API Guide
• interface port-channel number —(可选)显示端口通道信息,从 1 到 128。
• count —(可选)显示动态和静态 MAC 地址条目的数量。
• vlan vlan-id —(可选)仅显示指定 VLAN 的信息,从 1 到 4093。
查看 MAC 的地址表条目
OS10# show mac address-table
VlanId Mac Address Type Interface
1 00:00:15:c6:ca:49 dynamic ethernet1/1/21
1 00:00:20:2a:25:55 dynamic ethernet1/1/21
1 90:b1:1c:f4:aa:ce dynamic ethernet1/1/21
1 90:b1:1c:f4:aa:c6 dynamic ethernet1/1/21
10 34:17:eb:02:8c:33 static ethernet1/1/1
查看 MAC 地址表计数
OS10# show mac address-table count
MAC Entries for all vlans :
Dynamic Address Count : 4
Static Address (User-defined) Count : 1
Total MAC Addresses in Use: 5
Identifier GUID-6F7340F0-9919-4E78-9AF0-1CEAC7D04C91
Version 4
Status Translation approved
清除 MAC 地址表
您可以清除 MAC 地址表中维护的动态地址条目。
• 在 EXEC 模式下清除动态条目的 MAC 地址表。
clear mac address-table dynamic [[all] [address mac_addr] [vlan vlan-id] [interface
{ethernet type node/slot/port[:subport] | port-channel number}]
• all —(可选)清除所有动态条目。
• address mac_address —(可选)清除 MAC 地址条目。
• vlan vlan-id —(可选)从 VLAN 编号中清除 MAC 地址表条目,从 1 到 4093。
• ethernet node/slot/port[:subport] —(可选)清除以太网接口条目。
• port—channel number —(可选)清除端口通道号,从 1 到 128。
清除 MAC 地址表
OS10# clear mac address-table dynamic vlan 20 interface ethernet 1/2/20
Identifier
GUID-4656EB5A-295A-47FF-AAC6-BDC5E9DC9FDD
Version 3
Status Translation approved
MAC 命令
Identifier
GUID-AF9B3F75-1F62-4F96-86AC-A347E4F91A46
Version 5
Status Translation approved
clear mac address-table dynamic
从 MAC 地址表中清除 L2 动态地址条目。
语法
clear mac address-table dynamic {all | address mac_addr | vlan vlan-id |
interface {ethernet node/slot/port[:subport] | port-channel number}}
参数
• all —(可选)删除所有 MAC 地址表条目。
• address mac_addr —(可选)从地址表中删除已配置的 MAC 地址,格式为 nn:nn:nn:nn:nn:nn。
第 2 层 431