Show Port with VLAN name instead of # of VLANs

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • Answered
I have EXOS 21.1.  I would like to know if there is any way to get the output of show port to show all of the VLAN names instead of the number of VLANs on a port?  If there is a single VLAN, it shows the name, but just knowing the number of VLANs assigned to a port doesn't really do me any good.


Port  Display              VLAN Name          Port  Link  Speed  Duplex
#     String               (or # VLANs)       State State Actual Actual
=======================================================================
1:1                        (0002)              E     A     1000  FULL
1:2                        (0002)              E     R
1:3                        (0002)              E     R
1:4                        (0002)              E     R
Photo of Terren Crider

Terren Crider

  • 1,448 Points 1k badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Patrick Voss

Patrick Voss, Employee

  • 11,484 Points 10k badge 2x thumb
Hello Terren,

Unfortunately if there is more than one it will show the number of VLANs. You can utilize the below commands to see what vlans the port is added to:

"show port <port#> info detail"
"show vlan port <port#>"

Hope this helps!
Photo of Terren Crider

Terren Crider

  • 1,448 Points 1k badge 2x thumb
I can piece together this information with multiple commands. But it would be highly valuable to me to be able to see it all at a glance by port.  The reason being that I'm trying to survey all of the ports very quickly for any inconsistencies.
Photo of Patrick Voss

Patrick Voss, Employee

  • 11,484 Points 10k badge 2x thumb
Hello Terren,

The command Evan provided you is a newer command. Can you provide with the exact version you have?
Photo of Terren Crider

Terren Crider

  • 1,448 Points 1k badge 2x thumb
ExtremeXOS version 21.1.1.4 21.1.1.4-patch1-5
Photo of Evan Kuckelheim

Evan Kuckelheim

  • 658 Points 500 badge 2x thumb
Like this

* X-460G2-Testing.3 # show ports 1-4 vlan
         Untagged
Port     /Tagged   VLAN Name(s)
-------- --------  ------------------------------------------------------------
1        Untagged  None
         Tagged    KLS_VOICE, NAC
2        Untagged  KMS_WIRED
         Tagged    NAC
3        Untagged  EXTREME_WIRELESS_MANAGEMENT
         Tagged    NAC
4        Untagged  KMS_WIRED
         Tagged    NAC
* X-460G2-Testing.4 #
(Edited)
Photo of Terren Crider

Terren Crider

  • 1,394 Points 1k badge 2x thumb
The "show ports 1-4 vlan" command does not work.  It needs to be followed by "statistics".  And that doesn't show me anything.
Photo of Evan Kuckelheim

Evan Kuckelheim

  • 658 Points 500 badge 2x thumb
Hmm odd must be a new command on v22.
I'm running  22.2.1.5 patch1-4
Photo of Nick Yakimenko

Nick Yakimenko

  • 2,404 Points 2k badge 2x thumb
you may see what vlans are applied to a specific port
use "show vlan ports <port number>
Photo of Terren Crider

Terren Crider

  • 1,436 Points 1k badge 2x thumb
This one doesn't show me which ports exactly.  Only that x number of ports are in each VLAN.
Photo of Patrick Voss

Patrick Voss, Employee

  • 11,434 Points 10k badge 2x thumb
If you do "show vlan port 1" it will only display the VLANs added to port 1.
Photo of Terren Crider

Terren Crider

  • 1,436 Points 1k badge 2x thumb
The only issue is that I need to see all of them.  Doing this one by one is very tedious and not really feasible when dealing with more than a couple of switches.
Photo of Drew C.

Drew C., Community Manager

  • 37,378 Points 20k badge 2x thumb
Hello Terren,
Take a look at this thread: https://community.extremenetworks.com/extreme/topics/xos_show_vlan_portinfo
You can find the script here: https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/show_port_vid

I believe the script is included in the version of EXOS you're running. If not, it's easy to get it copied to the switch. We can help you with that if needed.
Photo of Patrick Voss

