The Internet is billions of devices joined by links and packet switches, and it is also a service that carries data between the programs running on them.
Words you will meet
- Host — any device that runs your programs: a laptop, a phone, a web server.
- Packet — a small block of data with an address on it, sent through the network on its own.
- Packet switch — a device that takes a packet in on one link and sends it out on another.
- Router — a packet switch used in the middle of the Internet.
- Link-layer switch — a packet switch used inside a local network.
- Link rate — how many bits a link can carry each second.
- ISP — Internet Service Provider: the organisation that connects you to everyone else.
- Protocol — the rules for which messages to send, in what order, and what to do with them.
Why this matters
Everything else in this book is a detail inside one of these words. When chapter 3 explains how TCP (Transmission Control Protocol) Transmission Control Protocol The Internet transport protocol that delivers data reliably and in order, with flow control and congestion control. introduced in ch. 1 recovers a lost packet, you need to already know what a packet is and why it can be lost. When chapter 5 explains how routers agree on paths, you need to already know what a router does with a packet.
This section is also where the book’s own vocabulary is set. From here on, “host”, “packet” and “protocol” mean exactly one thing each.
One question, two answers
The book opens by asking what is the Internet? and answers it twice, on purpose. Neither answer is more correct. They describe the same thing from two distances.
- The nuts-and-bolts answer lists the parts: the devices, the wires, the switches, the rules they follow.
- The services answer ignores the parts and asks what the Internet does for the programs that use it.
An engineer building a router needs the first answer. A programmer writing a chat application needs the second. You will need both, so we take them in turn.
The nuts-and-bolts answer: what the Internet is made of
Hosts, at the edge
The Internet internet Simple A worldwide network that connects billions of devices so they can exchange data. Precise A computer network that interconnects billions of computing devices throughout the world, running the TCP/IP protocols. It can equally be described as an infrastructure that provides services to distributed applications. introduced in ch. 1 — open in glossary connects billions of computing devices. Not long ago these were mostly desktop computers and servers. Today most users connect with smartphones and tablets: close to half the world’s population are active mobile Internet users, and that share is expected to reach 75 % by 2025. Devices that are not computers at all — televisions, game consoles, thermostats, home security systems, watches, cars, traffic control systems — are being connected too. One estimate counted about 18 billion connected devices in 2017, rising to 28.5 billion by 2022.
In networking language, every one of these devices is a host host Simple Any device connected to the Internet that runs your programs: a laptop, a phone, a server. Precise A device connected to the Internet that runs (hosts) application programs. Also called an end system, because it sits at the edge of the network; the book uses host = end system. introduced in ch. 1 — open in glossary , also called an end system end system Simple The book's other name for a host: a device at the edge of the network that runs applications. Precise A device connected at the edge of the Internet that runs application programs. The book states explicitly that host = end system and uses the two words interchangeably. introduced in ch. 1 — open in glossary . They are called end systems because they sit at the edge of the Internet. They are called hosts because they host — that is, run — application programs.
Hosts split into two informal groups. A client client Simple The host that asks for something, usually your laptop or phone. Precise A host that requests and receives service from a server. Informally, clients tend to be desktops, laptops and smartphones. introduced in ch. 1 — open in glossary asks for things: your laptop, your phone. A server server Simple The host that stores content and answers requests, usually inside a data centre. Precise A more powerful host that stores and distributes Web pages, streams video, relays e-mail and so on. Most servers reside in large data centres. introduced in ch. 1 — open in glossary stores and sends things: web pages, video, e-mail.
Most servers today live inside a data centre data center Simple A building full of thousands of servers, joined by their own internal network. Precise A facility housing tens to hundreds of thousands of hosts, called blades and stacked 20 to 40 per rack, interconnected by a data centre network and connected to the Internet. introduced in ch. 1 — open in glossary , a building holding tens to hundreds of thousands of hosts. Google alone had 19 data centres on four continents as of 2020, holding several million servers between them.
Links, and how fast they are
Hosts are joined by communication links communication link Simple The physical connection that carries bits between two devices. Precise A physical medium — coaxial cable, copper wire, optical fiber or radio spectrum — over which bits are sent between two network devices. Its transmission rate is measured in bits/second. introduced in ch. 1 — open in glossary . A link can be coaxial cable, copper wire, optical fibre or radio. Different links carry data at very different speeds. That speed is the link rate link rate Simple How many bits a link can send each second. Precise The transmission rate R of a link, in bits/second: the rate at which bits are pushed into the link. Packets are always transmitted over a link at the full transmission rate of that link. introduced in ch. 1 — open in glossary and it is measured in bits per second.
In plain words
The book calls this the transmission rate. This site always calls it the link rate, and always writes it with a unit: 54 Mbps, 100 Mbps, 1 Gbps. One word for one idea, every time.
Packets
A host almost never sends a large piece of data as one lump. Instead it cuts the data into pieces and puts a header on the front of each piece. The header carries the address of the destination and other control information. Each resulting block is a packet packet Simple A small block of data with an address on it, sent through the network on its own. Precise A package of information formed when a sending host segments its data and adds header bytes to each segment. Packets travel through communication links and packet switches to the destination host, where they are reassembled. introduced in ch. 1 — open in glossary .
Everyday picture
A factory has to move a warehouse of cargo a thousand kilometres. It does not build one enormous vehicle. It divides the cargo among a fleet of trucks. Each truck drives through the network of roads and junctions on its own, and the cargo is grouped again at the far end.
Packets are the trucks. Links are the roads. Packet switches are the junctions. Hosts are the buildings.
Where the picture breaks: a truck that crashes is still on the road, and somebody notices. A lost packet simply disappears — nothing in the network core reports it, and the sender only discovers the loss because an expected reply never comes. Chapter 3 is largely about living with that.
Packet switches: routers and link-layer switches
A packet switch packet switch Simple A device that takes a packet arriving on one link and sends it out on another link. Precise A device that takes a packet arriving on one of its incoming communication links and forwards that packet on one of its outgoing communication links. The two most prominent types in today's Internet are routers and link-layer switches. introduced in ch. 1 — open in glossary takes a packet arriving on one of its incoming links and forwards it on one of its outgoing links. That is its entire job.
Packet switches come in many shapes, but two dominate today’s Internet:
- A router router Simple A packet switch in the network core that uses IP addresses to choose the next link. Precise A packet switch that implements layers 1 through 3 of the protocol stack and forwards datagrams using a forwarding table indexed by the destination IP address. Routers are typically used in the network core. introduced in ch. 1 — open in glossary is normally used in the middle of the network.
- A link-layer switch link-layer switch Simple A packet switch used inside a local network; it reads link addresses, not IP addresses. Precise A packet switch that implements only layers 1 and 2 and forwards frames using link-layer addresses such as Ethernet addresses. Link-layer switches do not recognise IP addresses and are typically used in access networks. introduced in ch. 1 — open in glossary is normally used in access networks — the local network in an office or a home.
Both forward packets toward the destination. How each one decides where to send a packet is different, and that difference needs a chapter each: routers in chapter 4, link-layer switches in chapter 6.
The sequence of links and packet switches a packet travels through is its route route Simple The series of links and switches a packet travels through to reach its destination. Precise The sequence of communication links and packet switches traversed by a packet from the sending host to the receiving host. Also called a path. introduced in ch. 1 — open in glossary , also called its path. Cisco predicted that global IP (Internet Protocol) Internet Protocol The network-layer protocol that defines the datagram format and addressing every Internet device must use. introduced in ch. 1 traffic would reach nearly five zettabytes — that is 10²¹ bytes — per year by 2022.
ISPs, and the shape they make
Hosts reach the Internet through an ISP (Internet Service Provider) Internet Service Provider Connects hosts, and other ISPs, to the rest of the Internet. introduced in ch. 1 internet service provider Simple A company or organisation that connects you to the rest of the Internet. Precise A network of packet switches and communication links that provides network access to hosts and to other ISPs. ISPs form a loose hierarchy of access ISPs, regional ISPs and tier-1 ISPs. introduced in ch. 1 — open in glossary . Your ISP might be a cable or telephone company, your university, your employer, the café you are sitting in, or your mobile operator. Each ISP is itself a network of packet switches and links.
The Internet exists to connect hosts to each other, so the ISPs must also be connected to each other. Lower-tier ISPs connect through national and international upper-tier ISPs, and those upper-tier ISPs connect directly among themselves. Every ISP network is managed independently, runs the IP (Internet Protocol) Internet Protocol The network-layer protocol that defines the datagram format and addressing every Internet device must use. introduced in ch. 1 protocol, and follows the same naming and address rules. Section 1.3.3 builds this structure up properly.
Drag any device to rearrange the picture. Hover a link to see its rate, delay and length.
Drag any device. Press “Send the packet” to follow one packet from Lin’s laptop in Bangkok to the web server in Frankfurt. Notice how many separate networks it crosses.
Read this diagram as text
- Phone — wireless link — Cell tower (60 Mbps)
- Tablet — wireless link — Cell tower (60 Mbps)
- Cell tower — wired link — R-mob (1 Gbps)
- Lin’s laptop — wireless link — Home AP (54 Mbps · 0.01 km)
- Phone — wireless link — Home AP (54 Mbps)
- Home AP — wired link — Home router (1 Gbps)
- Home router — wired link — R1 (100 Mbps · 2 ms · 8 km)
- PC — wired link — Switch (1 Gbps)
- PC — wired link — Switch (1 Gbps)
- AP — wired link — Switch (1 Gbps)
- Server — wired link — Switch (10 Gbps)
- Switch — wired link — R1 (1 Gbps)
- R-mob — wired link — R1 (1 Gbps)
- R1 — wired link — R2 (10 Gbps · 1 ms)
- R2 — wired link — R3 (100 Gbps · 34 ms · 6,800 km)
- R3 — wired link — R4 (100 Gbps · 4 ms)
- R3 — wired link — R5 (100 Gbps · 3 ms)
- R4 — wired link — R6 (100 Gbps · 5 ms)
- R5 — wired link — R6 (100 Gbps · 4 ms)
- R5 — wired link — Switch (100 Gbps)
- Switch — wired link — Servers (100 Gbps)
- R6 — wired link — R-cp (100 Gbps · 2 ms)
- R-cp — wired link — Switch (10 Gbps)
- Switch — wired link — www.example.edu (1 Gbps)
The picture above is the book’s Figure 1.1, redrawn. Look at what it contains: a mobile network, a home network, an enterprise network, a regional ISP, a national ISP, two data centre networks and a content provider’s own network. None of these is “the Internet”. The Internet is all of them, joined together — which is why the book calls it a network of networks.
Protocols and standards
Hosts and packet switches run protocols protocol Simple An agreed set of rules for what messages to send, in what order, and what to do with them. Precise A protocol defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event. introduced in ch. 1 — open in glossary that control how information is sent and received. The two most important are TCP (Transmission Control Protocol) Transmission Control Protocol The Internet transport protocol that delivers data reliably and in order, with flow control and congestion control. introduced in ch. 1 and IP (Internet Protocol) Internet Protocol The network-layer protocol that defines the datagram format and addressing every Internet device must use. introduced in ch. 1 . IP specifies the format of the packets that travel between routers and hosts. Together the Internet’s main protocols are called TCP/IP (Transmission Control Protocol / Internet Protocol) Transmission Control Protocol / Internet Protocol The collective name for the Internet's principal protocols. It became the ARPAnet standard on 1 January 1983. introduced in ch. 1 .
Because everyone must agree on what each protocol does, protocols are written down as standards. Internet standards are developed by the IETF (Internet Engineering Task Force) Internet Engineering Task Force The body that develops Internet standards. introduced in ch. 1 , and its standards documents are called RFC (Request For Comments) Request For Comments The name of an IETF standards document. There are currently nearly 9000 of them. introduced in ch. 1 s. There are currently nearly 9 000 of them. They define TCP (Transmission Control Protocol) Transmission Control Protocol The Internet transport protocol that delivers data reliably and in order, with flow control and congestion control. introduced in ch. 1 , IP (Internet Protocol) Internet Protocol The network-layer protocol that defines the datagram format and addressing every Internet device must use. introduced in ch. 1 , HTTP (HyperText Transfer Protocol) HyperText Transfer Protocol The application-layer protocol that requests and transfers Web documents. introduced in ch. 1 for the Web and SMTP (Simple Mail Transfer Protocol) Simple Mail Transfer Protocol The application-layer protocol that transfers e-mail messages. introduced in ch. 1 for e-mail. Other bodies standardise other parts: the IEEE (Institute of Electrical and Electronics Engineers) Institute of Electrical and Electronics Engineers The body whose 802 committee standardises Ethernet and WiFi. introduced in ch. 1 802 committee, for example, specifies Ethernet and WiFi (IEEE 802.11 wireless LAN) IEEE 802.11 wireless LAN Wireless LAN access; a user must be within a few tens of metres of the access point. WiFi is a trade name, not an abbreviation. introduced in ch. 1 .
The services answer: what the Internet does for programs
Now forget the hardware. Describe the Internet by what it offers.
The Internet is an infrastructure that provides services to applications: e-mail, web browsing, messaging, maps with live traffic, music and video streaming, social media, video conferencing, multi-player games, location-based recommendations. These are distributed applications distributed application Simple A program that runs on several hosts at once and exchanges data between them. Precise An application involving multiple end systems that exchange data with each other. Internet applications run on hosts; they do not run in the packet switches of the network core. introduced in ch. 1 — open in glossary , because they involve several hosts exchanging data.
The claim the whole book rests on
Internet applications run on hosts. They do not run in the packet switches. A packet switch moves data between hosts, and takes no interest in which application produced it. Keep this in mind every time a later chapter puts new machinery inside the network.
So you have an idea for a distributed application. You write programs that run on hosts. Those programs need to send data to each other. How does one program tell the Internet to deliver data to another program on another host?
The answer is the socket interface socket interface Simple The set of rules a program follows to ask the Internet to deliver its data. Precise The interface that end systems provide, specifying how a program running on one end system asks the Internet infrastructure to deliver data to a specific destination program running on another end system. introduced in ch. 1 — open in glossary : a set of rules the sending program must follow so the Internet can deliver its data to the right destination program. Chapter 2 uses it to write real code.
Everyday picture
Alice wants to send a letter to Bob. She cannot write it and drop it out of the window. The postal service has rules. She must put the letter in an envelope, write Bob’s full name and address on it, and seal it. Then she puts a stamp in the corner and drops the envelope in an official postbox. Those rules are the postal service’s interface.
The socket interface is the same idea: a fixed set of rules a program follows so that the Internet will carry its data. And just as the postal service offers several services — ordinary post, express delivery, delivery confirmation — the Internet offers an application a choice of services. Chapter 2 explains which.
Where the picture breaks: the postal service will tell Alice if the letter cannot be delivered. The basic Internet service will not. Anything that looks like delivery confirmation has to be built by the two programs themselves, on top.
What is a protocol?
First, a human protocol
You already run protocols all day. Consider asking a stranger for the time.
Click any arrow to see what that message says and why it is sent.
Read this diagram as text
- You sends Hi to A stranger. A greeting. It carries no useful information at all. Its only job is to discover whether the other person is willing to talk.
- A stranger sends Hi to You. The reply means “yes, go ahead”. A different reply — “Do not bother me” — would mean the opposite, and you would stop here.
- You sends Got the time? to A stranger. Only now does the real request travel. The greeting made it safe to ask.
- A stranger sends 2:00 to You. The answer. The exchange is complete.
Lifelines, left to right: You (person), A stranger (person).
Good manners say you greet the person first. The usual reply to “Hi” is another “Hi”, and you read that reply as permission to ask your real question. A different reply — “Do not bother me”, or “I do not speak English” — tells you the conversation cannot happen, and you do not ask. Sometimes there is no reply at all, and you give up and ask somebody else.
Three things are doing the work here:
- Specific messages are sent, in a specific order.
- Specific actions are taken when a message is received.
- An event that is not a message — no reply within some time — also causes an action.
If two people run different protocols, nothing useful happens. The same is true in networking: it takes two or more entities running the same protocol to get anything done.
Now the same shape, in a network
Here is what happens when you type a web address into a browser.
Click any arrow to see what that message says and why it is sent.
The same four steps, in the same order. Click an arrow to read what that message actually says.
Read this diagram as text
- Lin’s laptop sends TCP connection request to Web server (90 ms). The greeting. The laptop asks the server to open a connection. No web page is requested yet.
- Web server sends TCP connection reply to Lin’s laptop (90 ms). The server agrees. This is the “Hi” coming back. Now the laptop knows it is safe to ask for the page.
- Lin’s laptop sends GET /index.html to Web server (90 ms). The real request, at last: the name of the page the browser wants.
- Web server sends <file> to Lin’s laptop (90 ms). The server sends the page back. 100 kB of HTML, split into many packets on the way.
Lifelines, left to right: Lin’s laptop (host), Web server (server).
Compare the two ladders. They have the same four steps in the same order:
| Step | Human | Network |
|---|---|---|
| 1 | “Hi” | TCP connection request |
| 2 | “Hi” back | TCP connection reply |
| 3 | “Got the time?” | GET /index.html |
| 4 | “2:00” | the file |
The difference is only that the entities exchanging messages are hardware and software components of a device, rather than people. Every activity in the Internet that involves two or more communicating remote entities is governed by a protocol. Hardware protocols control the flow of bits along a wire. Congestion control protocols in hosts decide how fast to send. Protocols in routers decide a packet’s path.
The definition
The book’s definition
A protocol defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event.
In plain words
A protocol answers three questions:
- What do the messages look like? (the format)
- In what order are they sent? (the order)
- What does each side do when it sends one, receives one, or waits too long and receives nothing? (the actions)
Miss any one of the three and you do not have a working protocol.
Mastering computer networking is largely a matter of understanding the what, the why and the how of networking protocols. Most of this book is about them.
Check yourself
Check yourself — §1.1
0 of 6 answered1.Which of these is a host?
2.A packet switch has just received a complete packet. What does it do next?
3.What is the difference between a router and a link-layer switch?
4.A protocol defines two things. Which two?
5.predictIn the two ladder diagrams, the first message in each exchange gets no useful data across. Why does each side send it anyway?
Step through both ladders one message at a time and compare the first arrow in each.
6.predictIn the map of the Internet, send a packet from Lin's laptop to the web server. Which claim about that journey is true?
Press "Send the packet" and watch which devices light up.
What to remember
- A host is any device at the edge of the network that runs applications. Hosts are joined by links and packet switches.
- Data is cut into packets. Each packet carries a header with the destination address and travels on its own.
- A protocol fixes the format of messages, their order, and the actions taken when one is sent, received, or never arrives.