表4-3 VLAN显示和调试
操作
命令
显示VLAN相关信息
display vlan [ vlan-id ]
命令中的参数含义如下:
vlan-id:指定要显示的VLAN ID,取值范围为1~4095。
如果指定vlan-id,则显示指定VLAN的信息;如果不指定,将显示已创建的所有VLAN的信息。
例:显示VLAN1的信息。(本例针对HGMP没有启动的情况)
<Quidway> display vlan 1
Vlan ID: 1
Type: static
Ports:
Ethernet 0/1 Ethernet 0/2 Ethernet 0/3 Ethernet 0/4
Ethernet 0/5 Ethernet 0/6 Ethernet 0/7 Ethernet 0/8
Ethernet 0/9 Ethernet 0/10 Ethernet 0/11 Ethernet 0/12
Ethernet 0/13 Ethernet 0/14 Ethernet 0/15 Ethernet 0/16
Ethernet 0/17
以上结果显示VLAN 1中包括Ethernet0/1~Ethernet0/17的端口。
4.4 VLAN配置举例
1. 组网需求
现有VLAN2、VLAN3,通过配置将端口Ethernet0/1和Ethernet0/2包含到VLAN2中,将端口Ethernet0/3和Ethernet0/4包含到VLAN3中。