#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)#ip address 1.1.1.54/32 secondary | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip address 10.1.1.54/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)# enable-ldp ipv4 | Enable LDP process on eth1 interface |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 10 | Configure the routing process OSPF with process id 10 |
(config-router)#network 1.1.1.54/32 area 0 | Define the interface (1.1.1.54/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 10.1.1.0/24 area 0 | Define the interface (10.1.1.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 7.7.7.55 remote- as 100 | Add loopback ip of PE2 as neighbor with neighbor AS |
(config-router)#neighbor 7.7.7.55 update- source lo | Update the source for that particular neighbor as loopback interface |
(config-router)#neighbor 3.3.3.52 remote- as 100 | Add loopback ip of ABR1 as neighbor with neighbor AS |
(config-router)#neighbor 3.3.3.52 update- source lo | Update the source for that particular neighbor as loopback interface |
(config-router)#allocate-label all | Allocate labels |
(config-router)#address-family ipv4 labeled- unicast | Enter into labeled-unicast address family |
(config-router-af)#neighbor 3.3.3.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 7.7.7.55 activate | Activate the neighbor inside vpnv4 address family |
(config-router-af)#network 1.1.1.54/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)# router ldp | Configure Router LDP instance |
(config-router)# transport-address ipv4 1.1.1.54 0 | Configure Transport address for LDP with label space value 0 |
(config-router)#exit | Exit from router 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 eth2 | Enter interface mode |
(config-if)# ip vrf forwarding vrf1 | Bind the interface (eth2) to the VRF vrf1 |
(config-if)# ip address 61.1.1.54/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 2.2.2.23/32 | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip address 10.1.1.23/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)# enable-ldp ipv4 | Enable LDP process on eth1 interface |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Enter interface mode |
(config-if)#ip address 20.1.1.23/24 | Configure the IP address of the interface eth2 |
(config-if)#label-switching | Enable label-switching on interface eth2 |
(config-if)# enable-ldp ipv4 | Enable LDP process on eth2 interface |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 10 | Configure the routing process OSPF with process id 10 |
(config-router)#network 20.1.1.0/24 area 0 | Define the interface (20.1.1.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 10.1.1.0/24 area 0 | Define the interface (10.1.1.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 2.2.2.23/32 area 0 | Define the interface (2.2.2.23/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 ldp | Configure Router LDP instance |
(config-router)# transport-address ipv4 2.2.2.23 0 | Configure Transport address for LDP with label space value 0 |
(config-router)#exit | Exit from router mode |
(config)# ip route 7.7.7.55/32 20.1.1.52 | Specify the destination prefix and mask for the network and a gateway. |
(config)# end | Exit from config mode |
#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)#ip address 3.3.3.52/32 | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip address 52.56.1.52/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)# enable-ldp ipv4 | Enable LDP process on eth1 interface |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Enter interface mode |
(config-if)#ip address 20.1.1.52/24 | Configure the IP address of the interface eth2 |
(config-if)#label-switching | Enable label-switching on interface eth2 |
(config-if)# enable-ldp ipv4 | Enable LDP process on eth2 interface |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 10 | Configure the routing process OSPF with process id 20 |
(config-router)#network 3.3.3.52/32 area 0 | Define the interface (3.3.3.52/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 20.1.1.0/24 area 0 | Define the interface (20.1.1.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 ldp | Configure Router LDP instance |
(config-router)# transport-address ipv4 3.3.3.52 0 | Configure Transport address for LDP with label space value 0 |
(config-router)#exit | Exit from router mode |
(config)#router bgp 100 | Enter Router BGP mode |
(config-router)#neighbor 1.1.1.54 remote- as 100 | Add loopback ip of PE2 as neighbor with neighbor AS |
(config-router)#neighbor 1.1.1.54 update- source lo | Update the source for that particular neighbor as loopback interface |
(config-router)#neighbor 52.56.1.56 remote- as 100 | Add loopback ip of ABR1 as 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 1.1.1.54 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)#neighbor 52.56.1.56 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)# neighbor 1.1.1.54 route-reflector-client | Enable Route reflector client for the neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 1.1.1.54 next-hop-self | Enable next hop self for the particular neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 52.56.1.56 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 labeled-unicast |
(config-router)#exit | Exit from router BGP mode |
#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)#ip address 5.5.5.56/32 | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip address 50.1.1.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)#interface eth2 | Enter interface mode |
(config-if)#ip address 52.56.1.56/24 | Configure the IP address of the interface eth2 |
(config-if)#label-switching | Enable label-switching on interface eth2 |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 30 | Configure the routing process OSPF with process Id 1 |
(config-router)#network 5.5.5.56/32 area 0 | Define the interface (5.5.5.56/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 50.1.1.0/24 area 0 | Define the interface (50.1.1.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 ldp | Configure Router LDP instance |
(config-router)# transport-address ipv4 5.5.5.56 0 | Configure Transport address for LDP with label space value 0 |
(config-router)#exit | Exit from router mode |
(config)#router bgp 200 | Enter Router BGP mode |
(config-router)#neighbor 52.56.1.52 remote- as 100 | Add neighbor peer ip and neighbor AS |
(config-router)#neighbor 7.7.7.55 remote- as 100 | Add loopback ip of PE2 as neighbor with neighbor AS |
(config-router)#neighbor 7.7.7.55 update- source lo | Update the source for that particular neighbor as loopback interface |
(config-router)#allocate-label all | Allocate labels |
(config-router)#address-family ipv4 labeled- unicast | Enter into labeled-unicast address family |
(config-router-af)#neighbor 52.56.1.52 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)#neighbor 7.7.7.55 activate | Activate the neighbor inside labeled-unicast address family |
(config-router-af)# neighbor 7.7.7.55 route-reflector-client | Enable Route reflector client for the neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 52.56.1.52 next-hop-self | Enable next hop self for the particular neighbor inside address family IPv4 labeled unicast |
(config-router-af)# neighbor 7.7.7.55 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 6.6.6.22/32 | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip address 50.1.1.22/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)# enable-ldp ipv4 | Enable LDP process on eth1 interface |
(config-if)#exit | Exit interface mode. |
(config)#interface eth2 | Enter interface mode |
(config-if)#ip address 60.1.1.22/24 | Configure the IP address of the interface eth2 |
(config-if)#label-switching | Enable label-switching on interface eth2 |
(config-if)# enable-ldp ipv4 | Enable LDP process on eth2 interface |
(config-if)#exit | Exit interface mode |
(config)#router ospf 30 | Configure the routing process OSPF with process id 20 |
(config-router)#network 50.1.1.0/24 area 0 | Define the interface (30.1.1.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 60.1.1.0/24 area 0 | Define the interface (40.1.1.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 6.6.6.22/32 area 0 | Define the interface (4.4.4.53/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 ldp | Configure Router LDP instance |
(config-router)# transport-address ipv4 6.6.6.22 0 | Configure Transport address for LDP with label space value 0 |
(config-router)#exit | Exit from router mode |
(config)# ip route 1.1.1.54/32 50.1.1.56 | Specify the destination prefix and mask for the network and a gateway. |
(config)#exit | Exit from Cofig mode |
#configure terminal | Enter the Configure mode. |
(config)#interface lo | Enter interface mode |
(config-if)#ip address 7.7.7.55/32 secondary | Configure the IP address of the interface loopback |
(config-if)#exit | Exit interface mode |
(config)#interface eth2 | Enter interface mode |
(config-if)#ip address 60.1.1.55/24 | Configure the IP address of the interface eth1 |
(config-if)#label-switching | Enable label-switching on interface eth1 |
(config-if)# enable-ldp ipv4 | Enable LDP process on eth1 interface |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 30 | Configure the routing process OSPF with process id 10 |
(config-router)#network 7.7.7.55/32 area 0 | Define the interface (7.7.7.55/32) on which OSPF runs, and associate the area ID (0) with the interface (area ID 0 specifies the backbone area). |
(config-router)#network 60.1.1.0/24 area 0 | Define the interface (60.1.1.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 200 | Enter Router BGP mode |
(config-router)#neighbor 1.1.1.54 remote- as 100 | Add loopback ip of PE2 as neighbor with neighbor AS |
(config-router)#neighbor 1.1.1.54 update- source lo | Update the source for that particular neighbor as loopback interface |
(config-router)#neighbor 1.1.1.54 ebgp-multihop | Enable neighbor connection between two eBGP |
(config-router)#neighbor 5.5.5.56 remote- as 200 | Add loopback ip of ABR1 as neighbor with neighbor AS |
(config-router)#neighbor 5.5.5.56 update- source lo | Update the source for that particular neighbor as loopback interface |
(config-router)#allocate-label all | Allocate labels |
(config-router)#address-family ipv4 labeled- unicast | Enter into labeled-unicast address family |
(config-router-af)#neighbor 5.5.5.56 activate | Activate the neighbor inside vpnv4 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 1.1.1.54 allow-ebgp-vpn | Allow eBGP neighbor to be a vpn peer. |
(config-router-af)#neighbor 1.1.1.54 activate | Activate the neighbor inside labeled-unicast 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 7.7.7.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)# router ldp | Configure Router LDP instance |
(config-router)# transport-address ipv4 7.7.7.55 0 | Configure Transport address for LDP with label space value 0 |
(config-router)#exit | Exit from router 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 eth2 | Enter interface mode |
(config-if)# ip vrf forwarding vrf1 | Bind the interface (eth2) to the VRF vrf1 |
(config-if)# ip address 62.1.1.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 |