计算机的mac被交换机绑定,交换机MAC地址绑定
需求:
1.要求交換機實現mac地址綁定,一個端口對應一個MAC地址,非法pc機連接不上,但是此端口并不斷開,只能此MAC——pc機能連上
2.一個端口綁定多MAC地址
需求1
>en
#config terminal
(config)#errdisable recovery cause psecure-violation
(config)#errdisable recovery interval 60
(config)#interface GigabitEthernet0/6
(config-if)#switchport mode access
(config-if)#switchport port-secruity
(config-if)#switchport port-secruity maximum 1
(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx
(config-if)#switchport port-security violation shutdown
cisco交換機默認都是動態安全端口secureDynamic,所以開啟粘滯安全端口實現mac綁定,省去了靜態端口配置
switchport port-security mac-address sticky
出現違例時間時的懲罰措施
switchport port-security violation 模式
模式分為三種 :
protect:僅丟棄非法的數據幀
restrict:丟棄非法的數據幀,同時產生一個syslog消息
shutdown:將端口設置成err-disable,接口不可用,同時產生一個syslog消息
switchport port-security violation shutdown 這種情況下,由于被懲罰進入了err-disable,需要手動開啟端口,有兩種方法開啟:
1.使用全局配置命令:err-disable recovery psecure-violation
2.手工將特定的端口shutdown再noshutdown
需求2
#config terminal
(config)#interface GigabitEthernet0/6
(config-if)#switchport mode access
(config-if)#switchport port-secruity
(config-if)#switchport port-secruity maximum 1
(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx
(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx
(config-if)#switchport port-security violation restrict
總結
以上是生活随笔為你收集整理的计算机的mac被交换机绑定,交换机MAC地址绑定的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 常见开源协议图解
- 下一篇: 浅析云桌面可视化与高性能分析平台的集成应