There are 5 different address classes (Class-A, Class-B, Class-C, Class-D, Class-E).
Before knowing these classes, let us see how an IP address contitutes.
IP: | 255 | 255 | 255 | 255 |
Binary value: | 11111111 | 11111111 | 11111111 | 11111111 |
Decimal value of Octet : | 255 | 255 | 255 | 255 |
You can determine IP class of any IP address by examining the first 4 bits of the IP address.
- Class A addresses begin with 0xxx (binary), or 1 to 126 (decimal).
- Class B addresses begin with 10xx (binary), or 128 to 191 (decimal).
- Class C addresses begin with 110x (binary), or 192 to 223 (decimal).
- Class D addresses begin with 1110 (binary), or 224 to 239 (decimal).
- Class E addresses begin with 1111 (binary), or 240 to 254 (decimal).
Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and for internal testing on a local machine [You can test this: you should always be able to ping 127.0.0.1, which points to device itself]; Class D addresses are reserved for multicasting; Class E addresses are reserved for future use. They should not be used for host addresses.
An IP address has four binary octet to represent network address and host address. you need to know which octet represents network and which octets are host number. Now we can see how the Class determines, by default, which part of the IP address belongs to the network (N, in red) and which part belongs to the host (H, in black).
- Class A -- NNNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
- Class B -- NNNNNNNN.NNNNNNNN. HHHHHHHH.HHHHHHHH
- Class C -- NNNNNNNN.NNNNNNNN.NNNNNNNN. HHHHHHHH
In the example, 140.178.200.220 is a Class B address so by default the Network part or network prefix/address of the full address is represented by the first two octets (140.178.x.x) and the node/host part is represented by the last 2 octets (x.x.200.220).
In order to specify the network address for a given IP address, the host section is set to all "0"s. In our example, 140.178.0.0 specifies the network address for 140.178.200.220.
When the host section is set to all "1"s, it specifies a broadcast that is sent to all hosts on the network. 140.178.255.255 (10001100.10110010.11111111.11111111) specifies the example broadcast address. Note that this is true regardless of the length of the node section.
Class | Address Range | Supports |
Class A | 1.0.0.1 to 126.255.255.254 | Supports 16 million hosts on each of 127 networks. |
Class B | 128.1.0.1 to 191.255.255.254 | Supports 65,000 hosts on each of 16,000 networks. |
Class C | 192.0.1.1 to 223.255.254.254 | Supports 254 hosts on each of 2 million networks. |
Class D | 224.0.0.0 to 239.255.255.255 | Reserved for multicast groups or broadcast address. |
Class E | 240.0.0.0 to 254.255.255.254 | Reserved for future use, or Research and Development Purposes. |
Classful IP addressing was primarily used but at the present due to the fast expansion of internet classless IP addressing is used widely.
No comments:
Post a Comment