【参考】switchport port-security aging端口地址老化配置
2013-05-08 16:44:15| 分类: 网络技术 | 标签: |举报 |字号大中小 订阅
在某些应用场景下,需要对交换机下联地址做控制,比如:控制下联接口主机数量。但如果下联主机的二层地址是变动的——今天来五个人,明天走了,后天又来五个,该怎么办?针对这种场景需要在交换机port-security 功能的基础上,启用“port-security aging ”功能。
其命令格式为:
switchport port-security aging {
static | time time | type {
absolute | inactivity}}
no switchport port-security aging {
static | time | type}
在实际环境中,做了如下配置:
interface FastEthernet0/28
switchport access vlan 123
switchport mode access
switchport port-security maximum 32
switchport port-security
switchport port-security aging time 60
switchport port-security violation restrict
switchport port-security mac-address sticky
switchport port-security aging type inactivity
switchport port-security aging static
switchport port-security mac-address sticky 0021.6b93.feca vlan access
switchport port-security mac-address sticky 0021.6bc6.fc78 vlan access
switchport port-security mac-address sticky 0023.4edb.2323 vlan access
switchport port-security mac-address sticky 0023.7666.4d77 vlan access
switchport port-security mac-address sticky 0026.c75d.764a vlan access
spanning-tree portfast
spanning-tree bpduguard enable
但是发现,sticky学到的这几个地址,始终在 F0/28的配置里。也就是说并没有按照原先以为的“老化”(aging)掉!那是因为 “switchport port-security aging … ”命令没有生效嘛?
下面就这个问题展开讨论——
看起来简单,但在具体应用时还是有两个需要注意的地方。
1):“ switchport port-security aging static”