Will static route be treated as "directly connected"?
johnifanx98
Member Posts: 329
in CCNA & CCENT
Below is content of Router A
==================
Router a
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.4.0 is directly connected, serial0
C 172.16.0.0 is directly connected, ethernet0
S 172.16.2.0 is directly connected, serial0
==================
subnet 172.16.2.0 is actually a subnet behind another router B, which is connected to router A via serial0. I wonder why this static route entry is marked as "directly connected"?
==================
Router a
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.4.0 is directly connected, serial0
C 172.16.0.0 is directly connected, ethernet0
S 172.16.2.0 is directly connected, serial0
==================
subnet 172.16.2.0 is actually a subnet behind another router B, which is connected to router A via serial0. I wonder why this static route entry is marked as "directly connected"?
Comments
-
ColbyG Member Posts: 1,264Looks like the route statement was done with an exit interface instead of an next hop IP, like "ip route x.x.x.x x.x.x.x fa0/0".
-
billscott92787 Member Posts: 933A static route isn't really treated as a directly connected route. Like Colby stated it shows the exit interface, which is just probably why it shows "Directly connected."
I configured a similar set up in packet tracer. Here is the routing table:
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Serial0/0
S 192.168.2.0/24 is directly connected, Serial0/0
I then configured using the next hop of 192.168.1.1
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Serial0/0
S 192.168.2.0/24 [1/0] via 192.168.1.1
So as you can see it's because the exit interface was used. A static route has a AD of 1. So a directly connected route would be chosen before a static route in this instance. The IOS should detect that it is a static route. Which you can verify it shows up in the static routes by using "show ip route static" which it does. -
Mark Knutson Member Posts: 73 ■■□□□□□□□□If I recall, the output of the show up route command has a legend at the top which explains what the letters mean.
When determining which route is preferable when there is more than one available, directly connected have the highest priority (administrative weight I believe), followed by static routes, followed by the various router protocol routes/ -
billscott92787 Member Posts: 933You see see the preference base by this link from cisco: What Is Administrative Distance? - Cisco Systems it breaks down the administrative distances based on each connected route, static, and protocols.
-
Haruna Umar Adoga Member Posts: 24 ■□□□□□□□□□yes it will be "treated" as a directly connected route (but its not directly connected), i.e when an exit interface is used instead of the next hop ip address.
what i mean here is, the router will perform only one look up process i.e it will just forward packets out the exit interface as if it was directly connected to it.
But when the next hop count ip address is used, it performs a recursive look up process i.e it will go to the next hop interface first and then use the exit interface to forward the packet.
exit interface e.g
ip route 192.168.3.0 255.255.255.0 serial0/0/0
and you have this on you routing table :
S 192.168.3.0 is directly connected, serial0/0/0
next hop ip address e.g
ip route 192.168.3.0 255.255.255.0 192.168.3.6
you have:
s 192.168.3.0 [1/0] via 192.168.3.6
note the "via" that is shown in the above route. i.e recursive look up is needed to forward packets that are destined for the 192.168.3.0 network.
_________________________________________________________________
ALWAYS LOOKING FORWARD TO LEARNING NEW THINGS SO THAT SOME DAY I WILL BE THE BEST IN MY CHOSEN FIELD... working on CCNA 640-802 -
kryolla Member Posts: 785johnifanx98 wrote: »Below is content of Router A
==================
Router a
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.4.0 is directly connected, serial0
C 172.16.0.0 is directly connected, ethernet0
S 172.16.2.0 is directly connected, serial0
==================
subnet 172.16.2.0 is actually a subnet behind another router B, which is connected to router A via serial0. I wonder why this static route entry is marked as "directly connected"?
if router B is advertising a network behind it to router A and if router A has a static route for that network, the static AD will win verses the AD of the rouing protocol by default. Others has pointed out why it says directly connected instead of via. Sometimes this is used if a route is flapping too much also you can use this technique for redistributing connectedStudying for CCIE and drinking Home Brew