From e131b771c2f325280282c9833266a377ff2ab4db Mon Sep 17 00:00:00 2001 From: zf <1563241475@qq.com> Date: Wed, 8 May 2024 16:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...57\345\217\243\350\201\232\345\220\210.md" | 0 ...50\347\232\204\351\205\215\347\275\256.md" | 39 +++++++++++++++++++ 2 files changed, 39 insertions(+) rename "14\345\274\240\350\212\254/2024-5-07-\347\224\237\346\210\220\346\240\221\345\215\217\350\256\256\345\222\214\347\253\257\345\217\243\350\201\232\345\220\210.md" => "14\345\274\240\350\212\254/2024.05.07-\347\224\237\346\210\220\346\240\221\345\215\217\350\256\256\345\222\214\347\253\257\345\217\243\350\201\232\345\220\210.md" (100%) create mode 100644 "14\345\274\240\350\212\254/2024.05.08\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250\347\232\204\351\205\215\347\275\256.md" diff --git "a/14\345\274\240\350\212\254/2024-5-07-\347\224\237\346\210\220\346\240\221\345\215\217\350\256\256\345\222\214\347\253\257\345\217\243\350\201\232\345\220\210.md" "b/14\345\274\240\350\212\254/2024.05.07-\347\224\237\346\210\220\346\240\221\345\215\217\350\256\256\345\222\214\347\253\257\345\217\243\350\201\232\345\220\210.md" similarity index 100% rename from "14\345\274\240\350\212\254/2024-5-07-\347\224\237\346\210\220\346\240\221\345\215\217\350\256\256\345\222\214\347\253\257\345\217\243\350\201\232\345\220\210.md" rename to "14\345\274\240\350\212\254/2024.05.07-\347\224\237\346\210\220\346\240\221\345\215\217\350\256\256\345\222\214\347\253\257\345\217\243\350\201\232\345\220\210.md" diff --git "a/14\345\274\240\350\212\254/2024.05.08\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250\347\232\204\351\205\215\347\275\256.md" "b/14\345\274\240\350\212\254/2024.05.08\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250\347\232\204\351\205\215\347\275\256.md" new file mode 100644 index 0000000..39d2f5a --- /dev/null +++ "b/14\345\274\240\350\212\254/2024.05.08\344\272\244\346\215\242\346\234\272\347\253\257\345\217\243\345\256\211\345\205\250\347\232\204\351\205\215\347\275\256.md" @@ -0,0 +1,39 @@ +# 交换机端口安全的配置 + +``` +1.选择要进行安全设置的端口 +Switch(config)#int f0/1 + +2.启用交换机接口的接口安全设置 +Switch(config-if)#switchport port-security + +3.改成访问模式access +Switch(config-if)#switchport mode access + +再次启用交换机接口的接口安全设置 +Switch(config-if)#switchport port-security + +启动安全设置后,还要做三件事,才能生效 + 1.设置最大允许连接的终端数量1 + Switch(config-if)#switchport port-security maximum 1 + + 2.设置超过最大连接数的违规设备的处理方式 + Switch(config-if)#switchport port-security violation shutdown + + 3.绑定正确的MAC地址 + Switch(config-if)#switchport port-security mac-address sticky + + +查看端口MAC地址绑定配置 +Switch#show mac-address-table + + +清楚交换机中的mac地址,重新开始记录 +Switch#clear port-security sticky +``` + + + +为了让交换机记录到第一次正确的MAC地址,需要ping一次 + +要重新启用被安全规则关闭的端口,先手动关闭一次,再手动开启 \ No newline at end of file -- Gitee