Sending a data packet between to different entities can be classified into two major categories.
- Unicasting : A one to one data transmission between a single sender and receiver.
- Broadcasting : Where there is only a single sender but multiple number of receivers are participating in data transmission.
IP(Internet Protocol) address is the unique identity allocated to each and every machine on internet.
IP version 4 (IPv4) address is a 32bit number, which is combination of Network ID and Host ID. Usually represents using dotted decimal notation (example: 172.27.172.27).
There IP address are grouped into five classes, based on the size of sub-networks possible under each network group.
The first octet of a IP address means 8 bits starting from most significant bit.
The value of fist octet decides the class of IP address as shown.
|Class Name||Range of First Octet||Reserved bits for Network ID||Reserved bits for Host ID|
|A||0 - 126||8 bits | 0xxx xxxx||24 bits|
|B||128 - 191||16 bits | 10xx xxxx||16 bits|
|C||192 - 223||24 bits | 110x xxxx||8 bits|
|D||224 - 239||-||-|
|E||240 - 255||-||-|
A IP with the whole Host ID part is zero represents Network ID of a groups of hosts.
Let IP of a computer P is 1011 1010. 1110 0110. 1000 0110. 1110 0110, which is belongs to class B.
Since class B uses Host ID of 16 bit, by assigning third and fourth octet of IP to zero, we can obtain the ID of network to which P belongs.
Here ID of network will be 1011 1010. 1110 0110. 0000 0000. 0000 0000
Major components of a data packet will be source IP, destination IP and the data.
There are two kind of of broadcasting.
- Limited Broadcasting
- Directed Broadcasting
Broadcasting of a data to all hosts of network in which the sender resides.
Broadcasting of a data to all hosts of a remote network , where the sender resides in different network.
The IP address 255.255.255.255 used as destination IP for limited broadcasting.
IP 255.255.255.255 is known as Limited Broadcast Address(LBA).
The Directed broadcast address is formated by raising all the bits of Host ID part of any network to one(1).
For example 22.214.171.124 is directed broad can address of the network 126.96.36.199
By setting destination IP as 188.8.131.52 as host a different network can send data to all the hosts in the network 184.108.40.206
Since every network has a Network ID and Directed Broadcast ID, the there will be a reduction of two IPs form total available IPs of netwrok.
|IP Address||Class||Network ID||Limited Broadcast Address||Directed Broadcast Address|