[Contents] [Prev] [Next] [Index] [Report an Error]

# MPLS L2VPN Tunnel over VLAN over LAG Configuration Example

Figure 122 shows a sample configuration scenario of an MPLS L2VPN or Martini tunnel over VLAN over LAG. The sample topology shows a customer edge router, CE1, connected to a provider edge router, PE1 using a stacked VLAN (S-VLAN) tunnel.

Two LAG bundles, LAG1 and LAG2, are created to group multiple Ethernet interfaces on CE1 and PE1 respectively. A Martini tunnel from PE1 to PE2 is configured over LAG2 with a unique subinterface number assigned to the LAG bundle. The MPLS packets that are received on PE2, which is the remote router located at the other side of the service provider core, are processed. After PE2 processes the layer 2 Ethernet frames, they are sent to CE2, which is the customer edge device at the remote site.

Figure 122: MPLS L2VPN Tunnel over VLAN over LAG Configuration Example

## Configuration on CE1 (Local CE Router)

Use the following commands on the local CE router (CE1) to configure the MPLS L2VPN tunnel shown in Figure 122.

`

! Configure a virtual router CE1.
host1(config)#virtual-router ce1
!
! Specify the interface for the LAG bundle lag 1 that groups all Ethernet physical
! interfaces between CE1 and PE1.
host1:ce1(config)#interface lag 1
!
! Add the Gigabit Ethernet physical interfaces to the LAG bundle named lag 1.
host1:ce1(config-if)#member-interface gigabitEthernet 2/1/0
host1:ce1(config-if)#member-interface gigabitEthernet 2/1/3
!
! Specify VLAN as the encapsulation method for the Ethernet interface.
host1:ce1(config-if)#encapsulation vlan
!
! Specify another subinterface in the LAG bundle lag 1.1.
host1:ce1(config-if)#interface lag 1.1
!
! Assign an S-VLAN ID and a VLAN ID for the subinterface, and assign an IP
! address and mask to the interface.
host1:ce1(config-subif)#svlan id 1 1
host1:ce1(config-subif)#ip address 7.7.7.7 255.255.255.0

`

## Configuration on PE1 (Local PE Router)

Use the following commands on the local PE router (PE1) to configure the MPLS L2VPN tunnel shown inFigure 122.

`

! Configure a virtual router PE1.
host1(config)#virtual-router pe1
!
! Enable MPLS on a virtual router in Global Configuration mode.
host1:pe1(config)#mpls .
!
! Configure the LSR to create topology-driven LSPs. Enabling LDP automatically
! creates topology-driven LSPs.
host1:pe1(config)#mpls topology-driven-lsp
!
! On PE1, configure a loopback interface, and assign an IP address and mask to
! the interface.
host1:pe1(config)#interface loopback 0
host1:pe1(config-if)#ip address 11.11.11.11 255.255.255.255
!
! Assign the router ID using the IP address you configured for the loopback
! interface.
host1:pe1(config)#ip router-id 11.11.11.11
!
! Create an IEEE 802.3ad LAG bundle, lag2, and add the Gigabit Ethernet physical
! interfaces to lag2. Specify VLAN as the encapsulation method for the member
! interfaces.
host1:pe1(config)#interface lag 2
host1:pe1(config-if)#member-interface gigabitEthernet 2/1/1
host1:pe1(config-if)#member-interface gigabitEthernet 2/1/2
host1:pe1(config-if)#encapsulation vlan
!
! Specify a subinterface by adding a unique subinterface number to the LAG bundle
! name. Assign an S-VLAN ID and a VLAN ID for the subinterface. Also, configure
! MPLS tunneling.
host1:pe1(config-if)#interface lag 2.1
host1:pe1(config-subif)#svlan id 1 1
host1:pe1(config-subif)#mpls-relay 22.22.22.22 1
!
! Create another Gigabit Ethernet interface on PE1, specify VLAN as the
! encapsulation method, and configure another subinterface. For this subinterface,
! assign a VLAN ID, specify the encapsulation method as VLAN, configure MPLS,
! and assign an IP address and mask. Also, enable LDP and topology-driven LSP, as
! does any LDP-related command, using an implicit default profile, on this Gigabit
! Ethernet subinterface.
host1:pe1(config)#interface gigabitEthernet 2/1/4
host1:pe1(config-if)#encapsulation vlan
host1:pe1(config-if)#interface gigabitEthernet 2/1/4.1
host1:pe1(config-subif)#vlan id 20
host1:pe1(config-subif)#ip address 2.0.0.1 255.255.255.0
host1:pe1(config-subif)#mpls
host1:pe1(config-subif)#mpls ldp
!
! Configure a static route with the destination IP address, mask, and IP address of
! the next hop that can be used to reach the destination network.
host1:pe1(config)#ip route 22.22.22.22 255.255.255.255 2.0.0.2
!
! Configure LDP to advertise a non-null label for the egress routes.
host1:pe1(config)#mpls ldp egress-label non-null

`

