IP Adresses

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

IP Addresses

2001, Cisco Systems, Inc.

3-1

IP Addressing
32 bits
Dotted
Decimal
Maximum

2001, Cisco Systems, Inc.

Network

255

255

Host

255

255

BSCI v1.23-2

Introduction to IP Addresses

172.18.0.1
172.18.0.2
10.13.0.0
10.13.0.1

172.16.0.1

HDR SADA DATA

172.17.0.1

172.16.0.2

172.17.0.2

192.168.1.0
192.168.1.1

Unique addressing allows communication


between end stations
Path choice is based on destination address
Location is represented by an address
2001, Cisco Systems, Inc.

BSCI v1.23-3

IP Addressing
32 bits
Dotted
Decimal

Network

255

Maximum
1

255
8 9

255
16 17

2001, Cisco Systems, Inc.

255
24 25

32

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

11111111 11111111 11111111 11111111


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

Binary

Host

BSCI v1.23-4

IP Addressing
32 bits
Dotted
Decimal

Network

255

Maximum
1

255
8 9

255
16 17

255
24 25

32

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

11111111 11111111 11111111 11111111


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

Binary

Host

Example
172
16
122
204
Decimal
Example 10101100 00010000 01111010 11001100
Binary
2001, Cisco Systems, Inc.

BSCI v1.23-5

IP Address Classes
8 bits

8 bits

8 bits

8 bits

Class A:

Network
Network

Host
Host

Host
Host

Host
Host

Class B:

Network
Network Network
Network

Host
Host

Host
Host

Class C:

Network
Network Network
Network Network
Network

Class D:

Multicast

Class E:

Research

2001, Cisco Systems, Inc.

Host
Host

BSCI v1.23-6

IP Address Classes
Bits:

Class A:
Bits:

Class B:
Bits:

Class C:
Bits:

Class D:
2001, Cisco Systems, Inc.

8 9

0NNNNNNN
0NNNNNNN
Range (1-126)
1

8 9

16 17
Host
Host

24 25
Host
Host

16 17

32
Host
Host

24 25

32

10NNNNNN
Network
Host
Host
10NNNNNN
Network
Host
Host
Range (128-191)
1
8 9
16 17
24 25

32

110NNNNN
Network
Network
Host
110NNNNN
Network
Network
Host
Range (192-223)
1
8 9
16 17
24 25

32

1110MMMM
Multicast Group
Group
1110MMMM Multicast
Range (224-239)

Multicast
Multicast Group
Group Multicast
Multicast Group
Group

BSCI v1.23-7

Host Addresses
172.16.2.2

10.1.1.1
10.6.24.2
E1

172.16.3.10

E0
172.16.2.1

10.250.8.11

172.16.12.12

172.16
Network
2001, Cisco Systems, Inc.

12 . 12
Host

10.180.30.118

Routing Table
Network
Interface
172.16.0.0

E0

10.0.0.0

E1
BSCI v1.23-8

Determining Available Host


Addresses
Network

...

...

10101100 00010000 00000000 00000000


00000000 00000001
00000000 00000011

N
1
2
3

...

16

16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1

172

Host

11111111 11111101 65534


11111111 11111110 65535
11111111 11111111 65536
2
2N-2 = 216-2 = 65534
2001, Cisco Systems, Inc.

65534
BSCI v1.23-9

IP Address Classes Exercise


Address

Class

Network

Host

10.2.1.1
128.63.2.100
201.222.5.64
192.6.141.2
130.113.64.16
256.241.201.10

2001, Cisco Systems, Inc.

BSCI v1.23-10

IP Address Classes Exercise


Answers
Address

Class

10.2.1.1

10.0.0.0

0.2.1.1

128.63.2.100

128.63.0.0

0.0.2.100

201.222.5.64

201.222.5.0

0.0.0.64

192.6.141.2

192.6.141.0

0.0.0.2

130.113.64.16

130.113.0.0

0.0.64.16

256.241.201.10

2001, Cisco Systems, Inc.

Network

Host

Nonexistent

BSCI v1.23-11

Addressing without Subnets

172.16.0.1 172.16.0.2 172.16.0.3

172.16.255.253 172.16.255.254
...

172.16.0.0

Network 172.16.0.0
2001, Cisco Systems, Inc.

BSCI v1.23-12

Addressing with Subnets

172.16.3.0

172.16.4.0

172.16.1.0

172.16.2.0

Network 172.16.0.0
2001, Cisco Systems, Inc.

BSCI v1.23-13

Subnet Addressing
172.16.2.200

172.16.3.5
172.16.3.1
E1

172.16.2.2

E0
172.16.2.1

172.16.3.100

172.16.2.160

172.16
Network
2001, Cisco Systems, Inc.

2 . 160
Host

172.16.3.150

New Routing Table


Network
Interface
172.16.0.0

E0

172.16.0.0

E1
BSCI v1.23-14

Subnet Addressing
172.16.2.200

172.16.3.5
172.16.3.1
E1

172.16.2.2

E0
172.16.2.1

172.16.3.100

172.16.2.160

172.16 .
2
. 160
Network Subnet Host
2001, Cisco Systems, Inc.

172.16.3.150

New Routing Table


Network
Interface
172.16.2.0

E0

172.16.3.0

E1
BSCI v1.23-15

Subnet Mask
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.
2001, Cisco Systems, Inc.

BSCI v1.23-16

Decimal Equivalents of Bit Patterns


128 64

32

16

128

192

224

240

248

252

254

255

2001, Cisco Systems, Inc.

BSCI v1.23-17

Subnet Mask without Subnets


Network

Host

172.16.2.160
172.16.2.160

10101100

00010000

00000010

10100000

255.255.0.0
255.255.0.0

11111111

11111111

00000000

00000000

10101100

00010000

00000000 00000000

172

16

Network
Number

Subnets not in usethe default


2001, Cisco Systems, Inc.

BSCI v1.23-18

Subnet Mask with Subnets


Network

Host

10101100

00010000

00000010

10100000

255.255.255.0
255.255.255.0 11111111

11111111

11111111

00000000

10101100

00010000

00000010 00000000

172

16

128
192
224
240
248
252
254
255

172.16.2.160
172.16.2.160

Subnet

Network
Number

Network number extended by eight bits


2001, Cisco Systems, Inc.

BSCI v1.23-19

Subnet Mask with Subnets (cont.)


Network

Subnet

Host

00000010

10100000

255.255.255.192
255.255.255.192 11111111

11111111

11111111

11000000

10101100

00010000

00000010 10000000

172

16

Network
Number

128
192
224
240
248
252
254
255

00010000

128
192
224
240
248
252
254
255

10101100

172.16.2.160
172.16.2.160

128

Network number extended by ten bits


2001, Cisco Systems, Inc.

BSCI v1.23-20

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

2001, Cisco Systems, Inc.

Class

Subnet

BSCI v1.23-21

Subnet Mask Exercise Answers

Address

Subnet Mask

Class

Subnet

172.16.2.10

255.255.255.0

172.16.2.0

10.6.24.20

255.255.240.0

10.6.16.0

10.30.36.12

255.255.255.0

10.30.36.0

2001, Cisco Systems, Inc.

BSCI v1.23-22

Broadcast Addresses

172.16.3.0

172.16.4.0

172.16.1.0
172.16.2.0

172.16.3.255
(Directed broadcast)
255.255.255.255
(Local network broadcast)

172.16.255.255
(All subnets broadcast)
2001, Cisco Systems, Inc.

BSCI v1.23-23

Addressing Summary Example


172

172.16.2.160
255.255.255.192

10101100

16

160

00010000 00000010 10100000 Host

Mask
Subnet 4
Broadcast
First
Last

2001, Cisco Systems, Inc.

BSCI v1.23-24

Addressing Summary Example


172

16

160

172.16.2.160

10101100

00010000 00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2


Subnet
Broadcast
First
Last

2001, Cisco Systems, Inc.

BSCI v1.23-25

Addressing Summary Example


172

16

160
3

172.16.2.160

10101100

00010000 00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2


Subnet
Broadcast
First
Last

2001, Cisco Systems, Inc.

BSCI v1.23-26

Addressing Summary Example


172

16

160
3

172.16.2.160

10101100

00010000 00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2


10000000 Subnet 4
Broadcast
First
Last

2001, Cisco Systems, Inc.

BSCI v1.23-27

Addressing Summary Example


172

16

160
3

172.16.2.160

10101100

00010000 0 000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2


10000000 Subnet 4
10111111 Broadcast
5
First

