Preview
Rate this lesson

LDP to SR Migration : This is an advantage that our network data plane is MPLS as we can achieve many services like MPLS VPN, VPLS and MPLS traffic engineering, but there are many options for the control plane when data plane is MPLS like LDP, RSVP-TE and segment routing.

People used to use LDP or RSVP-TE to provide the control plane function of the MPLS services but today people are trying to migrate to segment routing as their control plane since they can achieve improved services. As a result, it often happens that multiple MPLS control-plane protocols coexist at the same time.

Now the question is, How the coexistence of various different control plane protocols is managed on MPLS network?

To answer this question, we will discuss two important applications of LDP and SR coexistence. In this video we discuss migrating from LDP to SR to achieve a new enhanced function of traffic engineering and protection in segment routing network . This requires all routers in the network to support SR.

In the next video, we will discuss how LDP and SR interwork. This happens when some routers are only supporting LDP control plane protocol and do not support SR.

LDP or Segment Routing

what happens if both LDP and SR are enabled on the network? And labels from which protocol are used for MPLS forwarding? LDP or SR? Where and how exactly it is decided to use LDP labels or SR labels?

The answer to this question is simple. The label range with LDP and SR are different and at the edge of the network where IP traffic enters the MPLS network, we can determine which one to use. By default, LDP labels are preferred, but we have the option to change the preference.

LDP and Segment Routing coexistence

LDP to SR Migration Implementation

To better understand, let’s implement a real LDP to SR migration. In this topology, we suppose that LDP is already running in the network and we are going to migrate to segment routing.

 

LDP and SR co-existence: Migration from LDP to SR

Routers xv1 and xrv6 are our edge routers. The addresses of the loopback interfaces range from 1.1.1.1 to 6.6.6.6 according to the router numbers. The subnet of the links between routers also depends on the router number. For example, 10.1.2.x is selected for the subnet between routers xrv1 and xrv2. The last digit of the IP address is the router number.

In the picture you can see both the initial configuration and the migration process.

!!! migration from LDP to SR process
• Initial state: All nodes run LDP, not SR
• Step1: All nodes are upgraded to SR
– In no particular order
• Step2: All PEs are configured to prefer SR
– In no particular order
• Step3: LDP is removed from the nodes 
– In no particular order
• Final state: All nodes run SR, not LDP 

At initial, all routers run only LDP.

!!! xrv1
mpls ldp
!
router ospf 1
 router-id 1.1.1.1
 mpls ldp auto-config
 address-family ipv4 unicast
 area 0
  interface Loopback0
   passive enable
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point

At step1 we configure segment routing in all routers in no particular order. Order is not important  since by default LDP is preferred and segment routing labels are not used.

At the second step we change the preference from LDP to segment routing just in Edge routers and in no particular orders. Order is not important since it is possible , if in in one edge router, incoming traffic be forwarded with segment routing labels and in other edge, incoming traffic be forwarded with LDP labels. so you can change the preference in edge routers from LDP to SR gradually and in your own plan.

In the next step you can remove LDP from the network if you wish.

The configuration from each step is show here.

Step 0: LDP as Initial State

At initial, LDP is already running in our network with two commands. “mpls ldp” in the global configuration  mode and “mpls ldp auto-config” in our IGP, which is OSPF in our scenario.

• Initial state: All nodes run LDP, not SR
mpls ldp
!
router ospf 1
 address-family ipv4 unicast
  mpls ldp auto-config

now, we trace from xrv1 to xrv6 to see which labels are used.

RP/0/RP0/CPU0:xrv1#traceroute 6.6.6.6 source 1.1.1.1
Sun Jun 27 21:03:11.833 UTC

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1  10.1.2.2 [MPLS: Label 24012 Exp 0] 50 msec  73 msec  45 msec 
 2  10.2.4.4 [MPLS: Label 24007 Exp 0] 62 msec  63 msec  66 msec 
 3  10.4.5.5 [MPLS: Label 24004 Exp 0] 64 msec  65 msec  66 msec 
 4  10.5.6.6 65 msec  *  63 msec 

these labels belong to the LDP protocol. To make sure, we use  “show mpls ldp binding” command.

RP/0/RP0/CPU0:xrv1#show mpls ldp bindings 
Mon Jun 28 21:16:46.089 UTC

1.1.1.1/32, rev 2
        Local binding: label: ImpNull
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           24008   
2.2.2.2/32, rev 60
        Local binding: label: 24000
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           ImpNull 
4.4.4.4/32, rev 57
        Local binding: label: 24002
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           24010   
5.5.5.5/32, rev 55
        Local binding: label: 24003
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           24011   
6.6.6.6/32, rev 24
        Local binding: label: 24008
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           24012   
10.1.2.0/24, rev 4
        Local binding: label: ImpNull
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           ImpNull 
10.2.4.0/24, rev 26
        Local binding: label: 24010
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           ImpNull 
10.4.5.0/24, rev 30
        Local binding: label: 24014
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           24016   
10.5.6.0/24, rev 32
        Local binding: label: 24016
        Remote bindings: (1 peers)
            Peer                Label    
            -----------------   ---------
            2.2.2.2:0           24018   

