cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2180
Views
0
Helpful
10
Replies

IP prefix import from a vrf table into global table

Deniz AYDIN
Level 1
Level 1

Hi,

Does any know how to import some of the vrf routes into global routing table.

10 Replies 10

Harold Ritter
Cisco Employee
Cisco Employee

Deniz,

There is a feature that allows you to dynamically import routes from the global to the VRF but not the other way around.

You can have a static route in the global with a NH interface in a VRF though.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hi,

I cannot write static route for this case. Because I am using the vrf for my pppoe users. Router downloads the user profiles from the radius and put the users into the internet vrf. But I cannot install the reverse route for the user. If I use, route or framed route attribute in the userprofile ,router installs the route as it is a vrf route. The reason i am using the vrf is that I just wanna use different route table for different customers.

Hi Harold!

I agree we cannot import routes from VRF to global. But we should be able to redistribute routes from the VRF PE-CE routing protocol into the global IGP, as i have mentioned in my earlier post. I have not tried it out but I do see the redistribute ospf x vrf xyz command in global ospf config mode.

Regards,

Niranjan

Niranjan,

It is simply not allowed to redistribute from a routing process assigned to a VRF into the global.

One could probably loop two interfaces, one from the VRF and one from the global and run BGP between the two and therefore get the routes from the VRF into the global. Although I have never tried that I think this could work. You would need a special knob to configure the a separate BGP router id for the VRF, which is not available in all version of IOS (available in 12.2(22)SRB I believe) and would probably need to do some tricks with the local-as command to get it to work.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

n.nandrekar
Level 4
Level 4

hi!

You can create a distribute list and redistribute those routes from the vrf routing protocol (ospf x vrf test) into the global IGP.

eg. if you are running "ospf 1 vrf test" as the PE-CE protocol for vrf test, and you are running OSPF 100 as global igp, you can go to global IGP and redistribute the vrf routes in that using a distribute list to control the redistribution.

But doing this, you have to know the scenario completely and be sure that it doesnot overlap / cause problems in your global IGP.

For what scenario do you want to do that? If you have only a few prefixes, it is better to install static routes.

Regards,

Niranjan

Hi,

When I try to redistribute, Router is not allowing.

#router ospf 100

(config-router)#redistribute ospf 1 vrf test subnets

%OSPF process 1 is attached to VRF test

Hi,

1-Try to configure default route into the vrf for upload traffic with global key word:

ip route vrf internet 0.0.0.0 0.0.0.0 (next-hop is your gateway router) global.

2-For download traffic configure static route into global routing table with the pppoe customers pool pointing to customers vrf interface or next-hop through this interface:

ip route customer pool 255.255.255.0 ethernetx/x 1.1.1.1 .

Regards,W.Amer

Soryy, I guess I am not clear enough.

I cannot write a static route pointing to customer,as they are coming from L2TP tunnel which clones a virtual template. We can think as they are a normal dial-up users using a virtual-template. So I cannot write a static route manually pointing the customer.

If the uplink interface will be used only for internet traffic you can bind this interface to another vrf and now you can import & export routes (default and customer routes which are connected routes in the cust vrf routing table) by RTs between customer vrfs and uplink vrf and in the same time you will separate between cust VRFs and make uplink vrf as central vrf.

Regards,W.Amer

sittha
Level 1
Level 1

Why don't you create another interface for vrf "test" that facing to P Router and then enable ospf for vrf "test" ?

eg. Something like this.

in lo9999

ip vrf for test

ip add x.x.x.x/32

int gi2/0

description "Global TO P-router"

ip add y.y.y.y/30

int Gi2/0.1

description "VRF TO P-router"

encap dot 10

ip vrf for test

router ospf 1

router-id y.y.y.?

network 0.0.0.0 area 0

router ospf 2 vrf test

redis connected subnet tag 1234 !

router-id x.x.x.x

network 0.0.0.0 area 0

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: