# MPLS Shim Interfaces for Layer 2 Services over MPLS Overview

An MPLS shim interface is stacked on a layer 2 interface to do either of the following:

- Create a layer 2 circuit by cross-connecting the layer 2 interface to an LSP corresponding to the VC label.
- Create a local cross-connect by cross-connecting the layer 2 interface to another layer 2 interface.

You can create or remove MPLS shim interfaces with the mpls-relay or route interface commands. Shim interfaces are also created in or removed implicitly from a load-balancing group by the member interface command when you configure the group. Each MPLS shim interface exists in a particular virtual router.

Each MPLS shim interface points to a single MPLS next hop. When layer 2 frames arrive on the layer 2 interface below the MPLS shim interface, they are encapsulated in an MPLS packet and forwarded to that MPLS next hop. The details of the encapsulation are determined by the attributes of the shim interface.

The MPLS next hop to which the shim interface points is set by an MPLS signaling protocol, which adds a special entry with implicit null in label to the interface label-space MPLS forwarding table of the shim interface. For traffic arriving from the core, the MPLS signaling protocol adds a normal entry with a real in label to the platform label-space MPLS forwarding table whose next hop points to the MPLS shim interface.

You can configure the following attributes for each MPLS shim interface:

- The administrative state, enabled or disabled, configured with the mpls-relay disable command.
- The IP address of the remote PE router for the layer 2 circuit, configured with the mpls-relay command. The shim interface is cross-connected to an LSP corresponding to the VC label received from the specified remote PE router, or to another shim interface in the local cross-connects case. For local cross-connects the IP address is local to the PE router.
- The name of an RSVP-TE base tunnel to be used for the layer 2 circuit, configured with the route interface command.
- The group ID of the shim interface, configured using the group-id option of the mpls-relay and route interface commands. Even though you can configure the group ID, the JunosE Software does not currently use it.
- Whether the control word is used, configured with the control-word and no-control-word options of the mpls-relay and route interface commands. The layer 2 interface determines the default preference if this option is not configured. Some layer 2 interfaces require a control word; others do not support it.
- Whether sending nonzero sequence numbers in the control word is preferred, configured with the sequencing and no-sequencing options of the mpls-relay and route interface commands. The layer 2 interface determines the default preference if this option is not configured. Even when preferred, the sequence numbers might not be sent if the control word is not used due to configuration. You can only configure whether the numbers are sent. MPLS always accepts zero sequence numbers and checks the order of nonzero sequence numbers in received MPLS packets that are forwarded to an MPLS shim interface. Out-of-order packets are discarded.
- The number of the load-balancing group of which the shim interface is a member. This attribute is set to the current load-balancing group when the shim interface is implicitly created with the member interface command.

You can enable statistics collection for the MPLS shim interfaces.

#### Related Documentation

- For information about the creation or implicit removal of shim interfaces from a load-balancing group by the member interface command when you configure the group, see Understanding CE Load Balancing for Martini Layer 2 Transport
- For information about collecting statistics for the MPLS shim interfaces, see Monitoring Layer 2 Services over MPLS