OcNOS-SP : Segment Routing Guide : Segment Routing Configuration Guide : Configuring OSPF Intra-Area Segment Routing : PE1
PE1
 
PE1#configure terminal
Enter configure mode.
PE1(config)#int xe2
Enter interface mode.
PE1(config-if)#ip address 10.11.1.1/30
Configure the IP address of the interface.
PE1(config-if)#label-switching
Enable label switching.
R2(config-if)#exit
Exit interface mode.
PE1(config)#int xe4
Enter interface mode.
PE1(config-if)#ip address 10.11.2.1/30
Configure the IP address of the interface.
PE1(config-if)#label-switching
Enable label switching.
PE1(config-if)#exit
Exit interface mode.
PE1(config)#int lo
Enter interface mode.
PE1(config-if)#ip address 10.0.1.11/32 secondary
Configure the IP address of the interface.
PE1(config-if)#prefix-sid absolute 16000 no-php
Assign the prefix sid values
PE1(config-if)#exit
Exit interface mode.
PE1(config)#router ospf 1
Enter OSPF router mode for process ID 1.
PE1(config-router)#router-id 10.0.1.11
Set the router-id
PE1(config-router)#network 10.0.1.11/32 area 0.0.0.0
Advertise the lo interface in OSPF area 0.
PE1(config-router)#network 10.11.1.0/30 area 0.0.0.0
Advertise the xe2 interface in OSPF area 0.
PE1(config-router)#network 10.11.2.0/30 area 0.0.0.0
Advertise the xe4 interface in OSPF area 0.
PE1(config-router)#ospf segment-routing global block 16000 23999
Enable SRGB range under OSPF process.
PE1(config-router)#segment-routing mpls
Enable segment routing for the OSPF process.
PE1(config-if)#exit
Exit interface mode.
PE1(config)#commit
Commit the candidate configuration to the running configuration.
Last modified date: 06/27/2023