端口安全配置,限制MAC地址
[Huawei]int GigabitEthernet 0/0/1 [Huawei-GigabitEthernet0/0/1]port-security enable [Huawei-GigabitEthernet0/0/1]port-security ? aging-time Aging time MAC地址表老化時間 enable Enable port security 開啟端口安全 mac-address Mac address 綁定mac地址 max-mac-num Maximum mac address can learn MAC地址最大數 protect-action Action if beyond the limit 超過MAC最大數執行的操作 [Huawei-GigabitEthernet0/0/1]port-security [Huawei-GigabitEthernet0/0/1]port-security protect-action ? protect Discard packets 丟棄報文 restrict Discard packets and warning 丟棄報文並告警 shutdown Shutdown 關閉接口 [Huawei-GigabitEthernet0/0/1]port-security protect-action [Huawei]dis mac-address 查看所有Mac地址 MAC address table of slot 0: ------------------------------------------------------------------------------- MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID VSI/SI MAC-Tunnel ------------------------------------------------------------------------------- 5489-982a-3a23 1 - - GE0/0/1 security - ------------------------------------------------------------------------------- Total matching items on slot 0 displayed = 1 [Huawei] [Huawei]dis mac-address GigabitEthernet 0/0/1 查看指定接口下的Mac地址 MAC address table of slot 0: ------------------------------------------------------------------------------- MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID VSI/SI MAC-Tunnel ------------------------------------------------------------------------------- 5489-982a-3a23 1 - - GE0/0/1 security - ------------------------------------------------------------------------------- Total matching items on slot 0 displayed = 1 [Huawei]
讀書和健身總有一個在路上