Lecture7 - IPv4 Addressing
Lecture7 - IPv4 Addressing
Chapter 7
IPv4 Addressing
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.
7.1 IPv4 Address Structure
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.
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.
Prefix
• The prefix length is the number Subnet Mask 32-bit Address
Length
of bits set to 1 in the subnet 255.0.0.0 11111111.00000000.00000000.00000000 /8
mask. 255.255.0.0 11111111.11111111.00000000.00000000 /16
Host
Network Portion Host Bits
Portion
Subnet mask 255 255 255 0
255.255.255.0 or /24 11111111 11111111 11111111 00000000
Network address 192 168 10 0
All 0s
192.168.10.0 or /24 11000000 10100000 00001010 00000000
First address 192 168 10 1
All 0s and a 1
192.168.10.1 or /24 11000000 10100000 00001010 00000001
Last address 192 168 10 254
All 1s and a 0
192.168.10.254 or /24 11000000 10100000 00001010 11111110
Broadcast address 192 168 10 255
All 1s
192.168.10.255 or /24 11000000 10100000 00001010 11111111
7.2 IPv4 Unicast, Broadcast, and
Multicast
IPv4 Unicast, Broadcast, and Multicast
Unicast
• Unicast transmission is sending a packet to one destination IP address.
• For example, the PC at 172.16.4.1 sends a broadcast packet to all IPv4 hosts.
IPv4 Unicast, Broadcast, and Multicast
Multicast
• Multicast transmission is sending a packet to a multicast address group.
• For example, the PC at 172.16.4.1 sends a multicast packet to the multicast group
address 224.10.10.5.
7.3 Types of IPv4 Addresses
Types of IPv4 Addresses
Public and Private IPv4 Addresses
• As defined in in RFC 1918, public IPv4 addresses are globally routed between
internet service provider (ISP) routers.
network.
Link-Local addresses
• 169.254.0.0 /16 (169.254.0.1 to 169.254.255.254)
• 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.
Types of IPv4 Addresses
Legacy Classful Addressing
RFC 790 (1981) allocated IPv4 addresses
in classes
• Class A (0.0.0.0/8 to 127.0.0.0/8)
• Class B (128.0.0.0 /16 – 191.255.0.0 /16)
• Class C (192.0.0.0 /24 – 223.255.255.0 /24)
• Class D (224.0.0.0 to 239.0.0.0)
• Class E (240.0.0.0 – 255.0.0.0)
• 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
nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
/8 255.0.0.0 16,777,214
11111111.00000000.00000000.00000000
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
/16 255.255.0.0 65,534
11111111.11111111.00000000.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 254
11111111.11111111.11111111.00000000
Subnet an IPv4 Network
Subnet on an Octet Boundary (Cont.)
• In the first table 10.0.0.0/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)
10.0.0.0/16 10.0.0.1 - 10.0.255.254 10.0.255.255 10.0.0.0/24 10.0.0.1 - 10.0.0.254 10.0.0.255
10.0.1.0/24 10.0.1.1 - 10.0.1.254 10.0.1.255
10.1.0.0/16 10.1.0.1 - 10.1.255.254 10.1.255.255
10.0.2.0/24 10.0.2.1 - 10.0.2.254 10.0.2.255
10.2.0.0/16 10.2.0.1 - 10.2.255.254 10.2.255.255
… … …
10.3.0.0/16 10.3.0.1 - 10.3.255.254 10.3.255.255
10.0.255.0/24 10.0.255.1 - 10.0.255.254 10.0.255.255
10.4.0.0/16 10.4.0.1 - 10.4.255.254 10.4.255.255 10.1.0.0/24 10.1.0.1 - 10.1.0.254 10.1.0.255
10.5.0.0/16 10.5.0.1 - 10.5.255.254 10.5.255.255 10.1.1.0/24 10.1.1.1 - 10.1.1.254 10.1.1.255
• A /27 mask would provide 8 subnets of 30 host IP addresses and therefore support
this topology.
VLSM
IPv4 Address Conservation (Cont.)
However, the point-to-point WAN links only require two
addresses and therefore waste 28 addresses each for a total of
84 unused addresses.
• Applying a traditional subnetting scheme to this scenario is not very efficient and is
wasteful.
Examine the needs of an organization’s network usage and how the subnets will be
structured.
• Perform a network requirement study by looking at the entire network to determining how each
area will be segmented.
• Determine how many subnets are needed and how many hosts per subnet.
• Determine DHCP address pools and Layer 2 VLAN pools.
Structured Design
Device Address Assignment
Within a network, there are different types of devices that require addresses:
• End user clients – Most use DHCP to reduce errors and burden on network support staff. IPv6
clients can obtain address information using DHCPv6 or SLAAC.
• Servers and peripherals – These should have a predictable static IP address.
• Servers that are accessible from the internet – Servers must have a public IPv4 address, most
often accessed using NAT.
• Intermediary devices – Devices are assigned addresses for network management, monitoring,
and security.
• Gateway – Routers and firewall devices are gateway for the hosts in that network.