如何查看接口在瞻博网络 SRX 上被限制为哪些 MAC 的列表?

网络工程 路由器 瞻博网络 杜松-srx
2021-07-06 12:30:26

JUNOS 具有限制端口上 mac 地址数量或将端口锁定到特定 mac 地址的功能。我知道我可以将过滤器设置为:

user@switch# set interface all allowed-mac 00:05:85:3A:82:80
user@switch# set interface all allowed-mac 00:05:85:3A:82:81
user@switch# set interface all allowed-mac 00:05:85:3A:82:83

但是如何通过 show 命令列出这些?

2个回答

您可以使用 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

ctote,我之前没有限制 MAC,但您可以检查您的配置,如下所示:

show configuration | display set | match allowed-mac

这将显示所有配置行及其包含 allowed-mac 的完整节位置,在本例中将列出您配置的所有允许的 MAC。