IPv4
IPv4 is the network-layer protocol that addresses devices and carries packets across interconnected networks. It gives each packet a source and destination address so routers can move it toward the right host.
itNetworking | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — IPv4
IPv4 is the protocol that labels each internet packet with a 32-bit source address and a 32-bit destination address so routers can move it toward the right host. It does not promise delivery, preserve order, or recover lost data. Its job is narrower than most people expect: address the packet, hand it off, and get out of the way.
Before IPv4, networks were isolated islands. Connecting them meant building custom gateways for every pair. IPv4 solved this with a universal addressing scheme: every interface on the planet gets a 32-bit number written as four octets (eight-bit chunks) separated by dots, like 192.0.2.10. Routers read the address and forward the packet hop by hop. No central coordinator, no reservation, just best-effort delivery.
Three ideas everything else hangs off. First, an address alone is meaningless without a subnet mask (or prefix length, the number after the slash in 192.0.2.10/24), which tells you which bits identify the network and which identify the host inside it. A /24 leaves 8 host bits, giving 256 addresses; subtract the network and broadcast addresses (the ones reserved for routing and all-hosts delivery) and you have 254 usable hosts. CIDR (Classless Inter-Domain Routing) replaced the old A/B/C class system with this explicit notation, letting routers summarize blocks of any size.
Second, when a host decides a destination is off-link, it sends the packet to a default gateway (the nearest router). The gateway reads the destination, checks its routing table, and picks the longest-matching prefix to determine the next hop. Longest-prefix match is the rule that makes internet routing scale without central coordination.
Third, NAT (Network Address Translation) lets hundreds of devices on private address space (the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 blocks that are not globally routable) share one public address by rewriting source addresses and port numbers at a boundary. NAT is why your phone and your laptop can both browse the web from the same home connection. It is also why "what is my IP" returns a different answer on each side of the translator. DHCP (Dynamic Host Configuration Protocol) hands out these private addresses and configuration automatically, but its leases expire, so the address a device has right now may not be the one it has tomorrow.
Here is the surprise: the world ran out of free IPv4 addresses in 2011. IANA handed out its last /8 blocks, and regional registries followed. The internet still works because NAT and private addressing stretched the existing space, and because address blocks now move through RIR transfer markets. But IPv4 is a finite resource being rationed, not a renewable one. IPv6, with its 128-bit addresses, is the actual long-term answer.
Read the intro for the full technical map. The slides give you the decisions side by side. The cheatsheet is the reference you keep open while debugging. The field notes carry the operational traps that the standards do not warn you about.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.rfc-editor.org/rfc/rfc791.html
Supports
- IPv4's best-effort, connectionless datagram service and protocol layering
- 32-bit addressing and the IPv4 header fields
- Routing, time to live, header checksum, and fragmentation behavior
- Absence of delivery guarantees, acknowledgments, retransmission, sequencing, and flow control
- https://www.rfc-editor.org/rfc/rfc4632.html
Supports
- CIDR prefix-length notation and classless address blocks
- Address-block sizing from the 32-bit address width
- Route aggregation and longest-prefix forwarding
- https://www.rfc-editor.org/rfc/rfc1812.html
Supports
- Router forwarding requirements
- Longest-prefix matching and default-route behavior
- TTL processing during forwarding
- https://www.rfc-editor.org/rfc/rfc1122.html
Supports
- Host on-link and next-hop routing decisions
- Loopback behavior and ICMP host requirements
- IPv4 multihoming and address assignment to interfaces
- https://www.rfc-editor.org/rfc/rfc826.html
Supports
- Mapping protocol addresses to Ethernet addresses on a local network
- ARP's role in local next-hop delivery
- https://www.rfc-editor.org/rfc/rfc792.html
Supports
- ICMP error reports and control information
- Time Exceeded and Destination Unreachable messages
- https://www.rfc-editor.org/rfc/rfc1918.html
Supports
- The three private-use IPv4 blocks
- Reuse, routing scope, and renumbering considerations for private address space
- https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
Supports
- Current special-purpose IPv4 blocks and their defining RFCs
- Source, destination, forwarding, and global-reachability properties
- Loopback, link-local, shared, documentation, and limited-broadcast assignments
- https://www.rfc-editor.org/rfc/rfc5737.html
Supports
- TEST-NET-1, TEST-NET-2, and TEST-NET-3 documentation blocks
- Non-forwarding expectations for documentation addresses
- https://www.rfc-editor.org/rfc/rfc3022.html
Supports
- Basic NAT and NAPT mappings
- Translation state, checksums, and packet-field changes
- Outbound session direction and inbound mapping limitations
- https://www.rfc-editor.org/rfc/rfc1191.html
Supports
- Don't Fragment behavior with smaller next-hop MTUs
- ICMP feedback and sender packet-size adjustment
- https://www.rfc-editor.org/rfc/rfc8200.html
Supports
- IPv6 as the successor IP version
- 128-bit IPv6 source and destination addresses
- https://github.com/sindresorhus/awesome
Supports
- Discovery of the PCAPTools and Scapy networking lists
- https://github.com/caesar0301/awesome-pcaptools
Supports
- Discovery of Wireshark, Scapy, and Ostinato as packet-analysis or packet-crafting tools
- https://www.wireshark.org/docs/wsug_html_chunked/
Supports
- Live capture and capture-file workflows
- Packet details, packet bytes, display filters, and IPv4 statistics
- https://scapy.readthedocs.io/en/latest/usage.html
Supports
- Interactive packet construction, sending, capture, and protocol-layer manipulation
- https://ostinato.org/docs/
Supports
- Graphical packet crafting and traffic-stream generation for network labs
- https://en.wikipedia.org/wiki/Internet_Protocol
Supports
- Background on the Internet Protocol and its 1970s conception
- https://datatracker.ietf.org/doc/html/rfc760
Supports
- RFC 760, the earlier IP specification that RFC 791 supersedes
- https://datatracker.ietf.org/doc/html/rfc791
Supports
- RFC 791 defines IPv4's 32-bit addressing and connectionless datagram delivery
- https://en.wikipedia.org/wiki/ARPANET
Supports
- Documents the 1983 ARPANET flag-day switch to TCP/IP
- https://www.iana.org/help/ipv4-address-depletion
Supports
- IANA's account of IPv4 address depletion and RIR allocation
- https://datatracker.ietf.org/doc/html/rfc4632
Supports
- RFC 4632 describes CIDR prefix-length notation and route aggregation
- https://datatracker.ietf.org/doc/html/rfc1519
Supports
- RFC 1519 introduces CIDR as a replacement for classful A/B/C allocation
- https://datatracker.ietf.org/doc/html/rfc1918
Supports
- RFC 1918 reserves the private 10/8, 172.16/12, and 192.168/16 blocks
- https://datatracker.ietf.org/doc/html/rfc2131
Supports
- RFC 2131 standardizes DHCP for automated IPv4 address assignment
- https://datatracker.ietf.org/doc/html/rfc2460
Supports
- RFC 2460, the original IPv6 specification with 128-bit addresses
- https://datatracker.ietf.org/doc/html/rfc3022
Supports
- RFC 3022 defines traditional NAT and NAPT
- https://en.wikipedia.org/wiki/IPv4_address_exhaustion
Supports
- History of IPv4 address exhaustion and regional rundown
- https://www.apnic.net/get-ip/faqs/ipv4-exhaustion/
Supports
- APNIC's account of reaching its last /8 block in 2012
- https://datatracker.ietf.org/doc/html/rfc8200
Supports
- RFC 8200, the current IPv6 specification replacing RFC 2460
