P1#configure terminal | Enter configure mode. |
P1(config)#int 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 1000 no-php | Set the SID value. |
P1(config-if)#exit | Exit interface mode. |
P1(config)#int 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)#int xe11 | Enter interface mode. |
P1(config-if)#ip address 10.1.1.1/30 | Configure the IP address of the loopback interface. |
P1(nfig-if)#label-switching | Enable label switching |
P1(config-if)#exit | Exit interface mode. |
P1(config)#int xe17 | Enter interface mode. |
P1(config-if)#ip address 10.33.1.2/30 | Configure the IP address of the loopback interface. |
P1(nfig-if)#label-switching | Enable label switching |
P1(config-if)#exit | Exit interface mode. |
P1(config)#router ospf 1 | Enter OSPF router mode for process ID 1. |
P1(config-router)#router-id 10.0.1.1 | Set 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 xe2 interface in OSPF area 0. |
P1(config-router)#network 10.11.1.0/30 area 0.0.0.0 | Advertise the xe11 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)#ospf segment-routing global block 16000 23999 | Enable SRGB range under OSPF process. |
P1(config-router)#segment-routing mpls | Enable segment routing for the OSPF process. |
P1(config-if)#exit | Exit interface mode. |
P1(config)#commit | Commit the candidate configuration to the running configuration. |