Classful Networks and CIDR Routing

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search

Before CIDR nearly all IP networking was considered classful. In 1981 three different sizes of networks were defined. Basically, due to an IP address shortage, the classful system was eventually replaced by a new system that is known as C.I.D.R. (Classless Inter-Domain Routing).

When the IP system was created the designers recognized three classes of networks and thus declaired it a classful system. It was not necessary to send the subnet mask along with the IP address. The routing protocol considered the first octet, determining the class and assuming the mask. This allowed for 4,294,967,296 possible IP addresses divided into five classes.

The modern classless system makes no such assumptions about the subnet mask. With classless routing the additional information, including the subnet mask, is passed along with the IP address.

.

Classful Network IP Address Table

   bits                   addresses  Private IP Addresses
class    subnet mask           usable (-high,low,gw)     Private Last Address 
-------------------------------------------------------------------------------
   /32  255.255.255.255  1    
   /31  255.255.255.254  2    
   /30  255.255.255.252  4    1
   /29  255.255.255.248  8    5
   /28  255.255.255.240  16   13
   /27  255.255.255.224  32   29
   /26  255.255.255.192  64   61
   /25  255.255.255.128  128  125
.
C  /24  255.255.255.0    256  253
.
   /23  255.255.254.0    512
   /22  255.255.252.0    1024
   /21  255.255.248.0    2048
   /20  255.255.240.0    4096        172.16.0.0/20   ->  172.16.31.255
   /19  255.255.224.0    8192
   /18  255.255.192.0    16384
   /17  255.255.128.0    32768
.
B  /16  255.255.0.0      65536       192.168.0.0/16  ->  192.168.255.255
.
   /15  255.254.0.0      131072
   /14  255.252.0.0      262144
   /13  255.248.0.0      524288
   /12  255.240.0.0      1048576
   /11  255.224.0.0      2097152
   /10  255.192.0.0      4194304
   /9   255.128.0.0      8388608
.
A  /8   255.0.0.0        16777216    10.0.0.0/8      ->  10.255.255.255 
.
   /7   254.0.0.0        33554432
   /6   252.0.0.0        67108864
   /5   248.0.0.0        134217728
   /4   240.0.0.0        268435456
   /3   224.0.0.0        536870912
   /2   192.0.0.0        1073741824
   /1   128.0.0.0        2147483648
   /0   0.0.0.0          4294967296  
-------------------------------------------------------------------------------
Sat Oct 25 11:18:16 CDT 2003

.

6 IP Subnet division examples

. 6 IP Subnet division examples
. ------------------------------------------------------------------------------
.     bitnet: 192.168.0.0/30            -     bitnet: 192.168.0.0/29
.     subnet: 255.255.255.252           -     subnet: 255.255.255.248
.    network: 192.168.0.0               -    network: 192.168.0.0
.  broadcast: 192.168.0.3               -  broadcast: 192.168.0.7
.    gateway: 192.168.0.1               -    gateway: 192.168.0.1
.  complete range:                      - complete range:
.  192.168.0.0 - 192.168.0.3            - 192.168.0.0 - 192.168.0.7
.    usable range:                      -   usable range:
.  192.168.0.2                          - 192.168.0.2 - 192.168.0.6
. ------------------------------------------------------------------------------
.     bitnet: 192.168.0.64/26           -     bitnet: 10.10.4.128/25
.     subnet: 255.255.255.192           -     subnet: 255.255.255.128
.    network: 192.168.0.64              -    network: 10.10.4.128
.  broadcast: 192.168.0.127             -  broadcast: 10.10.4.255
.    gateway: 192.168.0.65              -    gateway: 10.10.4.254
.  complete range:                      - complete range:
.  192.168.0.64 - 192.168.0.127         -  10.10.4.128 - 10.10.4.255
.    usable range:                      -   usable range:
.  192.168.0.66 - 192.168.0.127         -  10.10.4.129 - 10.10.4.253
. ------------------------------------------------------------------------------
.     bitnet: 172.16.0.0/23             -     bitnet: 10.21.204.248/29
.     subnet: 255.255.254.0             -     subnet: 255.255.255.248
.    network: 172.16.0.0                -    network: 10.21.204.248
.  broadcast: 172.16.1.255              -  broadcast: 10.21.204.255
.    gateway: 172.16.1.254              -    gateway: 10.21.204.249
.  complete range:                      - complete range:
.  172.16.0.0 - 172.16.1.255            - 10.21.204.248 - 10.21.204.255
.    usable range:                      -   usable range:
.  172.16.0.1 - 172.16.1.253            - 10.21.204.250 - 10.21.204.254
. ------------------------------------------------------------------------------
. Sat Oct 25 18:16:15 CDT 2003

.

Classful subnet maps legal and illegal demonstrated

. Example subnet maps legal and illegal demonstrated
. ------------------------------------------------------------------------------
.
. [ scaled 24 bit network division to 28 bits ]
.
.                                  |
.                                  |
.                  |               |               |
.                  |               |               |
.          |       |       |       |       |       |       |
.          |       |       |       |       |       |       |    
.      |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
.   ...|...|...|...|...|...|...|...|...|...|...|...|...|...|...|...|
. 0   15  31  47  63  79  95  111 127 143 159 175 191 207 223 239 255
.  1   16  32  48  64  80  96  112 128 144 160 176 192 208 224 240 256
.
.
. [ legal 25 bit network division to 29 bits ]
.
.                                  |
.                                  |
.                  |               |               |
.                  |               |               | 
.                  |       |       |               |
.                  |       |       |               |          
.      |   |   |   |       |       |               |
.   ...|...|...|...|.......|.......|...............|...............|
.
.  1   8   16  24  32      48      64              96              128
.
.  four 29 bit subnets
.  two 28 bit subnets
.  two 27 bit subnets
.
. [ illegal 25 bit network division example ]
.
.                                  |
.                                  |
.                  |               |
.                  |               |
.                  |       |       |       |     
.                  |       |       |       |
.      |       |   |       |       |       |     
.   ...|.......|...|.......|.......|.......|.......................|
.
. 1    8       24  32      48      64      80                      128
.
.  this is a non-standard configuration
.
. ------------------------------------------------------------------------------
. Sat Oct 25 18:44:40 CDT 2003