cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2236
Views
0
Helpful
12
Replies

Relationship between Classless routing protocol, IP Classless command and Default route

jaighobahi
Level 1
Level 1

Hello All.
I am reading the following book and trying to practice with the topics.

Implementing Cisco IP Routing (ROUTE) Foundation Learning Guide
Foundation learning for the ROUTE 642-902 Exam
Diane Teare

On page 34 of the book, under the heading "The IP Classless Command", you will find the following statement:


"When you are running a classful protocol (RIPv1), ip classless must be enabled if you want the router to
use the default route when it receives a packet destined to an unknown subnet of a network for which it
knows some subnets. For example, consider a router’s routing table that has entries for subnets 10.5.0.0/16 and 10.6.0.0/16 and a default route of 0.0.0.0. If a packet arrives for a destination on the 10.7.0.0/16 subnet and ip classless is not enabled, the packet is dropped
".

I have tried to confirm the above statement by simulating a simple network.  See the attached image file.

The routing table for router R1 does not have entry for subnet 10.1.0.0/18 which means R1 does not know this subnet.  However, the routing table has entry for 10.2.0.0/16 which means R1 knows at least one of the subnets in block 10.0.0.0/18.  Going by the statement above, when IP Classless is disabled in R1, a ping from R1 to host 10.1.1.1 should fail even if there is a default route in the routing table since the destination subnet is 10.1.0.0/18 which R1 knows something about. I haven't found this to be the case because a ping from R1 to 10.1.1.1 succeeds whether ip classless is disabled or enabled.  Am I misinterpreting the statement?  What is the correct situation?

Apology, I had earlier posted this same topic at the Certifications forum, mistakenly.

1 Accepted Solution

Accepted Solutions

No need to apologise :-)

It will prefer the static routes but your static routes are wrong ie. they should be -

"ip route 10.1.0.0 255.255.192.0 192.168.1.1"
"ip route 10.2.0.0 255.255.192.0 172.16.8.10"

Jon

View solution in original post

12 Replies 12

e.ciollaro
Level 4
Level 4

Hi,

I made a little lab, it seems me that ip cef has something to do with this behaviour. When I ping with ip cef enabled, it works as you wrote but disabling  ip cef it works has expected (unsuccessful ping). Try and let me know

 

Bye,

enrico

 

Please rate if useful

Thanks for you response.  My computer is currently hooked up to a measurement device, running some DOS-based data acquisition software.  This software will run for another 48 hours and I suspect my network simulation software might interfere with the data acquisition program.  Please, bear with me.  I will give feedback subsequently. 

ok, don't worry

 

enrico

Apology for delayed response.  I have disabled IP CEF, but the ping is still successful,

R1(config)#no ip cef
R1(config)#do ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 52/68/88 ms

Your understanding of ip classless is correct and your lab isn't working properly.

I did a very quick lab and confirmed what Enrico has already said.

You need to disable CEF and then your ping shouldn't work. If it is working then there is something else going on.

Jon

Please, I beg to return to this topic.  Look at the ping commands below.  The ping to 10.1.1.2 failed, regardless of whether IP CEF is enabled or disabled.  The ping to 10.1.1.1 was successful.  This ping passed through interface 10.1.1.2 to reach 10.1.1.1.  What is the explanation for this?

R1(config)#do ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

R1(config)#do ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/90/92 ms
R1(config)#

By the way, I used network 10.2.2.0/18 and network 10.1.1.0/18 because I wanted to equally confirm how a classful routing protocol such RIPv1 treats discontiguous subnets.

This ping passed through interface 10.1.1.2 to reach 10.1.1.1.  What is the explanation for this?

R2 has two routes to 10.0.0.0/8 pointing to both R1 and R3.

Like I said you need to sort that out if you want to see consistent results.

Jon

Thanks.  I could easily change network 10.1.0.0/18 to some address in another class, but that will negate the following statement.

"When you are running a classful protocol (RIPv1), ip classless must be enabled if you want the router to
use the default route when it receives a packet destined to an unknown subnet of a network for which it
knows some subnets. For example, consider a router’s routing table that has entries for subnets 10.5.0.0/16 and 10.6.0.0/16 and a default route of 0.0.0.0. If a packet arrives for a destination on the 10.7.0.0/16 subnet and ip classless is not enabled, the packet is dropped
".

In my topology, R1 knows subnet 10.2.0.0/18 and has a default route to subnet 10.1.0.0/18. If the above statement is true, a ping to 10.1.1.2 should fail when IP classless is disabled.  However, I notice that regardless of whether IP classless is enabled or disabled, a ping to 10.1.1.2 succeeds, but a ping to 10.1.1.1 fails.  The ping that succeeds passed through the interface with IP address 10.1.1.1 on its way to 10.1.1.2.  What is really happening?

You haven't read what I wrote in my last post.

R2 has two default routes to 10.0.0.0/8.

So it could be sending the traffic back to R1 instead of forwarding to R3.

R2 has no way of knowing which way to send the traffic.

This is a separate issue from ip classless.

Jon

 

Thank you Sir.  Apology, I am not trying to be stubborn.  Here's the routing table of R2.  I thought the router would prefer the static routes to the RIP routes.

R2#show ip route
Gateway of last resort is not set
     172.16.0.0/30 is subnetted, 1 subnets
C       172.16.8.8 is directly connected, Serial1/1
     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
R       10.0.0.0/8 [120/1] via 192.168.1.1, 00:00:11, Serial1/0
                   [120/1] via 172.16.8.10, 00:00:08, Serial1/1
S       10.2.192.0/18 [1/0] via 192.168.1.1
S       10.1.192.0/18 [1/0] via 172.16.8.10
     192.168.1.0/30 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, Serial1/0
R2#

No need to apologise :-)

It will prefer the static routes but your static routes are wrong ie. they should be -

"ip route 10.1.0.0 255.255.192.0 192.168.1.1"
"ip route 10.2.0.0 255.255.192.0 172.16.8.10"

Jon

Thank you Sir.  I have made the corrections and the ping to 10.1.1.1 behaves as expected.  That is, when IP Classless is disabled on R1, the ping to 10.1.1.1 fails.

Review Cisco Networking for a $25 gift card