Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: Administrative Distance of the Connected route

Administrative Distance of the Connected route 9 years 5 days ago #23289

  • tsunami
  • tsunami's Avatar
  • Offline
  • Frequent Member
  • Posts: 27
  • Karma: 0
Hi All,

I need a clarification. I have configured two static routes on the router.

one is pointing to the next hop and one at the exit interface.


================================================================
ip route 192.168.1.0 255.255.255.0 serial1/0
ip route 192.168.1.0 255.255.255.0 10.1.1.2
================================================================

Theoritically, the Administrative distance of the connected route is 0.
However, when I run a show ip route on the router, I see both static routes,
one with the next hop and one with the exit interface getting load balanced.

Here is the output.

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

172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Loopback1
10.0.0.0/30 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Serial1/0
S 192.168.1.0/24 [1/0] via 10.1.1.2
is directly connected, Serial1/0
=================================================================

So, the Question is wether the AD of the static connected route is 1 or 0 ?

Thanks in Advance.

Tsunami
The administrator has disabled public write access.

Re: Administrative Distance of the Connected route 9 years 4 days ago #23290

  • S0lo
  • S0lo's Avatar
  • Offline
  • Moderator
  • Posts: 1577
  • Thank you received: 7
  • Karma: 3
I'm confused a bit,

Your defining 2 static routes for the same network to point to the same location (one on interface and one next hop). And in the middle of the talk you note that it is also directly connected.

If it is directly connected. you could have just defined one additional static route to see which AD rules, why 2 routes ? :?
Studying CCNP...

Ammar Muqaddas
Forum Moderator
www.firewall.cx
The administrator has disabled public write access.

Re: Administrative Distance of the Connected route 9 years 4 days ago #23291

  • tsunami
  • tsunami's Avatar
  • Offline
  • Frequent Member
  • Posts: 27
  • Karma: 0
yeah. I know it does not make any practical sense.

The following is according to Routing TCP/IP Volume 1:

For example, static routes pointing to a next-hop address have an administrative distance of 1, and static
routes referencing an exit interface have an administrative distance of 0. If two static routes point to the
same destination, but one references a next-hop address and one references an exit interface, the latter—
with the lower administrative distance—will be preferred


I just wanted to verify this statement which is not true any more!
The administrator has disabled public write access.

Re: Administrative Distance of the Connected route 8 years 11 months ago #23330

  • Elohim
  • Elohim's Avatar
  • Offline
  • Senior Member
  • Posts: 220
  • Karma: 0
I believe if you set the route to the interface that will be 0 (no hop) because it is the connected interface that is the gateway, and if you set it to the far end ip address, than it will be a 1 because it is 1 hop away... however, keep in mind that if you set the next hop to the connected interface, your router will suffer performance as it will arp for everything instead of just the IPs it is connected to.

yeah. I know it does not make any practical sense.

The following is according to Routing TCP/IP Volume 1:

For example, static routes pointing to a next-hop address have an administrative distance of 1, and static
routes referencing an exit interface have an administrative distance of 0. If two static routes point to the
same destination, but one references a next-hop address and one references an exit interface, the latter—
with the lower administrative distance—will be preferred


I just wanted to verify this statement which is not true any more!
The administrator has disabled public write access.

Re: Administrative Distance of the Connected route 8 years 11 months ago #23372

  • S0lo
  • S0lo's Avatar
  • Offline
  • Moderator
  • Posts: 1577
  • Thank you received: 7
  • Karma: 3
Understood your trial, I suggest the following to test your case. First let the subnet of the route be a remote one not a directly connected one. Say 192.168.3.0/24. then add this:

[code:1]
ip route 192.168.3.0 255.255.255.0 serial1/0
ip route 192.168.3.0 255.255.255.0 10.1.1.10
[/code:1]

Let serial1/0 be on a different link than the 10.1.1.10 mentioned above. So you have 2 routes pointing a to same location but directing the packets to go to different locations. Then issue this:

[code:1]
debug ip packet
[/code:1]


Ping something in 192.168.3.0/24. If the packets go to serial1/0 side (debugging shows it). then the first route with AD=0 rules. If the packets go to the 10.1.1.10 side then the second route rules.

Hope that helps.
Studying CCNP...

Ammar Muqaddas
Forum Moderator
www.firewall.cx
The administrator has disabled public write access.
Time to create page: 0.095 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup