06-19-2009 10:36 AM - edited 03-06-2019 06:21 AM
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!!
Solved! Go to Solution.
06-20-2009 02:27 PM
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
06-19-2009 10:55 AM
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>
06-19-2009 12:27 PM
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.
06-20-2009 12:08 AM
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.
06-20-2009 10:58 AM
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.
06-20-2009 02:27 PM
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
06-22-2009 07:55 AM
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.
06-22-2009 09:21 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide