What is IP address?
Octal Format:
Network address: IP address with all bits as ZERO in the host portion.
Broadcast address: IP address with all bits as ONES in the host portion.
Valid IP Addresses lie between the Network Address and the Broadcast Address.
An Internet Protocol address (IP address) is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication.
IPv4 is a 32-bit address. It is divided into 4 Octet. Each octet is 8 bits. Bits are represented by 0's and 1's
Example: 192.168.1.1
The binary version of it is: 11000000.10101000.00000001.00000001
Total Range of IPv4 Address:
First octet
|
Second octet
|
Third octet
|
Fourth octet
|
|
Starting range
|
00000000
|
00000000
|
00000000
|
00000000
|
Ending Range
|
11111111
|
11111111
|
11111111
|
11111111
|
Converting the above table of binaries into decimal we get the following
First octet
|
Second octet
|
Third octet
|
Fourth octet
|
|
Starting range
|
0
|
0
|
0
|
0
|
Ending Range
|
255
|
255
|
255
|
255
|
So the Range of IPv4 address is 0.0.0.0 to 255.255.255.255
The different classes of IPv4 Address
- Class A
- Class B
- Class C
- Class D
- Class E:
Priority Bit:
This is used for IP address classification. The Leftmost bit from the First octet is used for priority bits
Class A
|
0
|
Class B
|
10
|
Class C
|
110
|
Class D
|
1110
|
Class E
|
1111
|
Class
A: For CLASS A the first bit of the first octet is reserved as the priority bit
0XXXXXXX
2^7
|
2^6
|
2^5
|
2^4
|
2^3
|
2^2
|
2^1
|
2^0
|
Decimal
Value
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
1
|
1
|
0
|
0
|
0
|
0
|
0
|
0
|
1
|
0
|
2
|
0
|
0
|
0
|
0
|
0
|
0
|
1
|
1
|
3
|
0
|
1
|
1
|
1
|
1
|
1
|
1
|
1
|
127
|
The
range starts from 0.0.0.0
The
ends with 127.255.255.255
Class
B: For CLASS B the first 2 bits of the first octet are reserved as the priority
bit
10XXXXXX
2^7
|
2^6
|
2^5
|
2^4
|
2^3
|
2^2
|
2^1
|
2^0
|
Decimal
Value
|
1
|
0
|
0
|
0
|
0
|
0
|
0
|
0
|
128
|
1
|
0
|
0
|
0
|
0
|
0
|
0
|
1
|
129
|
1
|
0
|
0
|
0
|
0
|
0
|
1
|
0
|
130
|
1
|
0
|
0
|
0
|
0
|
0
|
1
|
1
|
131
|
1
|
0
|
1
|
1
|
1
|
1
|
1
|
1
|
191
|
The
range starts from 128.0.0.0
The ends with 191.255.255.255
Class C: For CLASS C the first 3 bits of the first octet is
reserved as the priority bit
110XXXXX
2^7
|
2^6
|
2^5
|
2^4
|
2^3
|
2^2
|
2^1
|
2^0
|
Decimal
Value
|
1
|
1
|
0
|
0
|
0
|
0
|
0
|
0
|
192
|
1
|
1
|
0
|
0
|
0
|
0
|
0
|
1
|
193
|
1
|
1
|
0
|
0
|
0
|
0
|
1
|
0
|
194
|
1
|
1
|
0
|
0
|
0
|
0
|
1
|
1
|
194
|
1
|
1
|
0
|
1
|
1
|
1
|
1
|
1
|
223
|
The range starts from 192.0.0.0
The ends with 223.255.255.255
Class D: For CLASS D the first 4 bits of the first octet are
reserved as the priority bit
1110XXXX
2^7
|
2^6
|
2^5
|
2^4
|
2^3
|
2^2
|
2^1
|
2^0
|
Decimal
Value
|
1
|
1
|
1
|
0
|
0
|
0
|
0
|
0
|
224
|
1
|
1
|
1
|
0
|
0
|
0
|
0
|
1
|
225
|
1
|
1
|
1
|
0
|
0
|
0
|
1
|
0
|
226
|
1
|
1
|
1
|
0
|
0
|
0
|
1
|
1
|
227
|
1
|
1
|
1
|
0
|
1
|
1
|
1
|
1
|
239
|
The range starts from 224.0.0.0
The ends with 239.255.255.255
Class E: For CLASS E the first 4 bits of the first octet are
reserved as the priority bit
1111XXXX
2^7
|
2^6
|
2^5
|
2^4
|
2^3
|
2^2
|
2^1
|
2^0
|
Decimal
Value
|
1
|
1
|
1
|
1
|
0
|
0
|
0
|
0
|
240
|
1
|
1
|
1
|
1
|
0
|
0
|
0
|
1
|
241
|
1
|
1
|
1
|
1
|
0
|
0
|
1
|
0
|
242
|
1
|
1
|
1
|
1
|
0
|
0
|
1
|
1
|
243
|
1
|
1
|
1
|
1
|
1
|
1
|
1
|
1
|
255
|
The range starts from 240.0.0.0
The ends with 255.255.255.255
CLASS
|
IP address range
|
Class A
|
0.0.0.0 - 127.255.255.255
|
Class B
|
128.0.0.0 - 191.255.255.255
|
Class C
|
192.0.0.0 -223.255.255.255
|
Class D
|
224.0.0.0 - 239.255.255.255
|
Class E
|
240.0.0.0 - 255.255.255.255
|
Octal Format:
Class A :
N.H.H.H
Class B :
N.N.H.H
Class C :
N.N.N.H
N = Refers
to the Network Portion
H = Refers
to the Host portion
Broadcast address: IP address with all bits as ONES in the host portion.
Valid IP Addresses lie between the Network Address and the Broadcast Address.
Calculate
the Number of Networks for each Class:
The priority bit that was mentioned above will be used
The priority bit that was mentioned above will be used
Class A
Octet Format is N.H.H.H
Network bits
: 8
No. of
Networks
= 2^(no of network bits– Priority bit)
= 2^(no of network bits– Priority bit)
= 2^(8-1)
= 2^7
= 128 – 2 (-2 is for 0 & 127 Network)
= 126 Networks
Class B
Octet Format is N.N.H.H
Network bits
: 16
No. of
Networks
= 2^(no of network bits– Priority bit)
= 2^(no of network bits– Priority bit)
= 2^(16-2)
= 2^14
= 16384 Networks
Class C
Octet Format is N.N.N.H
Network bits
: 24
No. of
Networks
= 2^(no of network bits– Priority bit)
= 2^(24-3)
= 2^21
= 2097152 Networks
Calculate the Number of Host for each Class:
Calculate the Number of Host for each Class:
Class A Octet Format is
N.H.H.H
Host bits : 24
No. of Networks
= 2^(no of host bits) -2
= 2^(24) – 2
= 16777216 - 2
= 16777214 Hosts/Network
Class B Octet Format is
N.N.H.H
Host bits : 16
No. of Networks
= 2^(no
of host bits) -2
= 2^(16) – 2
= 65536 - 2
= 65534 Hosts/Network
Class C Octet Format is
N.N.N.H
Host bits : 8
No. of Host
= 2^(no of host bits) -2
= 2(8) – 2
= 256 - 2
= 254 Hosts/Network
No comments:
Post a Comment