1.MAC地址与端口绑定,当发现主机的MAC地址与交换机上指定的MAC地址不同时 ,交换机相应的端口将down掉。当给端口指定MAC地址时,端口模式必须为access或者Trunk状况。

3550-1#conf t 
3550-1(config)#int f0/1 
3550-1(config-if)#switchport mode access //指定端口模式。 
3550-1(config-if)#switchport port-security mac-address 00-90-F5-10-79-C1 //配置MAC地址
3550-1(config-if)#switchport port-security maximum 1 //限制此端口答应通过的MAC地址数为1。 
3550-1(config-if)#switchport port-security violation shutdown //当发现与上述配置不符时,端口down掉

2.通过MAC地址来限制端口流量,此配置许可一TRUNK口最多通过100个MAC地址,超过100时,但来自新的主机的数据帧将丧失。

3550-1#conf t 
3550-1(config)#int f0/1 
3550-1(config-if)#switchport trunk encapsulation dot1q 
3550-1(config-if)#switchport mode trunk //配置端口模式为TRUNK。 
3550-1(config-if)#switchport port-security maximum 100 //答应此端口通过的最大MAC地址数目为100。 
3550-1(config-if)#switchport port-security violation protect //当主机MAC地址数目超过100时,交流机持续工作,但来自新的主机的数据帧将丧失。
上面的配置根据MAC地址来容许流量,下面的配置则是依据MAC地址来谢绝流量。

3.此配置在Catalyst交流机中只能对单播流量进行过滤,对于多播流量则无效。

3550-1#conf t 
3550-1(config)#mac-address-table static 00-90-F5-10-79-C1 vlan 2 drop //在相应的Vlan丢弃流量。 
3550-1#conf t 
3550-1(config)#mac-address-table static 00-90-F5-10-79-C1 vlan 2 int f0/1 //在相应的接口丢弃流量。

 

相关文章:

  • 2021-12-27
  • 2021-10-31
  • 2022-01-15
  • 2021-12-03
  • 2022-01-01
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2022-12-23
  • 2021-07-15
  • 2021-09-22
  • 2021-07-31
  • 2022-01-27
  • 2021-04-21
相关资源
相似解决方案