Wednesday, April 29, 2020

LDP to SR Coexistence and Migration


Earlier post has explained SR and LDP Interworking when both protocols exists in the network. In this post, I will be covering how the LDP to SR coexist and migration takes place. P5,P6 and PE7 are LDP nodes and we have to enable SR on LDP domain and have to make sure that everything works as it is. Once SR is configured, we can verify the LFIB and remove the mapping server and LDP.

The configuration will be using the same as in the earlier post of SR and LDP Interworking.

Below topology will be used for simulating the scenario.



Let's verify the output of traceroute sr-mpls on L4. Mapping server is configured on S1 as per the previous post. 16007 is the static prefix-sid configured on S1 (Mapping Server).
       
RP/0/0/CPU0:L4#traceroute sr-mpls 7.7.7.7/32
Wed Apr 29 13:57:35.186 UTC
  0 2.4.0.4 MRU 1500 [Labels: 16007 Exp: 0]
L 1 2.4.0.2 MRU 1500 [Labels: 16007 Exp: 0] 20 ms
L 2 2.5.0.5 MRU 1500 [Labels: 24000 Exp: 0] 30 ms
L 3 5.6.0.6 MRU 1500 [Labels: implicit-null Exp: 0] 30 ms
! 4 6.7.0.7 30 ms
RP/0/0/CPU0:L4#


Now configure segment routing on P6 and PE7 without removing the LDP configuration. This will create SR database with existing LDP label without impacting the traffic and configuration.
       

router isis lab
  address-family ipv4 unicast
   segment-routing mpls
  !
  interface Loopback0
   address-family ipv4 unicast
    prefix-sid index X (Replace X with 6 on P6 and 7 on PE7
    !
  !
 !
 segment-routing ! 


Let's do the trace on L4 after enabling the above configuration on P6 and PE7. Now the check the label values. End to End single label which is Prefix-sid. (Compare it with the above traceroute where we have two labels, one is prefix-sid(16007) and other is ldp(24000)
       

RP/0/0/CPU0:L4# traceroute sr-mpls 7.7.7.7/32
  0 2.4.0.4 MRU 1500 [Labels: 16007 Exp: 0]
L 1 2.4.0.2 MRU 1500 [Labels: 16007 Exp: 0] 40 ms
L 2 2.5.0.5 MRU 1500 [Labels: 16007 Exp: 0] 10 ms
L 3 5.6.0.6 MRU 1500 [Labels: implicit-null Exp: 0] 10 ms
! 4 6.7.0.7 10 ms
RP/0/0/CPU0:L4#


Verify the outout of mpls forwarding on P5 router. Below output shows that 7.7.7.7/32 is having LDP as well as SR label. Removed the rest of configuration for brevity purpose.
       

RP/0/0/CPU0:P5#show mpls forwarding
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
16007  16007       SR Pfx (idx 7)     Gi0/0/0/2    5.6.0.6         575
24000  24000       7.7.7.7/32         Gi0/0/0/2    5.6.0.6         0


Control plane and SR-MPLS data plane is established. Now we can remove the mapping server confiuration also. It's not required.
       

RP/0/0/CPU0:S1(config)#segment-routing
RP/0/0/CPU0:S1(config-sr)#no mapping-server
RP/0/0/CPU0:S1#show segment-routing mapping-server
RP/0/0/CPU0:S1#show segment-routing mapping-server prefix-sid-map  ipv4
RP/0/0/CPU0:S1(config-sr)#commit


No Output of mapping server
       

RP/0/0/CPU0:S1#show segment-routing mapping-server prefix-sid-map  ?
Wed Apr 29 14:32:52.756 UTC


Below outout shows the cef table of 5.5.5.5 prefix on PE7. Context-label seems to be the backup label because still LDP is prefered protocol.
       

RP/0/0/CPU0:PE7#show cef 5.5.5.5/32
Wed Apr 29 14:35:24.000 UTC
5.5.5.5/32, version 61, labeled SR, internal 0x1000001 0x81 (ptr 0xa141642c) [1], 0x0 (0xa13f8ad0), 0xa28 (0xa173d604)
 Updated Apr 29 14:02:50.764
 local adjacency 6.7.0.6
 Prefix Len 32, traffic index 0, precedence n/a, priority 3
 Extensions: context-label:16005
   via 6.7.0.6/32, GigabitEthernet0/0/0/0, 15 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 0 NHID 0x0 [0xa189b4d8 0x0]
    next hop 6.7.0.6/32
    local adjacency
     local label 24001      labels imposed {24003}
RP/0/0/CPU0:PE7#

RP/0/0/CPU0:PE7#show cef 4.4.4.4/32
Wed Apr 29 14:35:50.878 UTC
4.4.4.4/32, version 62, labeled SR, internal 0x1000001 0x81 (ptr 0xa1416fa8) [1], 0x0 (0xa13f88f0), 0xa28 (0xa173d65c)
 Updated Apr 29 14:02:50.764
 local adjacency 6.7.0.6
 Prefix Len 32, traffic index 0, precedence n/a, priority 3
 Extensions: context-label:16004
   via 6.7.0.6/32, GigabitEthernet0/0/0/0, 15 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 0 NHID 0x0 [0xa189b4d8 0x0]
    next hop 6.7.0.6/32
    local adjacency
     local label 24021      labels imposed {24020}
RP/0/0/CPU0:PE7#


Below output on PE7 shows that PE7 is maintaining two label databases. SR-MPLS trace shows that 16004 prefix-sid. MPLS trace route shows LDP and SR prefix-sid.
       

RP/0/0/CPU0:PE7#traceroute sr-mpls 4.4.4.4/32 source 7.7.7.7
  0 6.7.0.7 MRU 1500 [Labels: 16004 Exp: 0]
L 1 6.7.0.6 MRU 1500 [Labels: 16004 Exp: 0] 10 ms
L 2 5.6.0.5 MRU 1500 [Labels: 16004 Exp: 0] 20 ms
L 3 1.5.0.1 MRU 1500 [Labels: implicit-null Exp: 0] 50 ms
! 4 1.4.0.4 50 ms

RP/0/0/CPU0:PE7#traceroute mpls ipv4 4.4.4.4/32 source 7.7.7.7
  0 6.7.0.7 MRU 1500 [Labels: 24020 Exp: 0]
L 1 6.7.0.6 MRU 1500 [Labels: 24019 Exp: 0] 0 ms
L 2 5.6.0.5 MRU 1500 [Labels: 16004 Exp: 0] 0 ms
L 3 1.5.0.1 MRU 1500 [Labels: implicit-null Exp: 0] 10 ms
F 4 1.4.0.4 MRU 0 [No Label] 20 ms
RP/0/0/CPU0:PE7#


Above output shows that LDP domain has SR and LDP both configured but by default LDP forwarding is preferred. Now let's prefer SR over LDP by adding below configuration on P5,P6 and PE7.
       

router isis lab  
  address-family ipv4 unicast
   segment-routing mpls sr-prefer


Check the CEF output on PE7 and now we can see the context label is removed and everything is with SR only.
       

RP/0/0/CPU0:PE7#show cef 5.5.5.5/32
Wed Apr 29 14:39:11.725 UTC
5.5.5.5/32, version 88, labeled SR, internal 0x1000001 0x83 (ptr 0xa141642c) [1], 0x0 (0xa13f8e68), 0xa28 (0xa173d4a4)
 Updated Mar  3 09:33:15.916
 local adjacency 6.7.0.6
 Prefix Len 32, traffic index 0, precedence n/a, priority 1
   via 6.7.0.6/32, GigabitEthernet0/0/0/0, 13 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 0 NHID 0x0 [0xa189b4d8 0x0]
    next hop 6.7.0.6/32
    local adjacency
     local label 16005      labels imposed {16005}
RP/0/0/CPU0:PE7#

RP/0/0/CPU0:PE7#show cef 4.4.4.4/32
Wed Apr 29 14:40:18.680 UTC
4.4.4.4/32, version 91, labeled SR, internal 0x1000001 0x83 (ptr 0xa1416fa8) [1], 0x0 (0xa13f8eb8), 0xa28 (0xa173d370)
 Updated Mar  3 09:33:15.915
 local adjacency 6.7.0.6
 Prefix Len 32, traffic index 0, precedence n/a, priority 1
   via 6.7.0.6/32, GigabitEthernet0/0/0/0, 13 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 0 NHID 0x0 [0xa189b4d8 0x0]
    next hop 6.7.0.6/32
    local adjacency
     local label 16004      labels imposed {16004}
RP/0/0/CPU0:PE7#


Below output shows once SR is preferred, still the router is maintaining two label data bases. Removed other output brevity purpose. 5.5.5.5/32 is having 24003 as outgoing label and 24001 as incoming label and same is installed in backup cef also.
       

RP/0/0/CPU0:PE7#show mpls forwarding
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
16005  16005       SR Pfx (idx 5)     Gi0/0/0/0    6.7.0.6         0
24001  24003       5.5.5.5/32         Gi0/0/0/0    6.7.0.6         0

RP/0/0/CPU0:PE7#show cef 5.5.5.5/32 backup
Wed Apr 29 15:13:20.714 UTC
5.5.5.5/32, version 70, priority 4294967295, flags 0x0, flags2 0x83, source lsd (5), ctx-flags 0xc1
 Updated Apr 29 14:43:15.188
 Prefix Len 32
 Label count = 1, src = 5, label = 24001
   via  Gi0/0/0/0 (0x20) 6.7.0.6, weight 0, class 0 [flags 0x0]
    next hop VRF - 'default', table - 0xe0000000
    Output labels {24003}

Click Here To Read Rest Of The Post...

Monday, April 27, 2020

Segment Routing Mapping Server - Is it mandatory requirement While Deploying Segment Routing


Unified MPLS resolves legacy challenges such as scaling MPLS to support tens of thousands of end nodes, which provides the required MPLS functionality on cost-effective platforms, and the complexity of technologies like traffic engineering fast reroute (TE-FRR) to meet transport SLAs.

Large mobile service providers scales MPLS infrastructure using RFC 3107 hierarchical LSPs based architecture. The other areas PEs routes received as BGP labeled routes instead of distributing in IGP. ABR's work as inline RR with next-hop-self so that every IGP domain can reach to anywhere in the netowork by adding label of it's inline RR.

When SR will deploy along with the same network in hierarchy, question comes in mind how the prefix-SIDs of these labelled BGP routes get distributed in SR domain. Where do I place my segment routing mapping server (SRMS)?

The answer to the question is really don't need to install or create any kind of SRMS functionality in the SR domain. SRMS functionality is only required when we redistribute LDP the routes from LDP to SR domain or vice-versa. But in case of Unified MPLS, PE's loopbacks of other domains will still learn via labelled BGP on ABR's. ABR's are inline route reflectors. ABR's will distribute these labeled prefixes in SR domain.

On ingress SR PE, destination VPNv4 prefix will be learnt by vpnv4 route. The next hop of this VPNv4 prefix will be the ABR (inline RR). So ingress PE will add the VPNv4 label and SR label (prefix-SID) of ABR. Once packet will reach to SR-ABR, SR-ABR will do the stitching of SR to LDP and forward the packet by swaping it's label.

So end to end packet flow will work without installing any kind of SRMS functionality.
Click Here To Read Rest Of The Post...

Sunday, April 26, 2020

SR and LDP Interworking - End To End Packet Flow of VPNv4


This post is in continuation of previous post of SR and LDP Interworking which explains how green field deployment of segment routing inter works with brownfield deployment of LDP. In this post I will be covering how VPNv4 will work in the same topology.
       
Do we really need SRMS functionality? Stay tuned for upcoming posts.
We have already setup the SR control plane in the previous post. Let's see how vpnv4 control plane will setup in case of inter working.

RR-8 is route reflector for SR and LDP domain. L3,L4 and PE7 has MP-iBGP established with RR-8.

L4 BGP Neighborship with RR-8
       

RP/0/0/CPU0:L4#show bgp vpnv4 unicast summary
BGP router identifier 4.4.4.4, local AS number 100
Neighbor        Spk    AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  St/PfxRcd
8.8.8.8           0   100      71      68       18    0    0 00:43:00          2

Output of vrf test on L4
       

RP/0/0/CPU0:L4#show route vrf test
B    100.0.0.3/32 [200/0] via 3.3.3.3 (nexthop in vrf default), 00:43:19
L    100.0.0.4/32 is directly connected, 01:16:50, Loopback100
B    100.0.0.7/32 [200/0] via 7.7.7.7 (nexthop in vrf default), 00:43:19
RP/0/0/CPU0:L4#

Check the below output where 100.0.0.4/32 is advertised with local label 24000
       

RP/0/0/CPU0:L4#show bgp vpnv4 unicast vrf test 100.0.0.4/32
Thu Apr 23 07:22:22.670 UTC
BGP routing table entry for 100.0.0.4/32, Route Distinguisher: 100:100
Versions:
  Process           bRIB/RIB  SendTblVer
  Speaker                  5           5
    Local Label: 24000
Last Modified: Apr 23 06:02:51.935 for 01:19:30
Paths: (1 available, best #1)
  Advertised to peers (in unique update groups):
    8.8.8.8
  Path #1: Received by speaker 0
  Advertised to peers (in unique update groups):
    8.8.8.8
  Local
    0.0.0.0 from 0.0.0.0 (4.4.4.4)
      Origin incomplete, metric 0, localpref 100, weight 32768, valid, redistributed, best, group-best, import-candidate
      Received Path ID 0, Local Path ID 1, version 5
      Extended community: RT:100:100
RP/0/0/CPU0:L4#

Check the below output where 100.0.0.4/32 is received by PE7(LDP Domain) with received label 24000
       

RP/0/0/CPU0:PE7#show bgp vpnv4 unicast vrf test 100.0.0.4/32
Thu Apr 23 07:20:17.429 UTC
BGP routing table entry for 100.0.0.4/32, Route Distinguisher: 100:100
Versions:
  Process           bRIB/RIB  SendTblVer
  Speaker                 15          15
Last Modified: Apr 23 06:34:21.928 for 00:45:55
Paths: (1 available, best #1)
  Not advertised to any peer
  Path #1: Received by speaker 0
  Not advertised to any peer
  Local
    4.4.4.4 (metric 40) from 8.8.8.8 (4.4.4.4)
      Received Label 24000
      Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
      Received Path ID 0, Local Path ID 1, version 15
      Extended community: RT:100:100
      Originator: 4.4.4.4, Cluster list: 8.8.8.8
      Source AFI: VPNv4 Unicast, Source VRF: test, Source Route Distinguisher: 100:100

Output of end to end vrf traceroute on PE7
       

RP/0/0/CPU0:PE7#traceroute vrf test 100.0.0.4
 1  6.7.0.6 [MPLS: Labels 24020/24000 Exp 0] 29 msec  29 msec  29 msec
 2  5.6.0.5 [MPLS: Labels 24019/24000 Exp 0] 19 msec  19 msec  19 msec
 3  2.5.0.2 [MPLS: Labels 16004/24000 Exp 0] 39 msec  19 msec  29 msec
 4  2.4.0.4 19 msec  *  19 msec

End To End Packet Flow

Click Here To Read Rest Of The Post...