# Ethernet Raw Mode Encapsulation for Martini Layer 2 Transport Overview

An Ethernet pseudowire carries Ethernet/802.3 traffic over an MPLS network. JunosE Software enables Ethernet traffic to be transmitted over Martini circuits (cross-connect virtual circuits) on ES2 4G line modules (LMs), GE-2 LMs, GE/FE LMs, ES2 10G LMs, ES2 10G Uplink LMs, and ES2 10G ADV LMs. In previous releases, the transfer of Ethernet packets over MPLS-based pseudowire enabled service providers to provide point-to-point layer 2 Ethernet connectivity between geographically remote customer edge (CE) devices. This functionality enabled the following tasks to be performed on received packets:

- Removal of all V-LAN tags from layer 2 frames received from CE devices before transmitting that frame to the pseudowire
- Replacement of all V-LAN tags in layer 2 frames received from the pseudowire with the configured VLAN tags on the local interface before sending the frame to the CE device
- Insertion of the inner V-LAN tag while sending layer 2 frames received from the pseudowire to the CE device on a double-tagged interface

However, this mode of processing did not allow for:

- Identification of a particular VLAN tag in single-tagged or double-tagged packets as the service-delimiting tag
- Selective removal of only the service-delimiting tag when layer 2 frames were received from the CE devices to be sent to the pseudowire
- Selective insertion of only the service-delimiting tag when layer 2 frames were received from the pseudowire to be sent to the CE device

In this release, you can configure an S-VLAN subinterface to enable the provider edge (PE) device to strip the S-VLAN tag from all packets that enter the MPLS pseudowires or Martini circuits. This functionality is also referred to as operation of Martini circuits or MPLS shim interfaces in raw mode. An Ethernet pseudowire can operate in either tagged mode or raw mode.

- In tagged mode, each frame must contain at least one 802.1Q VLAN tag, and the tag value is processed based on a predefined rule or algorithm at the two pseudowire end points. This mode is not supported on E Series routers.
- In raw mode, if a frame contains an 802.1Q VLAN tag and the tag is not suitable to be processed at the two pseudowire end points, it passes transparently through them. The raw mode operation comprises the following tasks:
  - Identifying the outermost VLAN tag of the layer 2 frame received from the attachment circuit as a service-delimiting tag, stripping this tag, and then inserting the resulting frame into the pseudowire connection
  - Inserting the specified service-delimiting tag on the layer 2 frame received from the pseudowire connection and then transmitting the resulting frame to the attachment circuit

You can enable the raw mode configuration only for MPLS shim interfaces stacked on S-VLAN interfaces. Unified ISSU and high availablity are supported when the router is configured in either of these ways:

- To strip the S-VLAN tags from all packets that enter Martini circuits
- When raw mode encapsulation is configured on the VLAN interface stacked below the MPLS shim interface

When a pseudowire operates in raw mode, service-delimiting tags, if present in the frame received from the PE device, are stripped from the frame before being sent to the next processing point in the circuit. The Ethernet frame is encapsulated according to the algorithm defined for raw mode. If the local PE device detects a failure on the Ethernet input port, or if the port is disabled, the PE device sends an appropriate pseudowire status notification message to the remote PE device. In raw mode, all Ethernet frames received on the local PE device are transmitted to the remote PE device on a single pseudowire. The raw-mode attribute of the Martini circuit is sent to the forwarding controller (FC) on the supported line modules and the Label Distribution Protocol (LDP) is notified of the correct pseudowire type to be used in the signaling messages.

#### Related Documentation

- Examples: Ethernet Raw Mode Encapsulation for Martini Layer 2 Transport
- mpls-relay
- route interface