你可以在一系列端口上配置端口安全。下面举一个例子:
Switch)# config t
Switch(config)# int range fastEthernet 0/1 - 24
Switch(config-if)# switchport port-security
如果在一个UPLINK端口上输入此命令,用户必须十分小心使用此选项,因为它指向不只一个设备,第二个设备一旦发送一个数据包,整个端口就会关闭,这样可就麻烦了。
一旦你配置了端口安全而此端口上的以太网设备又发出了数据,交换机会记录下MAC地址而且通过使用这个地址来保障端口安全。要查看交换机上端口安全状态,可以使用show port security address 和show port-security interface命令。举例说明如下:
Switch# show port-security address
Switch# show port-security interface fa0/18
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 1
Configured MAC Addresses : 0
Sticky MAC Addresses : 0
Last Source Address : 0004.00d5.285d
Security Violation Count : 0
Switch#
大家可以到思科网站上去进一步查找资料,采取措施来保障自己网络端口的安全。
责任编辑:小草