cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3201
Views
5
Helpful
7
Replies

Default Route - NO ip classless?

fjcardenas-1
Level 1
Level 1

I am attaching my scenario and my "show ip route" and "show running" for my two routers.

I read about Classful Routing: When a packet's destination only matches a router's default route, and does not match any other routes, only use the default route if this router does not know any routes in the classful network in which the destination IP address reside.

I am trying to configure the scenario so that the ping from PC1 to PC2 fails because the routers are configure with the "no ip classless" and both PCs are in the same classful network.

Any idea why my ping is working? I was expecting this wouldn't work. Please help to understand!!

1 Accepted Solution

Accepted Solutions

Of course, you're right! The reason your ping is working, is because of CEF (which is usually enabled by default).

CEF does a route lookup in hardware, and apparently "no ip classless" does no apply when CEF is enabled.

For your ping to fail you need to turn off CEF and enable process switching. Try "no ip cef" in global config, and see if that does the trick.

hth

View solution in original post

7 Replies 7

andrew.prince
Level 10
Level 10

Read the below:-

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml#classless

This will clear a few things up for you, and explain why you are not seeing the results you expect.

HTH>

The link is clear but I still don't understand why my scenario still works.

As indicated in the link:

- This is the essence of classful routing: If one part of a major network is known, but the subnet toward which the packet is destined within that major network is unknown, the packet is dropped. ......... MY ROUTER "ROUTER-LAR" HAS A SUBNET /25 OF MAJOR NETWORK 192.168.0.X CONNECTED. IF I PING IP 192.168.0.131 WHOSE SUBNET /25 IS IN THE OTHER SIDE OF THE NETWORK (AND IT IS PART OF THE MAJOR NETWORK 192.168.0.X) THE PING WORKS!!! WHY DOES IT WORK IF "ROUTER-LAR" KNOWS PART OF THE MAJOR NETWORK? I THINK IT SHOULD DROP THE PACKET SINCE IT KNOWS ABOUT THE MAJOR NETWORK..... PLEASE HELP!!! PLEASE SEE MY ATTACHMENTS.

Gateway of last resort is 172.16.0.1 to network 0.0.0.0

172.16.0.0/30 is subnetted, 1 subnets

C 172.16.0.0 is directly connected, Serial0/0

192.168.0.0/25 is subnetted, 1 subnets <--------------------

C 192.168.0.0 is directly connected, FastEthernet0/0

S* 0.0.0.0/0 [1/0] via 172.16.0.1

________________________________________________________________________

Hi! This topic can be quite confusing. Take a look at your LAR routing table above.

192.168.0.128 /25 (AUS network) is not a subnet of 192.168.0.0/25 (LAR network). This means the packet takes the default route if no ip classless is configured.

But in the statement:

- This is the essence of classful routing: If one part of a major network is known, but the subnet toward which the packet is destined within that major network is unknown, the packet is dropped.

Isn't the major network refering to a network of class A, B or C? In my case both routers have a /25 subnet that belong to class C 192.168.0.0 network. That is why I think the packet should be dropped.

Of course, you're right! The reason your ping is working, is because of CEF (which is usually enabled by default).

CEF does a route lookup in hardware, and apparently "no ip classless" does no apply when CEF is enabled.

For your ping to fail you need to turn off CEF and enable process switching. Try "no ip cef" in global config, and see if that does the trick.

hth

Hey ivarnhagen,

It worked as you said. I only had to disable CEF with the "no ip cef" command and ping doesn't work with "no ip classless" and it works with "ip classless". Now the question is... is there something that gets affected by disabling CEF? I haven't really get to that concept.

Thanks,

Francisco.

Hi Francisco,

glad to have helped, and thanks for the rating!

I am not all too familiar with CEF and its workings, but I assume disabling it forces every packet to be passed to the control plane for routing, and not being routed/switched in hadware via the FIB ("Forwarding Information Base"). no ip classless does not seem to apply when using the FIB.

For more details I suggest you check out the online resources e.g.

http://en.wikipedia.org/wiki/Cisco_Express_Forwarding

http://www.cisco.com/en/US/tech/tk827/tk831/tk102/tsd_technology_support_sub-protocol_home.html

http://www.cisco.com/en/US/docs/ios/12_1/switch/configuration/guide/xcdcef.html

Ingo

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco