Binding VLAN IDs to Logical Interfaces
This topic describes how to configure logical interfaces to receive and forward VLAN-tagged frames:
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. You can configure these statements at the [edit interfaces interface-name unit logical-unit-number]
hierarchy level or at the [edit logical-systems logical-system-name interfaces interface-name unit logical-unit-number]
hierarchy level.
Scope of VLAN ID Matching | Type of VLAN Framing Supported on the Logical Interface | |
---|---|---|
Single-Tag Framing | Dual-Tag Framing | |
VLAN ID |
|
|
VLAN ID Range |
|
|
VLAN ID List |
|
|
The inner-list
option of the vlan-tags
statement does not support Tag Protocol ID (TPID) values.
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.
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.
To bind a list of VLAN IDs to a single-tag logical interface, include the
vlan-id-list
statement at the[edit interfaces ethernet-interface-name unit logical-unit-number]
hierarchy level or at the[edit logical-systems logical-system-name interfaces ethernet-interface-name unit logical-unit-number]
hierarchy level. 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.[edit interfaces ethernet-interface-name unit logical-unit-number] user@host# vlan-id-list [ vlan-id vlan-id–vlan-id ];
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 theflexible-vlan-tagging
statement instead.To bind a list of VLAN IDs to a dual-tag logical interface, include the
vlan-tags
statement at the[edit interfaces ethernet-interface-name unit logical-unit-number]
hierarchy level or at the[edit logical-systems logical-system-name interfaces ethernet-interface-name unit logical-unit-number]
hierarchy level. Use theinner-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.[edit interfaces ethernet-interface-name unit logical-unit-number] user@host# vlan-tags inner-list [vlan-id vlan-id–vlan-id ] outer <tpid>vlan-id;
Note:The
inner-list
option of thevlan-tags
statement does not support Tag Protocol ID (TPID) values.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 theflexible-vlan-tagging
statement instead.
The following sample configuration configures two different lists of VLAN IDs on two different logical ports.
[edit interfaces] ge-1/1/0 { vlan-tagging; # Only for single-tagging encapsulation flexible-ethernet-services; unit 10 { encapsulation vlan-ccc; vlan-id-list [20 30–40 45]; } } ge-1/1/1 { flexible-vlan-tagging; # Only for mixed tagging encapsulation flexible-ethernet-services; unit 10 { encapsulation vlan-ccc; vlan-id-list [1 10 20 30–40]; } unit 20 { encapsulation vlan-ccc; vlan-tags outer 200 inner-list [50–60 80 90–100]; } }
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.10
each bundle lists of VLAN IDs. The dual-tag logical interface
ge-1/1/1.20
bundles lists of inner VLAN IDs.
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.