Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

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.

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-idvlan-id;

vlan-tags outer tpid.vlan-id inner-range tpid.vlan-idvlan-id;

VLAN ID List

vlan-id-list [vlan-idvlan-idvlan-id];

vlan-tags outer <tpid.>vlan-id inner-list [vlan-idvlan-idvlan-id];

Note:

The inner-list option of the vlan-tags statement does not support Tag Protocol ID (TPID) values.

  1. 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. To bind a VLAN ID to a single-tag logical interface, include the vlan-id statement 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.

    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.

  2. To bind a VLAN ID 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:

    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.

  3. 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. To bind a range of VLAN IDs to a single-tag logical interface, include the vlan-id-range 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.
  4. 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 [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.

    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.

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.

  1. 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.

    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.

  2. 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 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.

    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.

The following sample configuration 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.10 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.