Configuring Layer 2 Services over MPLS
Before you configure layer 2 services over MPLS, you must configure the layer 2 interfaces and MPLS. For details, consult the JUNOSe resources listed in References.
This section describes how to configure different types of layer 2 services over MPLS. Each procedure uses either the mpls-relay command or the route interface command to configure MPLS tunneling. For more information about the commands used in these procedures, see the command descriptions listed in alphabetical order at the end this section, starting on 336.
Configuring Frame Relay Layer 2 Services
To configure Frame Relay layer 2 services over MPLS:
- Configure the Frame Relay interface.
host1(config)#interface serial 4/1:1/1host1(config-if)#encapsulation frame-relay ietfhost1(config-if)#frame-relay intf-type dtehost1(config-if)#frame-relay lmi-type ansihost1(config-if)#interface serial 4/1:1/1.1host1(config-subif)#frame-relay interface-dlci 17 ietf- Specify MPLS tunneling by using the appropriate command.
host1(config-if)#mpls-relay 10.10.100.2 45host1(config-if)#route interface tunnel mpls:tunnel6 45For information about configuring a more complex Frame Relay over MPLS topology, see Frame Relay over MPLS Configuration Example.
Configuring Ethernet/VLAN Layer 2 Services
To configure Ethernet/VLAN layer 2 services over MPLS:
- Configure the Ethernet/VLAN interface.
host1(config)#interface fastEthernet 4/0host1(config-if)#encapsulation vlanhost1(config-if)#interface fastEthernet 4/0.3host1(confi-if)#vlan id 201- Specify MPLS tunneling by using the appropriate command.
host1(config-if)#mpls-relay 10.10.100.2 45host1(config-if)#route interface tunnel mpls:tunnel6 45Configuring S-VLAN Tunnels for Layer 2 Services
When you configure Ethernet or bridged Ethernet layer 2 services over MPLS, you can use the svlan id command with the any keyword to create a stacked VLAN (S-VLAN) tunnel that uses a single interface to tunnel traffic from multiple VLANs across an MPLS network. The S-VLAN tunnel enables multiple VLANs, each configured with a different VLAN ID tag and a common S-VLAN ID, to share a common VC label while traversing an MPLS network.
You can use the svlan id command with the any keyword only with the mpls-relay command or the route interface command to configure layer 2 services over MPLS.
For more information about S-VLANs, see JUNOSe Physical Layer Configuration Guide, Chapter 5, Configuring Ethernet Interfaces.
To configure S-VLAN tunnels for Ethernet/VLAN layer 2 services over MPLS:
- Configure the Ethernet/VLAN interface.
host1(config)#interface fastEthernet 8/1host1(config-if)#encapsulation vlanhost1(config-if)#interface fastEthernet 8/1.1- Create the S-VLAN tunnel and assign the S-VLAN Ethertype. For example, the following commands tunnel traffic from VLANs configured with an S-VLAN ID of 33 and any VLAN ID to the same destination across the MPLS network.
host1(config-if)#svlan id 33 anyhost1(config-if)#svlan ethertype 8100- Specify MPLS tunneling by using the appropriate command. For example:
host1(config-if)#route interface tunnel mpls:tunnel3 45orhost1(config-if)#mpls-relay 10.10.100.2 45- Repeat these steps, using unique values to configure the S-VLAN tunnel and MPLS on the remote PE router.
For complete instructions on configuring S-VLANs see JUNOSe Physical Layer Configuration Guide, Chapter 5, Configuring Ethernet Interfaces.
Configuring Local Cross-Connects Between Ethernet/VLAN Interfaces
This section provides an example for configuring a local cross-connect that uses MPLS between two Ethernet/VLAN interfaces.
NOTE: You must use the mpls-relay command instead of the route interface command to configure a local cross-connect, regardless of the MPLS tunneling method used in the core network.
Figure 30 shows the interface stack that the router builds for this configuration.
![]()
To configure the application shown in Figure 30:
You can use any reachable local IP address. This example uses a loopback interface to provide the local IP address.
host1(config)#interface loopback 0host1(config-if)#ip address 10.1.1.1 255.255.255.255host1(config-if)#exit
- Configure the Ethernet/VLAN interface on one side of the local cross-connect.
host1(config)#interface fastEthernet 9/1host1(config-if)#encapsulation vlanhost1(config-if)#exithost1(config)#interface fastEthernet 9/1.1host1(config-if)#vlan id 10- (Optional) If you are configuring a multiservice local cross-connect, assign an IP address and mask to the Ethernet/VLAN interface.
host1(config-if)#ip address 10.1.2.3 255.255.255.0- Configure MPLS tunneling on this side of the connection by issuing the mpls-relay command.
When you issue the mpls-relay command, you must use a reachable local IP address and the same VC ID value (4) on both sides of the connection.
host1(config-if)#mpls-relay 10.1.1.1 4host1(config-if)#exit
- Configure the Ethernet/VLAN interface on the other side of the local cross-connect.
host1(config)#interface fastEthernet 3/1host1(config-if)#encapsulation vlanhost1(config-if)#exithost1(config)#interface fastEthernet 3/1.1host1(config-if)#vlan id 11- (Optional) If you are configuring a multiservice local cross-connect, assign an IP address and mask to the Ethernet/VLAN interface.
host1(config-if)#ip address 10.1.2.4 255.255.255.0- Configure MPLS tunneling on this side of the connection by issuing the mpls-relay command.
You must use a reachable local IP address and the same VC ID value (4) specified in Step 4.
host1(config-if)#mpls-relay 10.1.1.1 4host1(config-if)#exitConfiguring Local ATM Cross-Connects with AAL5 Encapsulation
To create a local cross-connect between two ATM 1483 subinterfaces on the same router, you create a loopback interface, configure your ATM PVCs, and then create an MPLS relay connection from the PVCs to the loopback interface. You do not need to configure any other MPLS commands.
The following commands create an ATM cross-connect between two ATM subinterfaces on the same router.
- Create a loopback interface. All local cross-connects can share the same loopback interface.
host1(config)#interface loopback 0host1(config-if)#ip address 10.1.1.1 255.255.255.255host1(config)#exit- Create an ATM 1483 subinterface and ATM PVC with aal5all encapsulation on the ingress interface.
host1(config)#interface atm 2/0.1host1(config-subif)#atm pvc 1 0 100 aal5all- Create an MPLS relay connection to the loopback interface. Include the address of the loopback interface and a VC ID.
host1(config-subif)#mpls-relay 10.1.1.1 2host1(config-subif)#exit- Create an ATM 1483 subinterface and ATM PVC with aal5all encapsulation on the egress interface.
host1(config)#interface atm 2/0.2host1(config-subif)#atm pvc 2 0 101 aal5all- Create an MPLS relay connection to the loopback interface. The VC ID must be the same on both sides of the connection.
host1(config-subif)#mpls-relay 10.1.1.1 2host1(config-subif)#exit- (Optional) Display your configuration.
host1#show mpls cross-connects atmCate PeakInterface VPI VCI Interface VPI VCI VC-ID Encap gory Rate Status---------- --- --- ---------- --- --- ----- ----- ---- ---- --------ATM2/0.1 0 100 ATM2/0.2 0 101 2 AAL5 UBR 0 State UP1 local connection(s) foundConfiguring an MPLS Pseudowire with VCC Cell Relay Encapsulation
The following commands create an ATM layer 2 services over MPLS pseudowire connection between two ATM 1483 subinterfaces on different routers. This procedure uses the aal0 encapsulation keyword for each ATM PVC to indicate that the router receive raw ATM cells on these circuits and forward the cells without performing AAL5 packet reassembly. The procedure also includes optional steps for configuring nondefault values for the ATM Martini cell packing timers and cell concatenation parameters.
To create an MPLS pseudowire connection with VCC cell relay encapsulation:
- (Optional) Configure values for the three ATM Martini cell packing timers on the ingress router to define the cell collection time threshold.
host1(config)#atm mcpt-timers 1500 2500 3500- Configure a loopback interface.
host1(config)#interface loopback 0host1(config-if)#ip address 5.1.1.1 255.255.255.255host1(config)#exit- Create an ATM 1483 subinterface and ATM PVC with aal0 encapsulation on the ingress interface.
host1(config)#interface atm 2/0.100host1(config-subif)#atm pvc 100 0 100 aal0- (Optional) Configure the following cell concatenation parameters for the ATM 1483 subinterface:
- Maximum number of ATM cells that the router can concatenate in a single packet
- Identifier (1, 2, or 3) of the ATM Martini cell packing timer that you want to use to detect timeout of the cell collection threshold
host1(config-subif)#atm cell-packing 100 mcpt-timer 2
- Create an MPLS relay connection to the loopback interface on the egress router. The VC ID (1 in this example) must be the same on both sides of the connection.
host1(config-subif)#mpls-relay 6.1.1.1 1host1(config-subif)#exit- Repeat Steps 1 through 5 on the egress router, creating an MPLS relay connection to the loopback interface on the ingress router.
The values you configure for the ATM Martini cell packing timers and cell concatenation parameters need not be the same on the ingress and egress routers, although matching values are permitted. The virtual connection ID (VC ID) value in the mpls-relay command, however, must be the same on the ingress and egress routers.
host2(config)#atm mcpt-timers 1500 2500 3500host2(config)#interface loopback 0host2(config-if)#ip address 6.1.1.1 255.255.255.255host2(config)#exithost2(config)#interface atm 4/0.101host2(config-subif)#atm pvc 101 0 101 aal0host2(config-subif)#atm cell-packing 150 mcpt-timer 3host2(config-subif)#mpls-relay 5.1.1.1 1host2(config-subif)#exit
- (Optional) Use the appropriate show commands to verify your configuration.
host1#show atm mcpt-timersATM Martini cell aggregation timers:Timer1: 1500microsecondsTimer2: 2500microsecondsTimer3: 3500microsecondshost1#show atm subinterface atm 2/0.100Circuit InterfaceInterface ATM-Prot VCD VPI VCI Type Encap MTU Status Type--------- -------- --- --- --- ------- ----- ---- -------------- ---------ATM 2/0.100 ATM/MPLS 100 0 100 PVC AAL0 9180 lowerLayerDown StaticMaximum number of cells per packet: 100Cell aggregation timeout timer: 2SNMP trap link-status: disabledInPackets: 0InBytes: 0OutPackets: 0OutBytes: 0InErrors: 0OutErrors: 0InPacketDiscards: 0InPacketsUnknownProtocol: 0OutDiscards: 01 interface(s) foundhost2#show atm subinterface atm 4/0.101Circuit InterfaceInterface ATM-Prot VCD VPI VCI Type Encap MTU Status Type--------- -------- --- --- --- ------- ----- ---- -------------- ---------ATM 4/0.101 ATM/MPLS 101 0 101 PVC AAL0 9180 lowerLayerDown StaticMaximum number of cells per packet: 150Cell aggregation timeout timer: 3SNMP trap link-status: disabledInPackets: 0InBytes: 0OutPackets: 0OutBytes: 0InErrors: 0OutErrors: 0InPacketDiscards: 0InPacketsUnknownProtocol: 0OutDiscards: 01 interface(s) foundConfiguring HDLC Layer 2 Services
The following commands configure an HDLC layer 2 circuit over MPLS between an E-series router and a remote PE device.
To configure an HDLC layer 2 circuit over MPLS:
host1(config)#interface pos 4/0
- Use the mpls-relay or route interface command without the relay-format ppp keywords. This command causes the router to signal VC-type HDLC on the LDP session and use HDLC encapsulation. Use this command syntax if the traffic carried on the serial or POS interface is any kind of standard HDLC (including PPP) or Cisco HDLC.
host1(config-if)#mpls-relay 2.2.2.1 1host1(config-if)#route interface tunnel mpls:tunnel-to-pe2 1
- Use the mpls-relay or route interface command with the relay-format ppp keywords. This command causes the router to signal VC-type PPP on the LDP session and use PPP encapsulation instead of the default VC-type HDLC signaling and HDLC encapsulation. Use this command syntax if the traffic carried on the serial or POS interface contains actual PPP packets.
host1(config-if)#mpls-relay 2.2.2.1 1 relay-format ppphost1(config-if)#route interface tunnel mpls:tunnel-to-pe2 1 relay-format ppp
- (Optional) Attach an MPLS policy to the HDLC layer 2 circuit by using the mpls policy command.
host1(config-if)#mpls policy input hdlc-policyFor more information about attaching policies to MPLS layer 2 circuits, see JUNOSe Policy Management Configuration Guide, Chapter 1, Policy Management Overview.
The interfaces at either end of the HDLC layer 2 circuit can be different types and have different speeds. For example, you can configure an HDLC layer 2 circuit between a serial interface on a T1 circuit and a POS interface on an OC3 circuit.
Configuring Local Cross-Connects for HDLC Layer 2 Services
You can also configure an HDLC layer 2 circuit in a local cross-connect configuration between serial or POS interfaces within the same router.
The procedure is basically the same for configuring an HDLC layer 2 interface between two PE routers and for a local cross-connect, with the following differences for local cross-connects:
- You must use the mpls-relay command instead of the route interface command to configure a local cross-connect for HDLC layer 2 services.
- You use the IP address of the local router as the value for the destination IP address (remote address) in the mpls-relay command.
For more information, see Local Cross-Connects.
Configuration Commands
The following command entries describe how to use the commands for configuring layer 2 over MPLS.
atm cell-packing
- Use to configure cell concatenation parameters for an ATM 1483 subinterface that provides ATM layer 2 services over MPLS with VCC cell relay encapsulation.
- Specify both of the following parameters:
- Maximum number of ATM cells in the range 1-190 that the router can concatenate in a single packet; the default value is 1.
- Identifier (1, 2, or 3) of the ATM Martini cell packing timer that you want to use to detect timeout of the cell collection threshold; the default value is 1.
NOTE: See the atm mcpt-timers command for information about configuring systemwide values for the ATM Martini cell packing timers.
- When the timer expires. the router forwards the packet even if the number of concatenated ATM cells in the packet is fewer than the specified maximum number of cells per packet.
- Example
host1(config)#atm cell-packing 50 mcpt-timer 2Use the no version to restore the default cell concatenation parameters for the subinterface. atm mcpt-timers
- Use to configure systemwide values for the three ATM Martini cell packing timers on the router. The ATM Martini cell packing timers define the time threshold that the router uses to concatenate ATM cells in a single VCC cell relay-encapsulated packet and transmit the packet on an MPLS pseudowire.
- For each of the three timers, specify the number of microseconds in the range 100-4095. The default timer values are:
- When the timer expires, the router forwards the packet even if the number of concatenated ATM cells in the packet is fewer than the specified maximum number of cells per packet.
NOTE: See the atm cell-packing command for information about specifying the maximum number of concatenated cells per packet and identifying which of the ATM Martini cell packing timers you want to use to detect timeout of the cell collection threshold.
- Example
host1(config)#atm mcpt-timers 200 400 600Use the no version to restore the default values for all three timers. atm pvc
- Use to configure a PVC on an ATM interface.
- Specify the VCD, the VPI, the VCI, and the encapsulation type. (For more information about these parameters, see Creating a Basic Configuration in JUNOSe Link Layer Configuration Guide, Chapter 1, Configuring ATM.)
- Use the aal5all encapsulation keyword to cause the router to pass through all ATM AAL5 traffic without interpreting it. This keyword is required when you are configuring layer 2 services over MPLS (including local cross-connects) with AAL5 encapsulation.
- Use the aal0 encapsulation keyword to cause the router to receive raw ATM cells on this circuit and to forward the cells without performing AAL5 packet reassembly. This keyword is required when you are configuring ATM PVCs for layer 2 services over MPLS (including local cross-connects) with VCC cell relay encapsulation.
NOTE: Only the aal5all and aal0 encapsulation keywords are supported for use with ATM layer 2 services over MPLS.
- Example
host1(config-subif)#atm pvc 10 100 22 aal5allUse the no version to remove the specified PVC. mpls policy
- Use to assign a policy list to the ingress or egress of an MPLS layer 2 transport interface.
- You must specify the input or output keyword to assign the policy list to the ingress or egress of the interface.
- For more information, see the mpls policy command description in JUNOSe Policy Management Configuration Guide, Chapter 1, Policy Management Overview.
- Example
host1(config-if)#mpls policy input hdlc-policyUse the no version to remove the association between the policy list and the interface. mpls-relay
- Use to route layer 2 traffic to the specified router. Creates an MPLS layer 2 circuit by creating an MPLS shim interface on the layer 2 interface.
- The router can use any MPLS LSP to the remote destination address that you specify.
- The VC ID can be any 32-bit value; however, the VC ID on both ends of the connection across the MPLS core must match.
NOTE: The VLAN ID, DLCI, or ATM VPI/VCI are not related to the VC ID and can be different on each end of the connection.
- Optionally, you can use a group ID parameter to configure the layer 2 circuit to be in a group of virtual connections. The ID can be any 32-bit value. The JUNOSe software does not currently use the group ID.
- You must issue this command in the virtual router where the remote address can be reached; that is, in the virtual router providing core connections.
- Use the control-word or no-control keyword to indicate whether the local preference is to use the control word for the layer 2 packets encapsulated in MPLS packets sent to the remote PE router. The default preference is determined by the interface stack on which the MPLS interface is stacked.
- Use the sequencing keyword to indicate that the local preference is to include nonzero sequence numbers with the control word. Sequencing enables the remote PE to detect out-of-order packets. If no control word is sent in the packets, then the sequencing keyword has no effect, The router always accepts zero sequence numbers and checks the order of nonzero sequence numbers of MPLS packets received from the remote PE; any out of order packets are dropped, regardless of whether sequencing is configured.
- Use the no-sequencing keyword to indicate that the sequencing number in the control word is set to zero. This action instructs the remote PE router to not attempt to detect out-of-order packets. If no control word is sent in the packets, then the no-sequencing keyword has no effect,
- Use the relay-format ethernet keywords to cause the router to use Ethernet signaling and encapsulation, so that the VLAN interface appears as an Ethernet interface to the other side of the connection. The relay-format ethernet keywords enable a VLAN interface on one side of an MPLS tunnel to communicate with an Ethernet or bridged Ethernet interface on the other side of the tunnel. The VLAN tag is not included in the MPLS encapsulation. This option is available only on VLAN interfaces.
- Use the relay-format ppp keywords to cause the router to use VC-type PPP signaling and PPP encapsulation instead of the default VC-type HDLC signaling and HDLC encapsulation. This option is available only on serial and POS interfaces for an HDLC layer 2 circuit.
- Examples
host1(config-if)#mpls-relay 10.10.100.2 45host1(config-if)#mpls-relay 10.1.1.1 2 sequencinghost1(config-if)#mpls-relay 10.1.1.1 4 relay-format ethernethost1(config-if)#mpls-relay 10.1.1.2 2 relay-format pppUse the no version to negate this command. mpls-relay disable
- Use to administratively disable the MPLS shim interface. MPLS shim interfaces are administratively enabled by default.
- The MPLS shim interface must exist before you can issue this command.
- Example
host1(config-if)#mpls-relay 10.10.100.2 45Use the no version to restore the default condition, enabling the MPLS shim interface. route interface
- Use to route layer 2 traffic on a specific MPLS tunnel.
- The VC ID can be any 32-bit value; however, the VC ID on both ends of the connection across the MPLS core must match.
NOTE: The VLAN ID, DLCI, or ATM VPI/VCI are not related to the VC ID and can be different on each end of the connection.
- You must issue this command in the virtual router where the remote address can be reached; that is, in the virtual router providing core connections. You cannot enter the command in a VRF.
- See the entry for the mpls-relay command on 338 for information on using the control-word, no-control, sequencing, no-sequencing, relay-format ethernet, and relay-format ppp keywords.
- Examples
host1(config-if)#route interface tunnel tunnel3 45host1(config-if)#route interface tunnel tunnel3 45 relay-format ethernethost1(config-if)#route interface tunnel tunnel-to-pe 10 relay-format pppUse the no version to negate this command.