Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can someone explain ip classless command?

Status
Not open for further replies.

gman10

Technical User
Jul 20, 2001
451
US
Hey guys,

Heres a typical config I've got with ip classless, what would be the implications if this command weren't present, trying to get a solid grasp of this command feature:

Using 783 out of 32762 bytes
!
version 10.2
service password-encryption
!
hostname TESTING
!
enable secret 5 $1$CnUI$Z8obXqwNyqAivHOYvxUAE.
!
ip subnet-zero
!
interface Ethernet0
ip address 10.133.2.1 255.255.255.0 secondary
ip address 10.133.3.1 255.255.255.0 secondary
ip address 10.133.1.1 255.255.255.0
!
interface Serial0
description T1 line to another building - Verizon Ckt 8909302

ip address 10.103.1.2 255.255.255.0
encapsulation ppp
!
interface Serial1
description Second T-1 to Boces
ip address 10.133.10.1 255.255.255.0
ip access-group 101 in
ip access-group 101 out
shutdown
!
ip name-server 10.1.5.1
ip name-server 10.1.9.1
ip classless
ip route 0.0.0.0 0.0.0.0 10.103.1.1
!
line con 0
password 7 06505C244D5D1D495D
login
line aux 0
login
line vty 0 4
password 7 0052400305481F5657
login
!
end
thanks to all that try to help me [2thumbsup]
 
IP classless is the behaviour of a router when doing route lookups with subnets of major networks /8, /16 & /24. For example if a router has an interface with an IP address of 10.1.1.1 and a /24 mask (255.255.255.0) and another interface with an IP address of 192.168.1.1/24. Without any routing protocols or static routes its routing table will contain 2 entries 10.1.1.0/24 directly connected and 192.168.1.0/24 directly connected. If a default static route is added to a device on the 192.16.1.0/24 subnet (i.e. ip route 0.0.0.0 0.0.0.0 192.168.1.2) the router will add a static entry to the routing table. If the router then has to route a packet to a device with an IP address of 10.1.2.1 the router will do one of two things depending on whether IP classless is enabled. If IP classless is disabled (no ip classless) then the router will drop the packet (it assumes netowrk 10.0.0.0/8 is already 'spoken for'), if IP classless is enabled then the router will forward the packet to device 192.68.1.2.

Thats it sort of - 'classfull or classless route lookups'

Andy
 
One other thing is if you are using a classless protocol like eigrp or ospf you don't need the command. You do need it using ripv1. Its there by default after ios 12.1 or 2.
 
IP CLASSLESS

the simplest form is that IP's are now being subnetted to smaller blocks, ie /25 /26 /27 etc...

The old way of routing used classful routing /8 etc...

Now that the classful routing is a thing of the past, for most, the router still needs to states classless routing because we are not setting up a specific "class" IP range of /8 /16 /24 (CIDR notation) we are able to break it down to a smaller "class" or "classless" routing.
 
The simple answer is that it is a legacy command. When IP was first introduced all the networks were broken up into classes based on the first four bits of the first Octet of the binary IP address. These classes had a natural network associated with them based on the bits. Becuase of this they had natural networks, this is before the time of subnetting. So a Class A naturally had a network mask of 255.0.0.0. A class C had a natural network of 255.255.255.0. These are the natural networks not subnetts! So If you needed 16 Million addresses you would use a class A if you need 250 you would use a Class C. Later subnetting was introduced into the IP protocol to further segment networks. Thats why subnetting is called SUB Netting becuase you were creating a sub network of the larger network. But this was really inefficent way of segmenting networks. So later Classless Interdomain Router (CIDR) was introduced to make better use of the address space. With CIDR the subnetting is important, and the bits and classes dont matter. So the IP classesless command tells the router to ignore the IP classes.

For all those who think I over simplified this, I did. This is only a basic summary and some information was left out, on purpose for clarity. If you want all the detials read a book.

 
NEtEng631-

Thanks for the info on Ipclassless.. this does explain quite a bit as I've set up routers that "by default" have this command already setup and active.. I was using EIGRP protocol which proves why it was automatically setup.

thx again

gman
 
Did you realize that your passwords are listed in your config?
 
ip classless
At times the router might receive packets destined for a subnet of a network that has no network default route. To have the Cisco IOS software forward such packets to the best supernet route possible, use the ip classless global configuration command. To disable this feature, use the no form of this command.

ip classless
no ip classless


It is what it is!!
__________________________________
A+, Net+, I-Net+, Certified Web Master, MCP, MCSA, MCSE, CCNA, CCDA, and few others (I got bored one day)
 
The command 'ip classless' DOES need to be configured if you're using EIGRP, but it is not necessary if your supernet routes are learned via OSPF, IS-IS, or BGP.

The short answer is this: don't even bother trying to understand what 'no ip classless' does. Just make sure 'ip classless' is configured on all of your routers and everything will work just as you expect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top