© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-2
ObjectivesExplain the structure IP addressing and demonstrate the ability to
convert between 8-bit binary and decimal numbers.
Given an IPv4 address, classify by type and describe how it is used in the network
Explain how addresses are assigned to networks by ISPs and within networks by administrators
Determine the network portion of the host address and explain the role of the subnet mask in dividing networks.
Given IPv4 addressing information and design criteria, calculate the appropriate addressing components.
Use common testing utilities to verify and test network connectivity and operational status of the IP protocol stack on a host.
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-3
Application7
Presentation6
Session5
Transport4
Network3
Data Link2
Physical1
L3 Header
L2 Header
IP Header Length
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-7
Why IP Addresses?
172.16.0.2
172.16.0.1
172.16.0.3
172.16.0.25410101100 . 0001000 . 00000000 . 00000010
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-8
Why IP Addresses?
10101100 . 0001000 . 00000000 . 00000010
Network-id Host-id
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-9
Network-id vs Host-id
172.1.0.3
172.1.0.4
172.1.0.5
172.1.0.2
172.1.0.1
Internet 172.3.0.0
172.4.0.0
172.2.0.0
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-10
IP Address Format
1010110000010000100000000001000100010000.Octet
10000000 0001000110101100 16 128 17172 . .
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-11
IP Class
host. host host0xxxxxxx . .Class A
network. host host10xxxxxx . .Class B
network. network host110xxxxx . .Class C
Class D
Class E
Multicast
Reserved
1 - 127
128 - 191
192 - 223
127.0.0.0 is reserved for loopback testing TCP/IP
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-13
Class A
host. host host00000000 . .Class A
00000001
00000010
00000011
00000100
00000101
00000110
00000111
01111111
0
1
2
3
4
5
6
7
127
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-14
Class B
network. host host10000000 . .Class B
10000001
10000010
10000011
10000100
10000101
10000110
10000111
10111111
128
129
130
131
132
133
134
135
191
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-15
Class C
network. network host11000000 . .Class C
11000001
11000010
11000011
11000100
11000101
11000110
11000111
11011111
192
193
194
195
196
197
198
199
223
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-16
Binary
1 1 1 1 11 1 1 0 0 0 0 00 0 0
24 23 22 21 2027 26 25
16 8 4 2 1128 64 32
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-17
Decimal -> Binary
128 64 32 16 8 4 2 1
Đôi 192 sang gia tri Binary
192 6464 0
01 1 0 0 0 0 0
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-18
Bai tâp đôi sô Decimal -> Binary
128 64 32 16 8 4 2 1
Đôi 80 sang gia tri Binary
80 0
00 1 1 0 0 0 0
16 16 16
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-19
Bai tâp đôi sô Decimal -> Binary
128 64 32 16 8 4 2 1
Đôi 170 sang gia tri Binary
170
11 0 0 1 0 1 0
42 10 1042 2 2 0
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-20
Bai tâp đôi sô Decimal -> Binary
128 64 32 16 8 4 2 1
Đôi 187 sang gia tri Binary
187
11 0 1 1 0 1 1
59 27 1159 3 3 1 0
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-21
Bai tâp đôi sô Binary -> Decimal
128 64 32 16 8 4 2 1
Đôi “1011 1000” sang gia tri Decimal
11 0 1 1 0 0 0
32 16128 8 = 184
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-22
Bai tâp đôi sô Binary -> Decimal
128 64 32 16 8 4 2 1
Đôi “0110 1010” sang gia tri Decimal
10 1 0 1 0 1 0
64 32 8 2 = 106
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-23
Bai tâp đôi sô Binary -> Decimal
128 64 32 16 8 4 2 1
Bai 1 0000 0011
Bai 2 0000 0100
Bai 3 0000 0111
Bai 4 0000 1000
Bai 5 0000 1111
Bai 6 0001 0000
Bai 7 0001 1111
Bai 8 0010 0000
Bai 9 0011 1111
Bai 10 0100 0000
Bai 11 0111 1111
Bai 12 1000 0000
Bai 13 1111 1111
=3
=4
=7
=8=15
=16
=31
=32
=63
=64=127
=128
=255
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-24
Bai tâp đôi sô Binary -> Decimal
128 64 32 16 8 4 2 1
Bai 1 1010 1000
Bai 2 0110 1000
Bai 3 1101 1000
Bai 4 1110 1010
Bai 5 1001 1010
Bai 6 1111 0001
Bai 7 1011 1001
Bai 8 1101 1111
Bai 9 0010 0101
Bai 10 0001 1010
Bai 11 0101 1100
Bai 12 1100 1101
Bai 13 1011 1011
Bai 14 1101 0111
Bai 15 0111 1111
Bai 16 0011 1111
Bai 17 1011 1011
Bai 18 1101 0001
=168
=104
=216
=234=154
=241
=185
=223
=37
=26
=92
=205
=187=215
=127
=63
=187
=209
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-25
Cac gia tri co thê co vơi n bit
n = 2
00 decimal = 001 decimal = 110 decimal = 211 decimal = 3
Vơi n bit Binary ta co 2n gia tri co thê co, n = 2 ta co 22 (4) gia tri
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-26
Cac gia tri co thê co vơi n bit
n = 3
000 decimal = 0001 decimal = 1010 decimal = 2011 decimal = 3100 decimal = 4101 decimal = 5110 decimal = 6111 decimal = 7
Vơi n bit Binary ta co 2n gia tri co thê co, n = 3 ta co 23 gia tri
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-27
Cac gia tri co thê co vơi n bit
0000 decimal = 00001 decimal = 10010 decimal = 20011 decimal = 30100 decimal = 40101 decimal = 50110 decimal = 60111 decimal = 7
1000 decimal = 81001 decimal = 91010 decimal = 101011 decimal = 111100 decimal = 121101 decimal = 131110 decimal = 141111 decimal = 15
n = 4
24
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-28
Cac gia tri co thê co vơi n bit
0000 0000 decimal = 00000 0001 decimal = 10000 0010 decimal = 20000 0011 decimal = 30000 0100 decimal = 40000 0101 decimal = 50000 0110 decimal = 60000 0111 decimal = 7
0000 1000 decimal = 80000 1001 decimal = 90000 1010 decimal = 100000 1011 decimal = 110000 1100 decimal = 120000 1101 decimal = 13…1111 1111 decimal = 255
n = 8
28
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-29
IP Class
host. host hostnetwork . .Class A
network. host hostnetwork . .Class B
network. network hostnetwork . .Class C
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-30
IP Class
. 224-2networkClass A
network. 216-2network .Class B
network. network 28-2network . .Class C
16.777.214
65.534
254
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-31
192.168.1.0
192.168.1.255
256 IP
Network Address
Broadcast Address
192.168.1.1
192.168.1.254
192.168.1.0000 0000
192.168.1.1111 1111
192.168.1.0/26
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-33
Unicast
10.0.0.3
10.0.0.1 10.0.0.2 20.0.0.1 20.0.0.2
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-34
Unicast
10.0.0.3
10.0.0.1 10.0.0.2 20.0.0.1 20.0.0.2
10.0.0.3 10.0.0.1Data
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-35
Directed Broadcast
10.0.0.3
10.0.0.1 10.0.0.2 20.0.0.1 20.0.0.2
10.0.0.3 10.255.255.255Data
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-36
All subnets broadcast
10.0.0.3
10.0.0.1 10.0.0.2 20.0.0.1 20.0.0.2
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-37
All subnets broadcast
10.0.0.3
10.0.0.1 10.0.0.2 20.0.0.1 20.0.0.2
10.0.0.3 10.255.255.255Data
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-38
All subnets broadcast
10.0.0.3
10.0.0.1 10.0.0.2 20.0.0.1 20.0.0.2
10.0.0.3 20.255.255.255Data
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-39
All subnets broadcast
10.0.0.3
10.0.0.1 10.0.0.2 20.0.0.1 20.0.0.2
10.0.0.3 255.255.255.255Data
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-40
Router chăn Broadcast
10.0.0.3
10.0.0.1 10.0.0.2 20.0.0.1 20.0.0.2
10.0.0.1 10.255.255.255Data 10.0.0.3 20.255.255.255Data 10.0.0.3 255.255.255.255Data 10.0.0.3 20.0.0.2Data
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-41
Public vs Private IP
host. host hostnetwork . .Class A
network. host hostnetwork . .Class B
network. network hostnetwork . .Class C
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-42
Public vs Private
1.0.0.0 - 9.255.255.255Class A
128.0.0.0- 172.15.255.255Class B
192.0.0.0–192.167.255.255Class C
Public IP
11.0.0.0 –126.255.255.255
172.32.0.0-191.255.255.255
192.169.0.0–223.255.255.255
10.0.0.0
172.16.0.0
192.168.0.0
Private IP
10.255.255.255
172.31.255.255
192.168.255.255
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-43
NAT
ADSL
IP PublicIP Private
Internet
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-44
17
prefix-length
.network-id
16 128172 . . /16
prefix prefix-length
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-45
17
subnet-mask
. 16 128172 . . /16
prefix-length
0. 255 0255 . .
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-46
subnet-mask
. . .
00000000.11111111 0000000011111111 . .
00010000 10000000 0001000110101100
00000000.00010000 0000000010101100 . .
0 and 0 = 00 and 1 = 01 and 0 = 01 and 1 = 1
0. 16 0172 . .
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-47
172 . 1 . 0 . 1
255 . 255 . 0 . 0
172 . 2 . 0 . 1
255 . 255 . 0 . 0
172 . 1 . 0 . 0 172 . 2 . 0 . 0
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-48
Default Prefix-length
host. host hostnetwork . .Class A
network. host hostnetwork . .Class B
network. network hostnetwork . .Class C
/8
/16
/24
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-49
Default Subnet-mask
0. 0 0255 . .Class A
255. 0 0255 . .Class B
255. 255 0255 . .Class C
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-50
Subnet-mask
10. 0. 0. 0Class A
255. 0. 0. 0
/8
11111111.00000000.00000000.00000000
© 2007 Cisco Systems, Inc. All rights reserved. ICND2 v1.0—2-51
Subnet-mask
10. 0. 0. 0Class A
255. 128. 0. 0
/9
11111111.10000000.00000000.00000000
Top Related