#configure terminal | Enter configure mode |
(config)#interface lo | Enter loopback interface mode |
(config-if)#ip address 60.1.1.1/24 secondary | Specify IP address for the interface |
(config-if)#exit | Exit loopback interface mode |
(config)#router ospf 1 | Configure the routing process and specify the Process ID (1). |
(config-router)#network 10.10.10.0/24 area 0 | Advertise the network in OSPF |
(config-router)#network 60.1.1.0/24 area 0 | Advertise the loopback IP address in area 0 of router OSPF 1. |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
#configure terminal | Enter configure mode. |
(config)#ip vrf ABC | Specify the name of the VRF (ABC) 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 10:100 | 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 eth1 | Enter interface mode. |
(config-if)#ip vrf forwarding ABC | Associate interface eth1 to vrf ABC. |
(config-if)#exit | Exit interface mode. |
(config)#router ospf 1 ABC | Configure OSPF for VRF. |
(config-router)#network 10.10.10.0/24 area 0 | Advertise the network for OSPF adjacency with CE1. |
(config-router)#domain-id 1.1.1.1 | Configure the primary domain ID. |
(config-router)#domain-id 2.2.2.2 secondary | Configure a secondary domain ID. |
(config-router)#domain-id 3.3.3.3 secondary | Configure a secondary domain ID. |
(config-router)#exit | Exit Router mode and return to Configure mode. |
(config)#router bgp 100 | Assign the ASN value (100) to the BGP router. |
(config-router)#neighbor 30.30.30.2 remote-as 100 | Configure neighbor 30.30.30.2 for iBGP. |
(config-router)#address-family vpnv4 unicast | Enter Address-Family-VPNv4 mode. |
(config-router-af)#neighbor 30.30.30.2 activate | Activate neighbor 30.30.30.2. |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#address-family ipv4 vrf ABC | Enter Address-Family-VRF mode. |
(config-router-af)#redistribute ospf | Specify redistributing routes from OSPF into BGP. |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
#configure terminal | Enter configure mode. |
(config)#ip vrf ABC | Specify the name of the VRF (ABC) 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 10:100 | 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 eth1 | Enter interface mode. |
(config-if)#ip vrf forwarding ABC | Associate interface eth1 to vrf ABC. |
(config-if)#exit | Exit interface mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ospf 1 ABC | Configure OSPF for VRF. |
(config-router)#network 20.20.20.0/24 area 0 | Advertise the network for OSPF adjacency with CE1. |
(config-router)#domain-id 1.1.1.1 | Configure the primary domain ID. |
(config-router)#domain-id 2.2.2.2 secondary | Configure a secondary domain ID. |
(config-router)#domain-id 3.3.3.3 secondary | Configure a secondary domain ID. |
(config-router)#exit | Exit Router mode and return to Configure 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 30.30.30.1 remote-as 100 | Configure neighbor 30.30.30.1 for iBGP. |
(config-router)#address-family vpnv4 unicast | Enter Address-Family-VPNv4 mode. |
(config-router-af)#neighbor 30.30.30.1 activate | Activate neighbor 30.30.30.1. |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#address-family ipv4 vrf ABC | Enter Address-Family-VRF mode. |
(config-router-af)#redistribute ospf | Specify redistributing routes from OSPF into BGP. |
(config-router-af)#exit-address-family | Exit Address Family mode and return to Router mode. |
(config-router)#commit | Commit the candidate configuration to the running configuration. |
#configure terminal | Enter configure mode. |
(config)#router ospf 1 | Configure the routing process, and specify the Process ID (1). |
(config-router)#network 20.20.20.0/24 area 0 | Advertise the network in OSPF. |
(config-router)#commit | Commit the candidate configuration to the running configuration. |