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.
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}
No comments:
Post a Comment