华为S2300 查看端口VLAN划分通过命令 display port vlan,不需要使用display current-configration来查看全部当前配置情况。
Port Link Type PVID Trunk VLAN List
Ethernet0/0/1 access 6 -
Ethernet0/0/2 access 6 -
Ethernet0/0/3 access 8 -
Ethernet0/0/4 access 8 -
Ethernet0/0/5 access 8 -
Ethernet0/0/6 access 8 -
Ethernet0/0/7 access 8 -
Ethernet0/0/8 access 8 -
Ethernet0/0/9 access 8 -
Ethernet0/0/10 access 8 -
Ethernet0/0/11 access 8 -
Ethernet0/0/12 access 8 -
Ethernet0/0/13 access 8 -
Ethernet0/0/14 access 8 -
Ethernet0/0/15 access 8 -
Ethernet0/0/16 access 8 -
Ethernet0/0/17 access 8 -
Ethernet0/0/18 access 8 -
Ethernet0/0/19 access 8 -
Ethernet0/0/20 access 8 -
Ethernet0/0/21 access 8 -
Ethernet0/0/22 access 8 -
Ethernet0/0/23 trunk 1 1-4094
Ethernet0/0/24 trunk 1 1-4094
GigabitEthernet0/0/1 hybrid 1 -
GigabitEthernet0/0/2 hybrid 1 -
思科2960G查看VLAN在端口上的划分,可使用VLAN 查看命令show vlan brief:
---- -------------------------------- --------- -------------------------------
Gi0/48
Gi0/5, Gi0/6, Gi0/7, Gi0/8
Gi0/9, Gi0/10, Gi0/11, Gi0/12
Gi0/13, Gi0/14, Gi0/15, Gi0/16
Gi0/17, Gi0/18, Gi0/19, Gi0/20
Gi0/21, Gi0/22, Gi0/23, Gi0/24
Gi0/25, Gi0/26, Gi0/27, Gi0/28
Gi0/29, Gi0/30, Gi0/31, Gi0/32
---- -------------------------------- --------- -------------------------------
1005 trnet-default act/unsup
在 思科2960G上想查看某个VLAN的端口有哪几个,以VLAN 21为例,可使用命令show vlan id 21
---- -------------------------------- --------- -------------------------------
Gi0/5, Gi0/6, Gi0/7, Gi0/8
Gi0/9, Gi0/10, Gi0/11, Gi0/12
Gi0/13, Gi0/14, Gi0/15, Gi0/16
Gi0/17, Gi0/18, Gi0/19, Gi0/20
Gi0/21, Gi0/22, Gi0/23, Gi0/24
Gi0/25, Gi0/26, Gi0/27, Gi0/28
Gi0/29, Gi0/30, Gi0/31, Gi0/32
Gi0/33, Gi0/34, Gi0/35, Gi0/36
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
21 enet 100021 1500 - - - - - 0 0
------- --------- ----------------- ------------------------------------------
这里显示的端口也包括了干线口45和46,查看一下干线口。
Port Mode Encapsulation Status Native vlan
Port Vlans allowed on trunk
Port Vlans allowed and active in management domain
Gi0/45 1-13,15,17-22,80,104
Gi0/46 1-13,15,17-22,80,104
Port Vlans in spanning tree forwarding state and not pruned
Gi0/45 1-13,15,17-22,80,104
Gi0/46 1-13,15,17-22,80,104