IP Address
IP Address is Logical Address
It is a Network Layer address (Layer 3)
Two Versions of IP:
IP version 4 is a 32 bit address
IP version 6 is a 128 bit address
Naveen Patel
IP version 4
Bit is represent by 0 or 1 (i.e. Binary)
IP address in binary form (32 bits):
01010101000001011011111100000001
32 bits are divided into 4 Octets:
First Octet
Second Octet
Third Octet
Forth Octet
85.5.191.1
Naveen Patel
IP version 6
It is represented in Hex notation
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
Format of IPv6 address:
x : x : x : x : x : x : x : x where x is 16 bits
(4 Hex digits)
Not case sensitive for A,B,C,D,E,F
Leading zeros in a field are Optional.
Successive Fields of 0 can be represented as ::
but only once.
Eg: 2031:0000:0000:130f:0000:0000:09c4:1300
The above example can be rewritten as below:
2031::130f:0:0:9c4:1300
Naveen Patel
255.255.255.255
1
Naveen Patel
= 255
IP Address Classification
IP Addresses are divided into 5 Classes
CLASS A
CLASS B
CLASS C
CLASS D
CLASS E
Naveen Patel
Parity Bit
Parity Bit is used for IP Address classification.
Most significant bit(s) from the first octet are selected
for Parity Bit(s).
10
110
1110
1111
Naveen Patel
CLASS A Range
In Class A : First bit of the first octet
is reserved as priority bit, bit value is zero.
26
0
0
0
0
0
25
0
0
0
0
0
24
0
0
0
0
0
23
0
0
0
0
0
22 21
0 0
0 0
0 1
0 1
1 0
20
0
1
0
1
0
=
=
=
=
=
= 127
Naveen Patel
0
1
2
3
4
Class A Range
0 . 0 . 0 . 0 to
127.255.255.255
Exception
0.X.X.X and 127.X.X.X
networks are reserved
CLASS B Range
In Class B : First two bits of the first
octet are reserved as priority bits, bit value as 10.
26
0
0
0
0
0
25
0
0
0
0
0
24
0
0
0
0
0
23
0
0
0
0
0
22 21
0 0
0 0
0 1
0 1
1 0
20
0
1
0
1
0
=
=
=
=
=
= 191
Naveen Patel
128
129
130
131
132
Class B Range
128. 0 . 0 . 0
to
191.255.255.255
CLASS C Range
For Class C range : First Three bits of the first
octet are reserved as priority bits, bit value as 110.
26
1
1
1
1
1
25
0
0
0
0
0
24
0
0
0
0
0
23
0
0
0
0
0
22 21
0 0
0 0
0 1
0 1
1 0
20
0
1
0
1
0
=
=
=
=
=
= 223
Naveen Patel
192
193
194
195
196
Class C Range
192. 0 . 0 . 0
to
223.255.255.255
CLASS D Range
For Class D range : First four bits of the first
octet are reserved as priority bits, bit value as 1110.
26
1
1
1
1
1
25
1
1
1
1
1
24
0
0
0
0
0
23
0
0
0
0
0
22 21
0 0
0 0
0 1
0 1
1 0
20
0
1
0
1
0
=
=
=
=
=
= 239
Naveen Patel
224
225
226
227
228
Class D Range
224. 0 . 0 . 0
to
239.255.255.255
CLASS E Range
For Class E range : First four bits of the first
octet are reserved as priority bits, bit value as 1111.
26
1
1
1
1
1
25
1
1
1
1
1
24
1
1
1
1
1
23
0
0
0
0
0
1 1
Naveen Patel
22 21
0 0
0 0
0 1
0 1
1 0
20
0
1
0
1
0
=
=
=
=
=
240
241
242
243
244
= 255
Class E Range
240. 0 . 0 . 0
to
255.255.255.255
Octet Format
N.H.H.H
CLASS B is written as
N.N.H.H
CLASS C is written as
N.N.N.H
Naveen Patel
Host bits : 24
No. of Networks
=
=
=
=
=
CLASS A
126 Networks
&
No. of Host
16777214 Hosts per
no
of
host
bits
= 2
-2
Network
= 224 2 (-2 is for Network ID & Broadcast ID)
= 16777216 - 2
= 16777214 Hosts/Network
Naveen Patel
Host bits : 16
No. of Networks
=
=
=
CLASS B
16384 Networks
&
No. of Host
65534 Hosts per Network
= 2no of host bits -2
= 216 2 (-2 is for Network ID & Broadcast ID)
= 65536 - 2
= 65534 Hosts/Network
Naveen Patel
Host bits : 8
No. of Networks
=
=
=
No. of Host
CLASS C
2097152 Networks
&
=
=
=
Naveen Patel
Naveen Patel
Example - Class A
Class A : N.H.H.H
Network Address :
0xxxxxxx.00000000.00000000.00000000
Broadcast Address :
0xxxxxxx.11111111.11111111.11111111
Class A
10.0.0.0
10.0.0.1
10.0.0.2
10.0.0.3
10.255.255.254
10.255.255.255
Naveen Patel
Network Address
Valid IP Addresses
Broadcast Address
Example - Class B
Class B : N.N.H.H
Network Address :
10xxxxxx.xxxxxxxx.00000000.00000000
Broadcast Address :
10xxxxxx.xxxxxxxx.11111111.11111111
Class B
172.16.0.0
172.16.0.1
172.16.0.2
172.16.0.3
172.16.255.254
172.16.255.255
Naveen Patel
Network Address
Valid IP Addresses
Broadcast Address
Example - Class C
Class C : N.N.N.H
Network Address :
110xxxxx.xxxxxxxx.xxxxxxxx.00000000
Broadcast Address :
110xxxxx.xxxxxxxx.xxxxxxxx.11111111
Class C
192.168.1.0
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.254
192.168.1.255
Naveen Patel
Network Address
Valid IP Addresses
Broadcast Address
Private IP Address
There are certain addresses in each class of IP address that are
reserved for Private Networks. These addresses are called
private addresses.
Class A
10.0.0.0 to 10.255.255.255
Class B
172.16.0.0 to 172.31.255.255
Class C
192.168.0.0 to 192.168.255.255
Naveen Patel
Subnet Mask
Subnet Mask differentiates Network portion and Host
Portion
Represented with all 1s in the network portion
and with all 0s in the host portion.
Naveen Patel
Naveen Patel
192.168.1.1
255.255.255.0
ANDING PROCESS :
AND TABLE
0
0
1
1
*
*
*
*
0
1
0
1
=
=
=
=
0
0
0
1
192.168.1.1
= 11000000.10101000.00000001.00000001
255.255.255.0 = 11111111.11111111.11111111.00000000
=======================================
192.168.1.0
= 11000000.10101000.00000001.00000000
=======================================
The output of an AND table is 1 if both its inputs are 1.
For all other possible inputs the output is 0.
Naveen Patel
Subnetting
Creating Multiple independent Networks from a Single Network.
Naveen Patel
MCSE
CISCO
Hardware
Linux
Exchange
Naveen Patel
192.168.1.1
192.168.1.21
192.168.1.41
192.168.1.61
192.168.1.81
to 192.168.1.20
to 192.168.1.40
to 192.168.1.60
to 192.168.1.80
to 192.168.1.100
Scenario (continued)
Administrators Requirement :
Inter-department communication should not be
possible ?
Solution.
Allocate a different Network to each Department
i.e.
MCSE
192.168.1.1 to 192.168.1.20
CISCO
192.168.2.1 to 192.168.2.20
Hardware
192.168.3.1 to 192.168.3.20
Linux
192.168.4.1 to 192.168.4.20
Exchange
192.168.5.1 to 192.168.5.20
Naveen Patel
Naveen Patel
Power table
POWER TABLE
21 = 2
29 = 512
217 = 131072
225 = 33554432
22 = 4
210 = 1024
218 = 262144
226 = 67108864
23 = 8
211 = 2048
219 = 524288
227 = 134217728
24 = 16
212 = 4096
220 = 1048576
228 = 268435456
25 = 32
213 = 8192
221 = 2097152
229 = 536870912
26 = 64
230 = 1073741824
231 = 2147483648
Naveen Patel
Bit
Value
Mask
128
10000000
192
11000000
224
11100000
240
11110000
248
11111000
252
11111100
254
11111110
255
11111111
Requirement of Networks is 5 ?
Example 1
Class C : N.N.N.H
110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
Class C : 192.168.1.0
No.
=
=
=
=
of Subnet
2n 2 Req. of Subnet
23 2 5 (-2 is for First & Last Subnet Range)
82
6 Subnet
No.
=
=
=
=
of Host
2h 2 (-2 is for Network ID & Broadcast ID)
25 2
32 2
30 Hosts/Subnet
Naveen Patel
HELP
Example 1 (Continued)
Customized
= Bits to Network Bits
If you Subnet
convertMask
3 Host
255.
224
6255.
Subnet & 255.
30 Hosts/Subnet
11111111.11111111.11111111. 11100000
Customized Subnet Mask
255.255.255.224
Range of Networks
Network ID
Broadcast ID
Subnet Range
192.168.1.31 x
192.168.1.0
192.168.1.32 to 192.168.1.63 MCSE
.
192.168.1.63
192.168.1.32
192.168.1.64 to 192.168.1.95 CISCO
.
192.168.1.95
192.168.1.64
192.168.1.96 to 192.168.1.127 FIREWALL
192.168.1.127
192.168.1.96
192.168.1.128 to 192.168.1.159 SOLARIS
Valid Subnets
192.168.1.159
192.168.1.128
192.168.1.160 to 192.168.1.191 TRAINING
192.168.1.191
192.168.1.160
192.168.1.192 to 192.168.1.223 Future Use
192.168.1.223
192.168.1.192
192.168.1.255 x
192.168.1.224
Naveen Patel
Requirement of Networks is 14 ?
Example 2
Class C : N.N.N.H
110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
Class C : 192.168.1.0
No.
=
=
=
=
of Subnet
2n 2 Req. of Subnet
24 2 14 (-2 is for First & Last Subnet Range)
16 2
14 Subnet
No.
=
=
=
=
of Host
2h 2 (-2 is for Network ID & Broadcast ID)
24 2
16 - 2
14 Hosts/Subnet
Naveen Patel
HELP
Example 2 (Continued)
Customized
= Bits to Network Bits
If you Subnet
convertMask
4 Host
255.
255.
240
14
Subnet &255.
14 Hosts/Subnet
11111111.11111111.11111111. 11110000
Customized Subnet Mask
255.255.255.240
Range of Networks
Network ID
Broadcast ID
Subnet Range
192.168.1.15 x
192.168.1.0
192.168.1.16 to 192.168.1.31
192.168.1.16
192.168.1.31
192.168.1.32 to 192.168.1.47
192.168.1.32
192.168.1.47
192.168.1.48 to 192.168.1.63
192.168.1.48
192.168.1.63
192.168.1.64 to 192.168.1.80
Valid Subnets
192.168.1.224
192.168.1.239
192.168.1.224 to 192.168.1.239
192.168.1.240
192.168.1.255 x
Naveen Patel
Naveen Patel