PE1#configure terminal | Enter configure mode. |
PE1(config)#interface lo | Enter interface mode. |
PE1(config-if)#ip address 1.1.1.1/32 secondary | Configure the IP address of the interface. |
PE1(config-if)#prefix-sid index 1 | Configure prefix sid index value. |
PE1(config-if)#exit | Exit interface mode. |
PE1(config)#interface eth1 | Enter interface mode. |
PE1(config-if)#ip address 10.1.2.1/24 | Configure the IP address of the interface. |
PE1(config-if)#label-switching | Enable label switching. |
PE1(config-if)#exit | Exit interface mode |
PE1(config)#interface eth2 | Enter interface mode. |
PE1(config-if)#ip address 10.1.3.1/24 | Configure the IP address of the interface. |
PE1(config-if)#label-switching | Enable label switching. |
PE1(config-if)#exit | Exit interface mode. |
PE1(config)#router ospf 1 | Set the routing process ID . |
PE1(config-router)#ospf router-id 1.1.1.1 | Configuring OSPF router-id |
PE1(config-router)#network 1.1.1.1/32 area 0.0.0.0 | Configure OSPF network in area 0 |
PE1(config-router)#network 10.1.2.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
PE1(config-router)#network 10.1.3.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
PE1(config-router)#segment-routing mpls | Enable segment routing under router OSPF process. |
PE1(config-router)#exit | Exit router mode. |
PE1(config)#ip vrf vrf1 | Configure VPN Routing/Forwarding instance |
PE1(config-vrf)#rd 100:1 | route distinguisher |
PE1(config-vrf)#route-target both 200:1 | route target |
PE1(config-vrf)#exit | Exit VRF mode |
PE1(config)#interface eth3 | Enter interface mode |
PE1(config-if)#ip vrf forwarding vrf1 | Enable IP VRF forwarding on the interface |
PE1(config-if)#ip address 177.1.1.1/24 | Configure the IP address for the non-default VRF interface. |
PE1(config-if)#exit | Exit interface mode. |
PE1(config)#router bgp 100 | Configure router BGP in AS 100 |
PE1(config-router)#neighbor 1.1.1.6 remote-as 100 | Configure neighbor in remote-as 100 |
PE1(config-router)#neighbor 1.1.1.6 update-source lo | Configure neighbor with update-source loopback |
PE1(config-router)#address-family vpnv4 unicast | Enter VPNv4 Address family mode |
PE1(config-router-af)#neighbor 1.1.1.6 activate | Activate VPNv4 neighbor |
PE1(config-router-af)#exit-address-family | Exit from Address Family configuration mode |
PE1(config-router)#address-family ipv4 vrf vrf1 | Enter address-family VRF |
PE1(config-router-af)#redistribute connected | Redistribute all the connected VRF routes |
PE1(config-router-af)#exit-address-family | Exit from Address Family configuration mode |
PE1(config-router)#exit | Exit router mode |
PE1(config)#commit | Commit candidate configuration to be running configuration |
PE1(config)#exit | Exit configuration mode |
PE1(config)#segment-routing | Enter segment-routing mode |
PE1(config-sr)#traffic-engineering | Enter segment-routing traffic-engineering mode |
PE1(config-sr-te)#segment-list p1-p3-pe2 | Configure a segment-list |
PE1(config-sr-sl)#index 10 segment-type-1 16002 | Configure the segment-list entry with index 10 and label as prefix-sid of P2 |
PE1(config-sr-sl)#index 20 segment-type-1 16004 | Configure the segment-list entry with index 10 and label as prefix-sid of P4 |
PE1(config-sr-sl)#index 30 segment-type-1 16006 | Configure the segment-list entry with index 10 and label as prefix-sid of PE2 |
PE1(config-sr-sl)#exit-sr-sl | Exit router mode |
PE1(config-sr-te)#policy to-pe2 | Configure an SR-policy |
PE1(config-sr-pol)#color 111 end-point 1.1.1.6 | Configure SR-policy with key ie., color and end-point |
PE1(config-sr-pol)#candidate-path 1 | Configure a candidate-path for the SR-policy |
PE1(config-sr-pol-cp)#preference 1000 | Configure the preference value for the candidate-path |
PE1(config-sr-pol-cp)#explicit segment-list p1-p3-pe2 | Configure the candidate-path as explicit-path with segment-list |
PE1(config-sr-pol-cp)#exit | Exit segment-routing mode |
PE1(config)#exit | Exit configure terminal mode |
PE1(config)#commit | Commit candidate configuration to be running configuration |
P1#configure terminal | Enter configure mode. |
P1(config)#interface lo | Enter interface mode. |
P1(config-if)#ip address 1.1.1.2/32 secondary | Configure the IP address of the interface. |
P1(config-if)#prefix-sid index 2 | Configure prefix sid index value. |
P1(config-if)#exit | Exit interface mode. |
P1(config)#interface eth1 | Enter interface mode. |
P1(config-if)#ip address 10.1.2.2/24 | 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 eth2 | Enter interface mode. |
P1(config-if)#ip address 10.2.4.1/24 | 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 eth3 | Enter interface mode. |
P1(config-if)#ip address 10.2.3.1/24 | Configure the IP address of the interface. |
P1(config-if)#label-switching | Enable label switching. |
P1(config-if)#exit | Exit interface mode. |
P1(config)#router ospf 1 | Set the routing process ID . |
P1(config-router)#ospf router-id 1.1.1.2 | Configure OSPF router-id |
P1(config-router)#network 1.1.1.2/32 area 0.0.0.0 | Configure OSPF network in area 0 |
P1(config-router)#network 10.1.2.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P1(config-router)#network 10.2.3.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P1(config-router)#network 10.2.4.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P1(config-router)#segment-routing mpls | Enable segment routing under router process. |
P1(config-router)#exit | Exit router mode. |
P1(config)#exit | Exit configure terminal mode |
P2#configure terminal | Enter configure mode. |
P2(config)#interface lo | Enter interface mode. |
P2(config-if)#ip address 1.1.1.3/32 secondary | Configure the IP address of the interface. |
P2(config-if)#prefix-sid index 3 | Configure prefix SID index value. |
P2(config-if)#exit | Exit interface mode. |
P2(config)#interface eth2 | Enter interface mode. |
P2(config-if)#ip address 10.1.3.2/24 | 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 eth1 | Enter interface mode. |
P2(config-if)#ip address 10.3.5.1/24 | 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 eth3 | Enter interface mode. |
P2(config-if)#ip address 10.2.3.2/24 | Configure the IP address of the interface. |
P2(config-if)#label-switching | Enable label switching. |
P2(config-if)#exit | Exit interface mode. |
P2(config)#router ospf 1 | Set the routing process ID . |
P2(config-router)#ospf router-id 1.1.1.3 | Configure OSPF router-id |
P2(config-router)#network 1.1.1.3/32 area 0.0.0.0 | Configure OSPF network in area 0 |
P2(config-router)#network 10.1.3.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P2(config-router)#network 10.2.3.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P2(config-router)#network 10.3.5.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P2(config-router)#segment-routing mpls | Enable segment routing under router process. |
P2(config-router)#exit | Exit router mode. |
P2(config)#exit | Exit configure terminal mode |
P1(config)#commit | Commit candidate configuration to be running configuration |
P3#configure terminal | Enter configure mode. |
P3(config)#interface lo | Enter interface mode. |
P3(config-if)#ip address 1.1.1.4/32 secondary | Configure the IP address of the interface. |
P3(config-if)#prefix-sid index 4 | Configure prefix SID index value. |
P3(config-if)#exit | Exit interface mode. |
P3(config)#interface eth2 | Enter interface mode. |
P3(config-if)#ip address 10.2.4.2/24 | Configure the IP address of the interface. |
P3(config-if)#label-switching | Enable label switching. |
P3(config-if)#exit | Exit interface mode. |
P3(config)#interface eth3 | Enter interface mode. |
P3(config-if)#ip address 10.4.5.1/24 | Configure the IP address of the interface. |
P3(config-if)#label-switching | Enable label switching. |
P3(config-if)#exit | Exit interface mode. |
P3(config)#interface eth1 | Enter interface mode. |
P3(config-if)#ip address 10.4.6.1/24 | Configure the IP address of the interface. |
P3(config-if)#label-switching | Enable label switching. |
P3(config-if)#exit | Exit interface mode. |
P3(config)#router ospf 1 | Set the routing process ID . |
P3(config-router)#ospf router-id 1.1.1.4 | Configure OSPF router-id |
P3(config-router)#network 1.1.1.4/32 area 0.0.0.0 | Configure OSPF network in area 0 |
P3(config-router)#network 10.2.4.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P3(config-router)#network 10.4.5.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P3(config-router)#network 10.4.6.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P3(config-router)#segment-routing mpls | Enable segment routing under router process. |
P3(config-router)#exit | Exit router mode. |
P3(config)#exit | Exit configure terminal mode |
P3(config)#commit | Commit candidate configuration to be running configuration |
P4#configure terminal | Enter configure mode. |
P4(config)#interface lo | Enter interface mode. |
P4(config-if)#ip address 1.1.1.5/32 secondary | Configure the IP address of the interface. |
P4(config-if)#prefix-sid index 5 | Configure prefix sid index value. |
P4(config-if)#exit | Exit interface mode. |
P4(config)#interface eth1 | Enter interface mode. |
P4(config-if)#ip address 10.3.5.2/24 | Configure the IP address of the interface. |
P4(config-if)#label-switching | Enable label switching. |
P4(config-if)#exit | Exit interface mode. |
P4(config)#interface eth3 | Enter interface mode. |
P4(config-if)#ip address 10.4.5.2/24 | Configure the IP address of the interface. |
P4(config-if)#label-switching | Enable label switching. |
P4(config-if)#exit | Exit interface mode. |
P4(config)#interface eth2 | Enter interface mode. |
P4(config-if)#ip address 10.5.6.1/24 | Configure the IP address of the interface. |
P4(config-if)#label-switching | Enable label switching. |
P4(config-if)#exit | Exit interface mode. |
P4(config)#router ospf 1 | Set the routing process ID . |
P4(config-router)#ospf router-id 1.1.1.5 | Configure OSPF router-id |
P4(config-router)#network 1.1.1.5/32 area 0.0.0.0 | Configure OSPF network in area 0 |
P4(config-router)#network 10.3.5.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P4(config-router)#network 10.4.5.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P4(config-router)#network 10.5.6.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
P4(config-router)#segment-routing mpls | Enable segment routing under router process. |
P4(config-router)#exit | Exit router mode. |
P4(config)#exit | Exit configure terminal mode |
P4(config)#commit | Commit candidate configuration to be running configuration |
PE2#configure terminal | Enter configure mode. |
PE2(config)#interface lo | Enter interface mode. |
PE2(config-if)#ip address 1.1.1.6/32 secondary | Configure the IP address of the interface. |
PE2(config-if)#prefix-sid index 6 | Configure prefix SID index value. |
PE2(config-if)#exit | Exit interface mode. |
PE2(config)#interface eth1 | Enter interface mode. |
PE2(config-if)#ip address 10.4.6.2/24 | Configure the IP address of the interface. |
PE2(config-if)#label-switching | Enable label switching. |
PE2(config-if)#exit | Exit interface mode |
PE2(config)#interface eth2 | Enter interface mode. |
PE2(config-if)#ip address 10.5.6.2/24 | Configure the IP address of the interface. |
PE2(config-if)#label-switching | Enable label switching. |
PE2(config-if)#exit | Exit interface mode. |
PE2(config)#router ospf 1 | Set the routing process ID . |
PE2(config-router)#ospf router-id 1.1.1.6 | Configuring OSPF router-id |
PE2(config-router)#network 1.1.1.6/32 area 0.0.0.0 | Configure OSPF network in area 0 |
PE2(config-router)#network 10.4.6.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
PE2(config-router)#network 10.5.6.0/24 area 0.0.0.0 | Configure OSPF network in area 0 |
PE2(config-router)#segment-routing mpls | Enable segment routing under router OSPF process. |
PE2(config-router)#exit | Exit router mode. |
PE2(config)#ip vrf vrf1 | Configure VPN Routing/Forwarding instance |
PE2(config-vrf)#rd 100:1 | route distinguisher |
PE2(config-vrf)#route-target both 200:1 | route target |
PE2(config)#exit | Exit vrf mode |
PE2(config)#interface eth3 | Enter interface mode |
PE2(config-if)#ip vrf forwarding vrf1 | Enable IP VRF forwarding on the interface |
PE2(config-if)#ip address 202.1.1.2/24 | Configure the IP address of the non-default VRF interface. |
PE2(config-if)#exit | Exit interface mode. |
PE2(config)#router bgp 100 | Configure router BGP in AS 100 |
PE2(config-router)#neighbor 1.1.1.1 remote-as 100 | Configure neighbor in remote-as 100 |
PE2(config-router)#neighbor 1.1.1.1 update-source lo | Configure neighbor with update-source loopback |
PE2(config-router)#address-family vpnv4 unicast | Enter VPNv4 Address family mode |
PE2(config-router-af)#neighbor 1.1.1.1 activate | Activate VPNv4 neighbor |
PE2(config-router-af)#exit-address-family | Exit from Address Family configuration mode |
PE2(config-router)#address-family ipv4 vrf vrf1 | Enter address-family VRF |
PE2(config-router-af)#redistribute connected | Redistribute all the connected VRF routes |
PE2(config-router-af)#exit-address-family | Exit from Address Family configuration mode |
PE2(config-router)#exit | Exit router mode |
PE2(config)#exit | Exit router mode |
PE2(config)#commit | Commit candidate configuration to be running configuration |
PE2(config)#exit | Exit configuration mode |