cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2792
Views
15
Helpful
16
Replies

ip classless & default route

axfalk
Level 1
Level 1

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.

16 Replies 16

Richard Burts
Hall of Fame
Hall of Fame

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

HTH

Rick

Jon Marshall
Hall of Fame
Hall of Fame

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

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

HTH

Rick

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

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

HTH

Rick

Rick

Thanks for that. I completely agree with your sentiments.

Jon

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...

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

HTH

Rick

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....

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

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

HTH

Rick

<< 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..

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

HTH

Rick

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card