show vlan
To display VLAN information, use the show vlan command in privileged EXEC mode.
show vlan [all | brief | id vlan-id | name name [ifindex] | ifindex]
Syntax Description
all |
(Optional) Displays all VLAN information. |
brief |
(Optional) Displays only a single line for each VLAN, naming the VLAN, status, and ports. |
id vlan-id |
(Optional) Displays information about a single VLAN that is identified by a VLAN ID number; valid values are from 1 to 4094. |
name name |
(Optional) Displays information about a single VLAN that is identified by VLAN name; valid values are an ASCII string fro m 1 to 32 char acters. |
ifindex |
(Optional) Displays the VLAN’s ifIndex number. |
Command Modes
Privileged EXEC (#)
Command History
Release |
Modification |
---|---|
12.2(14)SX |
Support for this command was introduced on the Supervisor Engine 720. |
12.2(17d)SXB |
Support for this command on the Supervisor Engine 2 was extended to Release 12.2(17d)SXB. |
12.2(33)SRA |
This command was integrated into Cisco IOS Release 12.2(33)SRA. |
Usage Guidelines
Each Ethernet switch port and Ethernet repeater group belong to only one VLAN. Trunk ports can be on multiple VLANs.
If you shut down a VLAN using the state suspend or the state active command, these values appear in the Status field:
-
suspended--VLAN is suspended.
-
active--VLAN is active.
If you shut down a VLAN using the shutdown command, these values appear in the Status field:
-
act/lshut--VLAN status is active but shut down locally.
-
sus/lshut--VLAN status is suspended but shut down locally.
This is an example of the output for a VLAN (VLAN0002) that is active but shut down locally:
Router# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa5/9
2 VLAN0002 act/lshut Fa5/9
<...Output truncated...>
If a VLAN is shut down internally, these values appear in the Status field:
-
act/ishut--VLAN status is active but shut down internally.
-
sus/ishut--VLAN status is suspended but shut down internally.
This is an example of the output for a VLAN (VLAN0002) that is active but shut down internally:
Router# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa5/9
2 VLAN0002 act/ishut Fa5/9
<...Output truncated...>
If a VLAN is shut down locally and internally, the value that is displayed in the Status field is act/ishut or sus/ishut. If a VLAN is shut down locally only, the value that is displayed in the Status field is act/lshut or sus/lshut.
Separate VLAN ranges with a hyphen, and separate VLANs with a comma and no spaces in between. For example, you can enter the following:
Router# show vlan id 1-4,3,7,5-20
When displaying a single VLAN both trunk and non-trunk ports are displayed. A non-trunk port is a port that is not configured as pm_port_mode_trunk. If an interface is configured as "switchport port mode trunk" it is displayed whether the link is up or down.
When displaying multiple VLANs only non-trunk ports are displayed.
Examples
This example shows how to display the VLAN parameters for all VLANs within the administrative domain:
Router# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa5/9
2 VLAN0002 active Fa5/9
3 VLAN0003 active Fa5/9
4 VLAN0004 active Fa5/9
5 VLAN0005 active Fa5/9
6 VLAN0006 active Fa5/9
<...Output truncated...>
1004 fddinet-default active Fa5/9
1005 trbrf-default active Fa5/9
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 303 0
4 enet 100004 1500 - - - - - 304 0
5 enet 100005 1500 - - - - - 305 0
6 enet 100006 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
<...Output truncated...>
Remote SPAN VLANs
-----------------
2, 20
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Router#
This example shows how to display the VLAN name, status, and associated ports only:
Router# show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa5/9
2 VLAN0002 active Fa5/9
3 VLAN0003
act/lshut
Fa5/9
4 VLAN0004
act/lshut
Fa5/9
5 VLAN0005 active Fa5/9
10 VLAN0010 active Fa5/9
.
.
.
999 VLAN0999 active Fa5/9
1002 fddi-default active Fa5/9
1003 trcrf-default active Fa5/9
1004 fddinet-default active Fa5/9
1005 trbrf-default active Fa5/9
Router#
This example shows how to display the VLAN parameters for multiple VLANs:
Router# show vlan id 1-4,3,7,5-20
VLAN Name Status Ports
---- -------------------------------- --------- ------------------------------
1 default active Fa5/7, Fa5/12
2 VLAN0002 active
3 VLAN0003 act/lshut
4 VLAN0004 act/lshut
5 VLAN0005 active
6 VLAN0006 active
10 VLAN0010 active
20 VLAN0020 active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 303 0
4 enet 100004 1500 - - - - - 304 0
5 enet 100005 1500 - - - - - 305 0
6 enet 100006 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Router#
This example shows how to display the ifIndex number for VLAN 10 only:
Router# show vlan id 10 ifindex
VLAN Ifindex
---- -------
10 37
Router#
The table below describes the fields that are shown in the example.
Field |
Description |
---|---|
VLAN |
VLAN number. |
Name |
Name, if configured, of the VLAN. |
Status |
Status of the VLAN (active or suspend, act/lshut or sus/lshut, or act/ishut or sus/ishut). |
Ports |
Ports that belong to the VLAN. |
Type |
Media type of the VLAN. |
SAID |
Security association ID value for the VLAN. |
MTU |
Maximum transmission unit size for the VLAN. |
Parent |
Parent VLAN, if one exists. |
RingNo |
Ring number for the VLAN, if applicable. |
BrdgNo |
Bridge number for the VLAN, if applicable. |
Stp |
Spanning Tree Protocol type that is used on the VLAN. |
BrdgMode |
Bridging mode for this VLAN--possible values are SRB and SRT; the default is SRB. |
AREHops |
Maximum number of hops for All-Routes Explorer frames--possible values are 1 through 13; the default is 7. |
STEHops |
Maximum number of hops for Spanning Tree Explorer frames--possible values are 1 through 13; the default is 7. |
Backup CRF |
Status of whether the TrCRF is a backup path for traffic. |
Ifindex |
Number of the ifIndex. |
Remote SPAN VLAN |
RSPAN status. |
Primary |
Number of the primary VLAN. |
Secondary |
Number of the secondary VLAN. |
Ports |
Indicates the ports within a VLAN. |
Type |
Type of VLAN--Possible values are primary, isolated, community, nonoperation, or normal. |