IP Classless vs IP Classfull

Answered Question
Dec 10th, 2009
User Badges:

Good Night,


My name is David Salazar, Network Tecniccian, my native lenguage is spanish and I only read technical english.


Sorry for my very poor grammatical english.


Ok, I am study for the CCIE R&S written exam and actually I was stay reading Classfull Routing and Classless Routing on Chapter 6 (IP Forwarding) and 7 (RIP Version 2) of Cisco Press CCIE Routing and Switching Exam Certification Guide 3edt. Nov 2007 and review to the Self-Study Guide BSCI 3edt. (Diane Teare and Cathuerine Paquet)  on Part II Chapter 2 Routing Principles, Topic Characteristics of Routing Protocols pag.36 says:


      The Routing Table Acts Classfully
It is actually the routing table itself that acts classfully by default without the ip classless command, and will do so
even if no routing protocols are running. For example, if you have only static routes and no routing protocols, you
still would not be able to reach a subnet of a known major network using a default route unless the ip classless
command is enabled.
A CCIE technical reviewer of an earlier edition of this book performed the following test using two Cisco 2520
routers running Cisco IOS c2500-i-l.122-8.T5.bin. The two routers, R1 and R2, were connected via interface E0,
and no routing protocols were enabled on either router.



therefore, I started to make a practice about "The Routing Table Acts Classfully" using the GNS3 (Hardware Emulator).


This practice consists of:


1751-V 2 Routers with IOS 12.4 (25a) connected through a serial link.


VPCs----F0/0---RouterA-----Serial0/0-----Serial0/0---RouterB---Loopback0


The network's numbers assigned to the links are:


10.3.0.0/16 - Router A - FastEthernet0/0  (RouterA= 10.3.0.1 and VPCS=10.3.0.100)

10.5.0.0/16 - RouterA - S0/0 -> 10.5.0.1, RouterB - S0/0 -> 10.5.0.2

10.10.0.0/16 - RouterB - Loopback 0 -> 10.10.0.1


RouterA was configured with the "NO IP CLASSLESS COMMAND"

RouterA was configured with a Gateway of Last Resort Route = ip route 0.0.0.0 0.0.0.0 10.5.0.2 (RouterB - Serial 0/0)

RouterB are default -> IP CLASSLESS (That is default in Release 12.0 and later).


the RouterA did ping succefully to 10.3.0.1, 10.3.0.100, 10.5.0.1 and 10.5.0.2

the RouterB did ping succefully to 10.10.0.1, 10.5.0.2 and 10.5.0.1.


When I was tried to do ping from RouterA to RouterB's loopback 0 fail. Everything is ok until this moment, when I was changed in RouterA to "IP CLASSLESS" the ping was sucefully.


But I think about it, that really changes?


It is time to use the DEBUG COMMAND specifically DEBUG IP PACKET in both moments (classfull and classless). The Router was changed the IP sources address used when send the ICMP paquet.


The output was:


CLASSFULL

-------------------


RouterA#ping 10.10.0.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.0.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
RouterA#


RouterB#debug ip pa
RouterB#debug ip packet
IP packet debugging is on
RouterB#
000014: *Mar  1 00:27:29.879: IP: tableid=0, s=10.3.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000015: *Mar  1 00:27:29.879: IP: s=10.3.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000016: *Mar  1 00:27:29.883: IP: s=10.10.0.1 (local), d=10.3.0.1, len 100, unroutable
.

.

.

RouterB#


Surprise the source IP address used in the IP packet was 10.3.0.1, that is the IP address of the FastEthernet0/0 in RouterA.



CLASSLESS

-------------------


RouterA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RouterA(config)#ip class
RouterA(config)#ip classless
RouterA(config)#^Z
RouterA#
RouterA#
RouterA#ping 10.10.0.1
*Mar  1 00:32:25.951: %SYS-5-CONFIG_I: Configured from console by console


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/23/84 ms
RouterA#


RouterB#
RouterB#
000029: *Mar  1 00:32:28.055: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000030: *Mar  1 00:32:28.055: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000031: *Mar  1 00:32:28.055: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000032: *Mar  1 00:32:28.055: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
.

.

.

RouterB#


Surprise again the source IP address used in the IP packet was 10.5.0.1, that is the IP address of the Serial0/0 in RouterA.



Perform the same test with Router 3725, and the result was that RouterA always use the IP address of Serial0/0 as the packet Source IP Address and pings  between RouterA and RouterB's loopback0 were satisfactory eveytime (Classless or Classfull).


I was perform a 3er test using RouterA with NO IP CLASSLESS COMMAND but I used NAT and the test pings between RouterA and RouterB's loopback0 were satisfactory eveytime


ip nat inside source list 1 interface Serial0/0 overload
!
access-list 1 remark +++ Cambia Direccion IP de Interfaz F0/0 +++
access-list 1 permit 10.3.0.1


RouterA#ping 10.10.0.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.10.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/18/44 ms
RouterA#


RouterA#sh ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
icmp 10.5.0.1:3        10.3.0.1:3         10.10.0.1:3        10.10.0.1:3
RouterA#



RouterB#
RouterB#
000104: *Mar  1 00:47:29.951: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000105: *Mar  1 00:47:29.955: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000106: *Mar  1 00:47:29.959: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000107: *Mar  1 00:47:29.963: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
000108: *Mar  1 00:47:29.983: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000109: *Mar  1 00:47:29.983: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000110: *Mar  1 00:47:29.983: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000111: *Mar  1 00:47:29.987: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
000112: *Mar  1 00:47:29.991: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000113: *Mar  1 00:47:29.991: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd
RouterB#4
000114: *Mar  1 00:47:29.995: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000115: *Mar  1 00:47:29.999: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
000116: *Mar  1 00:47:30.011: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000117: *Mar  1 00:47:30.011: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000118: *Mar  1 00:47:30.011: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000119: *Mar  1 00:47:30.011: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
000120: *Mar  1 00:47:30.015: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000121: *Mar  1 00:47:30.019: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000122: *Mar  1 00:47:30.019: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000123: *Mar  1 00:47:30.019: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100,
RouterB#sending
RouterB#



What really determines this behavior?
Is dependent on the hardware?

The routing table actually acts Classfull?
Or simply depends on the source interface is taken to generate the ICMP packet?


greatly thankful for the contribution they can give me about it.



David Salazar

csco10759905

Correct Answer by Laurent Aubert about 7 years 6 months ago

Hi,


I made some research but was not able to find the exact algorithm. My experience is in classless mode, the router will choose the address of its outgoing interface by default.


HTH


Laurent.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Laurent Aubert Fri, 12/11/2009 - 09:12
User Badges:
  • Cisco Employee,

Hi David,


The issue is CEF do not support IP classfull so that's why even if you configure no ip classless on router A, he's still sending the ping using its default route.


To really see no ip classless in action, you need to disable cef as well (no ip cef)


In this case, Router A will drop any packets destinated 10.x.x.x for which it doesn't have any explicit routes.


HTH


Laurent.

David Salazar Fri, 12/11/2009 - 10:51
User Badges:

Excellent, Laurent.


It's a really nice answer, I am apreciate so much you answer. "CEF are Classless". But I have yet one question, what's defined the order of the attached interfaces IP address used as IP source address (Serial, FastEthernet, Loopback)?



I was perform test of that and here are the result:


CLASSFULL

--------------------


RouterA#
RouterA#sh ip cef
%CEF not running
Prefix              Next Hop             Interface
RouterA#wr
Building configuration...
[OK]
RouterA#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route


Gateway of last resort is 10.5.0.2 to network 0.0.0.0


     10.0.0.0/16 is subnetted, 4 subnets
C       10.2.0.0 is directly connected, Loopback1
C       10.3.0.0 is directly connected, FastEthernet0/0
C       10.1.0.0 is directly connected, Loopback0
C       10.5.0.0 is directly connected, Serial0/0
S*   0.0.0.0/0 [1/0] via 10.5.0.2
RouterA#
RouterA#
RouterA#ping 10.10.0.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.0.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
RouterA#
RouterA#
RouterA#debug ip pa
RouterA#debug ip packet
IP packet debugging is on
RouterA#
RouterA#
RouterA#ping 10.10.0.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.0.1, timeout is 2 seconds:


