show vlans
Syntax
Release Information
Command introduced in Junos OS Release 9.0 for EX Series switches.
Description
Display information about VLANs configured on bridged Ethernet interfaces. For interfaces configured to support a voice over IP (VoIP) VLAN and a data VLAN, the show vlans command displays both tagged and untagged membership for those VLANs.
![]() | Note: When a series of VLANs is created with the vlan-range statement, such VLAN names are prefixed and suffixed with a double underscore. For example, a series of VLANs using the VLAN range 1–3 and the base VLAN name marketing are displayed as __marketing_1__, __marketing_2__, and __marketing_3__. |
![]() | Note: To display an 802.1X supplicant successfully authenticated in multiple-supplicant mode with dynamic VLAN movement, use the show vlans vlan-name extensive operational mode command, where vlan-name is the name of the dynamic VLAN. |
Options
none | — | Display information for all VLANs. VLAN information is displayed by VLAN name in ascending order. |
brief | detail | extensive | — | (Optional) Display the specified level of output. |
dot1q-tunneling | — | (Optional) Display VLANs with the Q-in-Q tunneling feature enabled. |
management-vlan | — | (Optional) Display management VLANs. |
sort-by (name | tag) | — | (Optional) Display VLANs in ascending order of VLAN IDs or VLAN names. |
summary | — | (Optional) Display the total number of VLANs and counts of VLANs by type—for example, the number of dynamic, 802.1Q-tagged, and Q-in-Q tunneled VLANs. |
vlan-name | — | (Optional) Display information for the specified VLAN. |
vlan-range-name | — | (Optional) Display information for the specified VLAN range. To display information for all members of the VLAN range, specify the base VLAN name—for example, employee for a VLAN range that includes __employee_1__ through __employee_10__. |
Required Privilege Level
view
List of Sample Output
show vlansshow vlans brief
show vlans detail
show vlans extensive (for a PVLAN spanning multiple switches)
show vlans extensive (MAC-based)
show vlans extensive (Port-based)
show vlans sort-by tag
show vlans sort-by name
show vlans employee (vlan-range-name)
show vlans summary
Output Fields
Table 1 lists the output fields for the show vlans command. Output fields are listed in the approximate order in which they appear.
Table 1: show vlans Output Fields
Field Name | Field Description | Level of Output |
|---|---|---|
Name | Name of a VLAN. | none, brief |
Tag | The 802.1Q tag applied to this VLAN. If none is displayed, no tag is applied. | All levels |
Interfaces | Interface associated with learned MAC addresses or all-members (flood entry). An asterisk (*) beside the interface indicates that the interface is UP. | All levels |
Address | The IP address. | none, brief |
Ports Active / Total | The number of interfaces associated with a VLAN. The Active column indicates interfaces that are UP, and the Total column indicates interfaces that are active and inactive. | brief |
VLAN | Name of a VLAN. | detail, extensive |
Admin state | Indicates whether the physical link is operational and can pass packets. | detail, extensive |
Dot1q Tunneling Status | Indicates whether Q-in-Q tunneling is enabled. | detail, extensive |
MAC learning Status | Indicates whether MAC learning is disabled. | detail, extensive |
Description | A description for the VLAN. | detail,extensive |
Primary IP | Primary IP address associated with a VLAN. | detail |
Number of interfaces | The number of interfaces associated with a VLAN. Both the total number of interfaces and the number of active interfaces associated with a VLAN are displayed. Also lists the following attributes of the interfaces:
| detail, extensive |
STP | The spanning tree associated with a VLAN. | detail, extensive |
RTG | The redundant trunk group associated with a VLAN. | detail, extensive |
Tagged interfaces | The tagged interfaces to which a VLAN is associated. | detail, extensive |
Untagged interfaces | The untagged interfaces to which a VLAN is associated. | detail. extensive |
Customer VLAN Ranges | Lists the customer VLAN (C-VLAN) ranges associated with this service VLAN (S-VLAN). | extensive |
Private VLAN Mode | The private VLAN mode (type of broadcast domain) for this VLAN. Values are Primary, Isolated, Inter-switch-isolated, and Community. | detail, extensive |
Primary VLAN | The primary VLAN tag for this secondary VLAN. | extensive |
Internal Index | VLAN index internal to Junos OS. | extensive |
Origin | The manner in which the VLAN was created. Values are static and learn. | extensive |
Protocol | Port-based VLAN or MAC-based VLAN. MAC-based protocol is displayed when VLAN assignment is done either statically or dynamically through 802.1X. | extensive |
Mac aging time | The MAC aging timer. | extensive |
IP addresses | IP address associated with a VLAN. | extensive |
Number of MAC entries | For MAC-based VLANs created either statically or dynamically, the MAC addresses associated with an interface. | extensive |
Secondary VLANs | The secondary VLANs associated with a primary VLAN. | extensive |
Isolated VLAN | The isolated VLANs associated with a primary VLAN. | extensive |
Inter-switch isolated VLAN | The inter-switch isolated VLAN associated with a primary VLAN. | extensive |
Community VLANs | The community VLANs associated with a primary VLAN. | extensive |
VLANs summary | VLAN counts:
| All levels |
Dot1q VLANs summary | 802.1Q VLAN counts:
| All levels |
Dot1q Tunneled VLANs summary | Q-in-Q-tunneled VLAN counts:
| All levels |
Dynamic VLANs | Counts of VLANs assigned or created dynamically by a protocol:
| All levels |
Sample Output
show vlans
user@switch> show vlans
Name Tag Interfaces
default None
ge-0/0/34.0, ge-0/0/33.0, ge-0/0/32.0, ge-0/0/31.0,
ge-0/0/30.0, ge-0/0/29.0, ge-0/0/28.0, ge-0/0/27.0,
ge-0/0/26.0, ge-0/0/25.0, ge-0/0/19.0, ge-0/0/18.0,
ge-0/0/17.0, ge-0/0/16.0, ge-0/0/15.0, ge-0/0/14.0,
ge-0/0/13.0, ge-0/0/11.0, ge-0/0/9.0, ge-0/0/8.0,
ge-0/0/3.0, ge-0/0/2.0, ge-0/0/1.0
v0001 1
ge-0/0/24.0, ge-0/0/23.0, ge-0/0/22.0, ge-0/0/21.0
v0002 2
None
v0003 3
None
v0004 4
None
v0005 5
Noneshow vlans brief
user@switch> show vlans brief
Ports Name Tag Address Active/Total default None 0/23 v0001 1 0/4 v0002 2 0/0 v0003 3 0/0 v0004 4 0/0 v0005 5 0/0 v0006 6 0/0 v0007 7 0/0 v0008 8 0/0 v0009 9 0/0 v0010 10 0/2 v0011 11 0/0 v0012 12 0/0 v0013 13 0/0 v0014 14 0/0 v0015 15 0/0 v0016 16 0/0
show vlans detail
user@switch> show vlans detail VLAN: default, Tag: Untagged, Admin state: Enabled Description: None Primary IP: None, Number of interfaces: 23 (Active = 0) STP: None, RTG: None Untagged interfaces: ge-0/0/34.0, ge-0/0/33.0, ge-0/0/32.0, ge-0/0/31.0, ge-0/0/30.0, ge-0/0/29.0, ge-0/0/28.0, ge-0/0/27.0, ge-0/0/26.0, ge-0/0/25.0, ge-0/0/19.0, ge-0/0/18.0, ge-0/0/17.0, ge-0/0/16.0, ge-0/0/15.0, ge-0/0/14.0, ge-0/0/13.0, ge-0/0/11.0, ge-0/0/9.0, ge-0/0/8.0, ge-0/0/3.0, ge-0/0/2.0, ge-0/0/1.0, Tagged interfaces: None VLAN: v0001, Tag: 802.1Q Tag 1, Admin state: Enabled Description: None Primary IP: None, Number of interfaces: 4 (Active = 0) Dot1q Tunneling Status: Enabled STP: None, RTG: None Untagged interfaces: None Tagged interfaces: ge-0/0/24.0, ge-0/0/23.0, ge-0/0/22.0, ge-0/0/21.0, VLAN: v0002, Tag: 802.1Q Tag 2, Admin state: Enabled Description: None Primary IP: None, Number of interfaces: 0 (Active = 0) STP: None, RTG: None Untagged interfaces: None Tagged interfaces: None VLAN: v0003, Tag: 802.1Q Tag 3, Admin state: Enabled Description: None Primary IP: None, Number of interfaces: 0 (Active = 0) STP: None, RTG: None Untagged interfaces: None Tagged interfaces: None VLAN: vlan4000, 802.1Q Tag: Untagged, Admin State: Enabled MAC learning Status: Disabled Number of interfaces: 0 (Active = 0)
show vlans extensive (for a PVLAN spanning multiple switches)
user@switch> show vlans extensive VLAN: COM1, Created at: Tue May 11 18:16:05 2010
802.1Q Tag: 100, Internal index: 3, Admin State: Enabled, Origin: Static
Private VLAN Mode: Community, Primary VLAN: primary
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 3 (Active = 3), Untagged 1 (Active = 1)
ge-0/0/20.0*, tagged, trunk
ge-0/0/22.0*, tagged, trunk, pvlan-trunk
ge-0/0/23.0*, tagged, trunk, pvlan-trunk
ge-0/0/7.0*, untagged, access
VLAN: __pvlan_primary_ge-0/0/0.0__, Created at: Tue May 11 18:16:05 2010
Internal index: 5, Admin State: Enabled, Origin: Static
Private VLAN Mode: Isolated, Primary VLAN: primary
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 3 (Active = 3), Untagged 1 (Active = 1)
ge-0/0/20.0*, tagged, trunk
ge-0/0/22.0*, tagged, trunk, pvlan-trunk
ge-0/0/23.0*, tagged, trunk, pvlan-trunk
ge-0/0/0.0*, untagged, access
VLAN: __pvlan_primary_ge-0/0/2.0__, Created at: Tue May 11 18:16:05 2010
Internal index: 6, Admin State: Enabled, Origin: Static
Private VLAN Mode: Isolated, Primary VLAN: primary
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 3 (Active = 3), Untagged 1 (Active = 0)
ge-0/0/20.0*, tagged, trunk
ge-0/0/22.0*, tagged, trunk, pvlan-trunk
ge-0/0/23.0*, tagged, trunk, pvlan-trunk
ge-0/0/2.0, untagged, access
VLAN: __pvlan_primary_isiv__, Created at: Tue May 11 18:16:05 2010
802.1Q Tag: 50, Internal index: 7, Admin State: Enabled, Origin: Static
Private VLAN Mode: Inter-switch-isolated, Primary VLAN: primary
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 3 (Active = 3), Untagged 0 (Active = 0)
ge-0/0/20.0*, tagged, trunk
ge-0/0/22.0*, tagged, trunk, pvlan-trunk
ge-0/0/23.0*, tagged, trunk, pvlan-trunk
VLAN: community2, Created at: Tue May 11 18:16:05 2010
802.1Q Tag: 20, Internal index: 8, Admin State: Enabled, Origin: Static
Private VLAN Mode: Community, Primary VLAN: primary
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 3 (Active = 3), Untagged 2 (Active = 2)
ge-0/0/20.0*, tagged, trunk
ge-0/0/22.0*, tagged, trunk, pvlan-trunk
ge-0/0/23.0*, tagged, trunk, pvlan-trunk
ge-0/0/1.0*, untagged, access
ge-1/0/6.0*, untagged, access
VLAN: primary, Created at: Tue May 11 18:16:05 2010
802.1Q Tag: 10, Internal index: 2, Admin State: Enabled, Origin: Static
Private VLAN Mode: Primary
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 3 (Active = 3), Untagged 5 (Active = 4)
ge-0/0/20.0*, tagged, trunk
ge-0/0/22.0*, tagged, trunk, pvlan-trunk
ge-0/0/23.0*, tagged, trunk, pvlan-trunk
ge-0/0/0.0*, untagged, access
ge-0/0/1.0*, untagged, access
ge-0/0/2.0, untagged, access
ge-0/0/7.0*, untagged, access
ge-1/0/6.0*, untagged, access
Secondary VLANs: Isolated 2, Community 2, Inter-switch-isolated 1
Isolated VLANs :
__pvlan_primary_ge-0/0/0.0__
__pvlan_primary_ge-0/0/2.0__
Community VLANs :
COM1
community2
Inter-switch-isolated VLAN :
__pvlan_primary_isiv__
show vlans extensive (MAC-based)
user@switch> show vlans extensive VLAN: default, Created at: Thu May 15 13:43:09 2008
Internal index: 3, Admin State: Enabled, Origin: Static
Protocol: Port Mode, Mac aging time: 300 seconds
Number of interfaces: Tagged 0 (Active = 0), Untagged 2 (Active = 2)
ge-0/0/0.0*, untagged, access
ge-0/0/14.0*, untagged, access
VLAN: vlan_dyn, Created at: Thu May 15 13:43:09 2008
Internal index: 4, Admin State: Enabled, Origin: Static
Protocol: Port Mode
Number of interfaces: Tagged 0 (Active = 0), Untagged 0 (Active = 0)
Protocol: MAC Based
Number of MAC entries: 6
ge-0/0/0.0*
00:00:00:00:00:02 (untagged)
00:00:00:00:00:03 (untagged)
00:00:00:00:00:04 (untagged)
00:00:00:00:00:05 (untagged)
00:00:00:00:00:06 (untagged)
00:00:00:00:00:07 (untagged)
show vlans extensive (Port-based)
user@switch> show vlans extensive VLAN: default, created at Mon Feb 4 12:13:47 2008
Tag: None, Internal index: 0, Admin state: Enabled, Origin: static
Description: None
Dot1q Tunneling Status: Enabled
Customer VLAN ranges:
1-4100
Private VLAN Mode: Primary
Protocol: Port based, Layer 3 interface: None
IP addresses: None
STP: None, RTG: None.
Number of interfaces: Tagged 0 (Active = 0), Untagged 23 (Active = 0)
ge-0/0/34.0 (untagged, access)
ge-0/0/33.0 (untagged, access)
ge-0/0/32.0 (untagged, access)
ge-0/0/31.0 (untagged, access)
ge-0/0/30.0 (untagged, access)
ge-0/0/29.0 (untagged, access)
ge-0/0/28.0 (untagged, access)
ge-0/0/27.0 (untagged, access)
ge-0/0/26.0 (untagged, access)
ge-0/0/25.0 (untagged, access)
ge-0/0/19.0 (untagged, access)
ge-0/0/18.0 (untagged, access)
ge-0/0/17.0 (untagged, access)
ge-0/0/16.0 (untagged, access)
ge-0/0/15.0 (untagged, access)
ge-0/0/14.0 (untagged, access)
ge-0/0/13.0 (untagged, access)
ge-0/0/11.0 (untagged, access)
ge-0/0/9.0 (untagged, access)
ge-0/0/8.0 (untagged, access)
ge-0/0/3.0 (untagged, access)
ge-0/0/2.0 (untagged, access)
ge-0/0/1.0 (untagged, access)
Secondary VLANs: Isolated 1, Community 1
Isolated VLANs :
__pvlan_pvlan_ge-0/0/3.0__
Community VLANs :
comm1
VLAN: v0001, created at Mon Feb 4 12:13:47 2008
Tag: 1, Internal index: 1, Admin state: Enabled, Origin: static
Description: None
Protocol: Port based, Layer 3 interface: None
IP addresses: None
STP: None, RTG: None.
Number of interfaces: Tagged 4 (Active = 0), Untagged 0 (Active = 0)
ge-0/0/24.0 (tagged, trunk)
ge-0/0/23.0 (tagged, trunk)
ge-0/0/22.0 (tagged, trunk)
ge-0/0/21.0 (tagged, trunk)
VLAN: v0002, created at Mon Feb 4 12:13:47 2008
Tag: 2, Internal index: 2, Admin state: Enabled, Origin: static
Description: None
Protocol: Port based, Layer 3 interface: None
IP addresses: None
STP: None, RTG: None.
Number of interfaces: Tagged 0 (Active = 0), Untagged 0 (Active = 0)
None
VLAN: v0003, created at Mon Feb 4 12:13:47 2008
Tag: 3, Internal index: 3, Admin state: Enabled, Origin: static
Description: None
Protocol: Port based, Layer 3 interface: None
IP addresses: None
STP: None, RTG: None.
Number of interfaces: Tagged 0 (Active = 0), Untagged 0 (Active = 0)
None
show vlans sort-by tag
user@switch> show vlans sort-by tag Name Tag Interfaces
default None
__vlan-x_1__ 1
None
__vlan-x_2__ 2
None
__vlan-x_3__ 3
None
__vlan-x_4__ 4
None
__vlan-x_5__ 5
None
__vlan-x_6__ 6
None
__vlan-x_7__ 7
None
__vlan-x_8__ 8
None
__vlan-x_9__ 9
None
__vlan-x_10__ 10
None
__vlan-x_11__ 11
None
__vlan-x_12__ 12
None
__vlan-x_13__ 13
None
__vlan-x_14__ 14
None
__vlan-x_15__ 15
None
__vlan-x_16__ 16
None
__vlan-x_17__ 17
None
__vlan-x_18__ 18
None
__vlan-x_19__ 19
None
__vlan-x_20__ 20
Noneshow vlans sort-by name
user@switch> show vlans sort-by name
Name Tag Interfaces
__employee_120__ 120
ge-0/0/22.0*
__employee_121__ 121
ge-0/0/22.0*
__employee_122__ 122
ge-0/0/22.0*
__employee_123__ 123
ge-0/0/22.0*
__employee_124__ 124
ge-0/0/22.0*
__employee_125__ 125
ge-0/0/22.0*
__employee_126__ 126
ge-0/0/22.0*
__employee_127__ 127
ge-0/0/22.0*
__employee_128__ 128
ge-0/0/22.0*
__employee_129__ 129
ge-0/0/22.0*
__employee_130__ 130
ge-0/0/22.0*show vlans employee (vlan-range-name)
user@switch> show vlans employee
Name Tag Interfaces
__employee_120__ 120
ge-0/0/22.0*
__employee_121__ 121
ge-0/0/22.0*
__employee_122__ 122
ge-0/0/22.0*
__employee_123__ 123
ge-0/0/22.0*
__employee_124__ 124
ge-0/0/22.0*
__employee_125__ 125
ge-0/0/22.0*
__employee_126__ 126
ge-0/0/22.0*
__employee_127__ 127
ge-0/0/22.0*
__employee_128__ 128
ge-0/0/22.0*
__employee_129__ 129
ge-0/0/22.0*
__employee_130__ 130
ge-0/0/22.0*show vlans summary
user@switch> show vlans summaryVLANs summary:
Total: 8, Configured VLANs: 5
Internal VLANs: 1, Temporary VLANs: 0
Dot1q VLANs summary:
Total: 8, Tagged VLANs: 2, Untagged VLANs: 6
Private VLAN:
Primary VLANs: 2, Community VLANs: 2, Isolated VLANs: 3
Dot1q Tunneled VLANs summary:
Total: 0
Private VLAN:
Primary VLANs: 0, Community VLANs: 0, Isolated VLANs: 0
Dynamic VLANs:
Total: 2, Dot1x: 2, MVRP: 0


