交换机如何配置端口安全? |
您所在的位置:网站首页 › 设置端口安全 › 交换机如何配置端口安全? |
4. 验证配置 上述配置完成后,当学习到的MAC地址数达到1个后,用命令display port-security interface可以看到端口模式变为secure,再有新的MAC地址到达将触发入侵保护,可以用display命令显示端口安全配置情况,如下: [H3C]display port-security interface gigabitethernet 1/0/1 Global port security parameters: Port security : Enabled AutoLearn aging time : 30 min Disableport timeout : 30 s MAC move : Denied Authorization fail : Online NAS-ID profile : Not configured Dot1x-failure trap : Disabled Dot1x-logon trap : Disabled Dot1x-logoff trap : Disabled Intrusion trap : Disabled Address-learned trap : Disabled Mac-auth-failure trap : Disabled Mac-auth-logon trap : Disabled Mac-auth-logoff trap : Disabled OUI value list :
GigabitEthernet1/0/1 is link-up Port mode : secure NeedToKnow mode : Disabled Intrusion protection mode : DisablePortTemporarily Security MAC address attribute Learning mode : Sticky Aging type : Periodical Max secure MAC addresses : 1 Current secure MAC addresses : 1 Authorization : Permitted NAS-ID profile : Not configured 可以看到端口的最大安全MAC数为1,口模式为autoLearn,入侵保护动作为DisablePortTemporarily,入侵发生后端口禁用时间为30秒,学习到的MAC地址数可以用上述命令显示,如学习到1,那么存储的安全MAC地址数就为1 可以在端口视图下用display this命令查看学习到的MAC地址,如下: [H3C-GigabitEthernet1/0/1]dis this # interface GigabitEthernet1/0/1 port link-mode bridge combo enable copper port-security intrusion-mode disableport-temporarily port-security max-mac-count 1 port-security port-mode autolearn port-security mac-address security sticky 1435-83d6-0306 vlan 1 # 当学习到的MAC地址数达到1个后,可以通过下述命令看到端口安全将此端口关闭 display interface gigabitethernet 1/0/1 gigabitEthernet1/0/1 current state: DOWN ( Port Security Disabled ) IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 0023-8927-ad7d Description: GigabitEthernet1/0/1 Interface ...... 30秒后,端口状态恢复 [H3C-GigabitEthernet1/0/1] display interface gigabitethernet 1/0/1 GigabitEthernet1/0/1 current state: UP IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 000f-cb00-5558 Description: GigabitEthernet1/0/1 Interface ...... 此时,如通过命令undo port-security mac-address security手动删除几条安全MAC地址后,端口安全的状态重新恢复为autoLearn,可以继续学习MAC地址 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |