show vlans

 

List of Syntax

Syntax (EX Series and QFX Series Switches)

Syntax (EX Series with ELS Switches and MX Routers)

Syntax (SRX Devices)

Syntax (EX Series and QFX Series Switches)

Syntax (EX Series with ELS Switches and MX Routers)

Syntax (SRX Devices)

Release Information

Command introduced in Junos OS Release 8.4.

Command introduced in Junos OS Release 9.0 for EX Series switches.

Command introduced in Junos OS Release 11.1 for the QFX Series.

Option dot1q-tunneling added in Junos OS Release 12.1 for the QFX Series.

Command introduced in Junos OS Release 12.3R2 for EX Series switches.

Option interface introduced in Junos OS Release 13.2X50-D10 (ELS).

Description

Display information about VLANs configured on bridged Ethernet interfaces. For interfaces configured to support a 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 using the vlan-range statement, such VLAN names are preceded and followed by a double underscore. For example, a series of VLANs using the VLAN range 1 through 3 and the base VLAN name marketing would be 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 dynamic VLAN.

Options

For EX Series and QFX Series switches:

noneDisplay 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 (tag | name)(Optional) Display VLANs in ascending order of VLAN IDs or VLAN names.
vlan-range-name(Optional) Display VLANs in ascending order of VLAN range 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-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__.

For EX Series with ELS Switches and MX Routers:

noneDisplay information for all VLANs.
brief | detail | extensive(Optional) Display the specified level of output.
instance instance-name(Optional) Display information for the specified routing instance.
logical-system logical-system-name(Optional) Display Ethernet-switching statistics information for the specified logical system.
operational(Optional) Display information for the operational routing instances.
vlan-name) (Optional) Display information about the specified VLAN.
interface interface-name(Optional) Display information about the specified interface.

For SRX devices:

noneDisplay information for all VLANs.
brief | detail | extensive(Optional) Display the specified level of output.
interface interface-name (Optional) Display information about a specific interface.
logical system(Optional) Display name of the logical system or all.
operational(Optional) Display information for the operational switching instances.

Required Privilege Level

view

List of Sample Output

show vlans (EX Series and QFX Series)

show vlans (Private VLANs on EX and QFX Series)

show vlans brief (EX and QFX Series)

show vlans detail (EX Series and QFX Series)

show vlans extensive (for a PVLAN spanning multiple switches)

show vlans extensive (Port-Based on EX Series and QFX Series)

show vlans extensive (MAC-based)

show vlans (Q-in-Q Tunneling on EX Series and QFX Series)

show vlans extensive (Q-in-Q Tunneling on EX Series and QFX Series)

show vlans extensive (Q-in-Q Tunneling and L2TP on EX Series and QFX Series)

show vlans sort-by tag (EX Series and QFX Series)

show vlans sort-by name (EX Series and QFX Series)

show vlans tag (EX Series and QFX Series)

show vlans sort-by tag (EX Series)

show vlans employee (vlan-range-name)

show vlans summary (EX Series)

show vlans brief (EX Series Switch)

show vlans brief (MX Routers)

show vlans detail (EX Series Switch)

show vlans detail (MX Routers)

show vlans extensive (EX Series Switch)

show vlans extensive (MX Routers)

show vlans (SRX devices)

show vlans brief (SRX devices)

show vlans detail (SRX devices)

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

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 option (flood entry). An asterisk (*) beside the interface indicates that the interface is UP.

All levels

Address

IP address.

none, brief

Ports Active /Total

Number of interfaces associated with a VLAN: Active indicates interfaces that are UP, and Total indicates interfaces that are active and inactive.

brief

VLAN

Name of a VLAN.

detail, extensive

Admin state

State of the interface. Values are:

enabled—The interface is turned on, and the physical link is operational and can pass packets.

detail,extensive

MAC learning Status

Indicates if MAC learning is disabled.

detail, extensive

Description

Description for the VLAN.

detail,extensive

Primary IP

Primary IP address associated with a VLAN.

detail

Number of interfaces

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.

detail, extensive

STP

Spanning tree associated with a VLAN.

detail,extensive

Tagged interfaces

Tagged interfaces with which a VLAN is associated.

detail,extensive

Untagged interfaces

Untagged interfaces with which a VLAN is associated.

detail. extensive

Dot1q Tunneling Status

Indicates if Q-in-Q tunneling is enabled.

extensive

Customer VLAN ranges

List of customer VLAN (C-VLAN) ranges associated with this service VLAN (S-VLAN).

