diff --git "a/27\347\216\213\347\224\237\345\274\230/\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/27\347\216\213\347\224\237\345\274\230/\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 0000000000000000000000000000000000000000..2d5219eb829b524745defc177e825de442f1e440 --- /dev/null +++ "b/27\347\216\213\347\224\237\345\274\230/\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