RP/0/RP0/CPU0:xrv1#

You can also use “show cef 6.6.6.6/32” to check whether LDP labels are used for incoming IP traffic.

RP/0/RP0/CPU0:xrv1#show cef 6.6.6.6/32
Mon Jun 28 20:40:07.177 UTC
6.6.6.6/32, version 239, internal 0x1000001 0x0 (ptr 0xe029778) [1], 0x0 (0xe1ec2e8), 0xa28 (0xeb79768)
 Updated Jun 28 19:53:09.665 
 remote adjacency to GigabitEthernet0/0/0/0
 Prefix Len 32, traffic index 0, precedence n/a, priority 3
   via 10.1.2.2/32, GigabitEthernet0/0/0/0, 4 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 0 NHID 0x0 [0xf104380 0x0]
    next hop 10.1.2.2/32
    remote adjacency
     local label 24008      labels imposed {24012}

Step 1: Enable Segment routing

In step 1, we activate segment routing with two commands in the OSPF configuration mode. “segment routing mpls” and “segment routing forwarding mpls”. The prefix-SID of the loopback interface is also configured from index 1 to index 6 according to the router number.

• Step1: All nodes are upgraded to SR
– In no particular order

router ospf 1
 segment-routing mpls
 segment-routing forwarding mpls
 area 0
  interface Loopback0
   passive enable
   prefix-sid index 1

Again we trace from the router xrv1 to xrv6. It is expected that the LDP label will continue to be used for MPLS forwarding as it has a higher priority by default.

RP/0/RP0/CPU0:xrv1#traceroute 6.6.6.6 source 1.1.1.1
Mon Jun 28 20:42:58.540 UTC

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1  10.1.2.2 [MPLS: Label 24012 Exp 0] 122 msec  90 msec  100 msec 
 2  10.2.4.4 [MPLS: Label 24007 Exp 0] 110 msec  90 msec  95 msec 
 3  10.4.5.5 [MPLS: Label 24004 Exp 0] 105 msec  88 msec  89 msec 
 4  10.5.6.6 104 msec  *  60 msec 

Step 2: Prefer SR to LDP in Edge Routers

in step 2, we change the priority from LDP to SR just in edge routers for example xrv1 with “segment routing sr-prefer” command in OSPF configuration mode. Then again we trace from the router xrv1 to xrv6. This time, it is expected that SR labels will be used.

• Step2: All PEs are configured to prefer SR
– In no particular order
router ospf 1
 segment-routing sr-prefer

With “show mpls label table detail”, you can make sure that these labels belong to segment routing protocol.

RP/0/RP0/CPU0:xrv1#show mpls label table detail 
Mon Jun 28 20:44:33.622 UTC
Table Label   Owner                           State  Rewrite
----- ------- ------------------------------- ------ -------
0     0       LSD(A)                          InUse  Yes
0     1       LSD(A)                          InUse  Yes
0     2       LSD(A)                          InUse  Yes
0     13      LSD(A)                          InUse  Yes
0     16000   ISIS(A):LAB                     InUse  No
              OSPF(A):ospf-1                  InUse  No
  (Lbl-blk SRGB, vers:0, (start_label=16000, size=8000)
0     24000   LDP(A)                          InUse  Yes
  (IPv4, vers:0, 'default':4U, 2.2.2.2/32)
0     24001   OSPF(A):ospf-1                  InUse  Yes
  (SR Adj Segment IPv4, vers:0, index=0, type=2, intf=Gi0/0/0/0, nh=10.1.2.2)
0     24002   LDP(A)                          InUse  Yes
  (IPv4, vers:0, 'default':4U, 4.4.4.4/32)
0     24003   LDP(A)                          InUse  Yes
  (IPv4, vers:0, 'default':4U, 5.5.5.5/32)
0     24008   LDP(A)                          InUse  Yes
  (IPv4, vers:0, 'default':4U, 6.6.6.6/32)
0     24010   LDP(A)                          InUse  Yes
  (IPv4, vers:0, 'default':4U, 10.2.4.0/24)
0     24014   LDP(A)                          InUse  Yes
  (IPv4, vers:0, 'default':4U, 10.4.5.0/24)
0     24016   LDP(A)                          InUse  Yes
  (IPv4, vers:0, 'default':4U, 10.5.6.0/24)

also you can check CEF table to check whether segment routing label is used.

RP/0/RP0/CPU0:xrv1#show cef 6.6.6.6/32
Mon Jun 28 20:44:56.722 UTC
6.6.6.6/32, version 715, labeled SR, internal 0x1000001 0x83 (ptr 0xe029778) [1], 0x0 (0xe1eb4e8), 0xa28 (0xeb79a28)
 Updated Jun 28 20:43:53.784 
 remote adjacency to GigabitEthernet0/0/0/0
 Prefix Len 32, traffic index 0, precedence n/a, priority 1
   via 10.1.2.2/32, GigabitEthernet0/0/0/0, 12 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 0 NHID 0x0 [0xf104380 0x0]
    next hop 10.1.2.2/32
    remote adjacency
     local label 16006      labels imposed {16006}

Back to: Segment Routing > segment routing and ldp coexistence

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment