ip classless & default route

Unanswered Question
Mar 28th, 2007
User Badges:

We're running MSFC's on Cat-6506s and are using static routes only; - i.e. no dynamic routing involved..The config had the "no ip classless" statement in it and we figured we would leave it intact..However, that resulted in the default route not working. Still, if we put a static route using the default route address, it would work OK. Does anybody happen to know what's going on here?

Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Richard Burts Wed, 03/28/2007 - 09:18
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Greg


I am not sure that I fully understand your question. You state that you are using only static routes with no dynamic routing protocol. You then state that the default route would not work until you configured a static route using the default route address. What puzzles me is that if there is no dynamic routing and no static default route, then where did the default route come from.


Perhaps if you can clarify what was happening we can find better answers to your question.


HTH


Rick

Jon Marshall Wed, 03/28/2007 - 13:36
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi Greg


Rick asked what i was going to ask :-) but can i ask when you say you added a static route using the default route address do you mean you added a static route for a particular network pointing to the default route address as opposed to the generic default route of 0.0.0.0 ?


Be aware that if you are using default routes you must enable ip classless which is on by default after 11.3 i believe so someone must have explicitly put that into the config.


If you don't have ip classless and the router does not have a specific entry for that network the router will not use the default route but will drop the packet.


HTH


Jon



Richard Burts Wed, 03/28/2007 - 13:52
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Jon


I am not sure that I understand what you are saying in the beginning of your middle paragraph, and if you are saying what I think you are then I disagree. "if you are using default routes you must enable ip classless" It is not necessary to enable ip classless to use a default route. A default route can and does work with no ip classless (though the use of the default route does change a bit depending on whether or not ip classless is configured).


And I think that your point in your last paragraph can be clarified with an example. So lets assume that we have a router and when we do show ip route we get these routes in the table:

10.10.1.0/24 via serial 0

172.16.0.0/16 via serial 0

0.0.0.0/0 via serial 0


Now lets examine what happens when certain packets come into a router interface and the router needs to make a routing decision:

- if a packet with destination 172.16.12.6 arrives then pretty clearly there is a match with the /16 route in the routing table and the router will forward it out serial 0.

- if a packet with destination 51.96.28.65 arrives then it does not match any specific entry in the routing table and the router will forward it out serial 0 (using the default route).

- note that in these 2 examples the behavior is exactly the same for ip classless and for no ip classless.

- if a packet with destination 10.20.2.78 arrives, then we must consider whether the behavior is ip classless or is no ip classless. If ip classless is configured then the default route can be used and the packet is forwarded out serial 0. If no ip classless is configured then the packet is dropped as unroutable.


HTH


Rick

Jon Marshall Wed, 03/28/2007 - 13:59
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi Rick


I must remember with posts that you are involved with to be very specific !!! :-)


You are quite right and i missed a crucial bit of information. With "no ip classless" from your example the router drops the 10.20.2.78 because that destination is from the same major network as the serial0 interface. The 51.x.x.x address would be forwarded.


I'm going to have to start re-reading what i write before posting :-)


*Edit - sorry it's not the serial0 interface that has the 10.10.1.0/24 address - that is just a route in the routing table. **


Jon

Richard Burts Wed, 03/28/2007 - 14:06
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Jon


I have been caught in my fair share of posts in which I wrote quickly or not carefully. And I have learned that in networking frequently we avoid mistakes by being careful about what we say and about what we do. And I believe that those of us with more experience do well to show a high standard in our posts for the benefit of those with less experience.


HTH


Rick

Jon Marshall Wed, 03/28/2007 - 14:09
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Rick


Thanks for that. I completely agree with your sentiments.


Jon

axfalk Thu, 03/29/2007 - 08:25
User Badges:

Guilty as charged as well...that e-mail was composed very hastily - should have known better..also, sorry for opening a can of worms ..

Rick, I appreciate your very thorough explanation (as always)...The question I was trying to articulate (albeit very clumsily)was why would a static route using the default gateway's address to a specific destination work, whereas the default gateway would not when using "no ip classless". And when using "ip classless" both worked OK...thanks again...

