OcNOS-SP : Segment Routing Guide : Segment Routing Configuration Guide : Configuring OSPF SR Mapping Server with LDP : P2
P2
 
P2#configure terminal
Enter configure mode.
P2(config)#router ldp
Enter router ldp mode.
P2(config-router)#exit
Exit router mode.
P2#configure terminal
Enter configure mode.
P2(config)# mpls lsp-stitching
Enable mpls lsp stitching on global mode.
P2(config-router)#exit
Exit router mode.
P2(config)#interface lo
Enter interface mode.
P2(config-if)#ip address 10.0.1.2/32 secondary
Configure the IP address of the interface.
P2(config-if)# prefix-sid index 3000 no-php
Configure Prefix SID value.
P2(config-if)#exit
Exit interface mode.
P2(config)#interface xe4
Enter interface mode.
P2(config-if)#ip address 10.11.2.2/30
Configure the IP address of the interface.
P2(config-if)#label-switching
Enable label switching.
P2(config-if)#exit
Exit interface mode.
P2(config)#interface xe10
Enter interface mode.
P2(config-if)#ip address 10.22.2.2/30
Configure the IP address of the interface.
P2(config-if)#label-switching
Enable label switching.
R4(config-if)#exit
Exit interface mode.
P2(config)#interface xe11
Enter interface mode.
P2(config-if)#ip address 10.1.1.2/30
Configure the IP address of the interface.
P2(config-if)#label-switching
Enable label switching.
P2(config-if)#exit
Exit interface mode.
P2(config)#interface xe13
Enter interface mode.
P2(config-if)#ip address 10.44.2.2/30
Configure the IP address of the interface.
P2(config-if)#label-switching
Enable label switching.
P2(config-if)# enable-ldp ipv4
Enable ldp ipv4 under interface.
P2(config-if)#exit
Exit interface mode.
P2(config)#router ospf 1
Set the routing process ID .
P2(config-router)# router-id 10.0.1.2
Advertise the router-id.
P2(config-router)# network 10.0.1.2/32 area 0.0.0.0
Advertise the xe17 interface in OSPF area 0.
P2(config-router)# network 10.1.1.0/30 area 0.0.0.0
Advertise the xe11 interface in OSPF area 0.
P2(config-router)# network 10.11.2.0/30 area 0.0.0.0
Advertise the xe4 interface in OSPF area 0.
P2(config-router)# network 10.22.2.0/30 area 0.0.0.0
Advertise the xe10 interface in OSPF area 0.
P2(config-router)# network 10.44.2.0/30 area 0.0.0.0
Advertise the xe13 interface in OSPF area 0.
P2(config-router)# ospf segment-routing global block 16000 23999
Advertise the segment routing global block range(16000-23999).
P2(config-router)#segment-routing mpls
Enable segment routing under router process.
P2(config-router)# segment-routing prefix-sid-map advertise-local
Enable segment routing prefix-sid-map advertise-local under router process.
P2(config-router)#exit
Exit router mode.
P2(config)#segment-routing
Enter segment routing configuration mode
P2(config-sr)# mapping-server
Enter mapping server mode.
P2(config-sr-ms)#srms preference 100
Configure segment routing mapping server preference value.
P2(config-sr-ms)#prefix-sid-map address-family ipv4
Enter prefix-SID mapping configuration mode.
P2(config-sr-ms-map-af4)# 10.0.1.33/32 1111 range 1
Configure mapping server entry for assigning s-ids to prefixes.
P2(config-sr-ms-map-af4)# 10.0.1.44/32 2222 range 1
Configure mapping server entry for assigning s-ids to prefixes.
P2(config-sr-ms-map-af4)#end
Exit to privileged mode.
P2#configure terminal
Enter configure mode
P2(config)#router ldp
Enter router ldp mode.
P2(config-router)#exit
Exit router mode.
P2#configure terminal
Enter configure mode.
P2(config)# mpls lsp-stitching
Enable mpls lsp stitching on global mode.
P2(config-router)#exit
Exit router mode
P2(config)#commit
Commit the candidate configuration to the running configuration.
Last modified date: 10/20/2023