IP Addressing
IP Addressing
IP Addressing
2
IP version 4
01010101000001011011111100000001
3
IP version 6
(Colon-Hex Notation)
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
4
Binary to Decimal Conversion
1 1 1 1 1 1 1 1 = 255
5
IP Address Classes
• CLASS A
• CLASS C
• CLASS D Multicasting
6
Priority Bit Concept
7
CLASS A Range
0 1 1 1 1 1 1 1 = 127
8
CLASS B Range
1 0 1 1 1 1 1 1 = 191
9
CLASS C Range
1 1 0 1 1 1 1 1 = 223
10
CLASS D Range
1 1 1 0 1 1 1 1 = 239
11
CLASS E Range
1 1 1 1 1 1 1 1 = 255
12
Octet Format
13
CLASS A – No. Networks & Host
• No. of Networks
= 28-1 (-1 is Priority Bit for Class A)
= 27
= CLASS AA
128 – 2 (-2 is for 0 & 127 Network) CLASS
= 126 Networks 126 Networks
126 Networks
&
&
• No. of Host
=
16777214 Hosts/Nw
224 – 2 (-2 is for Network ID 16777214
Hosts/Nw
& Broadcast ID)
= 16777216 - 2
= 16777214 Hosts/Network
14
CLASS B – No. Networks & Host
• No. of Networks
= 216-2 (-2 is Priority Bit for Class B)
= 214
CLASS BB
CLASS
= 16384 Networks
16384 Networks
16384 Networks
• No. of Host &
&
= 65534
216 – 2 (-2 is for Network ID65534 Hosts/Nw
Hosts/Nw
& Broadcast ID)
= 65536 - 2
= 65534 Hosts/Network
15
CLASS C – No. Networks & Host
• No. of Networks
= 224-3 (-3 is Priority Bit for Class C)
= 221
CLASS CC
CLASS
= 2097152 Networks
2097152 Networks
2097152 Networks
• No. of Host &&
= 254
28 – 2 (-2 is for Network ID &254 Hosts/Nw
Hosts/Nw
Broadcast ID)
= 256 - 2
= 254 Hosts/Network
16
Network & Broadcast Address
17
Example - Class A
Class A : N.H.H.H
Network Address :
0xxxxxxx.00000000.00000000.00000000
Broadcast Address :
0xxxxxxx.11111111.11111111.11111111
Class A
Class A
10.0.0.0
10.0.0.0 Network Address
10.0.0.1
10.0.0.1
10.0.0.2
10.0.0.2
10.0.0.3
10.0.0.3 Valid IP Addresses
10.255.255.254
10.255.255.254
10.255.255.255
10.255.255.255 Broadcast Address
18
Example - Class B
Class B : N.N.H.H
Network Address :
10xxxxxx.xxxxxxxx.00000000.00000000
Broadcast Address :
10xxxxxx.xxxxxxxx.11111111.11111111
Class B
Class B
172.16.0.0
172.16.0.0 Network Address
172.16.0.1
172.16.0.1
172.16.0.2
172.16.0.2
172.16.0.3
172.16.0.3 Valid IP Addresses
172.16.255.254
172.16.255.254
172.16.255.255
172.16.255.255 Broadcast Address
19
Example - Class C
Class C : N.N.N.H
Network Address :
110xxxxx.xxxxxxxx.xxxxxxxx.00000000
Broadcast Address :
110xxxxx.xxxxxxxx.xxxxxxxx.11111111
Class CC
Class
192.168.1.0
192.168.1.0 Network Address
192.168.1.1
192.168.1.1
192.168.1.2
192.168.1.2
192.168.1.3
192.168.1.3 Valid IP Addresses
192.168.1.254
192.168.1.254
192.168.1.255
192.168.1.255 Broadcast Address
20
Private IP Address
Class AA
Class
10.0.0.0 to
10.0.0.0 to 10.255.255.255
10.255.255.255
Class BB
Class
172.16.0.0 to
172.16.0.0 to 172.31.255.255
172.31.255.255
Class CC
Class
192.168.0.0 to
192.168.0.0 to 192.168.255.255
192.168.255.255
21
Subnet Mask
22
Subnet Mask - Examples
Class A : N.H.H.H
11111111.00000000.00000000.00000000
Default Subnet Mask for Class A is 255.0.0.0
Class B : N.N.H.H
11111111.11111111.00000000.00000000
Default Subnet Mask for Class B is 255.255.0.0
Class C : N.N.N.H
11111111.11111111.11111111.00000000
Default Subnet Mask for Class C is 255.255.255.0
23
How Subnet Mask Works ?
IP Address : 192.168.1.1
Subnet Mask : 255.255.255.0
ANDING PROCESS :
192.168.1.1 =
11000000.10101000.00000001.00000001 AND TABLE
AND TABLE
A B CC
255.255.255.0 = 11111111.11111111.11111111.00000000
A B
=======================================
00 00 00
192.168.1.0 =
00 11 00
11000000.10101000.00000001.00000000
11
======================================= 00 00
11 11 11
The output of an AND table is 1 if both its inputs are 1.
For all other possible inputs the output is 0.
24
Subnetting
25
Scenario
– MCSE 192.168.1.1 to
– CISCO 192.168.1.20
192.168.1.21 to 192.168.1.40
– FIREWALL 192.168.1.41 to 192.168.1.60
– SOLARIS 192.168.1.61 to 192.168.1.80
– TRAINING 192.168.1.81 to 192.168.1.100
26
Scenario (…continued)
• Administrator’s 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
– FIREWALL 192.168.3.1 to 192.168.3.20
– SOLARIS 192.168.4.1 to 192.168.4.20
– TRAINING 192.168.5.1 to 192.168.5.20
• No Security
28
Power table
POWER TABLE
POWER TABLE
VALUES IN
VALUES IN SUBNET
SUBNET MASK
MASK
Bit
Bit Value
Value Mask
Mask
11 128
128 10000000
10000000
22 192
192 11000000
11000000
33 224
224 11100000
11100000
44 240
240 11110000
11110000
55 248
248 11111000
11111000
66 252
252 11111100
11111100
77 254
254 11111110
11111110
88 255
255 11111111
11111111 30
Requirement of Networks is 5 ?
Example – 1
Class C : N.N.N.H
110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
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)
= 8–2
= 6 Subnet
• No. of Host
= 2h – 2 (-2 is for Network ID & Broadcast ID)
= 25 – 2
= 32 – 2
= 30 Hosts/Subnet
31
HELP
Example – 1 (Continued…)
• Customize
If Subnet
you Mask
convert 3 = Bits to Network Bits
Host
If you convert 3 Host Bits to Network Bits
255. 255. 255. 224
6 Subnet & 30 Hosts/Subnet
6 Subnet & 30 Hosts/Subnet
11111111. 11111111. 11100000
11111111.
Customize Subnet
Customize Subnet Mask
Mask
32
64
12
255.255.255.224
255.255.255.224
• Range of Networks
Network ID Broadcast ID
Subnet Range
Subnet Range
192.168.1.0 192.168.1.31 x
192.168.1.32
192.168.1.32 to
to 192.168.1.63
192.168.1.63 MCSE
MCSE
..
192.168.1.32 192.168.1.63
192.168.1.64
192.168.1.64 to
to 192.168.1.95
192.168.1.95 CISCO
CISCO
. .
192.168.1.64 192.168.1.95
192.168.1.96
192.168.1.96 to
to 192.168.1.127
192.168.1.127 FIREWALL
FIREWALL
192.168.1.96 192.168.1.127
192.168.1.128 to
192.168.1.128 to 192.168.1.159
192.168.1.159 SOLARIS
Valid Subnets
SOLARIS
192.168.1.128 192.168.1.159
192.168.1.160
192.168.1.160 to
to 192.168.1.191
192.168.1.191 TRAINING
TRAINING
192.168.1.160 192.168.1.191
192.168.1.192
192.168.1.192 to
to 192.168.1.223
192.168.1.223 Future Use
Future
Use
192.168.1.192 192.168.1.223
192.168.1.224 192.168.1.255 x 32
Requirement of Networks is 14 ?
Example – 2
Class C : N.N.N.H
110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
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
33
HELP
Example – 2 (Continued…)
• Customize
If Subnet
you Mask
convert 4 = Bits to Network Bits
Host
If you convert 4 Host Bits to Network Bits
255. 255. 255. 240
14 Subnet & 14 Hosts/Subnet
14 Subnet & 14 Hosts/Subnet
11111111. 11111111. 11110000
11111111.
Customize Subnet
Customize Subnet Mask
Mask
8
64
32
16
12
255.255.255.240
255.255.255.240
• Range of Networks
Network ID Broadcast ID
Subnet Range
Subnet Range
192.168.1.0 – 192.168.1.15x
192.168.1.16
192.168.1.16 to 192.168.1.31
to 192.168.1.31
192.168.1.16 – 192.168.1.31
192.168.1.32
192.168.1.32 to 192.168.1.47
to 192.168.1.47
192.168.1.32 – 192.168.1.47
192.168.1.48
192.168.1.48 to
to 192.168.1.63
192.168.1.63
192.168.1.48 – 192.168.1.63
192.168.1.64 to
192.168.1.64 to 192.168.1.80
192.168.1.80Valid Subnets
192.168.1.224 – 192.168.1.239
192.168.1.224
192.168.1.224 to 192.168.1.239
to 192.168.1.239
192.168.1.240 – 192.168.1.255 x 34
35