Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

vlan-id

Syntax

VLANs and Bridge Domain VLANs

For platforms without ELS:

For platforms without ELS and with ELS:

For ELS platforms only:

CAUTION:

When you want to change a traffic impacting option under a routing instance, use the following procedure.

  1. Deactivate the routing instance configuration.

  2. Change the traffic impacting option.

  3. Reactivate the updated routing instance configuration.

For example, follow this procedure if you need to change settings such as:

  • The vlan-id in an EVPN routing instance-- Changing the vlan-id on the fly, without first deactivating the associated EVPN routing instance would be catastrophic.

  • The service-type in a MAC-VRF routing instance-- When you change the service type of a running instance, the device might incorrectly change the VLAN ID if it is not deactivated prior to making the change.

802.1Q Tagging

VLAN ID to Rewrite

VLAN Tagging and Layer 3 Subinterfaces

Description

For VLANs, specify a VLAN identifier (VID) to include in the packets sent to and from the VLAN, or a VPLS routing instance.

Note:

When configuring a VLAN identifier for provider backbone bridge (PBB) routing instances, dual-tagged VIDs and the none option are not permitted.

For 10-Gigabit Ethernet and aggregated Ethernet interfaces only, bind an 802.1Q VLAN tag ID to a logical interface. Statement introduced in Junos OS Release 9.2 for EX Series switches.

Note:

The VLAN tag ID cannot be configured on logical interface unit 0. The logical unit number must be 1 or higher.

For 802.1Q tagging, configure an 802.1Q tag to apply to all traffic that originates on the VLAN.

The number zero is reserved for priority tagging and the number 4095 is also reserved.

For VLAN ID to Rewrite Gigabit Ethernet IQ and 10-Gigabit Ethernet IQ2, 10-Gigabit Ethernet LAN/WAN PIC, and IQ2-E interfaces and aggregated Ethernet using Gigabit Ethernet IQ interfaces, specify the line VLAN identifiers to be rewritten at the input or output interface.

You cannot include the vlan-id statement with the swap statement, swap-push statement, push-push statement, or push-swap statement at the [edit interfaces interface-name unit logical-unit-number output-vlan-map] hierarchy level. If you include any of those statements in the output VLAN map, the VLAN ID in the outgoing frame is rewritten to the vlan-id statement that you include at the [edit interfaces interface-name unit logical-unit-number] hierarchy level.

Default

For 802.1Q Tagging on EX Series and SRX Series, If you use the default factory configuration, all traffic originating on the VLAN is untagged and has a VLAN identifier of 1.

On a EX2300 switch, the maximum number of vlans supported is 2024. The vlans can be in the range of 1-4093.

On a EX3400 switch, the maximum number of vlans that can be created is 4093 including the default vlan with id 1. In a single vlan-id-list default vlan1 is always inherited, so the valid configurable vlan range is 2-4093. You can use vlan-id up to and including 4094, but 4093 is the maximum number of vlans that can be configured.

For VLANs on a QFX3500 and QFX3500 switch, if you use the default factory configuration, all traffic originating on the VLAN is untagged and has a VLAN identifier of 1. The number zero is reserved for priority tagging and the number 4093 is also reserved.

On a QFX5100 switch, if you use the default factory configuration, all traffic originating on the VLAN is untagged and has a VLAN identifier of 1. The number zero is reserved for priority tagging and the number 4093 is also reserved.

Note:

You can only create up 4090 VLANs on a QFX5100 switch. If you create more than 4090 VLANs, the interfaces associated with the extra VLANs are not displayed in the show vlans command output. For example, if you create 4094 VLANs, the extra VLANs will not have interfaces associated with the VLANs. The order in which you configure the extra VLANs determines which interfaces are missing from the show vlans command output.

For VLAN tagging and Layer 3 subinterfaces, bind an 802.1Q VLAN tag ID to a logical interface.

Note:

The VLAN tag ID cannot be configured on logical interface unit 0. The logical unit number must be 1 or higher.

Options

For VLANs:

number—A valid VLAN identifier. If you configure multiple VLANs with a valid VLAN identifier, you must specify a unique VLAN identifier for each. However, you can use the same VLAN identifier for VLANs that belong to different virtual switches. Use this option to send single tagged frames with the specified VLAN identifier over VPLS VT interfaces.

Note:

If you specify a VLAN identifier, you cannot also use the all option. They are mutually exclusive.

all—Specify that the VLAN spans all the VLAN identifiers configured on the member logical interfaces.

Note:

You cannot specify the all option if you include a routing interface in the VLAN.

none—Specify to enable shared VLAN learning or to send untagged frames over VPLS VT interfaces.

Note:

Multichassis link aggregation (MC-LAG) does not support the none option with the vlan-id statement with VLANs.

For 802.1Q Tagging:

number—VLAN tag identifier

Range:

    • 1 through 4094 (all switches except EX8200 Virtual Chassis)

    • 1 through 4092 (EX8200 Virtual Chassis only)

  • Default: 1

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

interface—To view this statement in the configuration.

interface-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

Support for Layer 2 trunk ports added in Junos OS Release 9.2.

Support for SRX 5600, and SRX 5800 devices added in Junos OS Release 9.6.

Support for logical systems added in Junos OS Release 9.6.