Not all static routes were created equal

In his excellent question, Matt reminded me of (almost prehistoric) days when static routes pointing to a connected interface (not IP next-hop) had administrative distance zero. I also remembered that we've had interesting routing problems as those static routes actually behaved like connected routes (and were redistributed into routing protocols with redistribute connected command).

This is no longer the case (and hasn't been since at least IOS release 12.2 ... I wasn't able to find a box running an older release to test it), all static routes now have default administrative distance one, and behave like they should (they never get redistributed with redistribute connected command).

For example, with the router configuration ...

ip route 0.0.0.0 0.0.0.0 serial 0/0.1
ip route 1.0.0.0 255.0.0.0 172.16.0.4

... both routes have identical administrative distance:

POP#show ip route 0.0.0.0Routing entry for 0.0.0.0 0.0.0.0, supernet
Known via "static", >distance 1, metric 0 (connected), candidate default path
Routing Descriptor Blocks:
* directly connected, via Serial0/0.1
Route metric is 0, traffic share count is 1
POP#show ip route 1.0.0.0
Routing entry for 1.0.0.0 255.0.0.0
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* 172.16.0.4
Route metric is 0, traffic share count is 1

Searching through Cisco's Bug toolkit turned up only a single relevant bug: CSCdi38232 (redistribute connected should not redistribute static route to OSPF), which was fixed in IOS release 10.2 and 10.3, that's probably also when they've fixed the administrative distance.

5 comments:

  1. In a cisco press book it points out that the administrative distance was 0 because it was directly connected

    ReplyDelete
  2. the link is http://fengnet.com/book/icuna/ch08lev1sec5.html

    ReplyDelete
  3. Ivan Pepelnjak04 March, 2010 08:56

    As I wrote, that was very long time ago, it's an interesting bit of IOS trivia, but somewhat irrelevant for the current CCNA students.

    ReplyDelete
  4. Dear Mr Pepelnjak
    In Wikipedia http://en.wikipedia.org/wiki/Administrative_distance is posted that Administrative distance of Static route out an interface is 1, but "Actual administrative distance is recognized somewhere between 0 and 1. This AD is more trustworthy than 1 but less trustworthy than 0."
    Is it true?

    ReplyDelete
  5. Ivan Pepelnjak06 June, 2011 18:05

    Never tried it. I guess it would also be IOS release dependent.

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.