Chinaunix

标题: 交换机端口安全 [打印本页]

作者: zjyyljd    时间: 2009-02-09 17:31
标题: 交换机端口安全
端口IP或MAC地址的绑定:
interface fastethernet 0/1
switchport port-security
switchport port-security mac-address 00d0.f800.073c ip-address 192.168.1.100



protect 当安全地址个数满后,安全端口将丢弃未知名地址(不是该端口的安全地址中的任何一个)的包.

restrict 当违例产生时,将发送一个trap通知

shutdown 当违例产生时,将关闭端口并发送一个trap通知
当端口因违例关闭后,在全局模式下用errdisable recovery 将接口从错误状态中恢复过来



实例:
interface fastethernet 0/1              #进入0/1端口
switchport port-security                #开启端口安全功能,在设置其他内容时必须把安全功能开启
switchport port-security violation shutdown    #当端口违例时将端口关闭并发送一个trap通知.


验证查看:
show port-security


设置端口最大连接数:
interface fastethernet 0/1      #进入0/1端口   
switchport port-security        #开启端口安全
switchport port-security maximum 1          #设置端口最大连接数为1
switchport port-security violation protect  #设置端口违例时丢弃未知地址



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/91713/showart_1820885.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2