IPv4 Addressing
IPv4 Addressing
• 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.
• For example, the PC at 172.16.4.1 sends a unicast packet to the printer at 172.16.4.253.
IPv4 Unicast, Broadcast, and Multicast
Broadcast
• Broadcast transmission is sending a packet to all other destination IP addresses.
• 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.
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.
• Private addresses are common blocks of Network Address RFC 1918 Private Address Range
and Prefix
addresses used by most organizations to
assign IPv4 addresses to internal hosts. 10.0.0.0/8 10.0.0.0 - 10.255.255.255
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)
• RIRs
• The Asia-Pacific Network Information Center (APNIC).
• The American Registry for Internet Numbers (ARIN).
• The European Network Information Center (RIPE NCC).
• The Latin American and Caribbean Network Information Center (LACNIC).
• The Africa Network Information Center (AfriNIC).
• 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
(256 Possible (65,534 possible hosts per Broadcast (65,536 Possible Host Range Broadcast
Subnets) subnet) Subnets) (254 possible hosts per subnet)
nnnnnnnn.nnnnnnnn.nnnnhhhh.hhhhhhhh
/20 255.255.240.0 16 4094
11111111.11111111.11110000.00000000
nnnnnnnn.nnnnnnnn.nnnnnhhh.hhhhhhhh
/21 255.255.248.0 32 2046
11111111.11111111.11111000.00000000
nnnnnnnn.nnnnnnnn.nnnnnnhh.hhhhhhhh
/22 255.255.252.0 64 1022
11111111.11111111.11111100.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnh.hhhhhhhh
/23 255.255.254.0 128 510
11111111.11111111.11111110.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 256 254
11111111.11111111.11111111.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
/25 255.255.255.128 512 126
11111111.11111111.11111111.10000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
/26 255.255.255.192 1024 62
11111111.11111111.11111111.11000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
/27 255.255.255.224 2048 30
11111111.11111111.11111111.11100000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
/28 255.255.255.240 4096 14
11111111.11111111.11111111.11110000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
/29 255.255.255.248 8192 6
11111111.11111111.11111111.11111000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
/30 255.255.255.252 16384 2
11111111.11111111.11111111.11111100
Subnet a Slash 16 and a Slash 8 Prefix
Create 100 Subnets with a Slash 16 prefix
Consider a large enterprise that requires at least 100 subnets
and has chosen the private address 172.16.0.0/16 as its
internal network address.
• 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.
When developing an IP addressing scheme, it is generally recommended that you have a set
pattern of how addresses are allocated to each type of device.