cisco — Configuration Example: Multi-VRF CE

Device#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Device(config)#ip routing Device(config)#interface gigabitethernet1/0/2 Device(config-if)#no switchport Device(config-if)#ip address 208.0.0.20 255.255.255.0 Device(config-if)#exit Device(config)#router ospf 101 Device(config-router)#network 208.0.0.0 0.0.0.255 area 0 Device(config-router)#end Switch F belongs to VPN 2. Configure the connection to Switch A by using these commands. Device#configure terminal Enter configuration commands, one per line. End with CNTL/Z.

Device(config)#ip routing Device(config)#interface gigabitethernet1/0/1 Device(config-if)#switchport trunk encapsulation dot1q Device(config-if)#switchport mode trunk Device(config-if)#no ip address Device(config-if)#exit Device(config)#interface vlan118 Device(config-if)#ip address 118.0.0.11 255.255.255.0 Device(config-if)#exit Device(config)#router ospf 101 Device(config-router)#network 118.0.0.0 0.0.0.255 area 0 Device(config-router)#end When used on switch B (the PE router), these commands configure only the connections to the CE device, Switch A. Device#configure terminal Enter configuration commands, one per line. End with CNTL/Z.

Device(config)#ip vrf v1 Device(config-vrf)#rd 100:1 Device(config-vrf)#route-target export 100:1 Device(config-vrf)#route-target import 100:1 Device(config-vrf)#exit Device(config)#ip vrf v2 Device(config-vrf)#rd 100:2 Device(config-vrf)#route-target export 100:2 Device(config-vrf)#route-target import 100:2 Device(config-vrf)#exit Device(config)#ip cef Device(config)#interface Loopback1 Device(config-if)#ip vrf forwarding v1 Device(config-if)#ip address 3.3.1.3 255.255.255.0 Device(config-if)#exit Device(config)#interface Loopback2 Device(config-if)#ip vrf forwarding v2 Device(config-if)#ip address 3.3.2.3 255.255.255.0 Device(config-if)#exit Device(config)#interface gigabitethernet1/1/0.10 Device(config-if)#encapsulation dot1q 10 Device(config-if)#ip vrf forwarding v1 Device(config-if)#ip address 38.0.0.3 255.255.255.0 Configuring Multi-VRF CE Configuration Example:

Multi-VRF CE Configuring Multi-VRF CE 23