16 Jun

MPLS workshop #1 – Basic MPLS Core configuration

This is the first post in a series where I’ll be presenting various aspects of MPLS network. Starting from basics and moving forward to more advanced topics. We’ll be using following topology:

As you can see we have two P routers, three PE routers, four CE routers and one of PE routers will also act as BGP route reflector. Different MPLS L3VPN networks are using different CE-PE protocols. Every router have Loopback0 interface configured with address 10.0.0.x/32 where x is the router number. Subnets on links between routers are addressed in scheme known from CCIE workbooks, that third octet shows between what routers link is configured and fourth octet represents router number. So if we are talking about link between R4 and R5 the address on R4 E0/1 interface is 10.0.45.4/24 and on R5 E0/1 interface 10.0.45.5/24.

Let’s first focus on core network configuration. As an IGP protocol we will use IS-IS which is quite common operation in ISP networks. Flat Level2 topology is used. What we have to do is start IS-IS process, assign NET address to every P and PE router and activate IS-IS in all loopback0 interfaces and links between P and P-PE routers.

R3

interface Loopback0
 ip address 10.0.0.3 255.255.255.255
 ip router isis CORE
!
interface Ethernet0/0
 ip address 10.0.34.3 255.255.255.0
 ip router isis CORE
!
router isis CORE
 mpls ldp sync
 net 49.0001.1111.1111.1113.00
 is-type level-2-only

R4

interface Loopback0
 ip address 10.0.0.4 255.255.255.255
 ip router isis CORE
!
interface Ethernet0/0
 ip address 10.0.34.4 255.255.255.0
 ip router isis CORE
 duplex auto
!
interface Ethernet0/1
 ip address 10.0.45.4 255.255.255.0
 ip router isis CORE
 duplex auto
!
interface Ethernet0/2
 ip address 10.0.49.4 255.255.255.0
 ip router isis CORE
 duplex auto
!
router isis CORE
 mpls ldp sync
 net 49.0001.1111.1111.1114.00
 is-type level-2-only

R5

interface Loopback0
 ip address 10.0.0.5 255.255.255.255
 ip router isis CORE
!
interface Ethernet0/1
 ip address 10.0.45.5 255.255.255.0
 ip router isis CORE
!
interface Ethernet1/1
 ip address 10.0.59.5 255.255.255.0
 ip router isis CORE
!
router isis CORE
 mpls ldp sync
 net 49.0001.1111.1111.1115.00
 is-type level-2-only

R8

interface Loopback0
 ip address 10.0.0.8 255.255.255.255
 ip router isis CORE
!
interface Ethernet0/0
 ip address 10.0.89.8 255.255.255.0
 ip router isis CORE
!         
router isis CORE
 mpls ldp sync
 net 49.0001.1111.1111.1118.00
 is-type level-2-only

R9

interface Loopback0
 ip address 10.0.0.9 255.255.255.255
 ip router isis CORE
!
interface Ethernet0/0
 ip address 10.0.89.9 255.255.255.0
 ip router isis CORE
!
interface Ethernet0/2
 ip address 10.0.49.9 255.255.255.0
 ip router isis CORE
!
interface Ethernet1/1
 ip address 10.0.59.9 255.255.255.0
 ip router isis CORE
!
router isis CORE
 mpls ldp sync
 net 49.0001.1111.1111.1119.00
 is-type level-2-only

Please notice we used mpls ldp sync command under IS-IS process. This way we configured MPLS LDP-IGP Synchronization. This feature provides a means to synchronize LDP and IGPs to minimize MPLS packet loss in case of IGP adjacency chance or LDP session closure. In those cases synchronization conflicts occurs and for short period of time packet loss may occur. This feature is available for various IGP protocols and it depends on IOS version installed if it’s available for particular protocol. Also some restrictions applies.

To verify if IGP routing is working properly issue show ip route isis command on R3 router and check if you can see all loopbacks and interlinks.

R3#show ip route isis 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, + - replicated route

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
i L2     10.0.0.4/32 [115/20] via 10.0.34.4, Ethernet0/0
i L2     10.0.0.5/32 [115/30] via 10.0.34.4, Ethernet0/0
i L2     10.0.0.8/32 [115/40] via 10.0.34.4, Ethernet0/0
i L2     10.0.0.9/32 [115/30] via 10.0.34.4, Ethernet0/0
i L2     10.0.45.0/24 [115/20] via 10.0.34.4, Ethernet0/0
i L2     10.0.49.0/24 [115/20] via 10.0.34.4, Ethernet0/0
i L2     10.0.59.0/24 [115/30] via 10.0.34.4, Ethernet0/0
i L2     10.0.89.0/24 [115/30] via 10.0.34.4, Ethernet0/0

Out IGP protocol for MPLS core is working properly now it’s time to enable MPLS assuming that CEF is enabled.

One thing we would like to do is to enable Explicit NULL label feature. Normally, LDP advertises an Implicit Null label for directly connected routes which means that second last (penultimate) label switched router (LSR) will remove the MPLS header from the packet and native IP packet will be send to edge LSR. This means less work for edge router but in case of QoS information stored in EXP field of header are lost. We change this behavior to preserve the QoS values. We configure the LSR to advertise an explicit NULL label (a label value of zero) to last hop LSR where top label is popped.

We have to enable mpls on all PE-P and P-P links, so all links where labels are gong to be used. We also statically define router-id for LDP protocol to use loopback0 address – it is required because LDP session is TCP connection so it’s always good to use loopbacks which are always up. That’s why we included loopbacks in IS-IS routing protocol.

R3

mpls ldp explicit-null
!
interface Ethernet0/0
 mpls ip  
!
mpls ldp router-id Loopback0

R4

mpls ldp explicit-null
!
interface Ethernet0/0
 mpls ip  
!
interface Ethernet0/1
 mpls ip  
!
interface Ethernet0/2
 mpls ip  
!
mpls ldp router-id Loopback0

R5

mpls ldp explicit-null
!
interface Ethernet0/1
 mpls ip  
!
interface Ethernet1/1
 mpls ip  
!
mpls ldp router-id Loopback0

R8

mpls ldp explicit-null
!
interface Ethernet0/0
 mpls ip  
!
mpls ldp router-id Loopback0

R9

mpls ldp explicit-null
!
interface Ethernet0/0
 mpls ip  
!
interface Ethernet0/2
 mpls ip  
!
interface Ethernet1/1
 mpls ip  
!
mpls ldp router-id Loopback0

Useful commands to verify if LDP is working properly are show mpls interfaces which give brief listing of MPLS-enabled interfaces and show mpls ldp neighbor which give us detailed information about LDP sessions

R9#show mpls interfaces 
Interface              IP            Tunnel   BGP Static Operational
Ethernet0/0            Yes (ldp)     No       No  No     Yes        
Ethernet0/2            Yes (ldp)     No       No  No     Yes        
Ethernet1/1            Yes (ldp)     No       No  No     Yes   

R9#show mpls ldp neighbor Ethernet 0/0
    Peer LDP Ident: 10.0.0.8:0; Local LDP Ident 10.0.0.9:0
	TCP connection: 10.0.0.8.646 - 10.0.0.9.62467
	State: Oper; Msgs sent/rcvd: 54/55; Downstream
	Up time: 00:36:09
	LDP discovery sources:
	  Ethernet0/0, Src IP addr: 10.0.89.8
        Addresses bound to peer LDP Ident:
          10.0.0.8        10.0.89.8       

With this configuration we are ready to deploy L2VPN and L3VPN services because we are able to send labeled packets through the network.

One thought on “MPLS workshop #1 – Basic MPLS Core configuration

Leave a Reply

%d bloggers like this: