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

Route prefference OSPF

Sarafianl1980
Level 1
Level 1

Hi All,

 

I would like to know from the below what the preferred path would be for the same route? Does the path in the global table win or the vrf table?

 

#sh ip route 12.191.38.231

Routing entry for 12.191.32.0/19

  Known via "ospf 1", distance 110, metric 145, type inter area

  Last update from 12.182.1.45 on TenGigabitEthernet0/0/0, 3w0d ago

  Routing Descriptor Blocks:

  * 12.182.1.47, from 12.191.0.4, 3w0d ago, via TenGigabitEthernet1/0/0

      Route metric is 145, traffic share count is 1

    12.182.1.45, from 12.191.0.4, 3w0d ago, via TenGigabitEthernet0/0/0

      Route metric is 145, traffic share count is 1

 

#sh ip route vrf GREEN 12.191.38.231

 Routing Table: GREEN

Routing entry for 12.191.0.0/16

  Known via "ospf 100", distance 110, metric 210

  Tag 64795, type extern 2, forward metric 54

  Last update from 12.145.5.130 on TenGigabitEthernet1/0/0.2090, 7w0d ago

  Routing Descriptor Blocks:

  * 12.145.5.130, from 12.145.2.151, 7w0d ago, via TenGigabitEthernet1/0/0.2090

      Route metric is 210, traffic share count is 1

      Route tag 64795

 

1 Accepted Solution

Accepted Solutions

 

It depends on whether the packet arrives on an interface in the VRF or not ie. if it does it will route within the VRF if not then the global routing table is used. 

 

Jon

View solution in original post

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

 

If you are in the VRF the preferred route will be the VRF route, if not you will use the global routing table. 

 

Jon

Thanks Jon.  If a packet is traversing this node heading towards this destination which routing table will be used?  I can't use traceroute so having to do this manually.

 

It depends on whether the packet arrives on an interface in the VRF or not ie. if it does it will route within the VRF if not then the global routing table is used. 

 

Jon

Joseph W. Doherty
Hall of Fame
Hall of Fame
Perhaps the key to understanding VRF routing, each is its own routing instance. If you understand VLANs, it's sort of the L3 version of those.

Or, if you run multiple dynamic routing protocols on a router, it's somewhat like that too. The big difference is, if you're running dynamic routing protocols, although each routing protocol doesn't share its routes with other routing protocols, the routing table is a composite of all route information (with best AD or longest prefix "wining" route table entry). VRF, though, don't, share their route tables on the same device.

I.e. if a packet is in the "global" context, it uses the "global" route table. If a packet is in a specific VRF context, it uses that VRF's route table.

What can be somewhat confusing, you can pass routes between VRFs (in concept, somewhat like redistribution between different routing protocols), so separate routing instances can have the same prefixes.
Review Cisco Networking for a $25 gift card