IP Addressing
Objectives:
● 1.5 - Compare and contrast transmission media and transceivers
● 1.7 - Given a scenario, use appropriate IPv4 network addressing
● 1.8 - Summarize evolving use cases for modern network environments
● Introduction
○ Internet Protocol (IP) Address
■ An assigned numerical label that is used to identify Internet
communicating devices on a computer network
■ Used in Layer 3 addressing
● Between two different networks or subnets
● IPv4 Addressing
○ Internet Protocol version 4 (IPv4) Addressing
■ Most common type of IP addressing used in networks
○ IPv4 Address
■ Decimal representations of a 32 bit binary number
■ Written in Dotted-decimal Notation which is a series of four decimal
numbers separated by dots
119
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Octets
● Refers to the four decimal numbers, individually
● IPv4 address consists of four octets, each representing 8 bits of a
binary number, totaling 32 bits
● Decimal numbers ranging from 0 to 255,
○ Network and Host Portion
■ Portions of IPv4 that is determined by a subnet mask
■ Subnet Mask
● Contains continuous strings of ones (1) and zeros (0)
■ Network portion – 1
■ Host portion – 0
○ Classes of IPv4 Addresses
■ IP addresses are classified into classes depending on the first octet in
their address
■ A
● First octet – 1 to 127
● Default subnet mask – 255.0.0.0
■ B
● First octet – 128 to 191
● Default subnet mask – 255.255.0.0
■ C
● First octet – 192 to 223
120
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Default subnet mask – 255.255.255.0
■ D
● First octet – 224 to 239
● No default subnet mask
● Reserved for multicast routing
○ Multicast Address
■ A logical identifier for a group of hosts
■ E
● First octet – 240 to 255
● No default subnet mask
● Reserved for experimental use in terms of research and
development
○ Subnetting
■ The process of dividing a larger network into smaller subnetworks
■ Classful Subnet Mask
● Uses default masks associated with specific address classes
■ Classless Subnet Mask
● Uses any subnet mask that is not the default for a specific address
class
121
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Classless Inter-Domain Routing (CIDR)
○ The process of borrowing bits from the host portion to
expand the network portion, allowing for smaller
subnetworks (Classless Subnet Mask)
■ CIDR Notation
● Combined notation of IP addresses and subnet masks (e.g.,
IP/subnet)
● Default CIDR notations for IP address classes to be considered
classful:
○ A – /8
○ B – /16
○ C – /24
● IPv4 Address Types
○ Public IPV4 Address
■ Also known as routable IP address
■ Unique identifier assigned to devices on the internet
■ Must be leased or purchased from Internet Service Providers (ISPs)
■ Globally, managed by Internet Corporation for Assigned Names and
Numbers (ICANN)
122
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Regional Internet Registries (RIRs)
○ Responsible for managing public IP addresses for different
regions
○ ARIN – North America
○ LACNIC – Latin America
○ AFNIC – Africa
○ APNIC – Asia Pacific
○ RIPE – Europe
○ Private IPV4 Address
■ Non-internet routable IP address used within local networks
■ Allows communication between devices within the network without
using a public IP address
■ Can be used by anyone at any time, but only within their own LANs
■ Network Address Translation (NAT)
● Method used to translate private IP addresses into public IP
addresses and vice versa
● Facilitates communication between local and public networks
● Helps conserve global IP address space
■ Request for Comments (RFCs)
● A formal publication from the Internet Engineering Task Force
(IETF)
123
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Authored by individuals or groups of computer scientists who
want to document new technologies or standards that they are
proposing
● RFC 1918
○ Defines ranges for the private IP addresses
○ Private IP Ranges
■ Class A – 10.x.x.x (e.g., 10.0.0.0 - 10.255.255.255)
■ Class B – 172.16.x.x to 172.31.x.x (e.g., 172.16.0.0 -
172.31.255.255)
■ Class C – 192.168.x.x (e.g., 192.168.0.0 -
192.168.255.255)
○ Loopback Address (Local Host)
■ Specialized IP address assigned as 127.0.0.1
■ Used for any higher level protocol can send data back to the host itself
without going out to a switch or router
● Internal testing and troubleshooting
■ Entire 127.x.x.x range reserved for loopback purposes
● Almost always written as 127.0.0.1
● Other IP addresses inside 127.x.x.x are wasted as part of loopback
or local host range
■ Local Host – the human readable name for the IP address 127.x.x.1
124
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ Automatic Private IP Address (APIPA)
■ Dynamically assigned by OS when DHCP server is unavailable
■ Range – 169.254.0.0 to 169.254.255.255 (169.254.x.x)
■ Used as a fallback for network configurations
■ Indicates a DHCP issue if assigned to a device
■ Dynamic Host Configuration Protocol (DHCP)
● Assigns dynamic IP addresses to devices
● Process – DORA
○ Discovery
○ Offer
○ Request
○ Acknowledgment
○ Exam Tips
■ Understand distinctions between public and private IP addresses
■ Memorize ranges for private IP addresses (RFC 1918)
■ Be aware of loopback/local host, and APIPA addresses
■ Recognize DHCP issues indicated by APIPA addresses
● IPv4 Data Flows
○ Unicast
■ Data from single source to single destination
■ Two-way conversation between sender and receiver
125
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ Multicast
■ Data from single source to multiple specific destinations
■ Sender communicates with a specific group of receivers
○ Broadcast
■ Data from single source to all sources on a destination network
■ Sender addresses all devices on the network
○ Multicast vs. Broadcast
■ Broadcast – everyone receives the message
■ Multicast – only those who have opted into the multicast group receive
the message
● Assigning IPv4 Addresses
○ Static Assignment
■ Manually inputting IP address, subnet mask, default gateway, and DNS
server
■ Prone to errors, time-consuming, especially in large networks
○ Dynamic Assignment
■ Provides quicker, easier, and less error-prone method
■ Commonly used for large or small networks
■ Utilizes DHCP (Dynamic Host Configuration Protocol) for automatic
assignment
126
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ Components of a Fully Configured Client
■ IP address
■ Subnet mask
■ Default gateway (often the router's IP)
■ DNS server (or WINS server in Windows domains)
● DNS (Domain Name System)
○ Converts domain names to IP addresses for internet
communication
○ Acts like an internet phone book
● WINS (Windows Internet Name Service)
○ Identifies NetBIOS systems on a TCP/IP network and
converts those NetBIOS names to IP addresses
○ Works similar to DNS but within Windows domain
environment
○ Methods of Dynamic Assignment
■ BOOTP (Bootstrap Protocol)
● Older and least used method, which is originally for diskless Unix
workstations
● Dynamically assigns IP addresses and allows a workstation to load
a copy of the boot image over the network
● Uses static database of IP and MAC addresses
127
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ DHCP (Dynamic Host Configuration Protocol)
● Modern replacement for BOOTP
● Dynamically assigns IPs based on assignable scope and allows
configuration of numerous options with it
● Gives all of the variables including the components of a fully
configured client
■ APIPA (Automatic Private Internet Protocol Addressing)
● Used if DHCP fails
● Assigns self-assigned IPs
● Allows a quick configuration of a LAN without the need for a DHCP
server
● Uses private IP addresses that cannot be routed outside LAN
● Cannot communicate with non-APIPA devices
■ ZeroConf
● Newer technology based on APIPA, providing the same features
and some new ones
● Features:
○ Assigns IPv4 link local addresses
○ Utilizes MDNS (Multicast Domain Name Service) for name
resolution without DNS
○ Enables service discovery on the network
128
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Implementations:
○ Apple Products
■ Known as Bonjour
■ Used for service discovery
○ Microsoft Windows
■ LLMNR (Link Local Multicast Name Resolution)
■ Extends APIPA for name resolution and service
discovery
○ Linux
■ Implemented using SystemD, specifically the
SystemD Resolved background service
● Computer Mathematics
○ Number Systems
■ Computers use binary (base-2) numbering
■ Humans typically use decimal (base-10) numbering
○ Binary to Decimal Conversion
■ Binary numbers are converted to decimal by summing the powers of 2 for
each digit
129
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Example: Converting 10010110 to decimal
● Each digit represents a power of 2, starting from 2
0
○ Table:
128
( 2 )
7
64
( 2 )
6
32
( 2 )
5
16
( 2 )
4
8
( 2 )
3
4
( 2 )
2
2
( 2 )
1
1
( 2 )
0
1 0 0 1 0 1 1 0
● 1 indicates presence and 0 indicates absence
● Sum up the values of all positions with 1
○ 128+16+4+2 = 150 – decimal
○ Decimal to Binary Conversion
■ Decimal numbers are converted to binary by repeatedly dividing by 2 and
noting remainders
■ Example: Converting 167 to binary
● Subtract highest power of 2 possible, repeating until remainder is
0
● Each subtraction corresponds to placing a 1 or 0 in the binary
representation
○ 167-128 = 39 – 1
○ 39-64 = x – 0
○ 39-32 = 7 – 1
130
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ 7-16 = x – 0
○ 7-8 = x – 0
○ 7-4 = 3 – 1
○ 3-2 = 1 – 1
○ 1-1 = 0 – 1
○ Table:
128
( 2 )
7
64
( 2 )
6
32
( 2 )
5
16
( 2 )
4
8
( 2 )
3
4
( 2 )
2
2
( 2 )
1
1
( 2 )
0
1 0 1 0 0 1 1 1
● 10100111 – binary of 167
○ Conversion Verification
■ To ensure accuracy, check the result by reversing the conversion process
■ Add up the decimal values corresponding to the 1s in the binary
representation
■ Verify that the sum matches the original decimal number
■ Example: 10100111 – binary of 167
● 128+32+4+2+1 = 167
131
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Subnetting
○ Subnetting
■ Involves dividing a large network into smaller networks for better
management and optimization
■ It's crucial for efficient use of IP addresses, both public and private
○ Subnet Masks
■ Modify network sizes by borrowing bits from the host portion and adding
them to the network portion
■ Default classful subnet masks are rarely optimal for network sizes, so
custom subnet masks are used for better efficiency
○ Subnetting Formulas
■ Number of Subnets
● 2
𝑆
● S is the number of borrowed bits
■ Assignable IP Addresses per Subnet
● 2
ℎ − 2
● h is the number of host bits
● “– 2” represents network ID (first) and broadcast ID (last) that
need to be taken away when calculating the number of usable IPs
○ Classful vs. Subnetted Networks
■ Classful networks (e.g., /8, /16, /24) have fixed sizes
132
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Subnetted networks allow flexibility in network size by borrowing bits
from the host portion
○ CIDR (Classless Inter-Domain Routing) Notation
■ Provides a shorthand for expressing subnet masks
■ Consolidates multiple subnets under a single route for more efficient
routing
○ Variable Length Subnet Mask (VLSM)
■ Allows subnets of various sizes to be used within a larger network
■ Enhances flexibility in subnetting by accommodating different network
requirements
○ Exam Tips
■ Memorize the chart correlating subnet mask notation (/24, /25, etc.) with
the number of subnets and assignable IP addresses
■ Helps quickly answer subnetting questions by understanding the
relationship between subnet size and IP allocation
■ Practice subnetting problems, especially in the Class C range (/24 to /30)
■ Familiarize yourself with CIDR notation and subnetting calculations to
excel in subnetting questions on exams
● Subnetting Practice
○ Subnetting
■ Involves dividing a larger network into smaller, manageable sub-networks
133
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ CIDR Notation
■ Commonly used to represent subnets
■ Expressed as IP address followed by a slash and a number indicating the
subnet mask length
○ Memory Aid
■ Memorize a subnetting chart for quick reference during exams
■ Utilize a "dump sheet" to jot down important information during the test
○ Problem Solving Approach
■ Begin by identifying the total number of IPs available in the given subnet
■ Determine the required subnet sizes for different departments
■ Remember to account for network address and broadcast address in each
subnet
■ Consider rounding up department sizes to factors of 2 for efficient
allocation
○ Practice Problem 1
■ You are the network administrator for DionTraining.com. We decided to
locate a small branch office in another city. To support the new location,
you will need to subnet the private IP address range given to you into
several smaller networks to service each department.
The new office location has been assigned the range of 10.10.10.0/24.
134
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
When you set up the new network, you need to configure separate
subnets for each department in the new office. You should allocate the
addresses using CIDR notation and provide each department the
minimum number of IP addresses that will meet their needs.
■ Process:
● Identify the number of users in each department: IT, instructors,
sales, administration
● Round up the department sizes to the nearest power of 2 (1, 2, 4,
8, 16, 32, 64, 128)
● Account for network address and broadcast address in each
subnet
○ For IT
■ 54 users
■ Round up to 64
■ CIDR notation: /26
○ For instructors
■ 32 users
■ Round up to 64
■ CIDR notation: /26
○ For sales
■ 5 users
■ Round up to 8
135
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ CIDR notation: /29
○ For administration
■ 3 users
■ Round up to 8
■ CIDR notation: /29
● Calculate the remaining unused IPs by subtracting allocated IPs
from the total (given as /24 in this case)
● Round down the remaining IPs to the nearest power of 2
● Determine CIDR notation for each subnet based on rounded
values
● Assign CIDR notation to each department's subnet accordingly
○ For unused
■ 112 IPs left
■ Round down to 64
■ CIDR notation: /26
● Sales and administration both have 8 IPs → CIDR notation: /29 for
both
● Use the subnetting chart for quick reference
136
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ Practice Problem 2
■ How many assignable IP addresses exist in this network?
172.16.1.0/27
A. 30
B. 32
C. 14
D. 64
■ Explanation:
● Total IPs for /27: 32
● Assignable IPs (excluding network and broadcast): 30
○ Practice Problem 3
■ How many assignable IP addresses exist in this network?
192.168.1.0/28
A. 30
B. 16
C. 14
D. 64
■ Explanation:
● Total IPs for /28: 16
● Assignable IPs: 16 - 2 = 14
137
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ General Tips
■ Pay attention to whether the question asks for assignable, usable, or total
IPs
■ Use subnetting formulas (2 ) if needed, where h represents the ℎ − 2
number of host bits
■ Practice with a subnetting chart and understand how to apply CIDR
notation effectively
● Subnetting by Hand: Demonstration
● IPv6 Addressing
○ IPv4 Limitations
■ Limited address space of only 32 bits of addressable space
■ Approximately 4.3 billion addresses
■ Address exhaustion due to waste and subnetting
○ IPv6 Advantages
■ 128-bit addresses
■ 340 undecillion addresses
■ Solved address exhaustion problem
○ IPv6 Features
■ No broadcasts
■ No packet fragmentation
138
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Simplified header with only 5 fields
■ No maximum transmission units (MTUs) for discovery
○ IPv6 Address Notation
■ Hexadecimal Notation
● 16 possible characters
● Represented in segments of 4 hexadecimal digits, separated by
colons
● 0-9, A-F
○ F can represent 10-15
■ No more than 32 hexadecimal digits
● Use of shorthand notation to shorten addresses
○ Four consecutive zeros can be represented by one zero
○ Double colon (::) can summarize multiple segments that
have just zeros but it can only be once within an address
○ Eliminate leading zeros within segments
○ Identifying IPv6 Addresses
■ IPv4 – Dotted decimal notation (0-255)
■ IPv6 – Hexadecimal digits (0-9, A-F) with colons, in groups of four
■ MAC – always have 12 hexadecimal digits, separated by colons, and
grouped in pairs of two
139
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ IPv6 Address Types
■ A single interface can be assigned to multiple IPv6 addresses
● Can be a mixture of address types
■ Unicast
● Identifies a single interface
○ Globally routed unicast addresses
■ Similar as in IPv4
■ 2000-3999
■ First segment in IPv6 address
○ Link local addresses
■ Like a private IP in IPv4 that can only be used in
LAN
■ Begins with FE80 as first segment
■ Multicast
● Identifies a group of interfaces
● Starts with FF as the first two digits within the first segment
■ Anycast
● Identifies a set of interfaces
● Allocated from unicast space
○ Stateless Address Autoconfiguration (SLAAC)
■ An Auto-configuration that eliminates the need to obtain addresses or
other configuration information from a central server
140
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Utilizes MAC addresses to create unique identifiers
■ Extended Unique Identifier (EUI)
● Allows a host to assign itself a unique 64-bit IPv6 interface
identifier (EUI-64)
■ DHCPv6 can also be used to assign addresses
○ Neighbor Discovery Protocol (NDP)
■ Used to determine Layer 2 addresses on the network
■ Functions:
● Router solicitation
● Router advertisement
● Neighbor solicitation
● Neighbor advertisement
● Redirection
■ Simplifies network configuration and improves efficiency
● IPv6 Data Flows
○ Data Flows in IPv6
■ Unicast
● Similar to IPv4, but uses IPv6 addresses
■ Multicast
● Uses multicast groups like in IPv4 (e.g., FF00::A)
141
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Data travels from a single source (server) to multiple specific
destination devices
■ Anycast
● Unique to IPv6, replaces broadcast from IPv4
● Allows one host to efficiently update router tables for a group of
other hosts
● IPv6 determines the closest gateway and sends packets as though
it was a unicast communication
● Routers in the group update their tables, improving efficiency
● IPv4 and IPv6 Compatibility Requirements
○ IPv6 was designed to be backward compatible with IPv4
○ Both protocols can co-exist on the same network to facilitate a smooth transition
○ Dual Stack
■ A network architecture that allows coexistence and simultaneous
operation of IPv4 and IPv6 on the same network
■ Devices are configured to understand and process both IPv4 and IPv6
addresses
■ Enables gradual migration to IPv6 while ensuring compatibility and
communication between both protocols
142
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Preference for IPv6 by default
● With fallback to IPv4 if IPv6 is not available or supported by the
destination
○ Tunneling
■ Method that enables communication of one network protocol within
another by encapsulating packets
■ Crucial for transitioning from IPv4 to IPv6, allowing IPv6 packets to
traverse IPv4 infrastructure
■ Encapsulation
● IPv6 packet will be encapsulated within IPv4 packet at the source
or entry point
■ Decapsulation
● Original IPv6 packet will be deencapsulated at the tunnel’s
endpoint, and delivered to its intended IPV six destination
● Tunnel endpoints configuration
○ Static tunnels
○ Dynamic tunnels
■ Enables the secure and transparent transportation of data through an
incompatible network
○ NAT64
■ A network address translation mechanism allowing IPv6-only devices to
communicate with IPv4 servers
143
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Crucial in environments where dual stack configuration is not feasible
■ Translates IPv6 addresses into IPv4 addresses and vice versa, facilitating
interoperability
■ Helps conserve remaining IPv4 addresses by allowing multiple IPv6
devices to share a single IPv4 address
■ Utilizes a NAT64 gateway at the edge of the IPv6 network to manage
translations seamlessly