Highlights

Contents

Part I
01

Network models and physical signals

A network carries application bytes through devices that make different decisions. Confusing those decisions makes a broken cable, a full queue and a failed service look like the same fault. We will define the packet path, compare layer models, wrap the request in headers and compute the cost of its physical transmission.

CHAPTER ATLAS / FOLLOW THE READING PATHCHAPTER ATLAS / FOLLOW THE READING PATH1Network models andphysical signals2Data link and Ethernetswitching3VLANs and IP addressing4IP forwarding and routing5Transport and TCP6Flow and congestioncontrol7DNS and HTTP8QUIC, TLS and websessions9Proxies, tunnels andfirewalls10Socket programming andI/O11CDN, P2P and cloudnetworking12The complete browserrequest

#Section 1Networking foundations and packet switching

A computer network connects endpoints and forwarding devices through shared protocols. Finch’s college browser owns the request’s meaning; switches and routers carry its bytes.

LAN, MAN, WAN, Internet and intranet

A LAN connects a local site, a MAN spans a metropolitan area, and a WAN connects more distant sites. Distance alone does not determine the forwarding protocol. An intranet serves an administrative community, while the Internet interconnects independently administered networks. Finch reaches its gateway locally before crossing the wider routed path.

A LOCAL NETWORK IS ONE NEIGHBOURHOOD ON A MUCH LONGER PATHA LOCAL NETWORK IS ONE NEIGHBOURHOOD ON A MUCH LONGER PATHLAN / local siteFinchgatewayWAN / Internetremote serverseveral links and routers
Figure 2.1Local and wide-area paths differ from administrative scope. Orange marks the LAN, where Finch reaches its first forwarding neighbour.

Topology, client-server and peer-to-peer

A topology records available connections. A star shares a central switch, a bus shares a medium, a ring connects neighbouring stations, and a mesh offers several paths. Losing the star’s central switch disconnects clients even if the remote service is healthy. Physical redundancy helps only when forwarding can use the surviving path.

THE LINK GEOMETRY REVEALS EACH SHARED FAILURE POINTTHE LINK GEOMETRY REVEALS EACH SHARED FAILURE POINTstarbusringmesh
Figure 2.2Illustrative physical topologies. The star shares a central forwarding device, the bus shares a medium, and ring and mesh arrangements offer different alternate paths.

Client-server assigns a service provider and requester; peer-to-peer lets participants serve as well as request. Those roles do not determine the transport. Circuit switching reserves capacity before transmission, while packet switching shares links among bursts. Datagram forwarding chooses a next hop independently for each packet; a virtual circuit retains a logical path established beforehand.

Store-and-forward, delay and delivered rate

A store-and-forward device receives the bounded packet before sending it onward. Each hop can add processing, queueing, serialization and propagation delay. For the illustrative link,

D=0.05+0.5+0.12+5=5.67 ms.D=0.05+0.5+0.12+5=5.67\text{ ms}.

Read D as total one-link delay in milliseconds, with each term naming a separate elapsed cost. Bandwidth is the link's configured bit rate; throughput is the delivered rate. RTT measures a round trip, jitter measures delay variation, and packet loss records missing delivery. The declared 40-millisecond RTT belongs to the wider path and is not twice this one-link fixture.

ONE 1500-BYTE PACKET, ONE LINK: 5.67 MS, AND DISTANCE IS MOST OF ITONE 1500-BYTE PACKET, ONE LINK: 5.67 MS, AND DISTANCE IS MOST OF ITqueue1000 km of fibre at 200000 km/sprocessingpropagation 5 mstransmission 0.12 mspropagation 5 msqueue 0.5 msprocessing 0.05 ms12000 bits ÷ 100 Mb/s1000000 m ÷ 200000000 m/swaiting behind othersheader lookuptotal 5.67 ms
Figure 2.3Illustrative one-link delay has four contributions. Orange marks processing; queueing can vary with demand, and propagation depends on distance.

#Section 2OSI and TCP/IP models

A layer model assigns work to boundaries. A failed admissions-page request could begin with radio, routing, certificate, or application failure; each needs different evidence.

The OSI layers

The OSI model names application, presentation, session, transport, network, data link and physical layers. Application describes service messages. Presentation concerns representation and transformations, while session concerns the organization of an exchange. Transport connects communicating application endpoints, network forwards addressed packets, data link carries frames between neighbours, and physical transmits signals. These categories are a reasoning tool, not a requirement that every implementation have a separate process for each category.

The practical Internet stack

The TCP/IP model groups application work above transport, Internet and link functions. Teaching diagrams often separate physical signalling from link framing. HTTP and DNS sit in the application group, TCP and UDP supply transport, IP supplies Internet addressing, and Ethernet supplies local framing. QUIC implements transport functions over UDP rather than making UDP itself an ordered stream.

THE SAME EXCHANGE IS SEEN AT DIFFERENT LAYERSTHE SAME EXCHANGE IS SEEN AT DIFFERENT LAYERSapplicationHTTP names the resourcetransportTCP names the processnetworkIP selects the next hoplinkEthernet reaches a neighbourphysicalsignals carry bits
Figure 2.4Each practical layer answers a different question. Orange marks application meaning, which lower-layer delivery alone cannot validate.

For Finch, HTTP names the resource, TCP connects ports, IP names the remote host, and Ethernet addresses the gateway interface. ARP helps connect the IP next-hop decision to a local link address and does not fit neatly into a strict single-layer label. A router can contain transport or application features while still performing IP forwarding. Classify the action under discussion rather than the product box.

The cost of layering is extra headers, state and work at boundaries. Its benefit is replacing one part without rewriting every other part. The same HTTP handler can run over different local media; a functioning Ethernet link still does not prove the server accepted the request. In an interview, start with the failure observation, identify the boundary it tests, and explain which boundaries remain untested.

#Section 3Encapsulation and decapsulation

Encapsulation adds a lower layer's control wrapper; decapsulation interprets and removes it. A header can be control information at one layer and payload at another.

The application passes bytes to TCP. TCP supplies ports, sequence information and its checksum; IP supplies addresses and forwarding fields; Ethernet supplies local MAC addresses and a frame check. Signals carry the resulting bits. At the server, processing climbs those boundaries in reverse, checking each layer before delivering the permitted bytes upward.

HEADERS WRAP THE SAME APPLICATION BYTESHEADERS WRAP THE SAME APPLICATION BYTESHTTPHTTPsame payloadapplication dataTCPTCPHTTPsame payloadports + sequenceIPIPTCPHTTPsame payloadaddresses + TTLEthernetEthernetIPTCPHTTPsame payloadMAC + checksum
Figure 2.5HTTP bytes become a TCP segment, an IP packet and a local frame. Orange marks the Ethernet wrapper replaced at each routed hop.

With the declared no-option headers, the IP packet budget is 1,500 bytes. Subtracting 20 IP-header bytes and 20 TCP-header bytes gives

P=1500−20−20=1460 bytes.P=1500-20-20=1460\text{ bytes}.

Read P as the TCP payload capacity of this particular packet layout. TCP can split one application write across several segments or combine several writes; this capacity is not an HTTP message boundary. Options, encryption and other wrappers change the available application space.

EACH LAYER WRAPS THE ONE ABOVE: THE IP PACKET CARRIES TCP, WHICH CARRIES HTTPEACH LAYER WRAPS THE ONE ABOVE: THE IP PACKET CARRIES TCP, WHICH CARRIES HTTPEthernetdst MAC, src MAC, typeIPsrc 192.168.10.70, dst 203.0.113.20TCPports 51000 → 443, seqHTTPGET /users/123application bytesFCSrouters open only as far as the IP envelope
Figure 2.6A header names the current layer's work while its payload contains the next layer's bytes. Orange marks IP, whose payload includes the TCP header and application data.

At the gateway, the incoming Ethernet wrapper ends. The router examines the IP destination and builds a different outgoing frame for its next neighbour. Ordinarily the end-to-end IP addresses remain, while TTL changes; Finch's NAT gateway also rewrites the source address and port under its translation rule. Link addresses therefore answer a different question from host addresses and transport ports.

The edge case is a path whose next link cannot carry the packet. A switch does not automatically invent smaller Ethernet frames that preserve every higher-layer boundary. Packet sizing and path MTU discovery need the relevant IP and transport rules, which return in Part IV. Confusing frame size with IP payload capacity hides both the overhead and the failure boundary.

#Section 4Physical signals, media and duplex

The physical layer represents bits using timed electrical, optical, or radio symbols. A cable carries signals, not software packet objects.

Bit rate, baud rate and channel limits

Bit rate counts bits per second, while baud rate counts symbols per second. A symbol alphabet can represent several bits in one symbol, but the receiver must still distinguish the states despite attenuation, distortion and noise. Attenuation reduces strength, distortion changes shape, and noise adds unwanted variation. A carrier can remain detectable while its error rate prevents useful communication.

CONTINUOUS WAVES AND CHOSEN SYMBOL LEVELSCONTINUOUS WAVES AND CHOSEN SYMBOL LEVELSanalog amplitudeillustrative binary symbols10110010
Figure 2.7Illustrative waveforms, not measured signals. The upper trace varies continuously; the lower trace encodes chosen binary symbol levels. Symbol rate and bit rate remain distinct quantities.

The illustrative channel has bandwidth B of 1,000,000 hertz and linear signal-to-noise ratio S of 15. Shannon's ideal bound gives

C=Blog⁡2(1+S)=1000000log⁡2(16)=4000000 bits/s.C=B\log_2(1+S)=1000000\log_2(16)=4000000\text{ bits/s}.

Read C as ideal channel capacity, not an Ethernet performance measurement. Nyquist's noiseless model with four distinguishable levels M gives 2Blog⁡2(M)=40000002B\log_2(M)=4000000 bits per second under those different assumptions. Neither formula replaces measured error behaviour or a protocol's framing costs.

Twisted pair, coaxial cable, fibre and wireless

Twisted pair and coaxial cable carry electrical signals with different interference and installation properties. Fibre carries light and changes the distance and equipment trade-off. Wireless shares radio spectrum and must contend with interference and competing stations. The media choice changes a physical cost without changing what the HTTP method means.

ELECTRICITY, LIGHT AND RADIO CARRY THE SAME LOGICAL BITSELECTRICITY, LIGHT AND RADIO CARRY THE SAME LOGICAL BITScopperfiberradioshared spectrum
Figure 2.8Illustrative media cutaways. Copper carries electrical signals, fiber carries light, and radio uses shared spectrum. The drawings compare mechanisms rather than measured attenuation or range.

Simplex sends in one direction, half duplex takes turns, and full duplex permits simultaneous directions. Modern switched Ethernet commonly uses full duplex, so its host link does not follow the older shared-medium collision procedure. For Finch's declared packet, serialization is 1500×8/100000000=0.000121500\times8/100000000=0.00012 seconds, while propagation is 1000000/200000000=0.0051000000/200000000=0.005 seconds. Packet length changes the first cost; distance changes the second.