knowledge

Overview

IP addressing defines how devices are identified and located on a network. IPv4 addresses are categorized into classes and split between private and public ranges. Supporting mechanisms — MAC addresses for physical delivery, ARP for local resolution, DHCP for automatic assignment, and NAT/PAT for internet connectivity — work together to ensure data reaches the correct destination across both local and global networks.


Terminology

TermDefinition
Class ARange 0–127; used for large enterprise networks and ISPs
Class BRange 128–191; suitable for medium to large networks
Class CRange 192–223; used in residential and small business networks
Class DRange 224–239; reserved for multicast; not assignable to hosts
Class ERange 240–255; reserved for experimental use
Private AddressIP address not routable on the public internet (e.g., 192.168.x.x)
Public AddressGlobally unique IP assigned by ISPs; routable on the internet
MulticastCommunication method where data is sent to a group of destinations simultaneously
MAC AddressPhysical hardware address burned into a NIC; 48-bit, written as XX:XX:XX:XX:XX:XX
ARP (Address Resolution Protocol)Resolves IP addresses to MAC addresses on a local network
DHCP (Dynamic Host Configuration Protocol)Automatically assigns IP addresses to devices on a network
NAT (Network Address Translation)Translates private IP addresses to a public IP for internet communication
PAT (Port Address Translation)A form of NAT that maps multiple private IPs to a single public IP using port numbers

Core Concepts

IP Address Classes

ClassRangeUse CaseHosts per Network
A0–127Large enterprise networks, ISPsMany
B128–191Medium to large networksModerate
C192–223Residential and small businessFew
D224–239Multicast communicationsN/A
E240–255Experimental / researchN/A

Private vs Public Addresses

Private addresses are not routable on the public internet; used within local networks only.

ClassPrivate Range
A10.0.0.0 – 10.255.255.255
B172.16.0.0 – 172.31.255.255
C192.168.0.0 – 192.168.255.255

Public addresses are assigned by ISPs and are globally unique and routable.

Address Allocation

  • Class A / B — fewer networks but many hosts per network; suited for large organizations
  • Class C — many networks with fewer hosts per network; suited for smaller deployments
  • Class D — multicast only; not assigned to individual hosts
  • Class E — rarely seen in real network traffic; reserved for research

MAC Addresses

Every NIC has a burned-in physical address (MAC address) used for local network delivery.

  • 48-bit address written as six pairs of hex digits: AA:BB:CC:DD:EE:FF
  • First three pairs identify the manufacturer (OUI); last three identify the device
  • Used at Layer 2 (Data Link) of the OSI model — operates only within a local network segment

ARP (Address Resolution Protocol)

ARP resolves a known IP address to the corresponding MAC address so data can be delivered on the local network.

  1. Device broadcasts: “Who has IP 192.168.1.1?”
  2. Device with that IP replies with its MAC address
  3. Requesting device caches the result in its ARP table for future use
  • ARP operates at Layer 2 and is limited to local network segments
  • ARP spoofing is a common attack that poisons ARP tables to redirect traffic

DHCP and the DORA Process

DHCP automatically assigns IP addresses to devices when they join a network, eliminating manual configuration.

StepNameDescription
1DiscoverClient broadcasts a request for an IP address
2OfferDHCP server responds with an available IP offer
3RequestClient formally requests the offered IP
4AcknowledgeServer confirms the assignment; client can now use the IP
  • The router/server records the lease, ensuring future traffic marked with that IP reaches the correct device
  • Lease times are configurable; when expired, DORA repeats to renew or obtain a new address

NAT and PAT

IPv4 provides approximately 4.3 billion addresses — insufficient for global demand. NAT allows many private addresses to share a single public IP.

TypeDescription
Static NATOne private IP maps to one dedicated public IP
Dynamic NATPrivate IPs mapped to a pool of public IPs
PAT (Port Address Translation)Many private IPs share one public IP, differentiated by port numbers
  • PAT is the most common form used in home and enterprise LANs
  • NAT also provides a layer of security by hiding internal addressing from the internet
  • Routers perform NAT at the boundary between the LAN and WAN


References / Images

  • RFC 791
  • IP address class diagrams from networking textbooks