Patrick Voss, Employee

  • 11,484 Points 10k badge 2x thumb
The "show port vlan" command appears to be available in 21.1.2.14 patch 1-2. This was added as part of a feature request. I would recommend upgrading to 21.1.3.7 patch 1-7 and utilizing the "show port vlan" and "show port vid" command to see the output below:

* X460G2-48p-10G4.5 # show port 1-4 vid
         Untagged
Port     /Tagged   VID(s)
-------- --------  ------------------------------------------------------------
1        Untagged  1
         Tagged    2
2        Untagged  1
         Tagged    2
3        Untagged  1
         Tagged    2
4        Untagged  1
         Tagged    2
* X460G2-48p-10G4.6 # show port 1-4 vlan
         Untagged
Port     /Tagged   VLAN Name(s)
-------- --------  ------------------------------------------------------------
1        Untagged  Default
         Tagged    VLAN_0002
2        Untagged  Default
         Tagged    VLAN_0002
3        Untagged  Default
         Tagged    VLAN_0002
4        Untagged  Default
         Tagged    VLAN_0002
* X460G2-48p-10G4.7 #
Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 12,782 Points 10k badge 2x thumb
Another way to get the information is to use
show ports [<PORTSTRING>] information detail | include "(^Port|(Internal|802.1Q) Tag)"
You have to either remove [<PORTSTRING>] or replace [<PORTSTRING>] with the list of ports you want to get info for, e.g.:
show ports information detail | include "(^Port|(Internal|802.1Q) Tag)"
show ports 3-7,9 information detail | include "(^Port|(Internal|802.1Q) Tag)"
Photo of modris bernands

modris bernands

  • 610 Points 500 badge 2x thumb
I have old version (12.6.2.10), but i can run following:
show vlan detail | include Tag
Output include vlan TAG and Tagged ports

    Admin State:    Enabled     Tagging:    802.1Q Tag 14 
           Tag:   *37(UzAmbSwitch4),*46(UzSwitch3),    *2g
                  (x) VMAN Tag Translated port
    Admin State:    Enabled     Tagging:    802.1Q Tag 15
           Tag:   *37(UzAmbSwitch4),*46(UzSwitch3),    *2g
                  (x) VMAN Tag Translated port
(Edited)
Photo of modris bernands

modris bernands

  • 610 Points 500 badge 2x thumb
If need see both Tag and Untag ports for each vlan, then

show vlan detail | include g:
Output is little bit more,

Admin State:	Enabled 	Tagging:	802.1Q Tag 14 
IPv4 Forwarding: Disabled
IPv6 Forwarding: Disabled
Tag: *37(UzAmbSwitch4),*46(UzSwitch3), *2g
Admin State: Enabled Tagging: 802.1Q Tag 15
IPv4 Forwarding: Disabled
IPv6 Forwarding: Disabled
Untag: *18(ekonomisti)
Tag: *37(UzAmbSwitch4),*46(UzSwitch3), *2g
(Edited)
Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 12,782 Points 10k badge 2x thumb
Can you test the following command on EXOS 12.6?
show vlan detail | include "^VLAN|((Ports|[Tt]ag(ging)?):)"
This works on EXOS 15.3 and produces useful VLAN info. :-)

Erik
Photo of Thomas Hucke

Thomas Hucke

  • 222 Points 100 badge 2x thumb
Erik. I find your very command very helpful, but it doesn't show all port numbers of a VLAN . For instances, it says that one VLAN is on 19 (tagged) ports but reports only 7 tagged port numbers. Another VLAN is on 16 (untagged )ports, but the command shows only 5 ports with numbers. It seems that the command output line shows only the the first line of port numbers (of the "show vlan detail" command) but not the following lines.
Cheers.
(Edited)
Photo of modris bernands

modris bernands

  • 610 Points 500 badge 2x thumb
@Erik - that's smart way. Nice example, how brains can help ;-)
and Yes it is working on 12.6 too.
(Edited)