Last
2001, Cisco Systems, Inc.

BSCI v1.23-28

Addressing Summary Example


172

16

160
3

172.16.2.160

10101100

00010000 00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2


10000000 Subnet 4
10111111 Broadcast
5
10000001 First

Last
2001, Cisco Systems, Inc.

BSCI v1.23-29

Addressing Summary Example


172

16

160
3

172.16.2.160

10101100

00010000 00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2


10000000 Subnet 4
10111111 Broadcast

2001, Cisco Systems, Inc.

5
10000001 First

10111110 Last

BSCI v1.23-30

Addressing Summary Example


172

16

160
3

172.16.2.160

10101100

00010000 00000010 10100000 Host

255.255.255.192

11111111

11111111

11111111 11000000 Mask 2

10101100

00010000

00000010 10000000 Subnet 4

10101100

00010000

00000010 10111111 Broadcast

10101100

00010000

5
00000010 10000001 First

10101100

00010000

00000010 10111110 Last

2001, Cisco Systems, Inc.

BSCI v1.23-31

Addressing Summary Example


172

16

160
3

172.16.2.160

10101100

00010000 00000010 10100000 Host

255.255.255.192 11111111
8
9
172.16.2.128
10101100

11111111

11111111 11000000 Mask 2

00010000

00000010 10000000 Subnet 4

10101100

00010000

00000010 10111111 Broadcast


6
7

172.16.2.191
172.16.2.129

10101100

00010000

5
00000010 10000001 First

172.16.2.190

10101100

00010000

00000010 10111110 Last

2001, Cisco Systems, Inc.

BSCI v1.23-32

Class B Subnet Example


IP Host Address: 172.16.2.121
Subnet Mask: 255.255.255.0
Network

Network

Subnet

Host

172.16.2.121: 10101100

00010000

00000010

01111001

255.255.255.0: 11111111

11111111

11111111

00000000

Subnet: 10101100

00010000

00000010

00000000

Broadcast: 10101100

00010000

00000010

11111111

Subnet Address = 172.16.2.0


Host Addresses = 172.16.2.1172.16.2.254
Broadcast Address = 172.16.2.255
Eight bits of subnetting
2001, Cisco Systems, Inc.

BSCI v1.23-33

Subnet Planning
20
20 subnets
subnets
55 hosts
hosts per
per subnet
subnet
Class
Class C
C address:
address:
192.168.5.0
192.168.5.0
192.168.5.16
Other
subnets

192.168.5.32

2001, Cisco Systems, Inc.

192.168.5.48

BSCI v1.23-34

Class C Subnet Planning Example


IP Host Address: 192.168.5.121
Subnet Mask: 255.255.255.248
Network

Network

Network Subnet Host

192.168.5.121: 11000000

10101000

00000101

01111001

255.255.255.248: 11111111

11111111

11111111

11111000

Subnet: 11000000
Broadcast: 11000000

10101000
10101000

00000101
00000101

01111000
01111111

Subnet Address = 192.168.5.120


Host Addresses = 192.168.5.121192.168.5.126
Broadcast Address = 192.168.5.127
Five Bits of Subnetting
2001, Cisco Systems, Inc.

BSCI v1.23-35

Broadcast Addresses 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

2001, Cisco Systems, Inc.

Class

Subnet

Broadcast

BSCI v1.23-36

Broadcast Addresses Exercise


Answers

Address

Subnet Mask

Class

Subnet

Broadcast

201.222.10.60 255.255.255.248

201.222.10.56

201.222.10.63

15.16.193.6

255.255.248.0

15.16.192.0

15.16.199.255

128.16.32.13

255.255.255.252

128.16.32.12

128.16.32.15

153.50.6.27

255.255.255.128

153.50.6.0

153.50.6.127

2001, Cisco Systems, Inc.

BSCI v1.23-37

Issues with IP
Addressing
2001, Cisco Systems, Inc.

3-38

Issues with IP Addressing

Internet

UNIVERSITY

IP address exhaustion
Routing table growth
2001, Cisco Systems, Inc.

BSCI v1.23-39

IP Addressing Solutions
Subnet masking, RFCs 950, 1812
Address allocation for private Internets,
RFC 1918
Network Address Translation, RFC 1631
Hierarchical addressing
Variable-length subnet masks, RFC 1812
Route summarization, RFC 1518
Classless interdomain routing, RFCs
1518, 1519, 2050
2001, Cisco Systems, Inc.

BSCI v1.23-40

Subnetting Overview
Moving the network boundary to the right
creates additional subnetworks at the
expense of fewer hosts on each segment
The new mask will contain additional
contiguous 1s indicating by how many bits
the network portion has been extended
The formula 2n, where n equals the number
of extended bits, indicates the maximum
number of subnets created

2001, Cisco Systems, Inc.

BSCI v1.23-41

IP Address Classes
IP address and associated mask are
represented in 32-bit dotted decimal
Other formats are commonly used
Decimal value in the first octet determines
the class of the address
001 - 126 = Class A
128 - 191 = Class B
192 - 223 = Class C
224 - 239 = Class D
240 - 254 = Class E
2001, Cisco Systems, Inc.

BSCI v1.23-42

Address Class Usage


Address classes A, B, and C are available for
Internet use
Some Class D multicast addresses are used by
routing protocols
OSPF224.0.0.5, 224.0.0.6
RIPv2224.0.0.9
EIGRP224.0.0.10
Other Class D multicast addresses are used by
videoconferencing or other applications
2001, Cisco Systems, Inc.

BSCI v1.23-43

Hierarchical
Addressing
2001, Cisco Systems, Inc.

3-44

Planning an IP Address Hierarchy

Does a telephone switch in California know how to


reach a specific phone in Virginia?
(1-703-555-1212)
2001, Cisco Systems, Inc.

BSCI v1.23-45

Planning an IP Address
Hierarchy (cont.)
Long (remote)
distance
Path to 1
(A number
indicates
destination
is remote)

Local
office

California

Does a telephone switch in California know how to


reach a specific phone in Virginia?
(1-703-555-1212)
2001, Cisco Systems, Inc.

BSCI v1.23-46

Planning an IP Address
Hierarchy (cont.)
Long (remote)
distance
Path to 1
(A number
indicates
destination
is remote)

Local
office

Long distance
Virginia
Path to 703
(An area code
summarizes
an area in VA)

California

Does a telephone switch in California know how to


reach a specific phone in Virginia?
(1-703-555-1212)
2001, Cisco Systems, Inc.

BSCI v1.23-47

Planning an IP Address
Hierarchy (cont.)
Long (remote)
distance
Path to 1
(A number
indicates
destination
is remote)

Local
office

Long distance
Virginia
Path to 555
Path to 703
(An area code
summarizes
an area in VA)

(A prefix
summarizes
Local office a smaller area
in VA)

Alexandria

California

Does a telephone switch in California know how to


reach a specific phone in Virginia? (1-703-555-1212)
2001, Cisco Systems, Inc.

BSCI v1.23-48

Planning an IP Address
Hierarchy (cont.)
Long (Remote)Distance
Path to 1
(A Number
Indicates
Destination
Is Remote)

Local
Office

Long-Distance
Virginia
Path to 555
Path to 703
(An Area Code
Summarizes
an Area in VA)

(A Prefix
Summarizes
Local Office a Smaller Area
in VA)

Alexandria

Path to 1212
(Number)
California

Aunt Judy

Does a telephone switch in California know how to


reach a specific phone (1-703-555-1212) in Virginia?
2001, Cisco Systems, Inc.

BSCI v1.23-49

Benefits of Hierarchical
Addressing
Reduced number of route table entries
Summarize multiple addresses into route
summaries
Efficient allocation of addresses
Contiguous address assignment allows
you to use all possible addresses

2001, Cisco Systems, Inc.

BSCI v1.23-50

Variable-Length
Subnet Masks
2001, Cisco Systems, Inc.

3-51

What Is a Variable-Length
Subnet Mask?

HQ

2001, Cisco Systems, Inc.

172.16.0.0/16

BSCI v1.23-52

What Is a Variable-Length
Subnet Mask? (cont.)

172.16.1.0/24

HQ
HQ

172.16.0.0/16

172.16.2.0/24

2001, Cisco Systems, Inc.

BSCI v1.23-53

What Is a Variable-Length
Subnet Mask? (cont.)
172.16.14.32/27

172.16.1.0/24

172.16.14. 64/27
B

HQ
HQ

172.16.0.0/16

172.16.2.0/24

172.16.14.96/27
C

