#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)#ip address 11.11.11.55/32 secondary | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface xe16 | Enter interface mode |
(config-if)#ip address 172.4.5.55/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 1 | Configure the routing process OSPF with process Id 1 |
(config-router)#network 172.4.5.0/24 area 0 | Define the interface (172.4.5.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 11.11.11.55/32 area 0 | Define the interface (11.11.11.55/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#exit | Exit from router ospf mode |
(config)#router bgp 100 | Enter Router BGP mode |
(config-router)# neighbor 21.21.21.56 update-source lo | Add loopback ip of PE2 as neighbor with neighbor AS |
(config-router)#neighbor 21.21.21.56 update- source lo | Update the source for that particular neighbor as loopback interface |
(config-router)#neighbor 172.4.5.52 remote- as 100 | Add neighbor with neighbor AS |
(config-router)#allocate-label all | Allocate labels |
(config-router)#address-family ipv4 labeled- unicast | Enter into labeled-unicast address family |
(config-router-af)#neighbor 172.4.5.52 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)#exit-address-family | Exit from address family IPv4 labeled unicast |
(config-router)#address-family vpnv4 unicast | Enter into vpnv4 unicast address family |
(config-router-af)#neighbor 21.21.21.56 activate | Activate the neighbor inside vpnv4 address family |
(config-router-af)#exit-address-family | Exit from address family vpnv4. |
(config-router)#address-family ipv4 unicast | Enter into ipv4 unicast address family |
(config-router-af)#network 11.11.11.55/32 | Advertise the loopback of RTR1 in BGP |
(config-router-af)#exit-address-family | Exit from address family vpnv4 |
(config-router)#exit | Exit from router BGP mode |
(config)# ip vrf vrf1 | Specify the name of the VRF (vrf1) to be created. |
(config-vrf)#rd 10:100 | Assign a route distinguisher (RD) for the VRF, which is a unique value on the router. The RD value can be in ASN:NN or A.B.C.D:NN format. |
(config-vrf)#route-target both 100:300 | Specify the 2-Octet AS specific or IPv4 specific Transitive Route-Target extended community attribute. |
(config-vrf)#exit | Exit VRF mode, and return to Configure mode. |
(config)#interface xe10 | Enter interface mode |
(config-if)# ip vrf forwarding vrf1 | Bind the interface (eth2) to the VRF vrf1 |
(config-if)# ip address 172.10.20.55/24 | Configure the IP address of the interface eth2 |
(config-if)#exit | Exit interface mode. |
(config)#router bgp 100 | Enter Router BGP mode |
(config-router)# address-family ipv4 vrf vrf1 | Enter address family ipv4 vrf mode |
(config-router-af)# redistribute connected | Redistribute connected routes |
(config-router-af)#end | Exit from router mode into privilege mode |
#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)#ip address 22.22.22.52/32 secondary | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface xe16 | Enter interface mode |
(config-if)#ip address 172.4.5.52/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)#exit | Exit interface mode. |
(config)#interface xe12 | Enter interface mode |
(config-if)#ip address 172.6.7.52/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 1 | Configure the routing process OSPF with process Id 1 |
(config-router)#network 172.4.5.0/24 area 0 | Define the interface (172.4.5.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 172.6.7.0/24 area 0 | Define the interface (172.6.7.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#exit | Exit from router ospf mode |
(config)#router bgp 100 | Enter Router BGP mode |
(config-router)# neighbor 172.4.5.55 remote-as 100 | Add neighbor with neighbor AS |
(config-router)# neighbor 172.6.7.54 remote-as 100 | Add neighbor with neighbor AS |
(config-router)#allocate-label all | Allocate labels |
(config-router)# address-family ipv4 labeled-unicast | Enter into labeled-unicast address family |
(config-router-af)#neighbor 172.6.7.54 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)#neighbor 172.4.5.55 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)# neighbor 172.4.5.55 route-reflector-client | Enable Route reflector client for the neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.6.7.54 route-reflector-client | Enable Route reflector client for the neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.4.5.55 next-hop-self | Enable next hop self for the particular neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.6.7.54 next-hop-self | Enable next hop self for the particular neighbor inside address family IPv4 labeled unicast |
(config-router-af)#exit-address-family | Exit address-family mode |
(config-router)#exit | Exit from router BGP mode |
(config)#end | Exit from config mode |
#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)# ip address 200.200.200.54/32 secondary | Configure the IP address of the interface loopbak |
(config-if)#exit | Exit interface mode |
(config)#interface xe16 | Enter interface mode |
(config-if)#ip address 172.1.2.54/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)#exit | Exit interface mode. |
(config)#interface xe12 | Enter interface mode |
(config-if)#ip address 172.6.7.54/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 1 | Configure the routing process OSPF with process Id 1 |
(config-router)#network 172.1.2.0/24 area 0 | Define the interface (172.1.2.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 172.6.7.0/24 area 0 | Define the interface (172.6.7.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#exit | Exit from router ospf mode |
(config)#router bgp 100 | Enter Router BGP mode |
(config-router)# neighbor 172.1.2.53 remote-as 100 | Add neighbor with neighbor AS |
(config-router)# neighbor 172.6.7.52 remote-as 100 | Add neighbor with neighbor AS |
(config-router)#allocate-label all | Allocate labels |
(config-router)# address-family ipv4 labeled-unicast | Enter into labeled-unicast address family |
(config-router-af)#neighbor 172.6.7.52 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)#neighbor 172.1.2.53 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)# neighbor 172.1.2.53 route-reflector-client | Enable Route reflector client for the neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.6.7.52 route-reflector-client | Enable Route reflector client for the neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.1.2.53 next-hop-self | Enable next hop self for the particular neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.6.7.52 next-hop-self | Enable next hop self for the particular neighbor inside address family IPv4 labeled unicast |
(config-router)# exit-address-family | Exit from address family. |
(config-router)#exit | Exit from router BGP mode |
(config)#end | Exit from config mode |
#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)# ip address 44.44.44.53/32 secondary | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface xe16 | Enter interface mode |
(config-if)#ip address 172.1.2.53/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)#exit | Exit interface mode. |
(config)#interface xe10 | Enter interface mode |
(config-if)#ip address 172.3.4.53/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 1 | Configure the routing process OSPF with process Id 1 |
(config-router)#network 172.1.2.0/24 area 0 | Define the interface (172.1.2.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 172.3.4.0/24 area 0 | Define the interface (172.3.4.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#exit | Exit from router ospf mode |
(config)#router bgp 100 | Enter Router BGP mode |
(config-router)# neighbor 172.1.2.54 remote-as 100 | Add neighbor with neighbor AS |
(config-router)# neighbor 172.3.4.56 remote-as 100 | Add neighbor with neighbor AS |
(config-router)#allocate-label all | Allocate labels |
(config-router)# address-family ipv4 labeled-unicast | Enter into labeled-unicast address family |
(config-router-af)#neighbor 172.3.4.56 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)#neighbor 172.1.2.54 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)# neighbor 172.3.4.56 route-reflector-client | Enable Route reflector client for the neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.1.2.54 route-reflector-client | Enable Route reflector client for the neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.3.4.56 next-hop-self | Enable next hop self for the particular neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 172.1.2.54 next-hop-self | Enable next hop self for the particular neighbor inside address family IPv4 labeled unicast |
(config-router-af)#exit-address-family | Exit from address family vpnv4 |
(config-router)#exit | Exit from router BGP mode |
(config)#end | Exit from config mode |
#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)#ip address 21.21.21.56/32 secondary | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface xe10 | Enter interface mode |
(config-if)#ip address 172.3.4.56/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 1 | Configure the routing process OSPF with process Id 1 |
(config-router)#network 172.3.4.0/24 area 0 | Define the interface (172.3.4.0/24) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 21.21.21.56/32 area 0 | Define the interface (21.21.21.56/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#exit | Exit from router ospf mode |
(config)#router bgp 100 | Enter Router BGP mode |
(config-router)#neighbor 11.11.11.55 remote-as 100 | Add loopback ip of PE1 as neighbor with neighbor AS |
(config-router)#neighbor 11.11.11.55 update-source lo | Update the source for that particular neighbor as loopback interface |
(config-router)# neighbor 172.3.4.53 remote-as 100 | Add neighbor with neighbor AS |
(config-router)#allocate-label all | Allocate labels |
(config-router)# address-family ipv4 labeled-unicast | Enter into labeled-unicast address family |
(config-router-af)#neighbor 172.3.4.53 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)#exit-address-family | Exit from address family IPv4 labeled unicast |
(config-router)#address-family vpnv4 unicast | Enter into vpnv4 unicast address family |
(config-router-af)#neighbor 11.11.11.55 activate | Activate the neighbor inside vpnv4 address family |
(config-router-af)#exit-address-family | Exit from address family vpnv4 |
(config-router-af)#network 21.21.21.56/32 | Advertise the loopback in BGP |
(config-router-af)#exit-address-family | Exit from address family ipv4 unicast |
(config-router)#exit | Exit from router BGP mode |
(config)# ip vrf vrf1 | Specify the name of the VRF (vrf1) to be created. |
(config-vrf)#rd 10:100 | Assign a route distinguisher (RD) for the VRF, which is a unique value on the router. The RD value can be in ASN:NN or A.B.C.D:NN format. |
(config-vrf)#route-target both 100:300 | Specify the 2-Octet AS specific or IPv4 specific Transitive Route-Target extended community attribute. |
(config-vrf)#exit | Exit VRF mode, and return to Configure mode. |
(config)#interface xe0 | Enter interface mode |
(config-if)# ip vrf forwarding vrf1 | Bind the interface (eth2) to the VRF vrf1 |
(config-if)# ip address 172.23.4.56/24 | Configure the IP address of the interface eth2 |
(config-if)#exit | Exit interface mode. |
(config)#router bgp 100 | Enter Router BGP mode |
(config-router)# address-family ipv4 vrf vrf1 | Enter address family ipv4 vrf mode |
(config-router)# redistribute connected | Redistribute connected routes |
(config-router)#end | Exit from router mode into privilege mode |