Richard Burts Thu, 03/29/2007 - 08:57
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Greg


I still do not have a good understanding of your original issue. Could you provide specifics of the static routes that did not work with no ip classless and what was in the routing table?


What usually trips people up with no ip classless (remember that it essentially is saying use classful behavior) is that if some subnet is present in the routing table, then classful routing will not route to other subnets, that are not specifically in the routing table, of that network - will not default route to a subnet of that major network. I am not sure if that is your situation or not.


HTH


Rick

axfalk Thu, 03/29/2007 - 17:53
User Badges:

absolutely..here is the actual setup: on the inside, we have 172.21.0.0/21...the default route looked like this:

ip route 0.0.0.0 0.0.0.0 172.21.16.102

The static route looked like this:

ip route 10.50.25.10 255.255.255.0 172.21.16.102


I could not ping the 10.50.25.10 with "no ip classless" using the default route. But when I put in the static route, it worked. Alternatively, when I used "ip classless" and took out the static route, it worked as well...Thanks very much again....

Jon Marshall Fri, 03/30/2007 - 00:13
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi Greg


Thanks for opening this can of worms :-)


Do you have routes in your routing table on the 6500 for any 10.x.x.x networks.


Is the static route


10.50.25.10 or 10.50.25.0 ?



Jon

Richard Burts Fri, 03/30/2007 - 06:32
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Greg


I believe that both of Jon's questions are spot on. You specify the address as if the route is going to be a /32 but specify a mask as if it is a /24.


But which ever way it is, the behavior suggests that there is at least 1 route to some subnet (or host) in 10.0.0.0 address space. If the router has at least 1 route for something in 10.0.0.0 but does not have a route that matches your destination then with ip classless it can route via the default route, and with no ip classless it will drop the packet as unroutable.


Note that for most modern networks it is usually better to have ip classless enabled than to have no ip classless.


HTH


Rick

axfalk Fri, 03/30/2007 - 10:55
User Badges:

<< Do you have routes in your routing table on the 6500 for any 10.x.x.x networks>> Yes, I do...but they would go out a different int..


<< Is the static route 10.50.25.10 or 10.50.25.0 >>


Now, that u mentioned it , I believe I put in 10.50.25.10/24...good point....Thanks..

Richard Burts Fri, 03/30/2007 - 11:14
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Greg


Then we have the answer to the problem:

"Yes, I do...but they would go out a different int.."

It does not matter whether they go out a different interface or same interface. What matters is that the routing table has knowledge of some part of network 10.0.0.0. If it has knowledge of some part of the network then with no ip classless the router can not use the default route for other parts of the network. And with ip classless the router can use the default route for other parts of the network.


HTH


Rick


axfalk Fri, 03/30/2007 - 12:35
User Badges:

K - that's fair...But then, why would the static route work? Would not the same logic apply to it? Thanks

Richard Burts Fri, 03/30/2007 - 13:39
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Greg


The static route works because it is putting an entry into the routing table that the destination does match against.


When the IOS is making a routing decision for a packet it uses the destination address and does a lookup in the routing table. If the destination address does match a subnet or a network entry in the routing table then IOS knows exactly where to forward the packet. ip classless or no ip classless does not come into play in that situation. It is when the IOS does not find a subnet that matches and IOS is trying to determine whether to use the default route that ip classless or no ip classless becomes a factor.


HTH


Rick

kramer700 Wed, 03/28/2007 - 22:28
User Badges:

hey, no ip clasless will mess a lot of things and your default route , just remove it.

This is becouse the routing table acts clasfully, it will not forward with any classfull protocol either (RIPv1, IGRP), but everything which comes from classless protocol will be fine, i.e default route propagated thru OSPF will route.

Every Cisco router will do this, you can test it , or see CCNP Self study, Buldibg scalable cisco networks, p.104 thre is a example and explanation.

just go ip classless and you should be fine....


you are welcome

Actions

This Discussion