TCP/IP Primer, Part II - Classless Inter-Domain Routing (CIDR)



CIDR is a new addressing scheme for the Internet which allows for more efficient allocation of IP addresses than the old Class A, B, and C address scheme.
As Internet addresses were generally only assigned in the three previously mentioned classes (A, B or C), there were many wasted addresses. For example, if

you needed 100 addresses you would be assigned the smallest address class (C), but that still meant 154 unused addresses. The overall result was that while

the Internet was running out of unassigned addresses, only 3% of the assigned addresses were actually being used. CIDR was developed to be a much more

efficient method of assigning addresses.
Restructuring IP Address Assignments
Classless Inter-Domain Routing (CIDR) is a replacement for the process of assigning Class A, B and C addresses with a generalized network identifier or

prefix. Instead of being limited to network prefixes of 8, 16 or 24 bits, CIDR currently uses prefixes anywhere from 13 to 27 bits. Thus, blocks of

addresses can be assigned to networks as small as 32 hosts or to those with over 500,000 hosts. This allows for address assignments that much more closely

fit an organization's specific needs.

The table below shows the number of Class C networks and hosts equivalent to CIDR block prefixes:
Code:

CIDR Block Prefix Number of Equivalent Class C Networks Number of Host Addresses
/27 1/8th of a Class C 32 hosts
/26 1/4th of a Class C 64 hosts
/25 1/2 of a Class C 128 hosts
/24 1 Class C 256 hosts
/23 2 Class C 512 hosts
/22 4 Class C 1,024 hosts
/21 8 Class C 2,048 hosts
/20 16 Class C 4,096 hosts
/19 32 Class C 8,192 hosts
/18 64 Class C 16,384 hosts
/17 128 Class C 32,768 hosts
/16 256 Class C = 1 Class B 65,536 hosts
/15 512 Class C 131,072 hosts
/14 1,024 Class C 262,144 hosts
/13 2,048 Class C 524,288 hosts



IP Addresses in CIDR Form

A CIDR address includes the standard 32-bit IP address and how many bits are used for the network prefix (i.e. the number of bits that define the network

part of the IP address, usually defined by the subnet mask). For example, in the CIDR address 206.13.1.48/25, the "/25" indicates the first 25 bits are used

to identify the unique network IP address, leaving the remaining bits to identify the specific host within that network. This would therefore be 1/2 of a

Class C network for a total of 128 hosts.

CIDR employs a simpler way of writing IP addresses and their corresponding subnet masks than writing the IP address and subnet mask separately. For example,

a host with an IP address of 192.168.5.8 and a subnet mask of 255.255.255.0 would be written in CIDR form as 192.168.5.8/24. The table below shows how the

subnet mask corresponds to the number of subnet bits used in the CIDR form of the IP address.

Code:

Subnet Mask (decimal) 255 255 255 0
Subnet Mask (Binary) 11111111 11111111 11111111 00000000
Number of subnet bits 8 8 8 0
Total number of subnet bits 24 = (8 + 8 + 8)



Relationship between the network ID, the subnet mask, and the node (host) ID

Essentially, performing a binary AND of HostID and subnet mask will result in the network ID
HostID AND SubnetMask = NetworkID

Selecting a Network Address
When creating a new network you have several choices to make before assigning addresses to your computers and other IP nodes. Firstly you should decide

whether you need to use private IP addresses or real or Internet Assigned IP addresses. Particular addresses in each address class have been reserved for

private IP networks. These address ranges are listed in the table below:
Code:

Class Reserved Address Addresses in this range
A 10.X.X.X 10.0.0.1 to 10.255.255.254
B 172.16.X.X to 172.32.X.X 172.16.0.1 to 172.32.255.254
C 192.168.X.X 192.168.0.1 to 192.168.255.254



These address ranges are designed for internal use and will not be routed through the Internet. When designing a small to medium size network it is common

to use the 192.168 series of addresses.

Continue to TCP/IP Primer, Part III - IP Addresses and KiXtart

TCP/IP Primer, Part II - Classless Inter-Domain Routing (CIDR)




Edited by sealeopard (2004-03-11 03:46 PM)
_________________________
There are two types of vessels, submarines and targets.