MODULE 5
IP Addressing
• Overview
• What Is an IP Address?
• Address Classes
• Addressing Guidelines
• What Is a Subnet Mask?
• IPv6 Overview
• IP Subnets
What Is an IP Address?
133.120.75.8
86
131.107.0.0
131.107.3.27
133.120.0.0
129.102.12.7
129.102.0.0
129.102.16.
2
90
94
MARIA AVE
MARIA AVE
Network ID and Host ID
Network ID Host ID
32 Bits
w. x. y. z.
131.107.3.24
Example:
Class B
Converting
IP Addresses from Binary to Decimal
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1
8 Bits
255 Decimal Value
Address Classes
Class C
w x y z
Class A
Network
ID
Host ID
0
Class B
Network ID Host ID
1 0
Network ID Host ID
1 1 0
Address Class Summary
Number
of Networks
126
16,384
2,097,152
Number of Hosts
per Network
16,777,214
65,534
254
Class A
Class B
Class C
Range of
Network IDs
(First Octet)
1 – 126
128 – 191
192 – 223
Private IP Addresses
Class RFC 1918 Internal Address Range
A 10.0.0.0 – 10.255.255.255
B 172.16.0.0 – 172.31.255.255
C 192.168.0.0 – 192.168.255.255
Addressing Guidelines
• Network ID Cannot Be 127
– 127 is reserved for lookback functions
• Network ID and Host ID Cannot Be 255
(All Bits Set to 1)
– 255 is a broadcast address
• Network ID and Host ID Cannot Be 0
(All Bits Set to 0)
– 0 means “this network only”
• Host ID Must Be Unique to the Network
Assigning Network IDs
Router
1 2 3
124.x.y.z 192.121.73.z 131.107.y.z
Router
Assigning Host IDs
Router Router
124.0.0.27
124.0.0.28
124.0.0.29
131.107.0.27
131.107.0.28
131.107.0.29
192.121.73.1
124.0.0.1 192.121.73.2
131.107.0.1
124.x.y.z 192.121.73.z 131.107.0.z
1 2 3
What Is a Subnet Mask?
• Distinguishes the Network ID from the
Host ID
• Used to Specify Whether the Destination
Host is Local or Remote
Default Subnet Masks (No Subnetting)
Bits Used for Subnet Mask
Address
Class
Dotted Decimal
Notation
Class A
Class B
Class C
11111111 00000000 00000000 00000000
11111111 11111111 00000000 00000000
11111111 11111111 11111111 00000000
255.0.0.0
255.255.0.0
255.255.255.0
Class B Example
16.200
131.107.
0.0
255.255.
131.107.
w.x.
IP Address
Subnet Mask
Network ID
Host ID 16.200
y.z
Determining the Destination of a Packet
10011111 11100000 00000111 10000001
11111111 11111111 00000000 00000000
10011111 11100000 00000000 00000000
IP Address
Subnet Mask
Result
• Local and Destination Host’s Subnet
Masks Are ANDed
– 1 AND 1 = 1
– Other combinations = 0
– If ANDed results of source and destination
hosts match, the destination is local.
• IPv6 Overview
• IPv6 is short for "Internet Protocol Version
6". IPv6 is the "next generation" protocol
designed by the IETF to replace the current
version Internet Protocol, IP Version 4
("IPv4").
• IPv6 use 128 bits to represent network
addresses. 16 octets.
Version Octects Bits Addresses Number
IPv4 4 32 4,294,467,295
IPv6 16 128 3.4 x 1038
IPv4 and IPv6
IPv4 = 32 Bits = 4 octects
IPv6 = 128 Bits = 16 octects
Represented as:
x:x:x:x:x:x:x:x where x is a 16-bit hexadecimal field
• 2001:0DB8:010F:0001:0000:0000:0000:0ED1
• 2001:DB8:10F:1:0:0:0:ED1
• 2001:DB8:10F:1::ED1
More information on:
http://www.ipv6.org/
http://www.cisco.com/ipv6/
• IP Subnets
131.107.3.27
Subnet 1
131.107.10.0
131.107.10.12
Subnet 2
131.107.3.0
131.107.12.7
131.107.12.0
131.107.12.31
Main Network
• A subnet is a physical segment
in a TCP/IP environment that
uses IP addresses derived from
a single network ID
Implementing Subnetting
• Determine the Number of Required Network IDs
– One for each subnet
– One for each wide-area network connection
• Determine the Number of Required Host IDs per
Subnet
– One for each TCP/IP host
– One for each router interface
• Define One Subnet Mask Based on Requirements
• Define a Unique Subnet ID for Each Physical
Segment Based on the Subnet Mask
• Define Valid Host IDs for Each Subnet Based on the
Subnet ID
Subnet Mask Bits
Network ID Host ID
1
Subnet
ID
Number of Subnets
0
0 . . . 254
Number of Hosts 65,534 . . . 254
Example of Class B Address
Defining a Subnet Mask
Convert the Number of Segments to Binary
Count the Number of Required Bits
Convert the Required Number of Bits to Decimal
(High Order)
1
2
3
Example of Class B Address
Number of Subnets
Binary Value
Convert to Decimal
6
0 0 0 0 0 1 1 0
= 6
(3 Bits)
4+2
255 . 255 . 224 . 0
11111111 11111111 11100000 00000000
Subnet Mask
Subnetting More than One Octet
Network ID Host ID
Subnet ID
Number of Subnets
0
0 . . . 65,534
Number of Hosts 16,777,214 . . . 254
Example of Class A Address
Defining Subnet IDs
255 255 224 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
00000000 = 0
00100000 = 32
01000000 = 64
01100000 = 96
10000000 = 128
10100000 = 160
11000000 = 192
11100000 = 224
1
2 3
Octet Values of a Subnet Mask
1 0 0 0 0 0 0 0 = 128
1 1 0 0 0 0 0 0 = 192
1 1 1 0 0 0 0 0 = 224
1 1 1 1 0 0 0 0 = 240
1 1 1 1 1 0 0 0 = 248
1 1 1 1 1 1 0 0 = 252
1 1 1 1 1 1 1 0 = 254
1 1 1 1 1 1 1 1 = 255
128 64 32 16 8 4 2 1
The decimal equivalent of the binary is typically used in an IP address.
Shortcut to Defining Subnet IDs
List the Number of Bits (High Order) Used for
Subnet Mask
Convert the Bit with the Lowest Value to Decimal
Increment the Value for Each Bit Combination
11000000
64
0
+ 64
= 64
+ 64
= 128
+ 64
192
w.x.64.1 w.x.127.254
w.x.128.1 w.x.191.254
1
2
3
Defining Host IDs for a Subnet
Subnet IDs Host ID Range
Invalid
x.y.32.1 – x.y.63.254
x.y.64.1 – x.y.95.254
x.y.96.1 – x.y.127.254
x.y.128.1 – x.y.159.254
x.y.160.1 – x.y.191.254
x.y.192.1 – x.y.223.254
Invalid
00000000 = 0
00100000 = 32
01000000 = 64
01100000 = 96
10000000 = 128
10100000 = 160
11000000 = 192
11100000 = 224
• Each Subnet ID Indicates the Beginning Value in
a Range
• The Ending Value Is One Less Than the
Beginning Value of the Next Subnet ID
Example
• You are assigned a Class C network number of
200.133.175.0. We will break this network into
14 subnets of 14 nodes each.
Example of Class C Address
Number of Subnets
Binary Value
Convert to Decimal
14
0 0 0 0 1 1 1 0
= 14
(4 Bits)
8+4+2
255 . 255 . 255 . 240
11111111 11111111 11111111 11110000
Subnet Mask
Example (Cont)
NETWORK NUMBER NODE ADDRESSES BROADCAST ADDRESS
200.133.175.0 Reserved None
200.133.175.16 .17 thru .30 200.133.175.31
200.133.175.32 .33 thru .46 200.133.175.47
200.133.175.48 .49 thru .62 200.133.175.63
200.133.175.64 .65 thru .78 200.133.175.79
200.133.175.80 .81 thru .94 200.133.175.95
200.133.175.96 .97 thru .110 200.133.175.111
200.133.175.112 .113 thru .126 200.133.175.127
200.133.175.128 .129 thru .142 200.133.175.143
200.133.175.144 .145 thru .158 200.133.175.159
200.133.175.160 .161 thru .174 200.133.175.175
200.133.175.176 .177 thru .190 200.133.175.191
200.133.175.192 .193 thru .206 200.133.175.207
200.133.175.208 .209 thru .222 200.133.175.223
200.133.175.224 .225 thru .238 200.133.175.239
200.133.175.240 Reserved None
Exercise 1
IP Address/Subnet Mask Network Number Node Addresses Broadcast Address
136.197.64.0/20
136.197.79.255/20
82.34.12.1/21
80.41.191.255/18
192.198.210.197/27
225.0.0.5/32
63.11.0.35/14
127.10.43.15/29
126.155.103.250/23
209.8.8.79/28
221.30.173.89/29
171.30.125.216/25
Exercise 2
• You are assigned a Class C network number of
200.31.192.0/24. Use subnetting to:
10 Hosts
7 Hosts
2
Hosts
28 Hosts
24 Hosts

