§1.1What Is the Internet?

Cross-layer Kurose & Ross pp. 2–8 · ~13 min read

  • host
  • packet
  • packet switch
  • router
  • link-layer switch
  • link rate
  • route
  • internet service provider
  • protocol
  • socket interface
  • distributed application

Where you are

  • Application layer you are here
  • Transport layer you are here
  • Network layer you are here
  • Link layer you are here
  • Physical layer you are here

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) 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.

  1. The nuts-and-bolts answer lists the parts: the devices, the wires, the switches, the rules they follow.
  2. 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 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 , also called an end system . 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 asks for things: your laptop, your phone. A server stores and sends things: web pages, video, e-mail.

Most servers today live inside a data centre , 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.

Hosts are joined by communication links . 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 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 .

1. The application has one messageindex.html — 100 kB2. The host cuts it up and adds a header to each piecehdrdata 1hdrdata 2hdrdata 3…and so on3. Each packet travels on its own and is put back together at the far endThe three packets may take different paths and may arrive out of order.

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.

A packet switch 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 is normally used in the middle of the network.
  • A link-layer switch 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 , also called its path. Cisco predicted that global IP (Internet Protocol) 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) . 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) protocol, and follows the same naming and address rules. Section 1.3.3 builds this structure up properly.

Figure 1.1 — some pieces of the Internet
10 hops: Lin’s laptop → Home AP → Home router → R1 → R2 → R3 → R5 → R6 → R-cp → Switch → www.example.edu
Mobile networkHome network — BangkokEnterprise networkLocal or regional ISPNational or global ISPDatacenter networkContent provider network — FrankfurtCell towerPhoneTabletR-mobLin’s laptopPhoneHome APHome routerSwitchPCPCAPServerR1R2R3R4R5R6SwitchServersR-cpSwitchwww.example.edu

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 that control how information is sent and received. The two most important are TCP (Transmission Control Protocol) and IP (Internet Protocol) . 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) .

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) , and its standards documents are called RFC (Request For Comments) s. There are currently nearly 9 000 of them. They define TCP (Transmission Control Protocol) , IP (Internet Protocol) , HTTP (HyperText Transfer Protocol) for the Web and SMTP (Simple Mail Transfer Protocol) for e-mail. Other bodies standardise other parts: the IEEE (Institute of Electrical and Electronics Engineers) 802 committee, for example, specifies Ethernet and WiFi (IEEE 802.11 wireless LAN) .

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 , 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 : 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.

A human protocol: asking a stranger for the time
message 4 of 4
YouTimeA strangerTimeHiHiGot the time?2:00

Click any arrow to see what that message says and why it is sent.

Read this diagram as text
  1. 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.
  2. 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.
  3. You sends Got the time? to A stranger. Only now does the real request travel. The greeting made it safe to ask.
  4. 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:

  1. Specific messages are sent, in a specific order.
  2. Specific actions are taken when a message is received.
  3. 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.

A computer network protocol: fetching a web page
message 4 of 4
0 ms90 ms180 ms270 ms360 msLin’s laptop192.168.1.24TimeWeb server198.51.100.7TimeTCP connection request90 msTCP connection reply90 msGET /index.html90 ms<file>90 ms

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
  1. 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.
  2. 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.
  3. 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.
  4. 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:

StepHumanNetwork
1“Hi”TCP connection request
2“Hi” backTCP 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:

  1. What do the messages look like? (the format)
  2. In what order are they sent? (the order)
  3. 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 answered
  1. 1.Which of these is a host?

  2. 2.A packet switch has just received a complete packet. What does it do next?

  3. 3.What is the difference between a router and a link-layer switch?

  4. 4.A protocol defines two things. Which two?

  5. 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. 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.