You are on page 1of 91

IPv4 Addresses

Please support my site. Click on the Google-sponsored links found on the web
pages.
IPv4 Addressing Concepts
IPv4 Addresses

 IPv4 addresses are 32 bit addresses

10
IPv4 Addresses
 IPv4 Addresses are 32 bit addresses:

1010100111000111010001011000100

10101001 11000111 01000101 10001001

 We use dotted notation (or dotted decimal notation) to


represent the value of each byte (octet) of the IP address in
decimal.

10101001 11000111 01000101 10001001


169 . 199 . 69 . 137

11
IPv4 Addresses
An IP address has two parts:
 network number
 host number

Which bits refer to the network number?

Which bits refer to the host number?

12
IPv4 Addresses
Answer:
 Newer technology - Classless IP Addressing
 The subnet mask determines the network portion and the host
portion.
 Value of first octet does NOT matter (older classful IP addressing)
 Hosts and Classless Inter-Domain Routing (CIDR).
 Classless IP Addressing is what is used within the Internet and in
most internal networks.

 Older technology - Classful IP Addressing (later)


 Value of first octet determines the network portion and the host
portion.
 Used with classful routing protocols like RIPv1.
 The Cisco IP Routing Table is structured in a classful manner (CIS
82)

13
Types of
Addresses

Network
Addresses have
all 0’s in the host
portion.

 Network address - The address by which we refer to the network


 Broadcast address - A special address used to send data to all
hosts in the network
 Host addresses - The addresses assigned to the end devices in
the network 14
Types of
Addresses

Broadcast
Addresses have
all 1’s in the host
portion.

 Network address - The address by which we refer to the network


 Broadcast address - A special address used to send data to all
hosts in the network
 Host addresses - The addresses assigned to the end devices in
the network 15
Types of
Addresses

Host Addresses
can not have all
0’s or all 1’s in the
host portion.

 Network address - The address by which we refer to the network


 Broadcast address - A special address used to send data to all
hosts in the network
 Host addresses - The addresses assigned to the end devices in
the network 16
Dividing the Network and Host Portions

11111111111111110000000000000000

 Subnet Mask
 Used to define the:
 Network portion
 Host portion
 32 bits
 Contiguous set of 1’s followed by a contiguous set of 0’s
 1’s: Network portion
 0’s: Host portion

17
Dividing the Network and Host Portions

11111111.11111111.00000000.00000000

Dotted decimal: 255 . 255 . 0 . 0


Slash notation: /16

 Expressed as:
 Dotted decimal
 Ex: 255.255.0.0
 Slash notation or prefix length
 /16 (the number of one bits)

18
Network
Addresses

 Network address - The address by which we refer to the network


 All binary 0’s in the host portion of the address (more later)

19
Example 1
Network Address: 192.168.1.0
Subnet Mask: 255.255.255.0

192.168.1.0
Network Host

Network Address in binary:


11000000.10101000.00000001.00000000
Subnet Mask in binary:
11111111.11111111.11111111.00000000
Prefix Length: /24

20
Example 2
Network Address: 172.0.0.0
Subnet Mask: 255.0.0.0

172.0.0.0
Network Host

Network Address in binary:


10101100.00000000.00000000.00000000
Subnet Mask in binary:
11111111.00000000.00000000.00000000
Prefix Length : /8

21
Example 3
Network Address: 172.0.0.0
Subnet Mask: 255.255.0.0

172.0.0.0
Network Host

Network Address in binary:


10101100.00000000.00000000.00000000
Subnet Mask in binary:
11111111.11111111.00000000.00000000
Prefix Length: /16

22
Subnet Masks – Your Turn!
Underline the network portion of each address:
Network Address Subnet Mask
172.0.0.0 255.0.0.0
172.16.0.0 255.255.0.0
192.168.1.0 255.255.255.0
192.168.0.0 255.255.0.0
192.168.0.0 255.255.255.0
10.1.1.0 /24
10.2.0.0 /16
10.0.0.0 /16

 What is the other portion of the address?

23
Subnet Masks – Your Turn!
Underline the network portion of each address:
Network Address Subnet Mask
172.0.0.0 255.0.0.0
172.16.0.0 255.255.0.0
192.168.1.0 255.255.255.0
192.168.0.0 255.255.0.0
192.168.0.0 255.255.255.0
10.1.1.0 /24
10.2.0.0 /16
10.0.0.0 /16

 What is the other portion of the address?


 Host portion for host addresses

24
Why the mask matters: Number of hosts!

Subnet Mask: 1st octet 2nd octet 3rd octet 4th octet
255.0.0.0 or /8 Network Host Host Host
255.255.0.0 or /16 Network Network Host Host
255.255.255.0 or /24 Network Network Network Host

 The more host bits in the subnet mask means the more hosts in the
network.
 Subnet masks do not have to end on “natural octet boundaries”

25
IP Addresses

There is a tradeoff between:


 The number of network bits and the number of networks (subnets) you
can have…
AND
 The number of HOST bits and the number of hosts for each network
you can have.

This will be examined more closely, later.

29
Broadcast
Addresses

 Broadcast address - A special address used to send data to all


hosts in the network
 All binary 1’s in the host portion of the address (more later)

30
Subnet Masks – Your Turn!
What is the broadcast address of each network:
Network Address Subnet Mask Broadcast Address
172.0.0.0 255.0.0.0
172.16.0.0 255.255.0.0
192.168.1.0 255.255.255.0
192.168.0.0 255.255.0.0
192.168.0.0 255.255.255.0
10.1.1.0 /24
10.2.0.0 /16
10.0.0.0 /16

31
Subnet Masks – Your Turn!
What is the broadcast address of each network:
Network Address Subnet Mask Broadcast Address
172.0.0.0 255.0.0.0 172.255.255.255
172.16.0.0 255.255.0.0 172.16.255.255
192.168.1.0 255.255.255.0 192.168.1.255
192.168.0.0 255.255.0.0 192.168.255.255
192.168.0.0 255.255.255.0 192.168.0.255
10.1.1.0 /24 10.1.1.255
10.2.0.0 /16 10.2.255.255
10.0.0.0 /16 10.0.255.255

32
Bringing it
all together

 Subnet Mask divides Network portion and Host portion:


 1’s: Network portion
 0’s: Host portion
 Network address:
 All 0’s in the host portion of the address
 Broadcast address:
 All 1’s in the host portion of the address
33
Host IP Addresses

192.168.10.100/24

 Host IP Addresses contain:


 Network portion of the address
 Unique combination of 0’s and 1’s in the host portion of the
address
 Cannot be all 0’s (network address)
 Cannot be all 1’s (broadcast address)
 Hosts have subnet masks to determine network portion (later)
40
Subnetting: First Look
Subnets and Subnet Masks

Formalized in 1985, the subnet mask breaks


a single network in to smaller pieces.

 Allows network administrators to divide their network into small networks


or subnets.
 Advantages will be discussed later.

71
What is subnetting?
Network Network Host Host
172 16 0 0

Network Network Subnet Host


 Subnetting is the process of borrowing bits from the HOST bits, in order to divide
the larger network into small subnets.
 Subnetting does NOT give you more hosts, but actually costs you hosts.
 You lose two host IP Addresses for each subnet, one for the subnet IP address
and one for the subnet broadcast IP address.
 You lose the last subnet and all of it’s hosts’ IP addresses as the broadcast for
that subnet is the same as the broadcast for the network.
 In older technology, you would have lost the first subnet, as the subnet IP
address is the same as the network IP address. (This subnet can be used in
most networks.)

72
Analogy
Before subnetting:
 In any network (or subnet) we can not use
all the IP addresses for host addresses.

 
 We lose two addresses for every network
98 Apples or subnet.
(100 – 2) 1. Network Address - One address is reserved
to that of the network. For Example:
                                                              

172.16.0.0 /16
2. Broadcast Address – One address is
reserved to address all hosts in that
network or subnet. For Example:
172.16.255.255
This gives us a total of 65,534 usable hosts

73
Analogy 10 barrels x 10 apples = 100 apples

10 10 10

98 Apples
(100 – 2)   10
                                                              
10 10

10 10 10

10

 It is the same as taking a barrel of 100 apples and


dividing it into 10 barrels of 10 apples each. 74
2 = 1 network address + 1 broadcast address

10 barrels x 8 apples = 80 apples

8 8 8

 
(less 2) (less 2) (less 2)

98 Apples 8
                                                              
8 8
(100 – 2) (less 2) (less 2) (less 2)

8 8 8
(less 2) (less 2) (less 2)

 However, in subnetting we will see that we lose two


apples per subnet: 8
 one for the network address
 one for the broadcast address (less 2)

75
2 = 1 network address + 1 broadcast address

8 barrels x 8 apples = 64 apples

8 X 8 8

 
(less 2) (less 2) (less 2)

98 Apples 8
                                                              
8 8
(100 – 2) (less 2) (less 2) (less 2)

8 8 8
(less 2) (less 2) (less 2)
 In legacy networks, we also lost:
 The first basket (subnet)
 The network address of the first subnet is the
network address of the entire network
X 8

(less 2)
 The last basket (subnet)
 The broadcast address for the last subnet is the
same as for the entire network.
76
Subnet Example
Network address 172.16.0.0 with /16 Base Network Mask
Using Subnets: Subnet Mask 255.255.255.0 or /24
Subnet addresses: All 0’s in host portion

Network Network Subnet Host

172 16 0 0 Subnets
Addresses
172 16 1 0
172 16 2 0 256
172 16 3 0 Subnets
28
172 16 Etc. 0
172 16 254 0
172 16 255 0
77
Subnet Example
Network address 172.16.0.0 with /16 Base Network Mask
Using Subnets: Subnet Mask 255.255.255.0 or /24

Network Network Subnet Hosts


Broadcast

172 16 0 1 254 255


172 16 1 1 254 255
172 16 2 1 254 255
172 16 3 1 254 255
172 16 Etc. 1 254 255
172 16 254 1 254 255
172 16 255 1 254 255
Each subnet has 254 hosts, 28 – 2 78
Host IP Address: 172.16.3.50
 A host of the 172.16.3.0 /24 network
With NO subnetting:

Network First Host Last Host Broadcast


172.16.0.0 172.16.0.1 172.16.255.254 172.16.255.255

 65,534 host addresses, one for network address and one for
broadcast address.

Host IP Address: 172.16.3.50


 A host of the 172.16.0.0 /16 network

79
Host IP Address: 172.16.3.50
With subnetting:  A host of the 172.16.3.0 /24 network

Network First Host Last Host Broadcast


172.16.0.0 172.16.0.1 172.16.0.254 172.16.0.255
172.16.1.0 172.16.1.1 172.16.1.254 172.16.1.255
172.16.2.0 172.16.2.1 172.16.2.254 172.16.2.255
172.16.3.0 172.16.3.1 172.16.3.254 172.16.3.255
172.16.4.0 172.16.4.1 172.16.4.254 172.16.4.255
172.16.5.0 172.16.5.1 172.16.5.254 172.16.5.255
172.16.6.0 172.16.6.1 172.16.6.254 172.16.6.255
172.16.7.0 172.16.7.1 172.16.7.254 172.16.7.255

172.16.254.0 172.16.254.1 172.16.254.254 172.16.15.255
172.16.255.0 172.16.255.1 172.16.255.254 172.16.255.255

80
With subnetting:
Network First Host Last Host Broadcast Hosts
172.16.0.0 172.16.0.1 172.16.0.254 172.16.0.255 254
172.16.1.0 172.16.1.1 172.16.1.254 172.16.1.255 254
172.16.2.0 172.16.2.1 172.16.2.254 172.16.2.255 254
172.16.3.0 172.16.3.1 172.16.3.254 172.16.3.255 254
172.16.4.0 172.16.4.1 172.16.4.254 172.16.4.255 254
172.16.5.0 172.16.5.1 172.16.5.254 172.16.5.255 254
172.16.6.0 172.16.6.1 172.16.6.254 172.16.6.255 254
172.16.7.0 172.16.7.1 172.16.7.254 172.16.7.255 254

172.16.254.0 172.16.254.1 172.16.254.254 172.16.15.255 254
172.16.255.0 172.16.255.1 172.16.255.254 172.16.255.255 254
---
65,024

Total address = 256 subnets * (256 hosts – 2)


= 256 * 254
= 65,024

NOTE: It is common for some network administrator to not use the last subnet.
81
With subnetting:
Network First Host Last Host Broadcast
172.16.0.0 172.16.0.1 172.16.0.254 172.16.0.255
172.16.255.0 172.16.255.1 172.16.255.254 172.16.255.255

Major Network Address: 172.16.0.0


Major Network Mask: 255.255.0.0
Major Network Broadcast Address: 172.16.255.255
Subnet Mask: 255.255.255.0

First Subnet:
Subnet Address: 172.16.0.0
Subnet Broadcast Address: 172.16.0.255

Last Subnet:
Subnet Address: 172.16.255.0
Subnet Broadcast Address: 172.16.255.255

82
Subnetting: Step-by-step
Determining Network and Subnet Information
 Use the Classless Subnetting Worksheet (Excel Spreadsheet) to do the
following:
 Given any IP address and major network mask we can determine:
 Major Network Address
 First host address of the network
 Last host address of the network
 Broadcast address of the network
 Number of usable hosts in the network
 If the network is subnetted and we know the subnet mask we can
determine:
 Subnet (network) Address
 First host address of the subnet
 Last host address of the subnet
 Broadcast address of the subnet
 Number of usable hosts in the subnet
 Number of usable subnets in this network

84
See a spreadsheets on my website

Nutshell: Classless
Subnetting in a Nutshell
(Excel spreadsheet)

Worksheet: Classless
Subnetting Worksheet (Excel
spreadsheet)

85
Part 1: Determine Major Network Information

86
Convert IP Address/Network Mask to Binary
 First, let’s determine the Major Network Information.
 This is the information for the entire network, whether or not there are subnets.
 Using the Major Network Mask, determine the major network Address, the broadcast
address for the entire network, and the number of hosts for the entire network.
 The Major Network Mask (or Base Mask, Subnet Mask) is provided by the ISP.
 Convert these addresses to binary.
Host IP Address:138.101.114.250
Major Network Mask: 255.255.0.0 (/16)

87
Determine Network Address
 Determine the Network Address by using the AND operation.
 Perform a bit-wise AND operation on the IP Address and the Subnet Mask
 Note: 1 AND 1 results in a 1, 0 AND anything results in a 0
 Express the result in Dotted Decimal Notation
 The result is the Major Network Address of this for this host IP Address is
138.101.0.0

88
Determine Network Address
A simple way of doing the AND operation:
1. In the Network mask locate where the 1’s end and the 0’s begin and draw a
line. (I call this the “Major Network Divide” or “MD” on the worksheet.)
2. Now copy all of the bits above the 1 bits in the Network mask, to the
Network address.
3. For the rest of the bits in the Network address (the bits below the 0’s in the
Network mask) write all 0’s.
MD

Network Portion Host Portion


Copy the bits from the Host IP Address Write all 0’s below the 0’s in
to the Major Network Address the Major Network Mask

89
Network: Determine First Host, Last Host, Broadcast Addresses
 Remember that the network mask separates the network portion of the address from
the host portion.
Major Network Mask: 255.255.0.0 or /16
 The network address has all 0’s in the host portion of the address
 The broadcast address has all 1’s in the host portion of the address
 The first host is all 0’s and a 1 in the host portion of the address.
 The last host is all 1’s and a 0 in the host portion of the address.

Network Portion Host Portion

90
Network: Determine First Host, Last Host, Broadcast Addresses
 The network address has all 0’s in the host portion of the address
 The broadcast address has all 1’s in the host portion of the address
 The first host is all 0’s and a 1 in the host portion of the address.
 The last host is all 1’s and a 0 in the host portion of the address.

Network Portion Host Portion

91
Network: Determine the number of usable hosts
 By counting the number of host bits we can determine the total number of usable hosts for
this network (before subnetting).
Host bits: 16
Total number of hosts:
216 = 65,536
65,536 – 2 = 65,534 (Can’t use the all 0’s address, network address, or the all 1’s
address, broadcast address.)

Network Portion
Host Portion = 16 bits

92
Part 2: Determine Subnet Information

                                                                

93
Convert IP Address/Subnet Mask to Binary
 Now we will determine the Subnet Network Information. (Assuming we are
subnetted.)
 This is the information only for that subnet.
 Using the Subnet Mask, determine the Subnet Address, the broadcast address for
the entire network, and the number of hosts for the subnet.
 The Subnet Mask is determined by the network administrator, depending upon the
number of subnets and the number of hosts per subnet that are needed.
 Convert these addresses to binary.
Host IP Address: 138.101.114.250
Subnet Mask: 255.255.255.192 (/26)

94
Determine Subnet Address
 Determine the Network Address by using the AND operation.
 Perform a bit-wise AND operation on the IP Address and the Subnet Mask
 Note: 1 AND 1 results in a 1, 0 AND anything results in a 0
 Express the result in Dotted Decimal Notation
 The result is the Major Network Address of this for this host IP Address is
138.101.114.192

95
Determine Subnet Address
A simple way of doing the AND operation:
1. In the Subnet mask locate where the 1’s end and the 0’s begin and draw a line. (I call
this the “Subnet Divide” or “SD” on the worksheet.)
2. Now copy all of the bits above the 1 bits in the Subnet mask, to the Network address.
3. For the rest of the bits in the Subnet address (the bits below the 0’s in the Network
mask) write all 0’s.

SD

Network/Subnet Portion Host


Portion
Copy the bits from the Host IP
Address to the Major Network
Address Write all 0’s below the 0’s in
the Major Network Mask

96
Subnet: Determine First Host, Last Host, Broadcast Addresses
 Remember that the network mask separates the network portion of the address from
the host portion.
Subnet Mask: 255.255.255.192 or /26
 The network address has all 0’s in the host portion of the address
 The broadcast address has all 1’s in the host portion of the address
 The first host is all 0’s and a 1 in the host portion of the address.
 The last host is all 1’s and a 0 in the host portion of the address.

Network Portion Subnet Portion


Host
Portion

97
Subnet: Determine First Host, Last Host, Broadcast Addresses
 The subnet address has all 0’s in the host portion of the subnet address
 The broadcast address has all 1’s in the host portion of the subnet address
 The first host is all 0’s and a 1 in the host portion of the subnet address.
 The last host is all 1’s and a 0 in the host portion of the subnet address.

Network Portion Subnet Portion


Host
Portion

98
Subnet: Determine the number of usable hosts
 By counting the number of host bits we can determine the total number of usable
hosts for this subnet.
Host bits: 6
Total number of hosts:
26 = 64
64 – 2 = 62 (Can’t use the all 0’s address, network address, or the all 1’s
address, broadcast address.) SD

Network Portion Subnet Portion


Host
Portion

99
Subnet: Determine the number of usable subnets
 By counting the number of subnet bits we can determine the total number of usable hosts
for this subnet.
Subnet bits: 10
Total number of hosts:
210 = 1,024
1,024 – (0, 1, or 2) = ? 1,024 – 1 = 1,023 usable subnets
 The number of usable subnets depends upon whether or not we can use the first and/or
last subnets. In today’s networks, both the first and last subnets are generally usable.
 In this example, the network administrator has determined the last subnet is not to be used.
MD SD

Network Portion
Subnet Portion Host
Portion

100
Overall Visual
 The subnet address has all 0’s in the host portion of the subnet address
 The broadcast address has all 1’s in the host portion of the subnet address
 The first host is all 0’s and a 1 in the host portion of the subnet address.
 The last host is all 1’s and a 0 in the host portion of the subnet address.

101
Overall Visual
The following information must be provided:
 IP Address (host or network)
 Major Network Mask
If subnetted:
 Subnet Mask
 Number of usable subnets (less 0, 1, or 2)

102
Notes
Quick check
 First host: 1 more than network/subnet address
 Last host: 1 less than broadcast
 Does the host IP address fall in the range of network host
addresses? Of subnet host addresses?

How do hosts view the network?


 Hosts receive a host IP address and mask.
 Hosts only see themselves as part of their subnet (or network if not
subnetted).
 They don’t know or care if they are in a network or subnet.
 Almost all networks are a subnet of some larger network.

103
Tips
 Use worksheets
 Don’t do short-cuts unless you understand the process we just
discussed and you know what you are doing.
 Only use a subnet calculator to check your answers.
 You must know how to subnet, then you can use the calculator.
 Interviews, exams, and certification exams do not allow subnet
calculators.
 Practice, practice, practice!

104
Chapter 6
IPv4 Addresses – Part 2

Please support my site. Click on the Google-sponsored links found on the web
pages.
Chapter 6
IPv4 Addresses – Part 3

Please support my site. Click on the Google-sponsored links found on the web
pages.
Calculating the number subnets/hosts
needed
Calculating the number subnets/hosts needed

172.16.1.0
255.255.255.0
Network Host

 Network 172.16.1.0/24
 Need:
 As many subnets as possible, 60 hosts per subnet

108
Calculating the number subnets/hosts needed

Number of hosts per subnet

172.16.1. 0 0 0 0 0 0 0 0

255.255.255. 0 0 0 0 0 0 0 0
6 host bits
Network Host

 Network 172.16.1.0/24
 Need:
 As many subnets as possible, 60 hosts per subnet

109
Calculating the number subnets/hosts needed

Number of subnets
172.16.1. 0 0 0 0 0 0 0 0

255.255.255. 1 1 0 0 0 0 0 0 255.255.255.192

6 host bits
Network Host
 Network 172.16.1.0/24
 Need:
 As many subnets as possible, 60 hosts per subnet
 New Subnet Mask: 255.255.255.192 (/26)
 Number of Hosts per subnet: 6 bits, 64-2 hosts, 62 hosts
 Number of Subnets: 2 bits or 4 subnets 110
Calculating the number subnets/hosts needed

172.16.1.0
255.255.255.0
Network Host

 Network 172.16.1.0/24
 Need:
 As many subnets as possible, 12 hosts per subnet

111
Calculating the number subnets/hosts needed

Number of hosts per subnet

172.16.1. 0 0 0 0 0 0 0 0

255.255.255. 0 0 0 0 0 0 0 0
4 host bits
Network Host

 Network 172.16.1.0/24
 Need:
 As many subnets as possible, 12 hosts per subnet

112
Calculating the number subnets/hosts needed

Number of hosts per subnet

Number of subnets
172.16.1. 0 0 0 0 0 0 0 0

255.255.255. 1 1 1 1 0 0 0 0 255.255.255.240

4 host bits
Network Host
 Network 172.16.1.0/24
 Need:
 As many subnets as possible, 12 hosts per subnet
 New Subnet Mask: 255.255.255.240 (/28)
 Number of Hosts per subnet: 4 bits, 16-2 hosts, 14 hosts
 Number of Subnets: 4 bits or 16 subnets 113
Calculating the number subnets/hosts needed

172.16.1.0
255.255.255.0
Network Host

 Network 172.16.1.0/24
 Need:
 Need 6 subnets, as many hosts per subnet as possible

114
Calculating the number subnets/hosts needed

Number of subnets
172.16.1. 0 0 0 0 0 0 0 0

