OcNOS-SP : Segment Routing Guide : Segment Routing Configuration Guide : Configuring OSPF SR Mapping Server with LDP : P1
P1
 
P1#configure terminal
Enter configure mode.
P1(config)#interface lo
Enter interface mode.
P1(config-if)#ip address 10.0.1.1/32 secondary
Configure the IP address of the interface.
P1(config-if)#prefix-sid index 2000 no-php
Configure prefix SID absolute value.
P1(config-if)#exit
Exit interface mode.
P1(config)#interface xe2
Enter interface mode.
P1(config-if)#ip address 10.11.1.2/30
Configure the IP address of the interface.
P1(config-if)#label-switching
Enable label switching.
P1(config-if)#exit
Exit interface mode.
P1(config)#interface xe7
Enter interface mode.
P1(config-if)#ip address 10.22.1.2/30
Configure the IP address of the interface.
P1(config-if)#label-switching
Enable label switching.
P1(config-if)#exit
Exit interface mode.
P1(config)#interface xe11
Enter interface mode.
P1(config-if)#ip address 10.1.1.1/30
Configure the IP address of the interface.
P1(config-if)#label-switching
Enable label switching.
P1(config-if)#exit
Exit interface mode.
P1(config)#interface xe17
Enter interface mode.
P1(config-if)#ip address 10.33.1.2/30
Configure the IP address of the interface.
P1(config-if)#label-switching
Enable label switching.
P1(config-if)#enable-ldp ipv4
 
P1(config-if)#exit
Exit interface mode.
P1(config)#router ospf 1
Set the routing process ID
P1(config-router)# router-id 10.0.1.1
Advertise the router-id
P1(config-router)# network 10.0.1.1/32 area 0.0.0.0
Advertise the lo interface in OSPF area 0
P1(config-router)# network 10.1.1.0/30 area 0.0.0.0
Advertise the xe12 interface in OSPF area 0
P1(config-router)# network 10.11.1.0/30 area 0.0.0.0
Advertise the xe2 interface in OSPF area 0
P1(config-router)# network 10.22.1.0/30 area 0.0.0.0
Advertise the xe7 interface in OSPF area 0
P1(config-router)# network 10.33.1.0/30 area 0.0.0.0
Advertise the xe17 interface in OSPF area 0
P1(config-router)# ospf segment-routing global block 16000 23999
Advertise the segment routing global block range(16000-23999).
P1(config-router)#segment-routing mpls
Enable segment routing under router process.
P1(config-router)#segment-routing prefix-sid-map advertise-local
Enable segment routing prefix-sid-map advertise-local under router process.
P1(config-router)#exit
Exit router mode.
P1(config)#segment-routing
Enter segment routing configuration mode
P1(config-sr)# mapping-server
Enter mapping server mode.
P1(config-sr-ms)#srms preference 200
Configure segment routing mapping server preference value.
P1(config-sr-ms)#prefix-sid-map address-family ipv4
Enter prefix-SID mapping configuration mode.
P1(config-sr-ms-map-af4)# 10.0.1.33/32 4000 range 1
Configure mapping server entry for assigning s-ids to prefixes.
P1(config-sr-ms-map-af4)# 10.0.1.44/32 5000 range 1
Configure mapping server entry for assigning s-ids to prefixes.
P1(config-sr-ms-map-af4)#end
Exit to privileged mode.
P1#configure terminal
Enter configure mode.
P1(config)#router ldp
Enter router ldp mode.
P1(config-router)#exit
Exit router mode.
P1#configure terminal
Enter configure mode.
P1(config)# mpls lsp-stitching
Enable mpls lsp stitching on global mode.
P1(config-router)#exit
Exit router mode.
P1(config)#commit
Commit the candidate configuration to the running configuration.
Last modified date: 10/20/2023