How devices communicate across networks — nodes, links, packets, IP addressing, DNS, protocols, routers, bandwidth, latency, and cloud computing
Every time you send a message, load a web page, stream a video, play an online game, or ask a voice assistant a question, your device is communicating across a network. That communication does not happen by magic. It follows precise rules, travels through physical infrastructure, and depends on systems designed by computer scientists and engineers over several decades.
This chapter explains how computers communicate. You will learn what a network is, how information travels across networks in small packets, how devices are identified by IP addresses, how names are translated into addresses, and how the global internet connects billions of devices into a single infrastructure. You will also learn why networks sometimes fail, how engineers think about performance and reliability, and how cloud computing uses networked infrastructure to deliver services.
By the end of this chapter, you should understand how a message gets from one device to another on the other side of the world, why that process is more complicated than it looks, and why the internet works as well as it does given how many things could go wrong.
When you type a domain name into a browser and press Enter, what happens next? Before a single byte of the page arrives, your device must find the server's address, establish a connection, and negotiate the rules of communication — all in fractions of a second. This chapter explains every step of that process and the infrastructure that makes it possible.
A network is a collection of devices that can communicate with each other by sending and receiving data. Networks can be small — a home network might include a laptop, a phone, a tablet, a printer, and a smart television, all connected to a wireless router. Networks can also be enormous: the internet connects billions of devices across every country on earth.
What makes something a network is not size. It is the ability to send and receive information between devices.
Before networks existed, computers were isolated. Each machine processed its own data and stored its own files. Moving information between machines required physically copying files to removable storage — floppy disks, tapes, or later USB drives. Networks changed everything. Once computers could communicate, they could share data without physical transfer, use shared resources like printers and storage, run software that depends on other machines, communicate in real time across large distances, pool computing power for larger problems, and deliver services to many users simultaneously. Today almost every useful computing system depends on a network. The isolated computer is the exception, not the rule.
Nodes — Devices that communicate: computers, phones, servers, printers, cameras, sensors. These are the endpoints.
Links — Physical or wireless connections between devices: cables, fiber optic lines, radio waves, satellite signals.
Protocols — Rules governing communication: message format, addressing, sequencing, and error handling. Without shared protocols, connected devices have no common language.
A node is any device connected to a network. Nodes include end-user devices (laptops, phones, tablets, desktop computers), servers (machines that respond to requests), routers (devices that direct traffic between networks), switches (devices that connect multiple nodes within a local network), and any number of printers, cameras, smart speakers, and IoT devices. Not all nodes serve the same role — some send requests, some respond, some move data from place to place.
| Link Type | Medium | Characteristics |
|---|---|---|
| Ethernet cable | Copper wire | Reliable, common in offices and homes; limited by cable length |
| Fiber optic cable | Light pulses | Very fast, long distances, expensive to install; backbone of the internet |
| Wi-Fi | Radio waves | Convenient, wireless; subject to interference; limited range |
| Cellular (4G/5G) | Radio waves | Mobile coverage; variable speed and latency; requires tower infrastructure |
| Satellite | Radio waves | Global reach including remote areas; introduces significant latency |
Networks do not send information as a single continuous stream. Instead, they break information into small, manageable pieces called packets. A packet is a small bundle of data that travels independently across a network. To understand why, imagine sending a long letter across a city. You could hire one courier to carry the whole letter, but that courier might be delayed. Alternatively, you could cut the letter into ten pieces, put each piece in a separate envelope, and send each envelope by a different route. The pieces might arrive at different times, but the recipient can reassemble them in order. Packets work the same way.
┌──────────────────────────────────────────────────────┐ │ PACKET │ ├──────────────────────────┬───────────────────────────┤ │ HEADER │ PAYLOAD │ ├──────────────┬───────────┤ │ │ Source IP │ Dest IP │ Actual data │ │ Sequence # │ Protocol │ being sent │ │ Error check │ Length │ (fragment of file, │ │ │ │ message, video, etc.) │ └──────────────┴───────────┴───────────────────────────┘
The header contains control information: the source address, the destination address, a sequence number so packets can be reassembled in the correct order, error-checking information, and protocol details. The payload contains the actual data being transmitted. The header is overhead — it carries no content, but without it, the packet could not be routed or reassembled.
Breaking data into independently routed packets is called packet switching. Its advantages: multiple conversations share the same links simultaneously; if one route is congested, packets can take alternate paths; the network can recover from node failures; and links are used efficiently. Packet switching is one of the fundamental design decisions that makes the internet scalable and resilient.
| Type | Scale | Example | Ownership |
|---|---|---|---|
| PAN — Personal Area Network | Within meters | Phone to wireless headphones via Bluetooth | Individual |
| LAN — Local Area Network | Building or campus | Home Wi-Fi network; school computer lab | Household or organization |
| MAN — Metropolitan Area Network | City or metro area | City government network; cable provider network | Telecom or municipality |
| WAN — Wide-Area Network | Countries or continents | Corporate multi-city network; the internet | Multiple organizations |
A LAN connects devices within a limited area. Because distances are short and infrastructure is controlled by a single organization, LANs are typically fast and reliable. Devices on a LAN can communicate directly with each other without touching the broader internet — a printer and a laptop on the same home LAN communicate locally. A WAN connects devices across large geographic distances using leased telecommunications lines, fiber optic cables, satellite links, or combinations. The internet is the largest WAN in the world, but organizations also build private WANs to connect offices in multiple cities.
The internet is not a single network. It is a vast collection of networks operated by thousands of different organizations — all interconnected and able to exchange data using shared protocols. At the smallest scale you have home networks and office LANs. These connect to networks operated by Internet Service Providers (ISPs). ISPs connect to larger regional and national networks, which connect to tier-1 networks — the largest backbone providers that span continents.
Your device
↓
Your home router (LAN)
↓
Your ISP's regional network
↓
A larger ISP or national backbone network
↓
International fiber optic cables (undersea)
↓
Foreign backbone networks
↓
Foreign ISPs
↓
Destination server
Each independently managed network is called an autonomous system (AS). There are tens of thousands of them. They connect to each other through peering agreements — arrangements to exchange traffic, either freely or for payment.
The internet's design assumes that individual components will fail. Routers malfunction. Cables break. Data centers go offline. Because there are many possible paths between any two points, packets can be rerouted when a path becomes unavailable. No single point of failure brings down the entire network. This resilience was a deliberate design goal.
Every device on a network needs an identifier so that packets can be addressed to it. On the internet, this identifier is called an IP address — a numerical label assigned to each device that serves two purposes: identifying the device and indicating its location within the network structure.
IPv4 uses 32-bit addresses, typically written as four numbers separated by dots, where each number is between 0 and 255. Because 232 equals approximately 4.3 billion, IPv4 allows about 4.3 billion unique addresses. When the internet was designed in the 1970s and 1980s, that seemed more than sufficient. As the internet grew far beyond initial expectations, the available pool of IPv4 addresses was exhausted.
192.168.1.1 ← common home router address
10.0.0.1 ← private network address
172.217.10.46 ← example public address
IPv6 uses 128-bit addresses, written as eight groups of four hexadecimal digits separated by colons. IPv6 allows approximately 3.4 × 1038 unique addresses — enough for every device on earth to have many unique addresses for the foreseeable future. The internet is gradually transitioning from IPv4 to IPv6, but both systems are currently in widespread use simultaneously.
2001:0db8:85a3:0000:0000:8a2e:0370:7334| Type | Description | Example Use |
|---|---|---|
| Public address | Globally unique; routable on the internet | A web server's address; your router's external address |
| Private address | Reserved for internal LANs; not routable on the public internet | 192.168.x.x, 10.x.x.x — devices inside your home network |
| Dynamic address | Assigned automatically via DHCP; may change each session | Your phone or laptop on Wi-Fi |
| Static address | Manually configured; remains constant | Web servers, network printers, infrastructure |
Your home router has one public IP address assigned by your ISP. All devices in your home share that single address. NAT allows the router to track which internal device each connection belongs to and route incoming packets correctly. This is why your phone, laptop, and smart TV can all access the internet through a single public address.
IP addresses are effective for machines, but they are difficult for people to remember. Nobody types 172.217.10.46 into a browser to visit a website. Instead, people type names like www.example.com. The system that translates human-readable names into IP addresses is called the Domain Name System (DNS).
Consider the name mail.university.edu. Reading from right to left: edu is the top-level domain (TLD) indicating an educational institution; university is the second-level domain identifying the specific organization; mail is a subdomain indicating a specific service or server within the organization.
| TLD | Original Purpose |
|---|---|
.com | Commercial organizations (now used broadly) |
.org | Nonprofits and organizations |
.edu | Educational institutions |
.gov | Government entities |
.net | Originally network infrastructure |
.uk, .de, .jp, .ca | Country-code TLDs |
When you type a domain name into your browser, your computer must find the IP address corresponding to that name before it can connect. This process involves several servers working together.
Your Browser
|
| "What is the IP for mail.university.edu?"
↓
Recursive Resolver (your ISP or DNS service)
|
| Cache miss — must find the answer.
↓
Root Nameserver
|
| "I don't know, but ask the .edu nameservers."
↓
.edu Nameserver
|
| "I don't know, but ask university.edu's nameservers."
↓
university.edu Authoritative Nameserver
|
| "The IP address is 203.0.113.42."
↓
Recursive Resolver ← Caches the result
|
| Returns 203.0.113.42 to your browser.
↓
Your Browser ← Connects to 203.0.113.42
If you have visited the same site recently, your device checks its local cache first. A cached answer skips the entire lookup chain. This caching is why DNS is fast in practice — most common domains are already cached somewhere in the lookup chain. DNS is designed with redundancy at every level because if DNS fails, domain names cannot be resolved and most internet services become unreachable even if the network itself is functioning.
DNS does not route packets. It only translates names to addresses. Once your browser has the IP address, DNS's job is done. Routing — the actual forwarding of packets — is handled by routers using IP, not by DNS.
192.168.1.256 b) 10.0.0.1 c) www.example.com d) 2001:0db8::1support.software.com, identify the top-level domain, second-level domain, and subdomain.A protocol is a set of rules that governs how devices communicate. Protocols define the format of messages, the sequence of exchanges, error handling, and addressing. Without protocols, two devices could be physically connected but unable to communicate meaningfully — like two people trying to have a conversation in languages neither understands.
Networks do not use a single protocol for everything. Communication is organized in layers, with each layer responsible for a different aspect of communication. Each layer provides services to the layer above it and uses services from the layer below it. This is called a protocol stack.
┌─────────────────────────────────────────────────────┐ │ Application Layer │ │ HTTP, HTTPS, DNS, SMTP, FTP, SSH │ ├─────────────────────────────────────────────────────┤ │ Transport Layer │ │ TCP · UDP │ ├─────────────────────────────────────────────────────┤ │ Internet Layer │ │ IP (Internet Protocol) │ ├─────────────────────────────────────────────────────┤ │ Network Access Layer │ │ Ethernet · Wi-Fi · Fiber │ └─────────────────────────────────────────────────────┘
| Layer | Responsibility | Example Protocols |
|---|---|---|
| Network Access | Physically transmitting bits across a link — electrical signals, radio waves, or light pulses | Ethernet, Wi-Fi (802.11) |
| Internet | Addressing and routing packets across networks; adding source and destination IP addresses to headers | IP (IPv4, IPv6) |
| Transport | Reliable or fast delivery between two endpoints; segmentation and reassembly | TCP, UDP |
| Application | Specific tasks for applications: web pages, email, file transfer, remote access | HTTP, HTTPS, SMTP, DNS, FTP, SSH |
The two main transport-layer protocols serve different needs. TCP (Transmission Control Protocol) provides reliable, ordered delivery. It requires acknowledgment of received packets and retransmits any that are lost. If a packet does not arrive, TCP will keep trying until it does. This reliability has a cost: retransmissions take time. UDP (User Datagram Protocol) is faster but makes no delivery guarantees. Lost packets are not retransmitted. For applications where speed matters more than perfection — live video, gaming, DNS lookups — UDP is often the better choice.
| Feature | TCP | UDP |
|---|---|---|
| Reliable delivery | Yes — retransmits lost packets | No — lost packets are discarded |
| Ordered delivery | Yes — packets reassembled in sequence | No guarantee |
| Speed | Slower due to overhead | Faster, lower overhead |
| Best for | File transfer, web pages, email, banking | Live video, gaming, voice calls, DNS |
| Protocol | Full Name | Purpose |
|---|---|---|
HTTP | Hypertext Transfer Protocol | Requesting and delivering web pages |
HTTPS | HTTP Secure | HTTP with encryption; shown as a padlock in browsers |
SMTP | Simple Mail Transfer Protocol | Sending email between servers |
FTP | File Transfer Protocol | Transferring files between computers |
SSH | Secure Shell | Securely connecting to and controlling remote computers |
DNS | Domain Name System | Translating domain names to IP addresses |
Layering keeps each protocol focused on a specific job. When engineers develop a faster networking technology at the physical layer, the layers above do not need to change. HTTP works the same whether the physical connection is copper cable, fiber, or Wi-Fi. Layering also allows different protocols to be swapped in at each layer without affecting the others.
A router is a network device that forwards packets from one network to another. Routers are the traffic directors of the internet. When a packet arrives, the router examines the destination IP address in the header, consults its routing table — a list of known networks and the best path to reach each — and forwards the packet to the next router on the path. This process repeats at each router until the packet reaches its destination.
A tool called traceroute (or tracert on Windows) shows the path packets take and the time each hop takes. Here is an example of what its output might look like:
traceroute to example.com (93.184.216.34) 1 192.168.1.1 2 ms (home router) 2 10.0.0.1 8 ms (ISP gateway) 3 72.14.204.97 12 ms (ISP backbone) 4 108.170.246.34 15 ms (larger backbone) 5 209.85.255.93 85 ms (transatlantic link) 6 93.184.216.34 88 ms (destination)
Each line is one hop. The time shown is the round-trip time — how long a test packet took to travel to that router and back. The large jump between hop 4 (15 ms) and hop 5 (85 ms) indicates a long-distance link, likely a transatlantic fiber optic cable.
Routers do not have hardcoded knowledge of the entire internet. They use routing protocols to discover network topology and build their routing tables dynamically. When a network path becomes unavailable, routing protocols propagate that information to neighboring routers, which update their tables and route around the failure. This dynamic routing is why the internet can survive localized failures without going down entirely.
traceroute result, you see the round-trip time jump from 20 ms to 160 ms between two consecutive hops. What likely happened?Bandwidth is the maximum rate at which data can be transferred across a network link. Think of it as the number of lanes on a highway — more lanes mean more cars can travel simultaneously. Higher bandwidth means more data can flow in a given time.
| Unit | Abbreviation | Value | Example |
|---|---|---|---|
| Kilobits per second | Kbps | 1,000 bps | Old dial-up modem |
| Megabits per second | Mbps | 1,000,000 bps | Typical home internet |
| Gigabits per second | Gbps | 1,000,000,000 bps | Data center connections |
Latency is the time it takes for a packet to travel from its source to its destination, typically measured in milliseconds (ms). Latency is determined primarily by physical distance and the speed of signals through the medium. Light through fiber optic cables travels at about 200,000 km/s — fast, but not instantaneous. A packet traveling from New York to London and back (roughly 12,000 km round trip) requires at least about 60 ms just for the signal to travel, plus processing time at each router.
Think of latency as the time to drive from one city to another, regardless of how many lanes the highway has. You can have a very wide highway (high bandwidth) but still take time to travel the distance (latency).
| Application | Limited by… | Why |
|---|---|---|
| Streaming video | Bandwidth | Requires a continuous high data rate |
| Large file downloads | Bandwidth | Total data transferred is large |
| Online gaming | Latency | Player actions must reach the server quickly |
| Video calling | Both | Requires both speed and responsiveness |
| Loading a web page | Latency first, then bandwidth | First request must complete before content can begin loading |
Throughput is the actual rate of data transfer achieved in practice — typically lower than the theoretical maximum bandwidth. Bandwidth is a capacity; throughput is the performance actually delivered. Throughput is reduced by congestion, packet loss, protocol overhead, and processing delays at routers.
Congestion occurs when more packets are sent across a link than it can carry. When a router's buffer fills, it discards incoming packets. Those discards cause TCP retransmissions, which can worsen congestion. TCP includes congestion control mechanisms that detect packet loss and automatically slow down transmission — which is why internet performance degrades gracefully rather than collapsing entirely when many users are active simultaneously.
UDP does not retransmit lost packets. For live audio and video, a small amount of packet loss is acceptable because retransmitting old data is pointless when newer data has already arrived. The tradeoff: UDP is faster but imperfect; TCP is reliable but slower under adverse conditions.
Cloud computing is a model in which computational resources — processing, storage, software — are delivered as services over the internet rather than running on local hardware. The "cloud" refers to infrastructure operated by a third party and accessed remotely. Instead of buying and maintaining servers, organizations pay for computing capacity provided by companies like Amazon Web Services, Google Cloud, and Microsoft Azure.
| Service Model | What the Provider Offers | What the Customer Controls | Example |
|---|---|---|---|
| IaaS — Infrastructure as a Service | Virtual machines, storage, networking | Operating system, software, applications | Renting a virtual server |
| PaaS — Platform as a Service | Managed environment: databases, web servers, tools | Applications and data | A managed database service |
| SaaS — Software as a Service | A complete application delivered over the internet | Data and settings only | Email, document editors, video conferencing |
Cloud computing became widely adopted for several reasons. Scalability: cloud providers operate enormous data centers; a startup can handle millions of users without building infrastructure. Economics: organizations pay only for what they use, often per hour or per request. Reliability: major providers operate multiple data centers in different geographic regions; if one fails, services continue from another. Accessibility: cloud services are available from any device with an internet connection.
Delivering content quickly to users around the world is a challenge because of latency. A server in North America takes measurably longer to respond to a user in Southeast Asia. A Content Delivery Network (CDN) addresses this by distributing copies of content to servers located in many geographic regions. When a user requests content, they are served from a nearby CDN server rather than the original source, reducing latency significantly. Major websites, streaming services, and software downloads use CDNs to ensure fast delivery regardless of where the user is.
Edge computing moves computation closer to the devices that generate and consume data, rather than sending all data to distant data centers. Smart cameras, industrial sensors, autonomous vehicles, and IoT devices generate enormous amounts of data. Sending all of it to a distant cloud introduces latency and requires significant bandwidth. Edge computing runs processing on local devices or nearby small servers, sending only processed results or important events to central systems. It is increasingly important where real-time response is critical — factory automation, traffic management, medical monitoring.
https://example.com into a browser. The browser checks its DNS cache — no entry. A DNS lookup begins.93.184.216.34 is returned.93.184.216.34 on port 443 (HTTPS). A handshake exchanges several packets to establish the connection and negotiate encryption.shop.company.com. Your diagram should show your browser, the recursive resolver, the root nameserver, the .com TLD nameserver, and the authoritative nameserver.Layer | Name | Responsibility | Example Protocols
4 | | |
3 | | |
2 | | |
1 | | |
https://example.com. The web server is located in Virginia. Walk through every step from Enter to page display..com TLD nameservers..com TLD nameserver → learns to ask example.com's authoritative nameserver.93.184.216.34. Resolver caches it; returns to browser.93.184.216.34 on port 443 — a multi-packet handshake to establish connection and negotiate HTTPS encryption.50 MB = 50 × 8 = 400 Megabits400 Mbits ÷ 100 Mbps = 4 seconds + ~60 ms setup overhead ≈ 4.06 seconds400 Mbits ÷ 10 Mbps = 40 seconds + ~15 ms setup overhead ≈ 40 secondsAnswer each in one to three sentences.
FF80:0000:0000:0000:0202:B3FF:FE1E:8329 b) 192.168.1.256 c) 10.0.0.1 d) www.example.comtraceroute to a server and sees 18 hops with 120 ms final latency. Another student sees 6 hops with 40 ms. What might explain the difference?Each item contains an error. Identify it and write the correct statement.
What is wrong? What is the correct description of how large files travel across a network?
Identify two errors in this statement and correct both.
What is wrong with both the direction of translation and the stated purpose?
Explain why this is incorrect and which protocol is typically preferred for live streaming. Why?
What does bandwidth actually measure? What term describes the travel time?
The roles of router and switch are reversed. Write the correct description of each.
What was the actual reason IPv6 was developed?
These questions draw on earlier chapters alongside Chapter 19.
traceroute output, the round-trip time jumps from 18 ms at hop 6 to 130 ms at hop 7. What does this likely indicate?Chapter 19 explained the infrastructure that carries packets between devices — the internet. Chapter 20 introduces the World Wide Web: one of the most important services built on top of that infrastructure. The internet and the web are not the same thing, even though they are often confused. The internet is the infrastructure — cables, routers, protocols, addressing. The web is one set of services built on that infrastructure, using HTTP to request and deliver linked documents and applications. Chapter 20 will explain how browsers communicate with servers, what URLs contain, how HTML, CSS, and JavaScript work together to build what you see on screen, what distinguishes web pages from web applications, how search engines work, and what web accessibility means. Every concept from Chapter 19 — IP addresses, DNS, TCP, HTTPS, packets — applies directly to Chapter 20.