IP Addressing.ppt

  • 1.
  • 2.
    • Overview • WhatIs an IP Address? • Address Classes • Addressing Guidelines • What Is a Subnet Mask? • IPv6 Overview • IP Subnets
  • 3.
    What Is anIP Address? 133.120.75.8 86 131.107.0.0 131.107.3.27 133.120.0.0 129.102.12.7 129.102.0.0 129.102.16. 2 90 94 MARIA AVE MARIA AVE
  • 4.
    Network ID andHost ID Network ID Host ID 32 Bits w. x. y. z. 131.107.3.24 Example: Class B
  • 5.
    Converting IP Addresses fromBinary to Decimal 1 1 1 1 1 1 1 1 128 64 32 16 8 4 2 1 8 Bits 255 Decimal Value
  • 6.
    Address Classes Class C wx y z Class A Network ID Host ID 0 Class B Network ID Host ID 1 0 Network ID Host ID 1 1 0
  • 7.
    Address Class Summary Number ofNetworks 126 16,384 2,097,152 Number of Hosts per Network 16,777,214 65,534 254 Class A Class B Class C Range of Network IDs (First Octet) 1 – 126 128 – 191 192 – 223
  • 8.
    Private IP Addresses ClassRFC 1918 Internal Address Range A 10.0.0.0 – 10.255.255.255 B 172.16.0.0 – 172.31.255.255 C 192.168.0.0 – 192.168.255.255
  • 9.
    Addressing Guidelines • NetworkID Cannot Be 127 – 127 is reserved for lookback functions • Network ID and Host ID Cannot Be 255 (All Bits Set to 1) – 255 is a broadcast address • Network ID and Host ID Cannot Be 0 (All Bits Set to 0) – 0 means “this network only” • Host ID Must Be Unique to the Network
  • 10.
    Assigning Network IDs Router 12 3 124.x.y.z 192.121.73.z 131.107.y.z Router
  • 11.
    Assigning Host IDs RouterRouter 124.0.0.27 124.0.0.28 124.0.0.29 131.107.0.27 131.107.0.28 131.107.0.29 192.121.73.1 124.0.0.1 192.121.73.2 131.107.0.1 124.x.y.z 192.121.73.z 131.107.0.z 1 2 3
  • 12.
    What Is aSubnet Mask? • Distinguishes the Network ID from the Host ID • Used to Specify Whether the Destination Host is Local or Remote
  • 13.
    Default Subnet Masks(No Subnetting) Bits Used for Subnet Mask Address Class Dotted Decimal Notation Class A Class B Class C 11111111 00000000 00000000 00000000 11111111 11111111 00000000 00000000 11111111 11111111 11111111 00000000 255.0.0.0 255.255.0.0 255.255.255.0 Class B Example 16.200 131.107. 0.0 255.255. 131.107. w.x. IP Address Subnet Mask Network ID Host ID 16.200 y.z
  • 14.
    Determining the Destinationof a Packet 10011111 11100000 00000111 10000001 11111111 11111111 00000000 00000000 10011111 11100000 00000000 00000000 IP Address Subnet Mask Result • Local and Destination Host’s Subnet Masks Are ANDed – 1 AND 1 = 1 – Other combinations = 0 – If ANDed results of source and destination hosts match, the destination is local.
  • 15.
    • IPv6 Overview •IPv6 is short for "Internet Protocol Version 6". IPv6 is the "next generation" protocol designed by the IETF to replace the current version Internet Protocol, IP Version 4 ("IPv4"). • IPv6 use 128 bits to represent network addresses. 16 octets. Version Octects Bits Addresses Number IPv4 4 32 4,294,467,295 IPv6 16 128 3.4 x 1038
  • 16.
    IPv4 and IPv6 IPv4= 32 Bits = 4 octects IPv6 = 128 Bits = 16 octects Represented as: x:x:x:x:x:x:x:x where x is a 16-bit hexadecimal field • 2001:0DB8:010F:0001:0000:0000:0000:0ED1 • 2001:DB8:10F:1:0:0:0:ED1 • 2001:DB8:10F:1::ED1 More information on: http://www.ipv6.org/ http://www.cisco.com/ipv6/
  • 17.
    • IP Subnets 131.107.3.27 Subnet1 131.107.10.0 131.107.10.12 Subnet 2 131.107.3.0 131.107.12.7 131.107.12.0 131.107.12.31 Main Network • A subnet is a physical segment in a TCP/IP environment that uses IP addresses derived from a single network ID
  • 18.
    Implementing Subnetting • Determinethe Number of Required Network IDs – One for each subnet – One for each wide-area network connection • Determine the Number of Required Host IDs per Subnet – One for each TCP/IP host – One for each router interface • Define One Subnet Mask Based on Requirements • Define a Unique Subnet ID for Each Physical Segment Based on the Subnet Mask • Define Valid Host IDs for Each Subnet Based on the Subnet ID
  • 19.
    Subnet Mask Bits NetworkID Host ID 1 Subnet ID Number of Subnets 0 0 . . . 254 Number of Hosts 65,534 . . . 254 Example of Class B Address
  • 20.
    Defining a SubnetMask Convert the Number of Segments to Binary Count the Number of Required Bits Convert the Required Number of Bits to Decimal (High Order) 1 2 3 Example of Class B Address Number of Subnets Binary Value Convert to Decimal 6 0 0 0 0 0 1 1 0 = 6 (3 Bits) 4+2 255 . 255 . 224 . 0 11111111 11111111 11100000 00000000 Subnet Mask
  • 21.
    Subnetting More thanOne Octet Network ID Host ID Subnet ID Number of Subnets 0 0 . . . 65,534 Number of Hosts 16,777,214 . . . 254 Example of Class A Address
  • 22.
    Defining Subnet IDs 255255 224 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 00000000 = 0 00100000 = 32 01000000 = 64 01100000 = 96 10000000 = 128 10100000 = 160 11000000 = 192 11100000 = 224 1 2 3
  • 23.
    Octet Values ofa Subnet Mask 1 0 0 0 0 0 0 0 = 128 1 1 0 0 0 0 0 0 = 192 1 1 1 0 0 0 0 0 = 224 1 1 1 1 0 0 0 0 = 240 1 1 1 1 1 0 0 0 = 248 1 1 1 1 1 1 0 0 = 252 1 1 1 1 1 1 1 0 = 254 1 1 1 1 1 1 1 1 = 255 128 64 32 16 8 4 2 1 The decimal equivalent of the binary is typically used in an IP address.
  • 24.
    Shortcut to DefiningSubnet IDs List the Number of Bits (High Order) Used for Subnet Mask Convert the Bit with the Lowest Value to Decimal Increment the Value for Each Bit Combination 11000000 64 0 + 64 = 64 + 64 = 128 + 64 192 w.x.64.1 w.x.127.254 w.x.128.1 w.x.191.254 1 2 3
  • 25.
    Defining Host IDsfor a Subnet Subnet IDs Host ID Range Invalid x.y.32.1 – x.y.63.254 x.y.64.1 – x.y.95.254 x.y.96.1 – x.y.127.254 x.y.128.1 – x.y.159.254 x.y.160.1 – x.y.191.254 x.y.192.1 – x.y.223.254 Invalid 00000000 = 0 00100000 = 32 01000000 = 64 01100000 = 96 10000000 = 128 10100000 = 160 11000000 = 192 11100000 = 224 • Each Subnet ID Indicates the Beginning Value in a Range • The Ending Value Is One Less Than the Beginning Value of the Next Subnet ID
  • 26.
    Example • You areassigned a Class C network number of 200.133.175.0. We will break this network into 14 subnets of 14 nodes each. Example of Class C Address Number of Subnets Binary Value Convert to Decimal 14 0 0 0 0 1 1 1 0 = 14 (4 Bits) 8+4+2 255 . 255 . 255 . 240 11111111 11111111 11111111 11110000 Subnet Mask
  • 27.
    Example (Cont) NETWORK NUMBERNODE ADDRESSES BROADCAST ADDRESS 200.133.175.0 Reserved None 200.133.175.16 .17 thru .30 200.133.175.31 200.133.175.32 .33 thru .46 200.133.175.47 200.133.175.48 .49 thru .62 200.133.175.63 200.133.175.64 .65 thru .78 200.133.175.79 200.133.175.80 .81 thru .94 200.133.175.95 200.133.175.96 .97 thru .110 200.133.175.111 200.133.175.112 .113 thru .126 200.133.175.127 200.133.175.128 .129 thru .142 200.133.175.143 200.133.175.144 .145 thru .158 200.133.175.159 200.133.175.160 .161 thru .174 200.133.175.175 200.133.175.176 .177 thru .190 200.133.175.191 200.133.175.192 .193 thru .206 200.133.175.207 200.133.175.208 .209 thru .222 200.133.175.223 200.133.175.224 .225 thru .238 200.133.175.239 200.133.175.240 Reserved None
  • 28.
    Exercise 1 IP Address/SubnetMask Network Number Node Addresses Broadcast Address 136.197.64.0/20 136.197.79.255/20 82.34.12.1/21 80.41.191.255/18 192.198.210.197/27 225.0.0.5/32 63.11.0.35/14 127.10.43.15/29 126.155.103.250/23 209.8.8.79/28 221.30.173.89/29 171.30.125.216/25
  • 29.
    Exercise 2 • Youare assigned a Class C network number of 200.31.192.0/24. Use subnetting to: 10 Hosts 7 Hosts 2 Hosts 28 Hosts 24 Hosts