extensive

Private VLAN Mode

The private VLAN mode for this VLAN. Values include Primary, Isolated, and Community.

extensive

Primary VLAN

Primary VLAN tag for this secondary VLAN.

extensive

Internal Index

VLAN index internal to Junos OS software.

extensive

Origin

Manner in which the VLAN was created: static or 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

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

Number of mapping rules

Number of mapping rules for Q-in-Q tunneling (Push) and VLAN translation (Swap).

Secondary VLANs

Secondary VLANs associated with a primary VLAN.

extensive

Isolated VLANs

Isolated VLANs associated with a primary VLAN.

extensive

Community VLANs

Community VLANs associated with a primary VLAN.

extensive

VLANs summary

VLAN counts:

  • Total—Total number of VLANs on the switch.

  • Configured VLANs—Number of VLANs that are based on user-configured settings.

  • Internal VLANs—Number of VLANs created by the system with no explicit configuration or protocol—for example, the default VLAN and the VLAN created when a trunk interface is not configured with native VLAN membership.

  • Temporary VLANs—Number of VLANs from the previous configuration that the system retains for a limited time after restart. Temporary VLANs are converted into one of the other types of VLAN, or are removed from the system if the current configuration does not require them.

All levels

Dot1q VLANs summary

802.1Q VLAN counts:

  • Total—Total number of 802.1Q-tagged and untagged VLANs on the switch.

  • Tagged VLANs—Number of 802.1Q-tagged VLANs.

  • Untagged VLANs—Number of untagged 802.1Q VLANs.

  • Private VLAN—Counts of the following kinds of 802.1Q private VLANs (PVLANs):

    • Primary VLANs—Number of primary forwarding private VLANs.

    • Community VLANs—Number of community transporting and forwarding private VLANs.

    • Isolated VLANs—Number of isolated receiving and forwarding private VLANs.

    • Inter–switch–isolated VLANs—Number of inter-switch isolated receiving and forwarding private VLANs.

All levels

Dot1q Tunneled VLANs summary

Q-in-Q-tunneled VLAN counts:

  • Total—Total number of Q-in-Q-tunneled VLANs on the switch.

  • Private VLAN—Counts of primary, community, and isolated Q-in-Q-tunneled private VLANs (PVLANs).

All levels

Sample Output (EX Series and QFX Series Switches)

show vlans (EX Series and QFX Series)

user@switch> show vlans

show vlans (Private VLANs on EX and QFX Series)

user@switch> show vlans

show vlans brief (EX and QFX Series)

user@switch> show vlans brief

show vlans detail (EX Series and QFX Series)

user@switch> show vlans detail

show vlans extensive (for a PVLAN spanning multiple switches)

user@switch> show vlans extensive

show vlans extensive (Port-Based on EX Series and QFX Series)

user@switch> show vlans extensive

show vlans extensive (MAC-based)

user@switch> show vlans extensive

show vlans (Q-in-Q Tunneling on EX Series and QFX Series)

user@switch> show vlans dot1q-tunneling

show vlans extensive (Q-in-Q Tunneling on EX Series and QFX Series)

user@switch> show vlans sv100 extensive

show vlans extensive (Q-in-Q Tunneling and L2TP on EX Series and QFX Series)

user@switch> show vlans v1 extensive

show vlans sort-by tag (EX Series and QFX Series)

user@switch> show vlans sort-by tag

show vlans sort-by name (EX Series and QFX Series)

user@switch> show vlans sort-by employee

show vlans tag (EX Series and QFX Series)

user@switch> show vlans employee

show vlans sort-by tag (EX Series)

user@switch> show vlans sort-by tag

show vlans employee (vlan-range-name)

user@switch> show vlans employee

show vlans summary (EX Series)

user@switch> show vlans summary

Sample Output: EX Series with ELS Switches and MX Routers

show vlans brief (EX Series Switch)

user@switch> show vlans brief

show vlans brief (MX Routers)

user@host> show vlans brief

show vlans detail (EX Series Switch)

user@switch> show vlans detail

show vlans detail (MX Routers)

user@host> show vlans detail

show vlans extensive (EX Series Switch)

user@switch> show vlans extensive

show vlans extensive (MX Routers)

user@host> show vlans extensive

Sample Output (SRX Devices)

show vlans (SRX devices)

user@host> show vlans

show vlans brief (SRX devices)

user@host> show vlans brief

show vlans detail (SRX devices)

user@host> show vlans detail