Default Route - NO ip classless?

Answered Question
Jun 19th, 2009
User Badges:

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



Correct Answer by ivarnhagen about 7 years 11 months ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
fjcardenas-1 Fri, 06/19/2009 - 12:27
User Badges:

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.



ivarnhagen Sat, 06/20/2009 - 00:08
User Badges:

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.

fjcardenas-1 Sat, 06/20/2009 - 10:58
User Badges:

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.

Correct Answer
ivarnhagen Sat, 06/20/2009 - 14:27
User Badges:

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

fjcardenas-1 Mon, 06/22/2009 - 07:55
User Badges:

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.

ivarnhagen Mon, 06/22/2009 - 21:21
User Badges:

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

Actions

This Discussion