12-15-2010 08:10 PM
Hello,
We need to know that what would be the procedure to have the VRF table and global routing table communicating with each other in a single router. Earlier we were using 2 different routers for this purpose, but now 1 router has to be eliminated.
There is no BGP involved for this.
Solved! Go to Solution.
12-15-2010 09:25 PM
Hi,
You could use static routes:
- Use the global keyword for the one in the VRF
- Specified both the interface and the NH for the one in the GRT.
It doesn't really scale so should be consider for exception only.
Another well known trick is to use an external cable connected to the same router. One port belong to the VRF and the other one to the GRT. You can then use regular static routing or an IGP like OSPF which uses a different process per VRF.
It's actually the same thing than using two routers as the idea is still to send the traffic out to receive it on another interface.
HTH
Laurent.
12-16-2010 12:42 AM
Vaibhav,
I do not want to jump into Laurent's thread of answering but as you seem to be in some sort of hurry I'll provide the example for you. The credit, however, belongs to Laurent.
ip vrf Example
rd 1:1
route-target 1:1
interface FastEthernet0/0
description Interface in a VRF
ip vrf forwarding Example
ip address 192.0.2.1 255.255.255.0
no shutdown
interface FastEthernet0/1
description Interface in a global table
ip address 199.99.9.1 255.255.255.0
! This command adds a route into the VRF
! that points to a route reachable via the global table
ip route vrf Example 223.255.255.0 255.255.255.0 199.99.9.2 global
! This command adds a route into the global table
! that points to a route reachable in the VRF Example
ip route 126.0.0.0 255.0.0.0 FastEthernet0/0 192.0.2.2
This way, there is a route added to the VRF Example pointing to the network 223.255.255.0/24 via the next hop 199.99.9.2 (somewhere behind the Fa0/1 interface). Also, another route to 126.0.0.0/8 is added to the global routing table which is reachable via the next hop 199.0.2.2 somewhere behind the Fa0/0 interface in the VRF Example.
Best regards,
Peter
Best regards.
Peter
12-15-2010 09:25 PM
Hi,
You could use static routes:
- Use the global keyword for the one in the VRF
- Specified both the interface and the NH for the one in the GRT.
It doesn't really scale so should be consider for exception only.
Another well known trick is to use an external cable connected to the same router. One port belong to the VRF and the other one to the GRT. You can then use regular static routing or an IGP like OSPF which uses a different process per VRF.
It's actually the same thing than using two routers as the idea is still to send the traffic out to receive it on another interface.
HTH
Laurent.
12-16-2010 12:26 AM
Hello,
ANYONE can please help with config lines?
12-16-2010 12:42 AM
Vaibhav,
I do not want to jump into Laurent's thread of answering but as you seem to be in some sort of hurry I'll provide the example for you. The credit, however, belongs to Laurent.
ip vrf Example
rd 1:1
route-target 1:1
interface FastEthernet0/0
description Interface in a VRF
ip vrf forwarding Example
ip address 192.0.2.1 255.255.255.0
no shutdown
interface FastEthernet0/1
description Interface in a global table
ip address 199.99.9.1 255.255.255.0
! This command adds a route into the VRF
! that points to a route reachable via the global table
ip route vrf Example 223.255.255.0 255.255.255.0 199.99.9.2 global
! This command adds a route into the global table
! that points to a route reachable in the VRF Example
ip route 126.0.0.0 255.0.0.0 FastEthernet0/0 192.0.2.2
This way, there is a route added to the VRF Example pointing to the network 223.255.255.0/24 via the next hop 199.99.9.2 (somewhere behind the Fa0/1 interface). Also, another route to 126.0.0.0/8 is added to the global routing table which is reachable via the next hop 199.0.2.2 somewhere behind the Fa0/0 interface in the VRF Example.
Best regards,
Peter
Best regards.
Peter
12-17-2010 05:29 AM
Thank you Peter, thanks for your post
11-21-2021 01:46 AM
i have another case related to IPv6
R7---------(vrf CE7)--R9
R7 is CE
R9 is PE and use vrf CE7 toward R7
i am trying to ping from R7 to R9 loopback (where loopback is resided in global routing table), i am trying to use ipv6 route nexthop-vrf default, but i am not sure what is value of nexthpp ip address?
12-15-2010 10:35 PM
Thanks Laurent
Can you please elaborate the use of global keyword (config). That would really help.
01-18-2011 11:56 PM
You can Use BGP for it as well..must check
01-19-2011 02:32 AM
HI,
The global keyword basically specifies to look into global routing table for the nexthop configured as part of static route.
ip route vrf test 10.0.0.0 255.0.0.0 192.168.1.1 global
As per above config, to reach 10.x.x.x netwrok from VRF test, it needs to look into global table for 192.168.1.1 as nexthop.
HTH,
Nagendra
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide