Static routing… metric?!

In this post we explore the operation of static routing, epecially the use of the metric feature, in a network that already runs an IGP (RIP routing protocol).

network setup

In our 3 routers RIP network, both R1 and R3 advertise 13.13.13.13/32 network into RIP domain

R3 is configured to offset (to add) all network updates via interface fa1/0 by 10

check the operation of rip network

A debug ip rip command shows the output in the next figure:

R2 receives R3 route with a metric of 11 hops.

A debug ip rip events shows that only R1 route succeeds its entrance into R2 RIP database

In rip database only the best route is preserved

A debug ip routing on R2 shows that R3 route is not accepted by the routing table and returns code:19

As soon as we shutdown the lo13 interface on R1 the route gets poisoned and R3 route added. We bring up the lo13 interface on R1 and see that R3 route is removed because R2 receives now a better route metric from R1

In the R2 routing table the best protocol candidate route in terms of protocol metric (in our case hops) is added

The protocol metric is just copied to the structure of the default routing table entry describing this route

This entry includes a new attribute that was not in the protocol table or database (rip database): distance (of 120 in case of RIP) which indicates the source of the route information

redundant static routing with same AD

We configure static routing to the same destination and use a distance (AD administrative distance) of 120 (the same as RIP)

Now the static route is installed in the routing table with 120 as AD and a metric of 0

Not because of the administrative distance but rather the metric which is 0 for static routes (instead for rip route with metric 1 hops away).

Static routing provides a local routing information source to the router. It is different from dynamic routing because no routing information is exchanged between routers. Knowing that, why should I configure a metric for static routes?

Let’s add another static route to the same destination but that points to the opposite direction

Both routes are installed because they have the same cost (metric).

In static routing metric and administrative distance are both local and there’s no case that may apply only to the metric in choosing the best route to put in the routing table. In other words if static routes are orginated from the same router why a route should be more expensive than the other?

Using the metric in static routing is redundant not to say useless.

But the administrative distance is still needed to discriminate the routing information source. Additionally, we could use different administrative distances per routes… giving the administrator the ability to distinguish them

as a conclusion

in this post we’ve explored a simple routing case operation to understand metric use in adding routing information to router default routing table. In static routing, the use of metric can not have the same meaning as for dynamic routing. But the administrative distance do so giving the administrator the ability to locally classify routing information to put in the routing table.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Have Missed!

error: Content is protected !!
Table of Contents