255.255.255. 0 0 0 0 0 0 0 0
3 subnet bits
Network Host

 Network 172.16.1.0/24
 Need:
 Need 6 subnets, as many hosts per subnet as possible

115
Calculating the number subnets/hosts needed

Number of hosts per subnet

Number of subnets
172.16.1. 0 0 0 0 0 0 0 0

255.255.255. 1 1 1 0 0 0 0 0 255.255.255.224
3 subnet bits
Network Host
 Network 172.16.1.0/24
 Need:
 Need 6 subnets, as many hosts per subnet as possible
 New Subnet Mask: 255.255.255.224 (/27)
 Number of Hosts per subnet: 5 bits, 32-2 hosts, 30 hosts
 Number of Subnets: 3 bits or 8 subnets 116
VLSM (Variable Length Subnet Masks)
VLSM

 If you know how to subnet, you can do VLSM.

 Example: 10.0.0.0/8
 Subnet in /16 subnets:
 10.0.0.0/16
 10.1.0.0/16
 10.2.0.0/16
 10.3.0.0/16
 Etc.
 Subnet one of the subnets (10.1.0.0/16)
 10.1.0.0/24
 10.1.1.0/24
 10.1.2.0/24
 10.1.3.0/24
 etc
118
Host can only be a member
VLSM of the subnet. Host can NOT
be a member of the network
that was subnetted.

YES!

10.2.1.55/24

10.2.1.55/16

NO!
All other /16
subnets are still
available for use
as /16 networks or
to be subnetted.

119
VLSM – Using the chart
 This chart can be used to help
determine subnet addresses.
 This can any octet.
 We’ll keep it simple and make it the
fourth octet.

 Network: 172.16.1.0/24
 What if we needed 4 subnets?
 What would the Mask be?
 What would the addresses of each
subnet be?
 What would the range of hosts be for
each subnet?

120
VLSM – Using the chart
 Network: 172.16.1.0/24
 What if we needed 4 subnets?
 What would the Mask be?
 255.255.255.192 (/26)
 What would the addresses of each subnet be?
 172.16.1.0/26
 172.16.1.64/26
 172.16.1.128/26
 172.16.1.192/26
 What would the range of hosts be for each
subnet?
 172.16.1.0/26: 172.16.1.1-172.16.1.62
 172.16.1.64/26: 172.16.1.65-172.16.1.126
 172.16.1.128/26: 172.16.1.129-172.16.1.191
 172.16.1.192/26: 172.16.1.193-172.16.1.254
121
16 /30 subnets

VLSM – Using the chart


 What if we needed several (four) /30 subnets for our
serial links?
 Take one of the /26 subnets and subnet it again
into /30 subnets.

Still have
3 /26
subnets

16 /30 subnets

122
Classful Subnetting
Classful IP Addressing

 In the early days of the Internet, IP addresses were allocated to


organizations based on request rather than actual need.
 When an organization received an IP network address, that address was
associated with a “Class”, A, B, or C.
 This is known as Classful IP Addressing
 The first octet of the address determined what class the network belonged
to and which bits were the network bits and which bits were the host bits.
 There were no subnet masks.
 It was not until 1992 when the IETF introduced CIDR (Classless
Interdomain Routing), making the address class meaning less.
 This is known as Classless IP Addressing.
 For now, all you need to know is that today’s networks are classless, except
for some things like the structure of Cisco’s IP routing table and for those
networks that still use Classful routing protocols.
 You will learn more about this is CIS 82, CIS 83 and CIS 185.
124
IPv4 Address Classes

125
Address Classes

1st octet 2nd octet 3rd octet 4th octet


Class A Network Host Host Host
Class B Network Network Host Host
Class C Network Network Network Host

N = Network number assigned by ARIN


(American Registry for Internet Numbers)
H = Host number assigned by administrator

126
Default Mask: 255.0.0.0 (/8)
Class A addresses
First octet is between 0 – 127, begins with 0

Network Host Host Host

8 bits 8 bits 8 bits