*Mar  1 00:05:28.139: IP: s=10.3.0.1 (local), d=10.10.0.1, len 100, unroutable.
*Mar  1 00:05:30.139: IP: s=10.3.0.1 (local), d=10.10.0.1, len 100, unroutable.
*Mar  1 00:05:32.139: IP: s=10.3.0.1 (local), d=10.10.0.1, len 100, unroutable.
*Mar  1 00:05:34.139: IP: s=10.3.0.1 (local), d=10.10.0.1, len 100, unroutable.
*Mar  1 00:05:36.139: IP: s=10.3.0.1 (local), d=10.10.0.1, len 100, unroutable.
Success rate is 0 percent (0/5)
RouterA#



CLASSLESS

-------------------


RouterA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RouterA(config)#ip class
RouterA(config)#ip classless
RouterA(config)#^Z
RouterA#ping 10.10.0.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/19/48 ms
RouterA#
*Mar  1 00:11:18.699: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 00:11:19.919: IP: tableid=0, s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:19.923: IP: s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), len 100, sending
*Mar  1 00:11:19.943: IP: tableid=0, s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:19.947: IP: s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), len 100, rcvd 3
*Mar  1 00:11:19.951: IP: tableid=0, s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:19.955: IP: s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), len 100, sending
*Mar  1 00:11:19.999: IP: tableid=0, s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:19.999: IP: s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), len 100, rcvd 3
*Mar  1 00:11:19.999: IP: tableid=0, s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:19.999: IP: s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), len 100, sending
*Mar  1 00:11:20.003: IP: tableid=0, s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:20.007: IP: s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), len 100, rcvd 3
*Mar  1 00:11:20.007: IP: tableid=0, s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:20.007: IP: s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), len 100, sending
*Mar  1 00:11:20.011: IP: tableid=0, s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:20.011: IP: s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), len 100, rcvd 3
*Mar  1 00:11:20.015: IP: tableid=0, s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:20.015: IP: s=10.5.0.1 (local), d=10.10.0.1 (Serial0/0), len 100, sending
*Mar  1 00:11:20.019: IP: tableid=0, s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), routed via RIB
*Mar  1 00:11:20.019: IP: s=10.10.0.1 (Serial0/0), d=10.5.0.1 (Serial0/0), len 100, rcvd 3


Debug on RouterB


RouterB#
000029: *Mar  1 00:11:20.503: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000030: *Mar  1 00:11:20.507: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000031: *Mar  1 00:11:20.511: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000032: *Mar  1 00:11:20.515: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
000033: *Mar  1 00:11:20.555: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000034: *Mar  1 00:11:20.559: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000035: *Mar  1 00:11:20.563: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000036: *Mar  1 00:11:20.567: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
000037: *Mar  1 00:11:20.595: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000038: *Mar  1 00:11:20.595: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd
RouterB#4
000039: *Mar  1 00:11:20.595: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000040: *Mar  1 00:11:20.595: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
000041: *Mar  1 00:11:20.599: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000042: *Mar  1 00:11:20.603: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000043: *Mar  1 00:11:20.603: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000044: *Mar  1 00:11:20.603: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100, sending
000045: *Mar  1 00:11:20.611: IP: tableid=0, s=10.5.0.1 (Serial0/0), d=10.10.0.1 (Loopback0), routed via RIB
000046: *Mar  1 00:11:20.611: IP: s=10.5.0.1 (Serial0/0), d=10.10.0.1, len 100, rcvd 4
000047: *Mar  1 00:11:20.611: IP: tableid=0, s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), routed via FIB
000048: *Mar  1 00:11:20.611: IP: s=10.10.0.1 (local), d=10.5.0.1 (Serial0/0), len 100,
RouterB#sending
RouterB#
RouterB#
RouterB#
RouterB#


Thank a lot, Laurent.

Correct Answer
Laurent Aubert Fri, 12/11/2009 - 20:14
User Badges:
  • Cisco Employee,

Hi,


I made some research but was not able to find the exact algorithm. My experience is in classless mode, the router will choose the address of its outgoing interface by default.


HTH


Laurent.

Actions

This Discussion