## Configuration on PE2 (Remote PE Router)

Use the following commands on the remote PE router (PE2) to configure the MPLS L2VPN tunnel shown inFigure 122.

`

! Configure a virtual router PE2.
host1(config)#virtual-router pe1
!
! Enable MPLS on a virtual router in Global Configuration mode.
host1:pe2(config)#mpls .
!
! Configure PE2 to create topology-driven LSPs. Enabling LDP automatically creates
! topology-driven LSPs.
host1:pe2(config)#mpls topology-driven-lsp
!
! On PE2, configure a loopback interface, and assign an IP address and mask to
! the interface.
host1:pe2(config)#interface loopback 0
host1:pe2(config-if)#ip address 22.22.22.22 255.255.255.255
!
! Assign the router ID using the IP address you configured for the loopback
! interface.
host1:pe1(config)#ip router-id 22.22.22.22
!
! Create a Gigabit Ethernet interface and configure MPLS tunneling with the IP
! address of the router on the remote end of the layer 2 circuit and the virtual
! circuit identifier.
host1:pe2(config)#interface gigabitEthernet 2/1/6
host1:pe2(config-if)#encapsulation vlan
!
! Create a VLAN subinterface by adding a subinterface number to the interface
! identification command. Assign an S-VLAN ID and a VLAN ID for the subinterface.
! Also, configure MPLS tunneling.
host1:pe2(config-if)#interface gigabitEthernet 2/1/6.1
host1:pe2(config-subif)#svlan id 1 1
host1:pe2(config-subif)#mpls-relay 11.11.11.11 1
!
! Create a Gigabit Ethernet interface on PE2 and specify VLAN as the
! encapsulation method.
host1:pe2(config)#interface gigabitEthernet 2/1/5
host1:pe2(config-if)#encapsulation vlan
!
! Create another Gigabit Ethernet subinterface on the main interface. For this
! interface, assign a VLAN ID, specify the encapsulation method as VLAN, configure
! MPLS, and assign an IP address and mask. Also, enable LDP and topology-driven
! LSP, as does any LDP-related command, using an implicit default profile, on this
! Gigabit Ethernet subinterface.
host1:pe2(config-if)#interface gigabitEthernet 2/1/5.1
host1:pe2(config-subif)#vlan id 20
host1:pe2(config-subif)#ip address 2.0.0.2 255.255.255.0
host1:pe2(config-subif)#mpls
host1:pe2(config-subif)#mpls ldp
!
! Configure a static route with the destination IP address, mask, and IP address of
! the next hop that can be used to reach the destination network.
host1:pe2(config)#ip route 22.22.22.22 255.255.255.255 2.0.0.1
!
! Configure LDP to advertise a non-null label for the egress routes.
host1:pe2(config)#mpls ldp egress-label non-null

`

## Configuration on CE2 (Remote CE Router)

Use the following commands on the remote CE router (CE2) to configure the MPLS L2VPN tunnel shown inFigure 122.

`

! Configure a virtual router CE2
host1(config)#virtual-router ce2
!
! Specify a Gigabit Ethernet interface and assign VLAN as the encapsulation method.
host1:ce2(config)#interface gigabitEthernet 2/1/7
host1:ce2(config-if)#encapsulation vlan
!
! Create a subinterface, assign an S-VLAN ID, and configure an IP address and mask to it.
host1:ce2(config-if)#interface gigabitEthernet 2/1/7.1
host1:ce2(config-subif)#svlan id 1 1
host1:ce2(config-subif)#ip address 7.7.7.8 255.255.255.0

`

#### Related Topics

- MPLS L2VPN Tunnel over LAG Configuration Example
- CE-Side MPLS L2VPNs over LAG Overview

[Contents] [Prev] [Next] [Index] [Report an Error]