您可以使用 show ethernet switching table
。
以下内容来自配置 MAC 限制(瞻博网络官方文档)。
配置:
[edit ethernet-switching-options secure-access-port]
user@host# set interface all allowed-mac 00:05:85:3A:82:80
user@host# set interface all allowed-mac 00:05:85:3A:82:81
user@host# set interface all allowed-mac 00:05:85:3A:82:83
核实:
user@host> show ethernet-switching table
Ethernet-switching table: 7 entries, 6 learned
VLAN MAC address Type Age Interfaces
employee-vlan * Flood - ge-0/0/2.0
employee-vlan 00:05:85:3A:82:77 Learn 0 ge-0/0/1.0
employee-vlan 00:05:85:3A:82:79 Learn 0 ge-0/0/1.0
employee-vlan 00:05:85:3A:82:80 Learn 0 ge-0/0/2.0
employee-vlan 00:05:85:3A:82:81 Learn 0 ge-0/0/2.0
employee-vlan 00:05:85:3A:82:83 Learn 0 ge-0/0/2.0
employee-vlan 00:05:85:3A:82:85 Learn 0 ge-0/0/2.0
同样,由于您将 MAC 配置为允许在该 VLAN 中的任何接口上使用,如果您想知道哪个接口具有特定的 MAC 条目,您可以使用:
show ethernet switching table | match "$mac-address"
显然用适当的 MAC替换$mac-address。
如果要查看配置的 MAC 地址与每个接口实际学习(或未学习)的内容,则必须使用(如@ParlorTricks 所述):
show configuration | display set | match allowed-mac