With 24 bits available for hosts,
Number
between 0 - 127 there a 224 possible addresses.
That’s 16,777,216 nodes!
 There are 126 class A addresses.
 0 and 127 have special meaning and are not used.
 16,777,214 host addresses, one for network address and one for broadcast address.
 Only large organizations such as the military, government agencies, universities, and
large corporations have class A addresses.
 For example ISPs have 24.0.0.0 and 63.0.0.0
 Class A addresses account for 2,147,483,648 of the possible IPv4 addresses.
 That’s 50 % of the total unicast address space, if classful was still used in the Internet!
127
Default Mask: 255.255.0.0 (/16)
Class B addresses
First octet is between 128 – 191, begins with 10

Network Network Host Host

8 bits 8 bits
With 16 bits available for hosts,
Number
between there a 216 possible addresses.
128 - 191 That’s 65,536 nodes!
 There are 16,384 (214) class B networks.
 65,534 host addresses, one for network address and one for broadcast
address.
 Class B addresses represent 25% of the total IPv4 unicast address space.
 Class B addresses are assigned to large organizations including corporations
(such as Cisco, government agencies, and school districts).
128
Default Mask: 255.255.255.0 (/24)
Class C addresses
First octet is between 192 – 223, begins with 110

Network Network Network Host

8 bits
With 8 bits available for hosts,
Number there a 28 possible addresses.
between
192 - 223
That’s 256 nodes!

 There are 2,097,152 possible class C networks.


 254 host addresses, one for network address and one for broadcast
address.
 Class C addresses represent 12.5% of the total IPv4 unicast address
space. 129
IPv4 Address Classes

 No medium size host networks


 In the early days of the Internet, IP addresses were allocated to
organizations based on request rather than actual need.
130
Network based on first octet

 The network portion of the IP address was dependent upon the first octet.
 There was no “Base Network Mask” provided by the ISP.
 The network mask was inherent in the address itself.

131
IPv4 Address Classes

Class D Addresses
 A Class D address begins with binary 1110 in the first octet.
 First octet range 224 to 239.
 Class D address can be used to represent a group of hosts called a host
group, or multicast group.

Class E Addresses
First octet of an IP address begins with 1111
 Class E addresses are reserved for experimental purposes and should not
be used for addressing hosts or multicast groups. 
132
Fill in the information…
1. 192.168.1.3 Class _____ Default Mask:______________
Network: _________________ Broadcast: ________________
Hosts: _________________ through ___________________

2. 1.12.100.31 Class ______ Default Mask:______________


Network: _________________ Broadcast: ________________
Hosts: _________________ through _____________________

3. 172.30.77.5 Class ______ Default Mask:______________


Network: _________________ Broadcast: ________________
Hosts: _________________ through _____________________

133
Fill in the information…

1. 192.168.1.3 Class C Default Mask: 255.255.255.0


Network: 192.168.1.0 Broadcast: 192.168.1.255
Hosts: 192.168.1.1 through 192.168.1.254

2. 1.12.100.31 Class A Default Mask: 255.0.0.0


Network: 1.0.0.0 Broadcast: 1.255.255.255
Hosts: 1.0.0.1 through 1.255.255.254

3. 172.30.77.5 Class B Default Mask: 255.255.0.0


Network: 172.30.0.0 Broadcast: 172.30.255.255
Hosts: 172.30.0.1. through 172.30.255.254

134
Class separates network from host bits
 The Class determines the Base Network Mask!

1. 192.168.1.3 Class C Default Mask: 255.255.255.0


Network: 192.168.1.0

2. 1.12.100.31 Class A Default Mask: 255.0.0.0


Network: 1.0.0.0

3. 172.30.77.5 Class B Default Mask: 255.255.0.0


Network: 172.30.0.0

135
Know the classes!
First First Network
Host
Class Bits Octet Bits
Bits

A 0 0 – 127 8 24

B 10 128 - 191 16 16

C 110 192 - 223 24 8

D 1110 224 – 239


136

You might also like