What are the Classes of Subnets & Hosts for structuring IP addresses?

Classes: The following are the classes of IP addresses.

Class A — The first octet denotes the network address, and the last three octets are the host portion. Any IP address whose first octet is between 1 and 126 is a Class A address. Note that 0 is reserved as a part of the default address, and 127 is reserved for internal loopback testing.

Class B — The first two octets denote the network address, and the last two octets are the host portion. Any address whose first octet is in the range 128 to 191 is a Class B address.

Class C — The first three octets denote the network address, and the last octet is the host portion. The first octet range of 192 to 223 is a Class C address.

Class D — Used for multicast. Multicast IP addresses have their first octets in the range 224 to 239.

Class E — Reserved for experimental usage and includes the range of addresses with a first octet from 240 to 255.

Classless Interdomain Routing (CIDR) was introduced to improve both address space utilization and routing scalability in the Internet. It was needed because of the rapid growth of the Internet and growth of the IP routing tables held in the Internet routers.

CIDR moves way from the traditional IP classes (Class A, Class B, Class C, and so on). In CIDR , an IP network is represented by a prefix, which is an IP address and some indication of the length of the mask. Length means the number of left-most contiguous mask bits that are set to one. So network can be represented as CIDR also depicts a more hierarchical Internet architecture, where each domain takes its IP addresses from a higher level. This allows for the summarization of the domains to be done at the higher level. For example, if an ISP owns network, then the ISP can offer,,and so on to customers. Yet, when advertising to other providers, the ISP only needs to advertise

Subnetting and Tables

Subnetting is the concept of dividing the network into smaller portions called subnets. This is done by borrowing bits from the host portion of the IP address, enabling more efficient use of the network address. A subnet mask defines which portion of the address is used to identify the network and which denotes the hosts.

The following tables show all possible ways a major network can be subnetted, and, in each case, how many effective subnets and hosts are possible.

There are three tables, one for each class of addresses.
The first column shows how many bits are borrowed from the host portion of the address for subnetting.
The second column shows the resulting subnet mask in dotted decimal format.
The third column shows how many subnets are possible.
The fourth column shows how many valid hosts are possible on each of these subnets.
The fifth column shows the number of subnet mask bits.

Class A Host/Subnet Table


Class A Host/Subnet Table
Class A
Number of                                                 Number of
Bits            Subnet         Effective   Number of      Subnet
from Host       Mask           Subnets     Hosts/Subnet   Mask Bits
-------      ---------------  ---------    -------------  ----------
  0               1     16777214           /8
  1             2      8388606           /9
  2             4      4194302           /10
  3             8      2097150           /11
  4            16      1048574           /12
  5            32       524286           /13
  6            64       262142           /14
  7           128       131070           /15
Class B Host/Subnet Table
Class B	     Subnet               Effective       Effective    Subnet
 Bits        Mask                 Subnets         Hosts        Mask Bits
-------  ---------------          ---------       ---------    -------------
  0      255.255..0.0                 1             65534        /16
  1                2             32766        /17
  2                4             16382        /18
  3                8              8190        /19
  4               16              4094        /20
  5               32              2046        /21
  6               64              1022        /22
  7              128               510        /23
Class C Host/Subnet Table
Class C      Subnet       Effective  Effective  Number of 
 Bits        Mask         Subnets     Hosts     Mask Bits
-------  ---------------  ---------  ---------  ----------
  0        1        254        /24
  1      2        126        /25
  2      4         62        /26
  3      8         30        /27
  4     16         14        /28
  5     32          6        /29
  6     64          2        /30
  7    128          2*       /31


Posted in