So I've found ways to exchange routes between VRF's with a BGP Af configuration, as well as the global keyword on static routes, but what I'm trying to do is to get connected Global routes into a VRF, is this possible? If so can someone point me in the right direction? I want to have multiple VRF's with different default routes, while also allow some global prefixes into the VRF?
Hope this makes sense, thanks
To get the global route into the vrf simply create a static route to the prefix in the vrf then restribute it in the vrf.
For example, say 18.104.22.168/24 is in the global table and you run eigrp as your igp. Also your vrf network is 192.168.1.0/24 and you are running ospf.
ip vrf test
int e 0/0
desc "2.2.2.x is reachbale via 22.214.171.124"
ip add 126.96.36.199 255.255.255.0
int e 0/1
ip vrf for test
ip add 192.168.1.1 255.255.255.0
router eigrp 50
redistribute static metric 1 1 1 1 1
router ospf 100 vrf test
net 192.168.1.1 0.0.0.0 area 0
redistribute static subnets
!this puts a static route into the vrf table for a global destination. You can specify the interface or the next-hop but the next-hop requires the global keyword
ip route vrf test 188.8.131.52 255.255.255.0 184.108.40.206 global
!This will put a static route into the global table for the vrf network, which eigrp will redistribute.
ip route 192.168.1.0 255.255.255.0 eth0/1
Aswell as doing it the manual way of adding vrf static routes pointing to a next hop in the global table, and redistributing this into the vrf igp, you can also use the ipv4 import feature to import from the global table into the vrf table, check out;
This is pretty simple... to inject global routes into a VRF you need to put an "ip route x.x.x.x x.x.x.x vlan10". Where Vlan10 is in a particular VRF.
ip vrf forwarding TEST-VRF
ip address 192.168.254.1 255.255.255.0
do this: ip route 192.168.254.0 255.255.255.0 Vlan10
Point to the physical interface since there is no next-hop IP reachable from the global table.
Multiple default routes in different VRF's is done similar to what CpuBob posted.
VRF-A: To get default route in a VRf to global
ip route vrf VRF-A 0.0.0.0 0.0.0.0
VRF-A: Needs return path from global to VRF too.
Thank you all this has been helpful. One other question along the same lines, how about getting multiple default routes into the same VRF, for example another default from another VRF for redundancy. Say I have 2 static routes in two different VRF's and I have EIGRP running within a VRF. How can I get VRF B's default into the VRF A eigrp topology?
ip vrf I1
route-target export 100:1
route-target import 100:2
ip vrf I2
route-target export 100:2
ip vrf forwarding I1
ip address 220.127.116.11 255.255.255.0
ip vrf forwarding I2
ip address 18.104.22.168 255.255.255.0
router eigrp 1
address-family ipv4 vrf I1
redistribute static metric 100000 100 255 1 1500
network 22.214.171.124 0.0.0.0
router bgp 1
bgp router-id 126.96.36.199
address-family ipv4 vrf I2
address-family ipv4 vrf I1
ip route vrf I1 0.0.0.0 0.0.0.0 188.8.131.52
ip route vrf I2 0.0.0.0 0.0.0.0 184.108.40.206