Computer Networking: How Data Moves From One Device to Another

Featured in:

The Network Stack: How Data Travels Across the Internet

The journey that data takes from a web browser to a server and back involves a stack of protocols, each responsible for a different layer of the communication process. The conceptual model that most clearly organises this complexity: the OSI model (Open Systems Interconnection) describes seven layers from the physical transmission of electrical or optical signals at layer 1 through the application-level protocols at layer 7. In practice, the TCP/IP model’s four layers (link, internet, transport, and application) more accurately reflect how most modern networking is implemented, with each layer providing services to the layer above and depending on services from the layer below.

The network layer that most clearly illustrates the layered model in action: the internet layer, where IP addresses and routing decisions determine how packets travel across the global internet. The IP address is a logical address assigned to a network interface that enables any device to send packets to any other device anywhere in the world by following the routing tables that routers maintain. The router at each hop in the path from source to destination reads the destination IP address in the packet header, consults its routing table to determine which interface and next-hop router will bring the packet closer to its destination, and forwards the packet accordingly. The routing process repeats at each hop until the packet arrives at its destination.

IP Addresses: IPv4, IPv6, and the Address Exhaustion Problem

The IP address system that has powered the internet since its early development: IPv4 (Internet Protocol version 4), which uses 32-bit addresses expressed as four decimal numbers separated by dots (such as 192.168.1.1), providing a theoretical address space of approximately 4.3 billion unique addresses. The 4.3 billion address space that seemed ample when the internet was small became exhausted as global internet adoption expanded — the IANA (Internet Assigned Numbers Authority) exhausted its pool of unallocated IPv4 address blocks in 2011, and the regional registries have been operating with exhausted pools since then.

The solutions that have allowed the internet to function despite IPv4 address exhaustion: Network Address Translation (NAT), which allows many devices to share a single public IP address by having the router translate between the internal private IP addresses (from the reserved ranges 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and the single public IP address that appears to the rest of the internet. The typical home network has one public IP address assigned by the ISP and dozens of internal devices with private IP addresses that NAT makes reachable through the shared public address. IPv6 (Internet Protocol version 6), with its 128-bit addresses providing 340 undecillion unique addresses, is the permanent solution to address exhaustion — but adoption has been slower than initially projected, and most internet traffic still uses IPv4 with NAT.

TCP vs UDP: Reliability vs Speed

The transport layer protocol selection that most directly affects the behaviour of network applications: the choice between TCP (Transmission Control Protocol) and UDP (User Datagram Protocol). TCP provides reliable, ordered, error-checked delivery of data streams — it guarantees that every byte sent will be received in the correct order, retransmitting packets that are lost or corrupted until they are successfully delivered. UDP provides unreliable, unordered, connectionless delivery of individual packets — it sends packets as fast as possible without any guarantee of delivery, ordering, or error correction, leaving these concerns to the application if they matter.

The application protocol selection rationale that most clearly explains when TCP and UDP are each appropriate: TCP’s reliability guarantees are valuable for applications where every byte must arrive correctly and where the additional latency of retransmission is acceptable (web browsing, email, file transfer, database queries). UDP’s speed and low overhead are valuable for applications where timeliness is more important than completeness and where the application can tolerate or compensate for lost packets (real-time voice and video calls, online gaming, DNS lookups, live streaming). The video call that uses UDP can continue smoothly with an occasional dropped frame that produces a momentary visual artifact; the same video call using TCP would pause and buffer every time a packet required retransmission, making the conversation unusable.

DNS: The Internet’s Phone Book

The Domain Name System (DNS) is the distributed database that translates human-readable domain names (www.example.com) into the IP addresses that routers need to forward packets to their destinations. The DNS resolution process that occurs before any website request can proceed: the browser checks its local DNS cache for a recent resolution of the requested domain; if not found, the operating system checks its cache; if not found, the query is forwarded to the DNS resolver specified in the network configuration (typically the ISP’s resolver or a public resolver like Google’s 8.8.8.8 or Cloudflare’s 1.1.1.1); the resolver performs the recursive resolution by querying the root name servers, the top-level domain name servers for the .com or .org domain, and finally the authoritative name server for the specific domain.

The DNS configuration change that most reliably improves internet performance and privacy for most users: switching from the ISP’s default DNS resolver to a faster and more privacy-respecting public resolver. The ISP’s DNS resolver may log all queries (providing the ISP with a complete history of every domain the user’s network resolves), may respond slowly due to geographic distance, and may return different results for some queries compared to public resolvers. Cloudflare’s 1.1.1.1 (which commits to not logging query data for marketing purposes and is among the fastest globally) and Google’s 8.8.8.8 (which is highly reliable and globally distributed) are the most commonly used alternatives to ISP default DNS resolvers, typically providing faster resolution and stronger privacy commitments.

Network Troubleshooting: The Tools That Reveal What Is Happening

The network diagnostic tools that most efficiently identify the source of connectivity problems: ping (sends ICMP echo request packets to a specified host and measures whether they arrive and how long the round trip takes — the first tool to reach for when testing whether a network path is functional and measuring its latency), traceroute (or tracert on Windows, which shows each router hop on the path to a destination and the latency to each hop — revealing where in the network path delays or packet loss are occurring), and nslookup or dig (which query DNS servers and show the resolution result — revealing whether DNS is resolving correctly and which server is providing the resolution).

The network troubleshooting methodology that most efficiently identifies the source of a problem: the layered approach that tests each network layer in sequence from the most fundamental to the most application-specific. The troubleshooting that begins by verifying the physical connection (is the cable plugged in, is the Wi-Fi indicator showing connection), confirms IP connectivity (can the device ping its default gateway), verifies DNS resolution (can the device resolve domain names to IP addresses), tests internet connectivity (can the device reach known good IP addresses), and finally tests specific application protocols (can the device reach the specific server and port the application requires) identifies the specific layer where the problem exists more efficiently than the approach that immediately tries to diagnose the problem at the application level without confirming that the underlying layers are functional.

Latest articles

Related articles

See more articles

Signs Your Computer Needs an Upgrade

Computers rarely fail all at once. They slow down gradually, and because the change happens over months,...

Desktop vs Laptop: Which One Should You Buy in...

The desktop-versus-laptop debate never really goes away, it just changes shape as the technology improves. In 2026,...