IPv4 Addressing
IPv4 (Internet Protocol version 4) is the fourth version of IP and the most widely used
addressing scheme in computer networks. It uses a 32-bit address divided into four
octets (e.g., [Link]), allowing for approximately 4.3 billion unique addresses.
IPv4 addresses are written in dotted decimal format and are categorized into
different classes (A, B, C, D, and E) based on their leading bits, though modern
networks often use CIDR (Classless Inter-Domain Routing) instead of traditional
classes. IPv4 supports both public addresses (used on the internet) and private
addresses (used within local networks, such as 192.168.x.x or 10.x.x.x). Despite
its widespread use, IPv4 faces an address exhaustion problem, which led to the
development of IPv6.
IPv6 Addressing
IPv6 (Internet Protocol version 6) was developed to overcome the limitations of IPv4,
particularly the shortage of available addresses. IPv6 uses a 128-bit address,
represented in hexadecimal notation and separated by colons (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:7334). This provides a practically
unlimited address space (around 3.4 × 10^38 addresses). Unlike IPv4, IPv6 has built-
in support for auto-configuration, improved routing, mandatory IPsec security,
and efficient multicast addressing. It eliminates the need for NAT (Network
Address Translation) since every device can have a globally unique address. IPv6
addresses can also be abbreviated by omitting leading zeros or consecutive groups of
zeros (2001:db8::7334).
Subnetting:
Subnetting is the process of dividing a large IP network into smaller,
more manageable subnetworks (subnets). This improves network
performance, security, and efficient IP address utilization. A subnet
mask is used to identify which part of an IP address represents the
network ID and which part represents the host ID. For example, the
subnet mask [Link] (or /24 in CIDR notation) means the first
24 bits are the network portion, and the remaining 8 bits can be used
for hosts. Subnetting allows network administrators to allocate IP
addresses efficiently, reduce broadcast traffic, and isolate network
segments.
Purpose:
Determine which part of IP address is network vs. host
Enable creation of smaller subnetworks
Improve network organization and security
Reduce broadcast traffic
Address Resolution Protocols
Address Resolution Protocol (ARP)
Definition: A protocol used to map IP addresses (Layer 3) to MAC addresses (Layer
2) within a local network segment.
How ARP Works
1. ARP Request:
1. Host needs to send data to an IP address
2. Checks ARP cache for existing MAC address
3. If not found, broadcasts ARP request: "Who has IP X.X.X.X?"
2. ARP Reply:
1. Target device responds with its MAC address
2. "IP X.X.X.X is at MAC YY:YY:YY:YY:YY:YY"
3. ARP Cache Update:
1. Requesting device stores IP-to-MAC mapping
2. Future communications use cached information
3. Entries expire after timeout period
ARP Table
Contents:
IP Address
MAC Address
Type (Static/Dynamic)
Age/Timeout
Example:
IP Address MAC Address Type Age192.168.1.1
00:1B:44:11:3A:B7 Dynamic 120192.168.1.5 00:50:56:C0:00:08 Static
-
ARP Security Considerations
ARP Spoofing: Malicious responses with false MAC addresses
ARP Cache Poisoning: Corrupting ARP tables
Mitigation: Static ARP entries, ARP monitoring tools
Dynamic Host Configuration Protocol (DHCP)
Definition: A network protocol that automatically assigns IP addresses and other
network configuration parameters to devices joining a network.
DHCP Process (DORA)
1. Discovery:
o Client broadcasts DHCP Discover message
o Searches for available DHCP servers
o Broadcast to [Link]
2. Offer:
o DHCP server responds with available IP address
o Includes lease time and other network parameters
o May receive multiple offers from different servers
3. Request:
o Client selects one offer and broadcasts DHCP Request
o Requests specific IP address from chosen server
o Informs other servers their offers were declined
4. Acknowledgment:
o Selected server sends DHCP ACK confirmation
o Includes final IP configuration
o Client can now use the assigned IP address
DHCP Configuration Parameters
Mandatory:
IP address
Subnet mask
Default gateway
Optional:
DNS server addresses
Domain name
NTP server
WINS server
Lease duration
DHCP Lease Management
Lease Process:
Lease time: Duration IP address is assigned
Renewal: Client requests lease extension at 50% of lease time
Rebinding: Client broadcasts renewal request at 87.5% of lease time
Release: Client voluntarily releases IP address
Expiration: Server reclaims address after lease expires
DHCP Reservations
Definition: Static assignment of specific IP addresses to particular devices based on
MAC addresses.
Benefits:
Consistent IP addresses for servers
Simplified network management
Maintains DHCP automation benefits
DHCP vs Static IP Assignment
Aspect DHCP Static IP
Configuration Automatic Manual
Management Centralized Individual device
Scalability High Limited
Flexibility High Low
Use case Client devices Servers, network devices
Address Resolution Summary
Address Types and Resolution
Address Resolution
Layer Length Purpose
Type Method
MAC Layer Burned into
48-bit Physical addressing
Address 2 hardware
IP Layer 32-bit (IPv4) /
Logical addressing DHCP or static
Address 3 128-bit (IPv6)
Port Layer Application Application
16-bit
Number 4 identification assignment