11-28-2018 02:42 AM - edited 03-08-2019 04:41 PM
Hello all!
Could anyone explain to me, why am I seeing different outputs from these two commands?
Let me show you an example:
SWITCH1#sh vlan br VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi0/2
SWITCH1#sh vlan id 1
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/23, Gi0/1, Gi0/2
Why I can see different ports assigned to VLAN?
Is there a way how to see everything using one command? We have multiple VLANs and I going one by one slows me down.
(think it has to do something with the trunk?)
Thank you very much!
11-28-2018 03:33 AM
See references below : apparently show vlan brief , insists to be brief in all it's wisdom...
M.
Ref : https://www.cisco.com/c/en/us/td/docs/ios/lanswitch/command/reference/lsw_book/lsw_s2.html
brief |
(Optional) Displays only a single line for each VLAN, naming the VLAN, status, and ports. |
11-28-2018 04:03 AM
Interesting.
I looked at a 2960 switch and noted the same. As you suggest, I think it does have something to do with trunk ports, where they don't show up in the "brief" query if they are allowing VLAN 1.
If you do "show interface status" it will identify all the ports in VLAN 1 and any ports that are trunking just say "trunk" for the VLAN. So it is possible the "show vlan brief" parses the interface status information.
I know this is not a definitive answer, but hopefully offers some sort of explanation.
Regards
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide