Binding VLAN IDs to Logical Interfaces
The following sections describe how to configure logical interfaces to receive and forward VLAN-tagged frames:
Binding VLAN IDs to Logical Interfaces Overview
To configure a logical interface to receive and forward VLAN-tagged frames, you must bind a VLAN ID, a range of VLAN IDs, or a list of VLAN IDs to the logical interface. Table 1 lists the configuration statements you use to bind VLAN IDs to logical interfaces, organized by scope of the VLAN IDs used to match incoming packets:
Table 1: Configuration Statements Used to Bind VLAN IDs to Logical Interfaces
Scope of VLAN ID Matching | Type of VLAN Framing Supported on the Logical Interface | |
---|---|---|
Single-Tag Framing | Dual-Tag Framing | |
VLAN ID | vlan-id vlan-id; | vlan-tags outer tpid.<vlan-id> inner tpidvlan-id; |
VLAN ID Range | vlan-id-range vlan-id–vlan-id; | vlan-tags outer tpid.vlan-id inner-range tpid.vlan-id–vlan-id; |
VLAN ID List | vlan-id-list [vlan-id vlan-id–vlan-id]; | vlan-tags outer <tpid.>vlan-id inner-list [vlan-id vlan-id–vlan-id]; |
You can include all of the statements at the following hierarchy levels:
- [edit interfaces interface-name unit logical-unit-number]
- [edit logical-systems logical-system-name interfaces interface-name unit logical-unit-number]
![]() | Note: The inner-list option of the vlan-tags statement does not support Tag Protocol ID (TPID) values. |
Binding a VLAN ID to a Logical Interface
A logical interface that you have associated (bound) to a particular VLAN ID will receive and forward incoming frames that contain a matching VLAN ID.
Binding a VLAN ID to a Single-Tag Logical Interface
To bind a VLAN ID to a single-tag logical interface, include the vlan-id statement:
You can include the statement at the following hierarchy levels:
- [edit interfaces ethernet-interface-name unit logical-unit-number]
- [edit logical-systems logical-system-name interfaces ethernet-interface-name unit logical-unit-number]
To configure an Ethernet interface to support single-tag logical interfaces, include the vlan-tagging statement at the [edit interfaces ethernet-interface-name] hierarchy level. To support mixed tagging, include the flexible-vlan-tagging statement instead.
Binding a VLAN ID to a Dual-Tag Logical Interface
To bind a VLAN ID to a dual-tag logical interface, include the vlan-tags statement:
You can include the statement at the following hierarchy levels:
- [edit interfaces ethernet-interface-name unit logical-unit-number]
- [edit logical-systems logical-system-name interfaces ethernet-interface-name unit logical-unit-number]
To configure an Ethernet interface to support dual-tag logical interfaces, include the stacked-vlan-tagging statement at the [edit interfaces ethernet-interface-name] hierarchy level. To support mixed tagging, include the flexible-vlan-tagging statement instead.
Binding a Range of VLAN IDs to a Logical Interface
A VLAN range can be used by service providers to interconnect multiple VLANs belonging to a particular customer over multiple sites. Using a VLAN ID range conserves switch resources and simplifies configuration.
Binding a Range of VLAN IDs to a Single-Tag Logical Interface
To bind a range of VLAN IDs to a single-tag logical interface, include the vlan-id-range statement:
You can include the statement at the following hierarchy levels:
- [edit interfaces ethernet-interface-name unit logical-unit-number]
- [edit logical-systems logical-system-name interfaces ethernet-interface-name unit logical-unit-number]
To configure an Ethernet interface to support single-tag logical interfaces, include the vlan-tagging statement at the [edit interfaces ethernet-interface-name] hierarchy level. To support mixed tagging, include the flexible-vlan-tagging statement instead.
Binding a Range of VLAN IDs to a Dual-Tag Logical Interface
To bind a range of VLAN IDs to a dual-tag logical interface, include the vlan-tags statement. Use the inner–list option to specify the VLAN IDs as an inclusive range by separating the starting VLAN ID and ending VLAN ID with a hyphen.
You can include the statement at the following hierarchy levels:
- [edit interfaces ethernet-interface-name unit logical-unit-number]
- [edit logical-systems logical-system-name interfaces ethernet-interface-name unit logical-unit-number]
To configure an Ethernet interface to support dual-tag logical interfaces, include the stacked-vlan-tagging statement at the [edit interfaces ethernet-interface-name] hierarchy level. To support mixed tagging, include the flexible-vlan-tagging statement instead.
Example: Binding Ranges VLAN IDs to Logical Interfaces
The following example configures two different ranges of VLAN IDs on two different logical ports:
Binding a List of VLAN IDs to a Logical Interface
In Junos OS Release 9.5 and later, on MX Series routers and in Junos OS Release 12.2R2 and later on EX Series switches, you can bind a list of VLAN IDs to a single logical interface, eliminating the need to configure a separate logical interface for every VLAN or VLAN range. A logical interface that accepts packets tagged with any VLAN ID specified in a VLAN ID list is called a VLAN-bundled logical interface.
You can use VLAN-bundled logical interfaces to configure circuit cross-connects between Layer 2 VPN routing instances or Layer 2 circuits. Using VLAN-bundled logical interfaces simplifies configuration and reduces use of system resources such as logical interfaces, next hops, and circuits.
As an alternative to configuring multiple logical interfaces (one for each VLAN ID and one for each range of VLAN IDs), you can configure a single VLAN-bundled logical interface based on a list of VLAN IDs.
![]() | Note: The vlan-id option is not supported to achieve VLAN normalization on VPLS instances that are configured with vlan-id-list. However, you can use the vlan-maps option to achieve VLAN normalization. |
Binding a List of VLAN IDs to a Single-Tag Logical Interface
To bind a list of VLAN IDs to a single-tag logical interface, include the vlan-id-list statement. Specify the VLAN IDs in the list individually by using a space to separate each ID, as an inclusive list by separating the starting VLAN ID and ending VLAN ID with a hyphen, or as a combination of both.
You can include the statement at the following hierarchy levels:
- [edit interfaces ethernet-interface-name unit logical-unit-number]
- [edit logical-systems logical-system-name interfaces ethernet-interface-name unit logical-unit-number]
To configure an Ethernet interface to support single-tag logical interfaces, include the vlan-tagging statement at the [edit interfaces ethernet-interface-name] hierarchy level. To support mixed tagging, include the flexible-vlan-tagging statement instead.
Binding a List of VLAN IDs to a Dual-Tag Logical Interface
To bind a list of VLAN IDs to a dual-tag logical interface, include the vlan-tags statement. Use the inner-list option to specify the VLAN IDs individually by using a space to separate each ID, as an inclusive list by separating the starting VLAN ID and ending VLAN ID with a hyphen, or as a combination of both:
![]() | Note: The inner-list option of the vlan-tags statement does not support Tag Protocol ID (TPID) values. |
You can include the statement at the following hierarchy levels:
- [edit interfaces ethernet-interface-name unit logical-unit-number]
- [edit logical-systems logical-system-name interfaces ethernet-interface-name unit logical-unit-number]
To configure an Ethernet interface to support dual-tag logical interfaces, include the stacked-vlan-tagging statement at the [edit interfaces ethernet-interface-name] hierarchy level. To support mixed tagging, include the flexible-vlan-tagging statement instead.
Example: Binding Lists of VLAN IDs to Logical Interfaces
The following example configures two different lists of VLAN IDs on two different logical ports:
In the example configuration above, ge-1/1/0 supports single-tag logical interfaces, and ge-1/1/1 supports mixed tagging. The single-tag logical interfaces ge-1/1/0.10 and ge-1/1/1.20 each bundle lists of VLAN IDs. The dual-tag logical interface ge-1/1/1.20 bundles lists of inner VLAN IDs.
![]() | Tip: You can group a range of identical interfaces into an interface range and then apply a common configuration to that interface range. For example, in the above example configuration, both interfaces ge-1/1/0 and ge-1/1/1 have the same physical encapsulation type of flexible-ethernet-services. Thus you can define an interface range with the interfaces ge-1/1/0 and ge-1/1/1 as its members and apply the encapsulation type flexible-ethernet-services to that defined interface range. For more information about interface ranges, see Configuring Interface Ranges. |