Networks Horizon

share

Tuesday 31 January 2012


Classless Routers and Classless Routing-Difference


Classless and Classful Routing Protocols


Before the internet and general networking become popular into what it is now, there were and still are routing protocols that only do classful routing.

Classful Routing
If we use a classful routing protocol we cannot change the subnet mask of any networks. We have to use the default subnet mask, so for example ..if we have a 172.16.X.X network the default subnet mask is a /16 or 255.255.0.0. So, in short we cannot have different size networks(subnetting) when using the a classful routing protocol like Rip version 1. Similarly for an Ip address 192.16.1.0 network we have only mask available is 255.255.255.0. So with a classful routing protocol we have maximum 254 usable hosts in a single network( for a class C IP address ). For class B network/ip address we can have maximum 2^8-2 usable host in a single network. We cannot have multiple network for a single IP address.

Remember that classful routing does not support subnet information, and therefore do not support VLSM (Variable Length Subnet masks) or subnetting.

Classless Routing
With a classless routing protocol we can split a single network into multiple network instead of having 254 usable hosts in one network; For the above classB IP example, we could have 126 usable hosts with two networks. The ranges for the first network would start at 192.168.1.1 and end at 192.168.1.126, and the second would start at 192.168.1.127 and end at 192.168.1.254(usable hosts). The subnet mask for both of these networks would be 255.255.255.128.

Problem with Classful routing
With a classful routing protocol it would only look at the class of the address in this case a class C and not look at the subnet mask(will ignore 255.255.255.128 or /25) and apply a default subnet mask of 255.255.255.0(/24) causing these addresses to be in the same network which in reality their not.

So we can say, classful routing protocols do not carry subnet mask information on their routing updates. This makes them unsuitable for hierarchical addressing that require Variable Length Subnet Mask (VLSM) in discontiguous network. In opposite, classless routing protocols also carry subnet mask information on their routing updates so suitable for subnetting and VLSM.

Example of Classful and Classless routing protocol

Classful: RIP v1 and IGRP
Classless:RIP v2, EIGRP, OSPF, Intermediate System to Intermediate System (IS-IS)and BGP

Classful and Classless Routers -info

Routers are classless by default and can behave classful if "no ip classless" command is used in global configuration mode. With the classful(no classless) behaviour in the router all the IP addresses will have their natural network mask like class A ip address will have 255.0.0.0. Similarly:
Class A->255.0.0.0
Class B->255.255.0.0
Class C->255.255.255.0

As In current world, we are currently using CIDR( Classless Interdomain Routing), we need to keep only thing in mind... sub-netting is more important and IP address and classes do not matter much.

With "ip classless" command we make router to ignore classes(A,B,C..) so that router can read IP addresses on its classful behavior based on subnet mask. This is router's default behavior.
In the other hand, a router configured with " no ip classless" command tell router to give significance to IP addresses and their default classes not to their sub-net masks.


Impact on Routing table and packet forwarding

Suppose in the diagram, there is a traffic packet for the host 10.1.2.0/24 from PC1, default gw router(R1) will perform the routing based on routing table but first R1 will check whether it is configured as classful or classless..


Routing Table R1

=========================
10.0.0.0/8
   10.1.1.0/24 directly connected
192.16.1.0/24
   192.16.1.0/24 directly connected
0.0.0.0 0.0.0.0 192.16.1.2   ------------>> default route
=========================


  • If it is configured as classless ("ip classless" command) ->traffic will be forwarded to the default route because there is no entry for the route 10.1.2.0/24 in the routing table of R1. Default route is a default exit point which tells the packet where to leave in case it doesn't find any route in the routing table.
  • If it is configured as classful("no ip classless" command)->destined traffic will be dropped by R1 assuming that route has been mapped already to major class 10.0.0.0/8 and there is no entry for that route. Only 10.1.1.0/24 exist. but if there is a traffic for another destination 172.18.1.0/24 from PC1, traffic packet will be forwarded to the default route(0.0.0.0/0) because there is no entry for the route(172.18.1.0) in the routing table.


No comments:

Post a Comment