Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Bronze

Adminstrative distance for route

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!

3 ACCEPTED SOLUTIONS

Accepted Solutions
Hall of Fame Super Bronze

Re: Adminstrative distance for route

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.

Hall of Fame Super Bronze

Re: Adminstrative distance for route

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.

Hall of Fame Super Bronze

Re: Adminstrative distance for route

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.

17 REPLIES
Blue

Re: Adminstrative distance for route

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

Correct.

Re: Adminstrative distance for route

Yes, you are correct.

Hall of Fame Super Blue

Re: Adminstrative distance for route

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

Blue

Re: Adminstrative distance for route

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.

Hall of Fame Super Bronze

Re: Adminstrative distance for route

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.

Blue

Re: Adminstrative distance for route

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.

Bronze

Re: Adminstrative distance for route

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!

Blue

Re: Adminstrative distance for route

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

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

Thanks

Hall of Fame Super Bronze

Re: Adminstrative distance for route

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

155.1.146.1

Not sure what's the point.

Hall of Fame Super Bronze

Re: Adminstrative distance for route

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.

New Member

Re: Adminstrative distance for route

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.

Blue

Re: Adminstrative distance for route

"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?

Hall of Fame Super Bronze

Re: Adminstrative distance for route

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.

Blue

Re: Adminstrative distance for route

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....

Hall of Fame Super Bronze

Re: Adminstrative distance for route

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 :(

Hall of Fame Super Silver

Re: Adminstrative distance for route

Hello Victor,

you are not alone on this ...

Best Regards

Giuseppe

Blue

Re: Adminstrative distance for route

Giuseppe:

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

188
Views
0
Helpful
17
Replies