P2#configure terminal | Enter configure mode. |
P2(config)#int 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 2000 no-php | Enable label switching. |
P2(config-if)#exit | Exit interface mode. |
P2(config)#int 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)#int xe11 | Enter interface mode. |
P2(config-if)#ip address 10.1.1.2/30 | Configure the IP address of the loopback interface. |
P2(config-if)#label-switching | Enable label switching. |
P2(config-if)#exit | Exit interface mode. |
P2(config)#int xe13 | Enter interface mode. |
P2(config-if)#ip address 10.44.2.2/30 | Configure the IP address of the loopback interface. |
P2(config-if)#label-switching | Enable label switching. |
P2(config-if)#exit | Exit interface mode. |
P2(config)#router ospf 1 | Enter OSPF router mode for process ID 1. |
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 lo 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.44.2.0/30 area 0.0.0.0 | Advertise the xe13 interface in OSPF area 0. |
P2(config)#ospf segment-routing global block 16000 23999 | Enable SRGB range under OSPF process. |
P2(config-router)#segment-routing mpls | Enable segment routing for the OSPF process. |
P2(config-if)#exit | Exit interface mode. |
P2(config)#commit | Commit the candidate configuration to the running configuration. |