(config-if)# switchport port-secruity violation shutdown
//配置安全违例的处理方式为shutdown,可选为protect (当安全地址数满后,将未知名地址丢弃)、restrict(当违例时,发送一个Trap通知)、shutdown(当违例时将端口关闭,并发送Trap通知,可在全局模式下用errdisable recovery来恢复)
(2)IP和MAC地址绑定
(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx ip-address 172.16.1.1
//接口配置模式下配置MAC地址xxxx.xxxx.xxxx和IP172.16.1.1进行绑定(MAC地址注意用小写)
08 三层路由功能(针对三层交换机)
(config)# ip routing //开启三层交换机的路由功能
(config)# interface fastethernet 0/1
(config-if)# no switchport //开启端口的三层路由功能(这样就可以为某一端口配置IP)
(config-if)# ip address 192.168.1.1 255.255.255.0
(config-if)# no shutdown
09 三层交换机路由协议
(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1 //配置静态路由
注:172.16.1.0 255.255.255.0 //为目标网络的网络号及子网掩码
172.16.2.1 为下一跳的地址,也可用接口表示,如ip route 172.16.1.0 255.255.255.0 serial 1/2(172.16.2.0所接的端口)