#configure terminal | Enter configure mode. |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip address 80.1.1.1/24 | Configure IP address for interface |
(config-if)#exit | Exit from interface mode and enter into Configure mode |
(config)#interface eth3 | Enter interface mode |
(config-if)#ip address 90.1.1.1/24 | Configure IP address for interface |
(config-if)#exit | Exit from interface mode and enter into Configure mode |
(config)# router bgp 200 | Assign the ASN value (100) to the BGP router |
(config-router)#neighbor 80.1.1.2 remote-as 100 | Configure neighbor (RR) in IBGP |
(config-router)#neighbor 90.1.1.2 remote-as 100 | Configure neighbor (RR) in IBGP |
(config-router)# address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)#redistribute static | Redistribute static routes into BGP |
(config-router-af)#neighbor 80.1.1.2 activate | Activate neighbor |
(config-router-af)#neighbor 90.1.1.2 activate | Activate neighbor |
(config-router-af)#exit-address-family | Exit address-family mode |
(config-router)#exit | Exit from router mode and enter configure mode |
(config)#ip route vrf 1 1.1.1.0/24 eth1 | Configure static route with VRF 1 instance |
(config)#ip route vrf 2 3.3.3.0/24 eth3 | Configure static route with VRF 2 instance |
(config)#ip route vrf 2 4.4.4.0/24 eth3 | Configure static route with VRF 2 instance |
(config)#commit | Commit the candidate configuration to the running configuration. |
#configure terminal | Enter configure mode. |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip address 101.1.1.1/24 | Configure IP address for interface |
(config-if)#exit | Exit from interface mode and enter into Configure mode |
(config)#interface eth3 | Enter interface mode |
(config-if)#ip address 100.1.1.1/24 | Configure IP address for interface |
(config-if)#exit | Exit from interface mode and enter into Configure mode |
(config)# router bgp 200 | Assign the ASN value (100) to the BGP router |
(config-router)#neighbor 100.1.1.2 remote-as 100 | Configure neighbor (RR) in IBGP |
(config-router)#neighbor 101.1.1.2 remote-as 100 | Configure neighbor (RR) in IBGP |
(config-router)# address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)#neighbor 100.1.1.2 activate | Activate neighbor |
(config-router-af)#neighbor 101.1.1.2 activate | Activate neighbor |
(config-router-af)#exit-address-family | Exit from address family ipv4 unicast mode |
(config-router)#exit | Exit from router and configure mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
#configure terminal | Enter configure mode. |
(config)#ip vrf 1 | Create a VRF instance 1 |
(config-vrf)#rd 1:100 | Configure unique RD value for VRF to identify VRF instance |
(config-vrf)#route-target export 1:200 | Configure route-target (rt) value for exporting routes into other VRFs (for other PE’s) |
(config-vrf)#exit | Exit VRF mode and enter Configure mode |
(config)#ip vrf 2 | Create a VRF instance 2 |
(config-vrf)#rd 1:300 | Configure unique RD value for VRF to identify VRF instance |
(config-vrf)#route-target both 1:400 | Configure route-target (rt) value for exporting routes into other VRFs (for other PE’s) |
(config-vrf)#exit | Exit VRF mode and enter Configure mode |
(config)#router ldp | Enable LDP. |
(config-router)#exit | Exit router LDP mode |
(config)#interface lo | Enter loopback interface mode |
(config-if)#ip address 11.11.11.11/32 secondary | Configure IP address for loopback interface |
(config-if)# enable-ldp ipv4 | Enable LDP on loopback interface |
(config-if)#exit | Exit interface mode |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip vrf forwarding 1 | Bind interface to VRF 1 |
(config-if)#ip address 80.1.1.2/24 | Configure IP address for VRF binded interface |
(config-if)#exit | Exit interface mode |
(config)#interface eth2 | Enter interface mode |
(config-if)#ip address 40.1.1.1/24 | Configure an IP address for interface |
(config-if)#label-switching | Enable label-switching on interface |
(config-if)# enable-ldp ipv4 | Enable LDP on connected interface between PE1 and RR |
(config-if)#exit | Exit interface mode |
(config)#interface eth3 | Enter interface mode |
(config-if)#ip vrf forwarding 2 | Bind interface to VRF 1 |
(config-if)#ip address 90.1.1.2/24 | Configure IP address for VRF binded interface |
(config-if)#exit | Exit interface mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ospf | Enable OSPF process between PE1 and RR |
(config-router)#network 11.11.11.11/32 area 0.0.0.0 (config-router)#network 40.1.1.0/24 area 0.0.0.0 | Advertise loopback network in OSPF area 0 |
(config-router)#exit | Exit router OSPF mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)# router bgp 100 | Assign the ASN value (100) to the BGP router |
(config-router)#neighbor 22.22.22.22 remote-as 100 | Configure neighbor (RR) in IBGP |
(config-router)#neighbor 22.22.22.22 update-source lo | Enable neighbor with loopback interface. |
(config-router)#address-family vpnv4 unicast | Enter Address-Family-VPNv4 mode. |
(config-router-af)#neighbor 22.22.22.22 activate | Activate RR neighbor |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#address-family rtfilter unicast | Enable RT filter address-family mode |
(config-router-af)#neighbor 22.22.22.22 activate | Activate neighbor |
(config-router-af)#exit-address-family | Exit RTfilter Address Family mode and return to Router mode. |
(config-router)#address-family ipv4 vrf 1 | Enter Address-Family-VRF mode. |
(config-router-af)#neighbor 80.1.1.1 remote-as 200 | Configure CE neighbor in VRF mode |
(config-router-af)#neighbor 80.1.1.1 activate | Activate neighbor in VRF |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#address-family ipv4 vrf 2 | Enter Address-Family-VRF mode. |
(config-router-af)#neighbor 90.1.1.1 remote-as 200 | Configure CE neighbor in VRF mode |
(config-router-af)#neighbor 90.1.1.1 activate | Activate neighbor in VRF |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#exit | Exit from router mode and configure mode |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ldp | Enable LDP |
(config-router)#exit | Exit router LDP mode |
(config)#interface lo | Enter loopback interface |
(config-if)#ip address 22.22.22.22/32 secondary (config-if)#ip address 44.44.44.44/32 secondary | Configure IP address for loopback interface |
(config-if)# enable-ldp ipv4 | Enable LDP on loopback interface |
(config-if)#exit | Exit interface mode |
(config)#interface eth2 | Enter interface mode |
(config-if)#ip address 40.1.1.2/24 | Configure IP address for interface connecting to PE2 |
(config-if)#label-switching | Enable label-switching on interface |
(config-if)# enable-ldp ipv4 | Enable LDP on connected interface between PE1 and RR |
(config-if)#exit | Exit interface mode |
(config)#interface eth4 | Enter into interface mode |
(config-if)#ip address 50.1.1.1/24 | Configure an IP address for interface connecting to PE1 |
(config-if)#label-switching | Enable label-switching on interface |
(config-if)# enable-ldp ipv4 | Enable LDP on connected interface between PE1 and RR |
(config-if)#exit | Exit interface mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ospf | Enable OSPF process between PE1 and RR |
(config-router)#network 22.22.22.22/32 area 0.0.0.0 | Advertise loopback network in OSPF area 0 |
(config-router)#network 40.1.1.0/24 area 0 (config-router)#network 44.44.44.44/32 area 0.0.0.0 (config-router)#network 50.1.1.0/24 area 0.0.0.0 | Advertise PE1 to RR connected network in OSPF |
(config-router)#exit | Exit from router OSPF mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)# router bgp 100 | Assign the ASN value (100) to the BGP router |
(config-router)#neighbor 11.11.11.11 remote-as 100 | Configure neighbor (PE1) in IBGP |
(config-router)#neighbor 11.11.11.11 update-source 22.22.22.22 | Enable neighbor with loopback interface |
(config-router)#neighbor 33.33.33.33 remote-as 100 | Configure neighbor (PE2) in IBGP |
(config-router)#neighbor 33.33.33.33 update-source 44.44.44.44 | Enable neighbor with loopback interface |
(config-router)#address-family vpnv4 unicast | Enter Address-Family-VPNv4 mode. |
(config-router-af)#neighbor 11.11.11.11 activate | Activate PE1 neighbor |
(config-router-af)#neighbor 33.33.33.33 activate | Activate PE2 neighbor |
(config-router-af)#neighbor 11.11.11.11 route-reflector-client | Configure PE1 as Route Reflector client |
(config-router-af)#neighbor 33.33.33.33 route-reflector-client | Configure PE2 as Route Reflector client |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#address-family rtfilter unicast | Enable RT filter address-family mode |
(config-router-af)#neighbor 11.11.11.11 activate | Activate PE1 neighbor in RTfilter family |
(config-router-af)#neighbor 33.33.33.33 activate | Activate PE2 neighbor in RTfilter family |
(config-router-af)#neighbor 33.33.33.33 route-reflector-client | Configure PE2 as Route Reflector client |
(config-router-af)#neighbor 11.11.11.11 route-reflector-client | Configure PE1 as Route Reflector client |
(config-router-af)#exit-address-family | Exit RTfilter Address-Family mode |
(config-router)#exit | Exit from Address-Family, Router and Configure mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
#configure terminal | Enter configure mode. |
(config)#ip vrf 3 | Create a VRF instance 3 |
(config-vrf)#rd 1:600 | Configure unique RD value for VRF to identify VRF instance |
(config-vrf)#route-target export 1:200 | Configure route-target (rt) value for exporting routes into other VRFs (for other PE’s) |
(config-vrf)#exit | Exit VRF mode and enter Configure mode |
(config)#ip vrf 4 | Create a VRF instance 4 |
(config-vrf)#rd 1:900 | Configure unique RD value for VRF to identify VRF instance |
(config-vrf)#route-target both 1:400 | Configure route-target (rt) value for exporting routes into other VRFs (for other PE’s) |
(config-vrf)#exit | Exit VRF mode and enter Configure mode |
(config)#router ldp | Enable LDP. |
(config-router)#exit | Exit router LDP mode |
(config)#interface lo | Enter loopback interface mode |
(config-if)#ip address 33.33.33.33/32 secondary | Configure IP address for loopback interface |
(config-if)# enable-ldp ipv4 | Enable LDP on loopback interface |
(config-if)#exit | Exit interface mode |
(config)#interface eth1 | Enter interface mode |
(config-if)#ip vrf forwarding 3 | Bind interface to VRF 3 |
(config-if)#ip address 101.1.1.2/24 | Configure IP address for VRF binded interface |
(config-if)#exit | Exit interface mode |
(config)#interface eth3 | Enter interface mode |
(config-if)#ip vrf forwarding 4 | Bind interface to VRF 3 |
(config-if)#ip address 100.1.1.2/24 | Configure IP address for VRF binded interface |
(config-if)#exit | Exit interface mode |
(config)#interface eth4 | Enter interface mode |
(config-if)#ip address 50.1.1.2/24 | Configure an IP address for interface |
(config-if)#label-switching | Enable label-switching on interface |
(config-if)# enable-ldp ipv4 | Enable LDP on connected interface between PE2 and RR |
(config-if)#exit | Exit interface mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ospf | Enable OSPF process between PE2 and RR |
(config-router)#network 33.33.33.33/32 area 0.0.0.0 | Advertise loopback network in OSPF area 0 |
(config-router)#network 50.1.1.0/24 area 0 | Advertise PE2 to RR connected network in OSPF |
(config-router)#exit | Exit router OSPF mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)# router bgp 100 | Assign the ASN value (100) to the BGP router |
(config-router)#neighbor 44.44.44.44 remote-as 100 | Configure neighbor (RR) in IBGP |
(config-router)#neighbor 44.44.44.44 update-source 33.33.33.33 | Enable neighbor with loopback interface. |
(config-router)#address-family vpnv4 unicast | Enter Address-Family-VPNv4 mode. |
(config-router-af)#neighbor 44.44.44.44 activate | Activate RR neighbor |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#address-family rtfilter unicast | Enable RT filter address-family mode |
(config-router-af)#neighbor 44.44.44.44 activate | Activate neighbor |
(config-router-af)#exit-address-family | Exit RTfilter Address Family mode and return to Router mode. |
(config-router)#address-family ipv4 vrf 3 | Enter Address-Family-VRF mode. |
(config-router-af)#neighbor 101.1.1.1 remote-as 200 | Configure CE neighbor in VRF mode |
(config-router-af)#neighbor 101.1.1.1 activate | Activate neighbor in VRF |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#address-family ipv4 vrf 4 | Enter Address-Family-VRF mode. |
(config-router-af)#neighbor 100.1.1.1 remote-as 200 | Configure CE neighbor in VRF mode |
(config-router-af)#neighbor 100.1.1.1 activate | Activate neighbor in VRF |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#exit | Exit router and configure mode |
(config)#commit | Commit the candidate configuration to the running configuration. |