Skip to content

IPv4 Overview

We live in a digital era, profoundly shaped by computers. When these computing devices connect, they form networks, enabling us to share data and information globally at incredible speeds.

In computing, a network is a collection of interconnected devices (hosts) that can exchange data and share resources. This interconnection is achieved via a shared transmission medium, which can be wired or wireless. Networks vary in scale, from a Local Area Network (LAN) within an office, to a Metropolitan Area Network (MAN) across a city, or a Wide Area Network (WAN) spanning geographical regions, the largest example being the Internet.

A simple network might involve two PCs linked by a cable, while complex networks like the Internet connect billions of devices worldwide. Modern networks comprise various components to facilitate reliable data exchange:

  • Hosts: End devices on the network that originate or consume data. Examples include personal computers, smartphones, servers (web, email, database), and IoT devices.
  • Media: The physical or wireless path for data transmission. Wired media includes Ethernet cables (copper, e.g., Cat 6) and fiber optic cables. Wireless media commonly involves Wi-Fi (using IEEE 802.11 standards like Wi-Fi 6) and cellular data (e.g., 4G LTE, 5G).
  • Hubs: Legacy Layer-1 (Physical Layer) devices that repeat incoming signals to all connected ports. Hubs create large collision domains and are inefficient, making them obsolete in modern networks, largely replaced by switches.
  • Switches: Layer-2 (Data Link Layer) devices that intelligently forward data frames only to the destination port based on MAC addresses. Switches enhance network performance by segmenting collision domains. Layer-3 switches also offer routing capabilities.
  • Routers: Layer-3 (Network Layer) devices that connect different networks and direct data packets based on IP addresses. Routers determine the optimal path for data to travel across networks and are fundamental to internet operation.
  • Gateways: Devices or software that connect networks using different protocols or addressing schemes. A common example is a ‘default gateway’ (typically a router) that connects a LAN to the internet. NAT gateways translate private to public IP addresses.
  • Firewalls: Security systems (hardware or software) that monitor and control network traffic based on defined rules. They protect internal networks from unauthorized access and threats. Types include packet-filtering, stateful inspection, and Next-Generation Firewalls (NGFWs) with advanced capabilities.

All network components ultimately work together to enable seamless communication and resource sharing between hosts.

For hosts to communicate, they need unique identifiers. On a local network segment (like a LAN), devices use Media Access Control (MAC) addresses for direct communication. A MAC address is a 48-bit hardware identifier burned into the Network Interface Card (NIC).

In early networks using hubs, all devices on a segment shared the same collision domain, meaning any data transmitted was received by all devices, potentially leading to data collisions. Modern networks predominantly use switches, which create separate collision domains per port, significantly reducing collisions and improving efficiency. While MAC addresses are essential for local communication (within the same Layer 2 network), they are not used for routing data across different networks (e.g., over the internet).

To communicate with hosts on remote networks, a logical addressing scheme is required. This is provided by the Internet Protocol (IP) address. IPv4 is a widely deployed version of this addressing scheme, assigning a unique 32-bit logical address to each device on an IP network.

Understanding IPv4 is crucial for numerous practical tasks, such as:

  • Configuring home and office routers (e.g., setting up DHCP, port forwarding).
  • Assigning static IP addresses to servers or network devices.
  • Troubleshooting network connectivity issues using tools like ping, traceroute, and ipconfig/ifconfig.
  • Understanding network security concepts like IP-based access control lists (ACLs) on firewalls.
  • Working with cloud networking and virtual private networks (VPNs).

While IPv4 has been foundational to the internet’s growth, its 32-bit address space (approximately 4.3 billion addresses) is limited and has been largely exhausted. To mitigate this, Network Address Translation (NAT) is widely used, allowing multiple devices on a private network to share a single public IPv4 address. The long-term solution is IPv6, which offers a vastly larger 128-bit address space and other enhancements. Although IPv6 adoption is steadily increasing, IPv4 remains pervasively used globally, making its study essential for anyone in IT or networking.