6. 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
7. 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
8. 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
9. 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
12. What Is a Subnet 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 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.
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
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
18. 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
19. 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
20. 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
21. 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
23. 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.
24. 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
25. 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
26. 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