Subnet 172.16.14.0/24 is divided into smaller


subnets:
Subnet with one mask at first (/27)
2001, Cisco Systems, Inc.

BSCI v1.23-54

What Is a Variable-Length
Subnet Mask? (cont.)
172.16.14.32/27

172.16.14.132/30
A

172.16.1.0/24

172.16.14. 64/27
172.16.14.136/30
B

HQ
HQ

172.16.0.0/16

172.16.14.96/27
172.16.2.0/24
C

172.16.14.140/30

Subnet 172.16.14.0/24 is divided into smaller subnets:


Subnet with one mask at first (/27)
Then further subnet one of the unused /27 subnets into
multiple /30 subnets
2001, Cisco Systems, Inc.

BSCI v1.23-55

Calculating VLSMs
Subnetted Address: 172.16.32.0/20
In Binary 10101100. 00010000.00100000.00000000

2001, Cisco Systems, Inc.

BSCI v1.23-56

Calculating VLSMs (cont.)


Subnetted Address: 172.16.32.0/20
In Binary 10101100. 00010000.00100000.00000000
VLSM Address: 172.16.32.0/26
In Binary 10101100. 00010000.00100000.00000000

2001, Cisco Systems, Inc.

BSCI v1.23-57

Calculating VLSMs (cont.)


Subnetted Address: 172.16.32.0/20
In Binary 10101100. 00010000.00100000.00000000
VLSM Address: 172.16.32.0/26
In Binary 10101100. 00010000.00100000.00000000

1st subnet:

10101100 . 00010000 .0010 0000.00 000000=172.16.32.0/26


Network

2001, Cisco Systems, Inc.

Subnet VLSM
subnet

Host

BSCI v1.23-58

Calculating VLSMs (cont.)


Subnetted Address: 172.16.32.0/20
In Binary 10101100. 00010000.00100000.00000000
VLSM Address: 172.16.32.0/26
In Binary 10101100. 00010000.00100000.00000000
1st subnet: 10101100 . 00010000
2nd subnet:
172
.
16
3rd subnet:
172
.
16
172
.
16
4th subnet:
172
.
16
5th subnet:
Network

2001, Cisco Systems, Inc.

.0010
.0010
.0010
.0010
.0010

0000.00
0000.01
0000.10
0000.11
0001.00

Subnet VLSM
Subnet

000000=172.16.32.0/26
000000=172.16.32.64/26
000000=172.16.32.128/26
000000=172.16.32.192/26
000000=172.16.33.0/26
Host

BSCI v1.23-59

A Working VLSM Example


Derived from the 172.16.32.0/20 Subnet

2001, Cisco Systems, Inc.

BSCI v1.23-60

A Working VLSM Example (cont.)


Derived from the 172.16.32.0/20 Subnet
172.16.32.0/26

172.16.32.64/26

172.16.32.128/26

172.16.32.192/26

26 bit mask
(62 hosts)
2001, Cisco Systems, Inc.

BSCI v1.23-61

A Working VLSM Example (cont.)


Derived from the 172.16.32.0/20 Subnet
172.16.32.0/26

172.16.32.64/26

172.16.32.128/26

172.16.32.192/26
Derived from the
172.16.33.0/26 Subnet
30 bit mask
(2 hosts)
2001, Cisco Systems, Inc.

26 bit mask
(62 hosts)
BSCI v1.23-62

A Working VLSM Example (cont.)


Derived from the 172.16.32.0/20 Subnet
172.16.32.0/26
172.16.33.0/30
172.16.33.4/30

172.16.33.8/30

172.16.32.64/26

172.16.32.128/26

172.16.33.12/30
172.16.32.192/26
Derived from the
172.16.33.0/26 Subnet
30-Bit Mask
(2 Hosts)
2001, Cisco Systems, Inc.

26-Bit Mask
(62 Hosts)
BSCI v1.23-63

Written Exercise

2001, Cisco Systems, Inc.

3-64

Written Exercise: Calculating


VLSMs
Using VLSMs, define appropriate subnets for addressing
the networks using 192.168.49.0/24.
25 Users

Addresses for
WAN Links
A Serial
B Serial

25 Users

C Serial

D Serial

25 Users

HQ

E Serial

D
25 Users

D
E
25 Users

E
2001, Cisco Systems, Inc.

BSCI v1.23-65

You might also like