IP Addresses & Classes
IP Addresses & Classes
A unique identifier for a computer or device on the internet is called IP address. Networks
using the TCP/IP protocol route message on the address of the destination. The format of
an IP address is a 32 bit numeric address written as four numbers separated by periods.
Each number can be 0 to 255. For example 1.160.10.240 could be an IP address.
The above mentioned IP address is specified in decimal format, however IP address in
computer is specified in binary form such as:
1.160.10.240
00000001.10100110.00000011.01111011
The four numbers in an IP address are called octets, because each part consists of eight
binary digits. The total binary digits for four parts of an IP address are 32. That is why IP
address is considered as 32 bit.
IP classes
The four numbers or octets in an IP address are used in different ways to identify a
particular network and a host on that network.
The four octets that make up an IP address are conventionally represented by a, b, c and
d respectively. The following table shows how the octets are distributed in classes A, B
and C.
IP Network Host
Class
Address ID ID
A a.b.c.d a b.c.d
C a.b.c.d a.b.c d
Class A
The general format of class A is:
Summary of Class A
Allows 126 (0 and 127 are reserved) networks and approximately 17 million hosts per
network.
Class B
Summary of class B
First two bits 1 & 0, next 14 network bits and next 16 host bits
Initial byte: 128-191
Allows 16,384 networks and 65,000 hosts per network
Class C
First three bits 110; next 21 network bits and next 8 host bits
Intial byte: 192 – 223
Allows 2,097,152 networks and 254 hosts per network
Class D
Class E
Summary of class E :
Network Id: i.e., to which network a computer belongs. Systems belonging to same physical network
have same network id.
Host Id: i.e., it uniquely identifies the system within that network. The host address for each device
must be unique to the network id. Sometimes host ID is also referred to as node address.
The concept of network id and host id can be better understood with an example.
Let’s say somebody wants to meet me. For that, he needs to know where i live. If i tell him i live in
sector 42, he will search me in that sector i.e., his search is now limited to sector 42 only. Now sector
42 is my network id. If i further tell him my house number, he knows where to find me. So my house
number becomes my host id. This host id is unique to me. Other people who live in sector 42 will have
network id- sector 42 but their host IDs will be their house numbers, so host Ids will be unique to all
who live in sector 42. Thus network id may be same but host id within “same network id” will be
different.