Adminstrative distance for route

Answered Question
Mar 18th, 2009

Hi every body!

i have few questions;

ip route 10.0.0.0 255.0.0.0 202.202.202.1

where 202.202.202.1 is next hop ip address.

ip route 10.0.0.0 255.0.0.0 s0

Now i configured both these routes on a router then the Ip route 10.0.0.0 255.0.0.0 s0 will be picked and installed in the routing table with" s" symbol indicating it is static route.

That means both routes have Ad=1 but ip route 10.0.0.0 255.0.0.0 s0 is chosen because the metric value for directly connected route is zero. am i correct?

thanks a lot and have a nice day!

I have this problem too.
0 votes
Correct Answer by Edison Ortiz about 7 years 8 months ago

A directly connected route has an AD of 0. A static route has an AD of 1.

That's not correct

http://cciepursuit.wordpress.com/2007/07/09/the-administrative-distance-of-a-static-route-pointed-to-an-interface-is-not-zero/

HTH,

__

Edison.

Correct Answer by Edison Ortiz about 7 years 8 months ago

How come i only find one route in routing table ?

Another bug in your IOS? :)

I don't know.

As another poster indicated, it recursives within CEF.

R1#sh ip cef 1.1.1.1

1.1.1.1/32

attached to FastEthernet0/0

nexthop 192.168.12.2 FastEthernet0/0

BTW, do you have cef enabled?

__

Edison.

Correct Answer by Edison Ortiz about 7 years 8 months ago

No, they will be load-balanced.

Rack1R1#sh run | i ip route

ip route 1.1.1.1 255.255.255.255 FastEthernet0/0

ip route 1.1.1.1 255.255.255.255 155.1.146.4

Rack1R1#sh ip route 1.1.1.1

Routing entry for 1.1.1.1/32

Known via "static", distance 1, metric 0 (connected)

Routing Descriptor Blocks:

155.1.146.4

Route metric is 0, traffic share count is 1

* directly connected, via FastEthernet0/0

Route metric is 0, traffic share count is 1

HTH,

__

Edison.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
lamav Wed, 03/18/2009 - 09:27

"the metric value for directly connected route is zero. am i correct?"

Correct.

Jon Marshall Wed, 03/18/2009 - 09:34

Sarah

In addition to previous posts.

If the next hop is the interface then the router will have to arp for all destinations.

If the next hop is an IP address then the router only needs the mac-address for that IP address.

Jon

lamav Wed, 03/18/2009 - 09:40

And just to add to what Jon said, that scenario can really suck if the next hop is the Internet and your router is going to send out an ARP request everytime someone goes to a new website.

Correct Answer
Edison Ortiz Wed, 03/18/2009 - 09:40

No, they will be load-balanced.

Rack1R1#sh run | i ip route

ip route 1.1.1.1 255.255.255.255 FastEthernet0/0

ip route 1.1.1.1 255.255.255.255 155.1.146.4

Rack1R1#sh ip route 1.1.1.1

Routing entry for 1.1.1.1/32

Known via "static", distance 1, metric 0 (connected)

Routing Descriptor Blocks:

155.1.146.4

Route metric is 0, traffic share count is 1

* directly connected, via FastEthernet0/0

Route metric is 0, traffic share count is 1

HTH,

__

Edison.

lamav Wed, 03/18/2009 - 09:51

Wow, that's interesting. I never tested it in a lab, like you just did, but it seems to go against everything we have ever read about static routes and directly connected interfaces.

sarahr202 Wed, 03/18/2009 - 10:04

Thanks Edison!

I configured :

ip route 10.0.0.0 255.0.0.0 s0

ip route 10.0.0.0 255.0.0.0 202.202.202.1

Show ip route;

routerB#show ip route

(output omitted)

S 10.0.0.0/8 is directly connected

is directly connected, Serial0

C 201.201.201.0/24 is directly connected, Serial1

C 202.202.202.0/24 is directly connected, S0

===============

In my set up only one route is installed whose metric =0

But in your example, i see

Rack1R1#sh run | i ip route

ip route 1.1.1.1 255.255.255.255 FastEthernet0/0

ip route 1.1.1.1 255.255.255.255 155.1.146.4

Rack1R1#sh ip route 1.1.1.1

Routing entry for 1.1.1.1/32

Known via "static", distance 1, metric 0 (connected)

Routing Descriptor Blocks:

155.1.146.4

Route metric is 0, traffic share count is 1

* directly connected, via FastEthernet0/0

Route metric is 0, traffic share count is 1

====================

metric=0 in both cases, my question if traffic is load balancing , these two routes must be present. In your case both routes are in routing table.

How come i only find one route in routing table ?

thanks a lot!

lamav Wed, 03/18/2009 - 10:08

Sarah, whats the IP address of s0 on your router?

Edison, whats the IP address of f0/0 on your router?

Thanks

Edison Ortiz Wed, 03/18/2009 - 10:22

Edison, whats the IP address of f0/0 on your router?

155.1.146.1

Not sure what's the point.

Correct Answer
Edison Ortiz Wed, 03/18/2009 - 10:11

How come i only find one route in routing table ?

Another bug in your IOS? :)

I don't know.

As another poster indicated, it recursives within CEF.

R1#sh ip cef 1.1.1.1

1.1.1.1/32

attached to FastEthernet0/0

nexthop 192.168.12.2 FastEthernet0/0

BTW, do you have cef enabled?

__

Edison.

izackvail Wed, 03/18/2009 - 09:54

It will actually install both routes. It will install the "ip route 10.0.0.0 255.0.0.0 202.202.202.1" as a recursive route. It will install "ip route 10.0.0.0 255.0.0.0 s0" as a directly connected route. When it goes to send traffic it will attempt to recurse to the next hop route. If the router has another route (via a dynamic routing protocol) it will use that for recursion. If not it will use the static directly connected route and attempt to send the traffic out that interface. If that is a multipoint interface it will have to do layer 3 to layer 2 resolution via arp or some other means depending on the encapsulation on the interface.

lamav Wed, 03/18/2009 - 09:59

"It will install the "ip route 10.0.0.0 255.0.0.0 202.202.202.1" as a recursive route. It will install "ip route 10.0.0.0 255.0.0.0 s0" as a directly connected route."

A directly connected route has an AD of 0. A static route has an AD of 1. So why would it place both routes in the routing table when one has a better AD?

lamav Wed, 03/18/2009 - 10:39

Oh, my God!

I'm a victim of an urban legend! Damn, I feel so deceived, so humiliated, so disillusioned. What's the world coming to when you can't trust what Cisco says about its own equipment?!?!

Alas, were it not for my cyber hero, Edison, I would have continued being a victim of false propaganda. Thanks, papi.

Sarah, you may be running an old version of code. According to that link Edison sent me, the AD of a static route pointing to an interface USED to be zero, not after 12.2. though....

Edison Ortiz Wed, 03/18/2009 - 10:42

Sarah, you may be running an old version of code.

She is and that's the reason she posts for extra confirmation.

She is a student with limited funds :(

lamav Wed, 03/18/2009 - 11:45

Giuseppe:

If you were thinking the way I was, then I can say Im flattered. :-)

Actions

This Discussion