02 ZXR10-BC-En-IP Network Basics (IP Addressing and Subnetting) - 2-PPT-201105 32

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 32

IP Addressing and Subnetting

Objectives

Upon completion of this course, you will be


able to:

Know about IP address classification and calculation


Be familiar with subnet and mask

Contents

IP Address Classification
Subnet and IP Address Calculation
VLSM

IPv4 Address Function

10.13.0.1

192.168.1.1
HDR SADA DATA

172.17.0.1

172.17.0.2

Uniquely and logically identifies end stations


Packet forwarding is based on IP address

IP Address
32 bits
Network
Maximum

Decimal
Binary

255
16 17

24 25

32

11111111 11111111

11111111 11111111
128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1

8 9

255

128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1

Binary

255

255
1

Host

172

16

122

204

10101100 00010000 01111010 11001100

Classification
8 bits

8 bits

8 bits

8 bits

Class A:

Network

Class B:

Network Network

Class C:

Network Network Network

Class D:

Multicast Address

Class E:

Reserved for Research

Host

Host

Host

Host

Host

Host

Valid Network Numbers


Bits:

Class A:

8 9

0NNNNNNN

16 17

24 25

32

Host

Host

Host

Network

Host

Host

Network

Network

Host

Range (1-126)

Class B:

10NNNNNN
Range (128-191)

Class C:

110NNNNN
Range (192-223)

Class D:

1110MMMM

Multicast Group Multicast Group Multicast Group

Range (224-239)

Reserved IP Address

Network 127.0.0.0
Network

0.0.0.0

All 0 host address


All 1 host address
Host 255.255.255.255

Default Subnet Mask

Class of
Address

Size of
network part

Size of host
part

Default mask

24

255.0.0.0

16

16

255.255.0.0

24

255.255.255.0

Contents

IP address classification
Subnet and IP address calculation
VLSM

Addressing Without Subnets

172.19.0.0
A
172.18.0.0

172.16.0.0

172.17.2.0

Subnet mask: 255.255.0.0

Addressing With Subnets

172.16.3.0
A
172.16.4.0

172.16.1.0

172.16.2.0

Subnet mask: 255.255.255.0

Subnet Mask And Prefix


Network
IP
Address

172

Host

16

Network
Default
Subnet
Mask

8-bit
Subnet
Mask

255

0
Host

255

11111111
11111111
00000000
00000000
Also written as /16 where 16 represents the number of 1s
in the mask.
Network
Subnet
Host

255

255

255

Also written as /24 where 24 represents the number of 1s


in the mask.

Address Formats When Subnetting


8

Class A:

24-x

Network

Subnet
16

Class B:

Host

Network

Subnet

Network

255.255 .
172.16

Network

Host
8-x

24

Class C:

16-x

Subnet Host

255 .
2

Subnet

0
160

Host

Conversion between Binary and Decimal


24 25

32

11111111 11111111

11111111 11111111
128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1

Weight:

16 17

8 9

128
64
32
16
8
4
2
1
128
64
32
16
8
4
2
1

172
172=128+32+8+4

16

122

204

128+64+8+4=204

10101100 00010000 01111010 11001100

Boolean AND
Rules

Example

0 AND 0 yields 0

0 AND 1 yields 0

1 AND 0 yields 0
1 AND 1 yields 1

Boolean AND

How Many Hosts And Subnets


Process:
Step 1:The class rules define the network part.
Step 2:The mask binary 0s define the host part.
Step 3:What is left over defines the size of subnet part

Step 4:Number of subnets=2number-of-subnet-bits


Step 5:Number of hosts per subnet =2number-of-host-bits-2

Example

00000000 00000000
00000001 00000001
00000011
10000000
11111101
11111110 11111110
11111111 11111111

1
2
3

2N-2 = 28-2 = 254

...

...

255.255.255.0

0
...

Subnet mask:

16

Host

...

172

Subnet

8
7
6
5
4
3
2
1
8
7
6
5
4
3
2
1

Network

254
255
256
2
254

Converting table
Weight:

128 64

32

16

128

192

224

240

248

252

254

255

Finding The Subnet Number


Subnet

10101100

00010000

00000010

10100000

11111111

11111111

11111111

11000000

AND result

10101100

00010000

00000010

10000000
128
192
224
240
248
252
254
255

Host

128
192
224
240
248
252
254
255

Network

Subnet number

172

16

128

172.16.2.160
255.255.255.192

Finding The Subnet Broadcast Address


Subnet

Network

Host

10101100

00010000

00000010

10100000

11111111

11111111

11111111

11000000

AND result

10101100

00010000

00000010

10000000

host bits set to 1

10101100

00010000

00000010

10111111

Broadcast

172

16

191

172.16.2.160
255.255.255.192

Finding The Valid Range of IP Addresses


Subnet

Network

Host

10101100

00010000

00000010

10100000

11111111

11111111

11111111

11000000

AND result

10101100

00010000

00000010

10000000

First available

10101100

00010000

00000010

10000001

Last available

10101100

00010000

00000010

10111110

First valid

172

16

129

Last valid

172

16

190

172.16.2.160
255.255.255.192

Address Calculating Summary


164

16

10100100

00010000

00000010 01100000 Host

255.255.255.192 11111111

11111111

11111111 11000000 Mask

164.16.2.64

10100100

00010000

00000010 01000000 Subnet

164.16.2.127

10100100

00010000

00000010

164.16.2.65

10100100

00010000

00000010 01000001 First

164.16.2.126

10100100

00010000

00000010 01111110 Last

164.16.2.96

96

01111111 Broadcast

Which Subnet Masks Meet Requirement

Subnet
number
200

2N-2

Host number
per Subnet
200

2M-2

Class
B

N+M=16

Subnet
mask
?

N=M=8

IP address Classification Exercise

Address
10.2.1.1
128.63.2.100
201.222.5.64
192.6.141.2
130.113.64.16
256.241.201.10

Class

Network

Host

Subnet Mask Exercise

Address

Subnet Mask

172.16.2.10

255.255.255.0

10.6.24.20

255.255.240.0

10.30.36.12

255.255.255.0

Class

Subnet

Broadcast Address Exercise

Address

Subnet Mask

201.222.10.60

255.255.255.248

15.16.193.6

255.255.248.0

128.16.32.13

255.255.255.252

153.50.6.27

255.255.255.128

Class

Subnet

Broadcast

Contents

IP address classification
Subnet and IP address calculation
VLSM

Variable Length Subnet Mask


172.16.14.32/27
A

172.16.14.64/27
B

HQ
HQ

172.16.14.96/27
Derived from
172.16.14.0/24

Derived from

Derived from

172.16.14.128/27

172.16.0.0/16

VLSM Calculating
Subnetted Address: 172.16.14.0/24
In Binary 10101100. 00010000.00001110.00000000
VLSM Address: 172.16.14.0/27
In Binary 10101100. 00010000.00100000.00000000

00100000
01000000
01100000
10000000

172.16.14.32/27
172.16.14.64/27
172.16.14.96/27
172.16.14.128/27

VLSM Subnet
VLSM Address: 172.16.14.128/27
In Binary 10101100. 00010000.00100000.10000000

00100
01000
01100
10000

172.16.14.132/30
172.16.14.136/30
172.16.14.140/30

VLSM Subnet

Summarization

IP address classification
Subnetting and calculation
VLSM

You might also like