[导读]:想看一下8楼交换机所有端口的状态,因为有两台嘛,不确定是哪台,一台插得网口多,一台插得少。交换机是H3C的,以前在思科的交换机上有个很好用的命令:show ip in br ,H3...
想看一下8楼交换机所有端口的状态,因为有两台嘛,不确定是哪台,一台插得网口多,一台插得少。交换机是H3C的,以前在思科的交换机上有个很好用的命令:show ip in br ,H3C应该是 dis ip in br,发现不行,就只出现了VLAN信息,没有端口信息。
原来H3C下应该是 dis in br,但显示出来的也不对啊!后来发现是后面的“br”不对,这个应该补全为:brief,不然它是:Bridge-Aggregation,所以不对嘛!执行效果如下:
dis interface brief The brief information of interface(s) under route mode: Link: ADM – administratively down; Stby – standby Protocol: (s) – spoofing Interface Link Protocol Main IP Description M-GE0/0/0 DOWN DOWN – NULL0 UP UP(s) – Vlan1 DOWN DOWN – Vlan2000 UP UP 172.16.1.45 The brief information of interface(s) under bridge mode: Link: ADM – administratively down; Stby – standby Speed or Duplex: (a)/A – auto; H – half; F – full Type: A – access; T – trunk; H – hybrid Interface Link Speed Duplex Type PVID Description BAGG6 DOWN auto A T 1 GE1/0/1 DOWN auto A A 801 GE1/0/2 UP 1G(a) F(a) A 801 GE1/0/3 UP 1G(a) F(a) A 801 GE1/0/4 DOWN auto A A 801 GE1/0/5 UP 100M(a) F(a) A 801 GE1/0/6 UP 10M(a) F(a) A 801 GE1/0/7 DOWN auto A A 801 GE1/0/8 DOWN auto A A 801 GE1/0/9 DOWN auto A A 801 GE1/0/10 DOWN auto A A 801 GE1/0/11 DOWN auto A A 801 GE1/0/12 DOWN auto A A 801 GE1/0/13 DOWN auto A A 801 GE1/0/14 DOWN auto A A 801 GE1/0/15 UP 100M(a) F(a) A 801 GE1/0/16 UP 1G(a) F(a) A 801 GE1/0/17 UP 1G(a) F(a) A 801 GE1/0/18 DOWN auto A A 801 GE1/0/19 DOWN auto A A 801 GE1/0/20 DOWN auto A A 801
后来我发现还有个命令也可以查看所有的端口状态:dis port-security。显示如下:
dis port-security Equipment port-security is disabled Trap is disabled AutoLearn aging time is 0 minutes Disableport Timeout: 20s OUI value: GigabitEthernet1/0/1 is link-down GigabitEthernet1/0/2 is link-up GigabitEthernet1/0/3 is link-up GigabitEthernet1/0/4 is link-down GigabitEthernet1/0/5 is link-up GigabitEthernet1/0/6 is link-up GigabitEthernet1/0/7 is link-down GigabitEthernet1/0/8 is link-down GigabitEthernet1/0/9 is link-down GigabitEthernet1/0/10 is link-down GigabitEthernet1/0/11 is link-down GigabitEthernet1/0/12 is link-down GigabitEthernet1/0/13 is link-down GigabitEthernet1/0/14 is link-down GigabitEthernet1/0/15 is link-up GigabitEthernet1/0/16 is link-up GigabitEthernet1/0/17 is link-up GigabitEthernet1/0/18 is link-down GigabitEthernet1/0/19 is link-down GigabitEthernet1/0/20 is link-down
以下为网络转载:
大家都知道交换机的端口都是比较多,当你想查看某些端口状态(是处于UP还是DOWN状态)时,通常我们会使用以下命令:
思科:show interface X
H3C:display interface X
注:X表代端口号,如e1/0/1之类的。
但如果当交换机的端口非常多时,而且你想知道所有端口的状态时,你再一条一条命令输进去,那是相当累人的,同时输出的结果也过于详细,看得人眼花缭乱。
如何有效的查看所有端口的状态呢?我们可以使用以下命令:
思科:show ip interface brief
H3C:display interface brief
华为的交换机好像没有什么命令能实现这种功能。
本文来自投稿,不代表微盟圈立场,如若转载,请注明出处:https://www.vm7.com/a/jc/11036.html