03-18-2009 09:22 AM - edited 03-06-2019 04:40 AM
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!
Solved! Go to Solution.
03-18-2009 09:40 AM
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.
03-18-2009 10:11 AM
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.
03-18-2009 10:14 AM
A directly connected route has an AD of 0. A static route has an AD of 1.
That's not correct
HTH,
__
Edison.
03-18-2009 09:27 AM
"the metric value for directly connected route is zero. am i correct?"
Correct.
03-18-2009 09:29 AM
Yes, you are correct.
03-18-2009 09:34 AM
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
03-18-2009 09:40 AM
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.
03-18-2009 09:40 AM
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.
03-18-2009 09:51 AM
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.
03-18-2009 10:04 AM
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!
03-18-2009 10:08 AM
Sarah, whats the IP address of s0 on your router?
Edison, whats the IP address of f0/0 on your router?
Thanks
03-18-2009 10:22 AM
Edison, whats the IP address of f0/0 on your router?
155.1.146.1
Not sure what's the point.
03-18-2009 10:11 AM
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.
03-18-2009 09:54 AM
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.
03-18-2009 09:59 AM
"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?
03-18-2009 10:14 AM
A directly connected route has an AD of 0. A static route has an AD of 1.
That's not correct
HTH,
__
Edison.
03-18-2009 10:39 AM
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....
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide