cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2925
Views
25
Helpful
18
Replies

Dilemma in understanding routing table building

Hi Friends,

I made the following topology:

               -----------------R3------------------------

              |                                             |

              |                                             |

R5--------R4                                           R1

             |                                               |

             |                                               |

             -----------------------R2----------------------

R3-R1-R2-R4 running eigrp

R3-R4-R5 running ospf

EIGRP and OSPF is mutually redistributed at R3.

At R2, EIGRP is sending summary address 192.168.0.0/21 towards R4

At R3, OSPF is aggregating EIGRP learned prefixes to 192.168.0.0/21 towards R4

At R4, distance command is used to alter the OSPF AD to 90 for routes learned via R3.

Now, if we go by routing rules, the lowest AD get installed in routing table. However the scenario which I create prefix 192.168.0.0/21 would be learned via EIGRP at R4 with AD of 90 and also via OSPF at R4 with altered AD of 90; So I assume that both of them should be installed in the routing table ( assuming that metric of both are same, which I ensured), but only EIGRP was getting installed.

To further check I was correctly setting the OSPF AD to 90, I shut down the EIGRP running interface and as expected, prefix learned via OSPF got installed in routing table with AD of 90.

So, question boils down to how is routing table build when AD and metric is same ??

Tried searching Cisco DOC, but didn't found anything usefull.

Regards,

Smitesh

18 Replies 18

Hi Smitesh,

After performing a series of tests, I agree with Alain and his assessment of the situation. It indeed looks as if the routers still kept the default AD of the different routing protocols, and used it in case two different protocols tried to enter the same network with the same resulting metric into the routing table. Note the following output from debug ip routing after configuring both EIGRP and OSPF for the same AD and metric:

*Mar  1 04:50:18.058: RT: add 192.0.2.1/32 via 10.0.12.1, ospf metric [90/512]

*Mar  1 04:50:18.058: RT: NET-RED 192.0.2.1/32

*Mar  1 04:50:18.058: RT: add 192.0.2.1/32 via 10.0.23.3, ospf metric [90/512]

*Mar  1 04:50:18.058: RT: NET-RED 192.0.2.1/32

*Mar  1 04:50:18.066: RT: closer admin distance for 192.0.2.1, flushing 2 routes

*Mar  1 04:50:18.066: RT: NET-RED 192.0.2.1/32

*Mar  1 04:50:18.066: RT: add 192.0.2.1/32 via 10.0.12.1, eigrp metric [90/512]

*Mar  1 04:50:18.066: RT: NET-RED 192.0.2.1/32

*Mar  1 04:50:18.066: RT: add 192.0.2.1/32 via 10.0.23.3, eigrp metric [90/512]

*Mar  1 04:50:18.066: RT: NET-RED 192.0.2.1/32

Strange - but nonetheless evidenced by this debug output.

Best regards,

Peter

Sorry to be ugly, but we try to make the routing protocols behave themselves when rational things are done. Making two protocols compete with the same AD is not rational and I'm not surprised the results are not what you expect.

Sent from Cisco Technical Support iPad App

Hi Don,

I am glad you joined! It is so nice to meet you here again - it has been a while.

You are not ugly at all. The experiment results were just unexpected to me. It boils down to how the insertion of the same network from different routing information sources into the routing table is implemented if these routing information sources are forced to use the same AD. I mean, I could absolutely understand if the code simply looked first at the AD, then at the metric, and if all matched, then just used all the alternatives. I am not saying it would be sensible but it would fit into what is publicly known about IOS way of installing routes into the routing table. This certainly enhances my understanding of how the best alternative gets installed into the routing table:

  1. First, look at the AD
  2. In case of tie, look at the default AD
  3. In case of tie, look at the metric

Would this selection process be correct?

Thank you!

Best regards,

Peter

Peter,

In general, the process you describe is correct, but not always.  As you know, BGP/EIGRP interaction can ignore these rules in multiple ways, but that's really irrelevant to this discussion.

The third item on your list (compare metric) is not really in play unless the routing protocols use the same metric type, meaning they're the same routing protocol.  In other words, a particular metric value in EIGRP is not the equivalent to the same metric value in OSPF and are never compared to determine who wins.  It's comparing apples and oranges.

Since the RIB will not allow the installation of two paths from two different route sources for a single prefiix, some tie breaker is required.  Rather than having it non-deterministic based on which one was first, the default AD is used.  I don't think it's always been this way, but happened at some point to solve a problem.  If I think of it, I'll see if I can find out more when I get to the office on Monday.

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: