交换机端口安全配置实验(MAC动态绑定和静态绑定)

网友投稿 463 2022-09-28


交换机端口安全配置实验(MAC动态绑定和静态绑定)

Switch(config-if)#switchport port-security maximum 2

设置最大接入MAC地址数为2Switch(config-if)#switchport port-security mac-address sticky 自动获得接入设备的MAC Switch(config-if)#switchport port-security violation ? 违规处理方式protect Security violation protect mode 保护- 丢弃数据,不告警restrict Security violation restrict mode 抵制 –丢弃数据,发告警shutdown Security violation shutdown mode 关闭- 丢弃数据,发告警并关闭链路Switch(config-if)#switchport port-security violation protect 选择违规处理方式为保护Switch(config-if)#endSwitch#Switch#show port-security address 查看地址表Secure Mac Address Table

Vlan Mac Address Type Ports Remaining Age(mins)

1 0002.4AA6.D46D SecureSticky FastEthernet0/1 -1 0010.1108.D197 SecureSticky FastEthernet0/1 -

Total Addresses in System (excluding one mac per port) : 1Max Addresses limit in System (excluding one mac per port) : 1024

验证试验,两台先接入的主机可以访问PC3 ,第三台不能访问PC3 说明试验成功 。

验证安全端口的另外一种模式-静态绑定

Switch#conf tSwitch(config)#Switch(config)#interface f0/1Switch(config-if)#no switchport port-security mac-address sticky 删除动态绑定Switch(config-if)#do show port addSecure Mac Address Table

Vlan Mac Address Type Ports Remaining Age

1 0002.4AA6.D46D SecureSticky FastEthernet0/1 - 动态绑定的地址还在1 0010.1108.D197 SecureSticky FastEthernet0/1 -

Total Addresses in System (excluding one mac per port) : 1Max Addresses limit in System (excluding one mac per port) : 1024Switch(config-if)#endSwitch#clear port-security sticky 清除动态绑定地址Switch#show port-security address Secure Mac Address Table

Vlan Mac Address Type Ports Remaining Age(mins)

Total Addresses in System (excluding one mac per port) : 0Max Addresses limit in System (excluding one mac per port) : 1024

Switch#conf tSwitch(config)#interface f0/1Switch(config-if)#switchport port-security mac-address 00D0.FF76.14ED 手动绑定PC的MACSwitch(config-if)#switchport port-security mac-address 0010.1108.D197

PC的MAC地址需要你自己在pC 的命令提示符下获取,获取方法:ipconfig /all

验证试验,静态绑定的PC可以访问PC3 ,其他不可以访问PC3 ,证明试验成功 。


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:JDK1.8新特性之方法引用 ::和Optional详解
下一篇:NAT技术 ACL控制 让你为所欲为(什么是nat技术)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~