cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1359
Views
0
Helpful
4
Replies

VRF-Lite/Multi VRF Connected Injection

ngriffin
Level 1
Level 1

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

4 Replies 4

cpubob
Level 1
Level 1

See:

http://www.cisco.com/en/US/tech/tk436/tk832/technologies_configuration_example09186a0080231a3e.shtml

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 2.2.2.0/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

rd 1:1

int e 0/0

desc "2.2.2.x is reachbale via 1.1.1.2"

ip add 1.1.1.1 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

net 1.1.1.1

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 2.2.2.0 255.255.255.0 1.1.1.2 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

Hi,

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;

http://www.cisco.com/en/US/docs/ios/12_3t/12_3t14/feature/guide/gt_bgivt.html

HTH

LR

autobot130
Level 1
Level 1

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.

eg:

!

interface Vlan10

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.

ip route

Thats it!

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

rd 100:1

route-target export 100:1

route-target import 100:2

!

ip vrf I2

rd 100:2

route-target export 100:2

!

nterface Ethernet0/1

ip vrf forwarding I1

ip address 6.6.6.1 255.255.255.0

half-duplex

!

interface Ethernet0/2

ip vrf forwarding I2

ip address 7.7.7.1 255.255.255.0

half-duplex

!

router eigrp 1

no auto-summary

!

address-family ipv4 vrf I1

redistribute static metric 100000 100 255 1 1500

network 1.1.100.1 0.0.0.0

no auto-summary

autonomous-system 1

exit-address-family

!

router bgp 1

no synchronization

bgp router-id 1.1.1.1

bgp log-neighbor-changes

no auto-summary

!

address-family ipv4 vrf I2

redistribute connected

redistribute static

no auto-summary

no synchronization

exit-address-family

!

address-family ipv4 vrf I1

redistribute connected

redistribute static

default-information originate

no auto-summary

no synchronization

exit-address-family

!

ip route vrf I1 0.0.0.0 0.0.0.0 6.6.6.254

ip route vrf I2 0.0.0.0 0.0.0.0 7.7.7.254

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: