Module 11: IPv4
Addressing
Introduction to Networks v7.0
(ITN)
Module Objectives
Module Title: IPv4 Addressing
Module Objective: Calculate an IPv4 subnetting scheme to efficiently segment your network.
Topic Title Topic Objective
IPv4 Address Structure Describe the structure of an IPv4 address including
the network portion, the host portion, and the
subnet mask.
IPv4 Unicast, Broadcast, and Multicast Compare the characteristics and uses of the
unicast, broadcast and multicast IPv4 addresses.
Types of IPv4 Addresses Explain public, private, and reserved IPv4
addresses.
Network Segmentation Explain how subnetting segments a network to
enable better communication.
Subnet an IPv4 Network Calculate IPv4 subnets for a /24 prefix.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
11.1 IPv4 Address Structure
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
IPv4 Address Structure
Network and Host Portions
• An IPv4 address is a 32-bit hierarchical address that is made up of a network portion
and a host portion.
• When determining the network portion versus the host portion, you must look at the
32-bit stream.
• A subnet mask is used to determine the network and host portions.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
IPv4 Address Structure
The Subnet Mask
• To identify the network and host portions of an IPv4 address, the subnet mask is
compared to the IPv4 address bit for bit, from left to right.
• The actual process used to
identify the network and
host portions is called
ANDing.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
IPv4 Address Structure
The Prefix Length
• A prefix length is a less cumbersome method used to identify a subnet mask address.
Prefix
• The prefix length is the number Subnet Mask 32-bit Address
Length
of bits set to 1 in the subnet [Link] 11111111.00000000.00000000.00000000 /8
mask.
[Link] 11111111.11111111.00000000.00000000 /16
[Link] 11111111.11111111.11111111.00000000 /24
• It is written in “slash notation”
therefore, count the number of [Link] 11111111.11111111.11111111.10000000 /25
bits in the subnet mask and [Link] 11111111.11111111.11111111.11000000 /26
prepend it with a slash.
[Link] 11111111.11111111.11111111.11100000 /27
[Link] 11111111.11111111.11111111.11110000 /28
[Link] 11111111.11111111.11111111.11111000 /29
[Link] 11111111.11111111.11111111.11111100 /30
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
IPv4 Address Structure
Determining the Network: Logical AND
• A logical AND Boolean operation is used in determining the network address.
• Logical AND is the comparison of two bits where only a 1 AND 1 produces a 1 and any other
combination results in a 0.
• 1 AND 1 = 1, 0 AND 1 = 0, 1 AND 0 = 0, 0 AND 0 = 0
• 1 = True and 0 = False
• To identify the network address, the
host IPv4 address is logically
ANDed, bit by bit, with the subnet
mask to identify the network
address.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
IPv4 Address Structure
Network, Host, and Broadcast Addresses
• Within each network are three types of IP addresses:
• Network address
• Host addresses
• Broadcast address
Host
Network Portion Host Bits
Portion
Subnet mask 255 255 255 0
[Link] or /24 11111111 11111111 11111111 00000000
Network address 192 168 10 0
All 0s
[Link] or /24 11000000 10100000 00001010 00000000
First address 192 168 10 1
All 0s and a 1
[Link] or /24 11000000 10100000 00001010 00000001
Last address 192 168 10 254
All 1s and a 0
[Link] or /24 11000000 10100000 00001010 11111110
Broadcast address 192 168 10 255
All 1s
[Link] or /24 11000000 10100000 00001010 11111111
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
11.2 IPv4 Unicast, Broadcast,
and Multicast
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
IPv4 Unicast, Broadcast, and Multicast
Unicast
• Unicast transmission is sending a packet to one destination IP address.
• For example, the PC at [Link] sends a unicast packet to the printer at
[Link].
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
IPv4 Unicast, Broadcast, and Multicast
Broadcast
• Broadcast transmission is sending a packet to all other destination IP addresses.
• For example, the PC at [Link] sends a broadcast packet to all IPv4 hosts.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11
IPv4 Unicast, Broadcast, and Multicast
Multicast
• Multicast transmission is sending a packet to a multicast address group.
• For example, the PC at [Link] sends a multicast packet to the multicast group
address [Link].
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
11.3 Types of IPv4
Addresses
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
Types of IPv4 Addresses
Public and Private IPv4 Addresses
• As defined in RFC 1918, public IPv4 addresses are globally routed between internet
service provider (ISP) routers.
• Private addresses are common blocks of Network Address
RFC 1918 Private Address Range
addresses used by most organizations to and Prefix
assign IPv4 addresses to internal hosts. [Link]/8 [Link] - [Link]
[Link]/12 [Link] - [Link]
• Private IPv4 addresses are not unique
and can be used internally within any [Link]/16 [Link] - [Link]
network.
• However, private addresses are not globally routable.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
Types of IPv4 Addresses
Routing to the Internet
• Network Address Translation (NAT) translates private IPv4 addresses to public IPv4
addresses.
• NAT is typically enabled
on the edge router
connecting to the internet.
• It translates the internal
private address to a public
global IP address.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
Types of IPv4 Addresses
Special Use IPv4 Addresses
Loopback addresses
• [Link] /8 ([Link] to [Link])
• Commonly identified as only [Link]
• Used on a host to test if TCP/IP is operational.
Link-Local addresses
• [Link] /16 ([Link] to [Link])
• Commonly known as the Automatic Private IP Addressing (APIPA) addresses or self-
assigned addresses.
• Used by Windows DHCP clients to self-configure when no DHCP servers are
available.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
Types of IPv4 Addresses
Legacy Classful Addressing
RFC 790 (1981) allocated IPv4 addresses
in classes
• Class A ([Link]/8 to [Link]/8)
• Class B ([Link] /16 – [Link] /16)
• Class C ([Link] /24 – [Link] /24)
• Class D ([Link] to [Link])
• Class E ([Link] – [Link])
• Classful addressing wasted many IPv4
addresses.
Classful address allocation was replaced with
classless addressing which ignores the rules of
classes (A, B, C).
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
Types of IPv4 Addresses
Assignment of IP Addresses
• The Internet Assigned Numbers Authority (IANA) manages and allocates blocks of
IPv4 and IPv6 addresses to five Regional Internet Registries (RIRs).
• RIRs are responsible for
allocating IP addresses to ISPs
who provide IPv4 address
blocks to smaller ISPs and
organizations.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
11.4 Network Segmentation
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
Network Segmentation
Broadcast Domains and Segmentation
• Many protocols use broadcasts or multicasts (e.g., ARP use broadcasts to locate
other devices, hosts send DHCP discover broadcasts to locate a DHCP server.)
• Switches propagate broadcasts out all interfaces except the interface on which it was
received.
• The only device that stops
broadcasts is a router.
• Routers do not propagate
broadcasts.
• Each router interface connects
to a broadcast domain and
broadcasts are only
propagated within that specific
broadcast domain.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
Network Segmentation
Problems with Large Broadcast Domains
• A problem with a large broadcast domain is
that these hosts can generate excessive
broadcasts and negatively affect the network.
• The solution is to reduce the size of the
network to create smaller broadcast domains in
a process called subnetting.
• Dividing the network address [Link] /16
into two subnets of 200 users each: [Link]
/24 and [Link] /24.
• Broadcasts are only propagated within the
smaller broadcast domains.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
Network Segmentation
Reasons for Segmenting Networks
• Subnetting reduces overall network traffic and improves network performance.
• It can be used to implement security policies between subnets.
• Subnetting reduces the number of devices affected by abnormal broadcast traffic.
• Subnets are used for a variety of reasons including by:
Location Group or Function Device Type
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
11.5 Subnet an IPv4 Network
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
Subnet an IPv4 Network
Subnet on an Octet Boundary
• Networks are most easily subnetted at the octet boundary of /8, /16, and /24.
• Notice that using longer prefix lengths decreases the number of hosts per subnet.
Prefix Length Subnet Mask Subnet Mask in Binary (n = network, h = host) # of hosts
[Link]
/8 [Link] 16,777,214
11111111.00000000.00000000.00000000
[Link]
/16 [Link] 65,534
11111111.11111111.00000000.00000000
[Link]
/24 [Link] 254
11111111.11111111.11111111.00000000
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
Subnet an IPv4 Network
Subnet on an Octet Boundary (Cont.)
• In the first table [Link]/8 is subnetted using /16 and in the second table, a /24 mask.
Subnet Address Host Range Subnet Address
Host Range
(256 Possible (65,534 possible hosts per Broadcast (65,536 Possible Broadcast
(254 possible hosts per subnet)
Subnets) subnet) Subnets)
[Link]/16 [Link] - [Link] [Link] [Link]/24 [Link] - [Link] [Link]
[Link]/24 [Link] - [Link] [Link]
[Link]/16 [Link] - [Link] [Link]
[Link]/24 [Link] - [Link] [Link]
[Link]/16 [Link] - [Link] [Link]
… … …
[Link]/16 [Link] - [Link] [Link]
[Link]/24 [Link] - [Link] [Link]
[Link]/16 [Link] - [Link] [Link] [Link]/24 [Link] - [Link] [Link]
[Link]/16 [Link] - [Link] [Link] [Link]/24 [Link] - [Link] [Link]
[Link]/24 [Link] - [Link] [Link]
[Link]/16 [Link] - [Link] [Link]
… … …
[Link]/16 [Link] - [Link] [Link]
[Link]/24 [Link] - [Link] [Link]
... ... ...
... ... ...
[Link]/16 [Link] - [Link] [Link] [Link]/24 [Link] - 10.2255.255.254 [Link]
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25
Subnet an IPv4 Network
Subnet within an Octet Boundary
• Refer to the table to see six ways to subnet a /24 network.
Subnet Mask in Binary # of
Prefix Length Subnet Mask # of hosts
(n = network, h = host) subnets
[Link]
/25 [Link] 2 126
11111111.11111111.11111111.10000000
[Link]
/26 [Link] 4 62
11111111.11111111.11111111.11000000
[Link]
/27 [Link] 8 30
11111111.11111111.11111111.11100000
[Link]
/28 [Link] 16 14
11111111.11111111.11111111.11110000
[Link]
/29 [Link] 32 6
11111111.11111111.11111111.11111000
[Link]
/30 [Link] 64 2
11111111.11111111.11111111.11111100
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26
11.10 Module Practice and
Quiz
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
Module Practice and Quiz
What did I learn in this module?
• The IP addressing structure consists of a 32-bit hierarchical network address that identifies a
network and a host portion. Network devices use a process called ANDing using the IP
address and associated subnet mask to identify the network and host portions.
• Destination IPv4 packets can be unicast, broadcast, and multicast.
• There are globally routable IP addresses as assigned by the IANA and there are three ranges
of private IP network addresses that cannot be routed globally but can be used on all internal
private networks.
• Reduce large broadcast domains using subnets to create smaller broadcast domains, reduce
overall network traffic, and improve network performance.
• Create IPv4 subnets using one or more of the host bits as network bits. However, networks
are most easily subnetted at the octet boundary of /8, /16, and /24.
• Larger networks can be subnetted at the /8 or /16 boundaries.
• Use VLSM to reduce the number of unused host addresses per subnet.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 28