TCP/IP - basics
Classless Inter-Domain Routing (CIDR) is a replacement for the old process of assigning Class A, B and C addresses with
a generalized network "prefix". Instead of being limited to network identifiers (or "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.
A CIDR address includes the standard 32-bit IP address and also information on how many bits are used for
the network prefix. For example, in the CIDR address 206.13.01.48/25, the "/25" indicates the first 25 bits
are used to identify the unique network leaving the remaining bits to identify the specific host.
Is a 32-bit address composed of four 8-bit octets. The IP address is divided into two parts: a Host ID and a Network ID.
Example: 192.168.1.65 is an IP address in decimal format and is 11000000.10101000.00000001.01000001 in binary
Is a collection of IP-based hosts that share a common Network ID and therefore are considered to belong to the same subnet.
Example: all computers that have IP addresses starting with 192.168.1 belong to the same subnet. Ultimately, the subnet mask is
what truly determines which hosts are on the same subnet.
Is a simple mathematical equation that specifies which part of the IP address is the Network ID and which one is the Host ID,
which in turn determines what IP addresses are on the same subnet (local network) and which ones are not (remote network).
There is a maximum number of networks and hosts that can be assigned unique addresses using the Internet's 32-bit long addresses.
Traditionally, the Internet assigned "classes" of addresses: Class A, Class B and Class C were the most common.
Each address had two parts: one part to identify a unique network and the second part to identify a unique host in that network.
Another way the old Class A, B, and C addresses were identified was by looking at the first 8 bits of the address and converting
it to its decimal equivalent.
|CIDR Block Prefix||# Equivalent Class C||# of Host |
|/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|
|Class||# Network Bits||# Hosts Bits||Decimal Address Range||Subnet mask|
|Class A||8 bits||24 bits||1-126||255.0.0.0|
|Class B||16 bits||16 bits||128-191||255.255.0.0|
|Class C||24 bits||8 bits||192-223||255.255.255.0|
Using the old Class A, B, and C addressing scheme the Internet could support the following:
- 126 Class A networks that could include up to 16,777,214 hosts each
- Plus 65,000 Class B networks that could include up to 65,534 hosts each
- Plus over 2 million Class C networks that could include up to 254 hosts each