cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1354
Views
0
Helpful
17
Replies

Adminstrative distance for route

sarahr202
Level 5
Level 5

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

Edison Ortiz
Hall of Fame
Hall of Fame

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.

View solution in original post

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.

View solution in original post

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.

View solution in original post

17 Replies 17

lamav
Level 8
Level 8

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

Correct.

Mohamad Qayoom
Level 3
Level 3

Yes, you are correct.

Jon Marshall
Hall of Fame
Hall of Fame

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

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.

Edison Ortiz
Hall of Fame
Hall of Fame

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.

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.

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!

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

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

Thanks

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

155.1.146.1

Not sure what's the point.

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
Level 1
Level 1

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.

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

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.

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

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: