Old-School Networking / 2026 ・ No.01

Old-School Networking

Part 1: the big picture — from pressing Submit to reaching the server, seen through seven layers

Published

The Wireshark window. The list at the top shows 14 packets (2 ARP, 2 DNS, TCP, the HTTP POST /api/expenses and 201 Created and so on) with packet 8, the POST, selected. Bottom left, the lines Frame, Ethernet II, Internet Protocol Version 4, Transmission Control Protocol, Hypertext Transfer Protocol and JavaScript Object Notation are stacked; bottom right are the bytes in hexadecimal
One submission opened in Wireshark. Bottom left, you can see the layers stacked one on top of another (A capture recorded on 24 October 2026 on a practice network the author built in the cloud, opened in Wireshark 4.2.2. The bar across the top of the window was added for the illustration.)

After the front-end series comes networking. As a bridge before we move on to the back end, we will go through the networking basics every programmer should know, in twelve parts.
There is a single thread running through it: we follow one request sent by the Submit button of the expense-claim app, going one layer deeper each time.
Part 1 is the big picture. We map out the seven layers of the OSI reference model and the four layers of TCP/IP, then actually catch one submission and take it apart layer by layer.

1

Behind the Submit button

AraiI graduated from all fifteen front-end parts! Next up is the server side, right?

FuruiOne question first. The fetch('/api/expenses') you wrote in part 10. How did it get to the server?

AraiUm... I wrote fetch, and it got there.

FuruiFine while it works. On the day it doesn't, can you say where it stopped? The cable, the Wi-Fi, the name, the port, the server?

Arai...I'd ask an AI.

FuruiEven then, you decide where to look. So this time we follow that one request all the way.

In part 10 of the front-end series, the claim form learned to send a claim to the server with fetch and get a claim number back. From the page's side it is one line. Underneath that line, though, several jobs are running: looking up a name, finding the other machine, setting up a connection, and carrying the data in small pieces. In this series we look at them layer by layer.

The route map of all 12 parts (you are here: part 1)

1 Big picture 2 Physical 3 Data link 4 IP addresses 5 Routers 6 TCP 7 UDP, sockets 8 TLS 9 DNS 10 HTTP 11 Dev networks 12 Troubleshoot You are here Overview Layer 1 Layer 2 Layer 3 Layer 4 Layers 5-6 Layer 7 Practice
  • Get the big picture — the seven layers of the OSI reference model and the four TCP/IP layers that actually run. Which devices and protocols live on which layer
  • Go down, then up — from the physical layer (cables, radio) in part 2 to HTTP in part 10
  • Use it day to day — part 11 covers Docker and cloud networks, part 12 troubleshooting when things won't connect
  • Measure every time — record real packets on a practice network and explain with those numbers
2

What is a network?

In a sentence, a network is a way of connecting computers and delivering data between them. Roughly drawn, the road from Arai's PC to the server looks like this.

From the Submit button to the server (roughly)

Arai's PC browser Switch Wi-Fi AP Router Server Node.js Internet Submit /api/expenses the home or office network (LAN) the internet servers Each device hands the data on as small parcels (packets)

The network inside a home or office is a LAN (local area network). At the edge of the LAN sits a router; beyond it is the provider's (ISP's) network, then other networks, and so on. That network of networks is the internet. The server, too, lives on a LAN in a data centre.

The devices along the way don't push the data through in one go. They split it into small parcels called packets and hand them from one device to the next. Rather than reserving a dedicated line to the other end like a phone call, it works like the post: each parcel carries its own address and takes whatever road is free. Many conversations can share one line, so nothing goes to waste.

So that sender and receiver read the data the same way, there are agreements on its format and the steps to follow. These are called protocols. HTTP, TCP, IP and Ethernet are all names of protocols.

POINT

A network is made of lines that connect, steps that deliver, and agreements (protocols). Data is split into parcels (packets) and passed from device to device.

3

Thinking in layers

There is a lot to do before anything arrives, so networking splits the work into layers. Think about posting a letter.

The postal analogy: content, addressee, address and van are each someone else's job

Van Street address To: Accounts Letter {"title":…} Road = physical (cables, radio) Data link next device's address (MAC) Network final destination (IP address) Transport which program (port 3000) Application the content (HTTP and JSON)

What goes in the letter is the writer's business. “To: Accounts” on the envelope decides who gets it inside the building. The street address decides which building. The van only reads the address and takes the letter to the next post office; it never reads the letter. The road has no idea what the van is carrying.

Networks work the same way, with a job for each layer. This brings three benefits.

  • Swappable parts — switch from a cable to Wi-Fi and the way you write HTTP doesn't change. Replace a lower layer and the upper ones keep working
  • Think about your own layer only — nobody worries about cable voltages while writing fetch
  • Narrow down faults — if the name resolved but the connection fails, look below the naming layer (part 12)

AraiThat's like “HTML is the bones, CSS the clothes, JavaScript the muscles” from the front-end series. Split by job.

FuruiExactly. Split it, and you only fix the part that broke. An old-school craftsman never stuffs everything into one box.

4

The seven OSI layers

The best-known “ruler” for splitting the layers is the OSI reference model. The International Organization for Standardization (ISO) started on it in 1977 and published it in 1984 as ISO 7498. It divides communication into seven layers.

The seven OSI layers. The lower, the closer to the machine; the higher, the closer to the app

# Name In a few words Unit 7 Application apps' agreements (HTTP, DNS) data 6 Presentation encoding, encryption data 5 Session start and end of a talk data 4 Transport to which program (port) segment 3 Network to a far-away host (IP) packet 2 Data link to the next device (MAC) frame 1 Physical 0s and 1s as signals bit

When sending, data is handed from the upper layers down; when receiving, from the bottom up. Each layer has its own main devices and protocols. On one table it looks like this (each part goes into detail).

LayerMain devicesMain protocols and standardsThis series
7 Applicationservers and PCs (their apps), proxies, L7 load balancers, WAFsHTTP, DNS, SMTP, SSH, DHCPparts 9, 10
6 Presentation(no dedicated device)character encoding (UTF-8), compression, TLS encryptionpart 8
5 Session(no dedicated device)TLS sessions (older ones such as NetBIOS)part 8
4 Transportfirewalls, L4 load balancersTCP, UDP, QUICparts 6, 7
3 Networkrouters, L3 switchesIPv4, IPv6, ICMPparts 4, 5
2 Data linkswitches (L2 switches), Wi-Fi access points, NICsEthernet, Wi-Fi (IEEE 802.11), ARP, VLANspart 3
1 Physicalcables, optical fibre, connectors, repeaters, hubsstandards such as 1000BASE-T, radio standardspart 2

The name for the data changes with the layer too: a segment at layer 4, a packet at layer 3, a frame at layer 2 and bits at layer 1. In everyday talk people often call all of them packets, but when discussing layers it pays to keep them apart.

AraiI have to memorise all seven...?

FuruiTop down: “All People Seem To Need Data Processing”. Application, Presentation, Session, Transport, Network, Data link, Physical.

AraiSounds like something you'd say about me.

FuruiIt's about everyone. Even the people who say they don't need data.

5

The four TCP/IP layers

What actually runs the internet today, however, is not the OSI protocols but TCP/IP. Vint Cerf and Bob Kahn sketched it in a 1974 paper, and on 1 January 1983 the ARPANET of the day switched over to TCP/IP all at once. From the late 1980s into the early 1990s, opinion was split on whether OSI or TCP/IP would win (the “Protocol Wars”); TCP/IP is the one that spread.

The TCP/IP way of thinking was summed up in four layers in RFC 1122 (1989). Next to the OSI ruler it looks like this.

OSI is the ruler; TCP/IP is the real thing

OSI model (the ruler) TCP/IP (in use) Main protocols 7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Data link 1 Physical Application HTTP DNS TLS also does L5-6 work Transport TCP UDP Internet IP ICMP Link Ethernet Wi-Fi + cables, radio The numbers in “L2 switch” or “L7 load balancer” are OSI layers

There are two big differences. First, the work of OSI layers 5 and 6 is folded into the application layer in TCP/IP: TLS encryption and character encoding are jobs for the app and its libraries. Second, OSI layers 1 and 2 are merged into a single link layer.

Even so, the OSI numbers are part of everyday vocabulary. “L2 switch”, “L3 switch”, “L4 load balancer” and “routing at L7” all use OSI layer numbers. In this series too we will talk TCP/IP but count in OSI.

POINT

The OSI reference model is a ruler for naming layers. What runs is the four-layer TCP/IP. Layers 5 and 6 barely show up as separate layers; they live inside apps and TLS.

6

Catching one submission

With the map in hand, let's look at the real thing. On a Linux machine in the cloud I used network namespaces to build a small network of three machines (part 11 shows how).

RoleIP addressMAC addressJob
Arai's PC10.0.1.1002:00:00:00:01:10sends the claim
Router (PC side)10.0.1.102:00:00:00:01:01forwards; also answers names (DNS)
Router (server side)10.0.2.102:00:00:00:02:01forwards
Server10.0.2.2002:00:00:00:02:20receives /api/expenses in Node.js

The server is called api.keihi.example (.example is a name reserved for documentation). With tcpdump recording on both the PC side and the server side, I sent one claim. curl stands in for the browser, and the content is a small JSON rather than the full form from part 10.

# On Arai's PC (10.0.1.10), the same submission reproduced with curl
$ curl -X POST -H 'Content-Type: application/json' \
    --data-binary '{"title":"ニューヨーク出張","total":46851}' \
    http://api.keihi.example:3000/api/expenses
{"id":"EXP-2026-0012","status":"submitted"}
# A claim number came back (HTTP status 201 Created)

Claim number EXP-2026-0012 came back. During that time, 14 packets in all crossed Arai's PC.

# Everything recorded on Arai's PC for one submission (no., elapsed time, source, destination, protocol, bytes, info)
# 1. ARP: ask everyone for the router's (10.0.1.1) MAC address
 1   0.000ms  02:00:00:00:01:10 -> broadcast         ARP   42  Who has 10.0.1.1? Tell 10.0.1.10
 2   0.012ms  02:00:00:00:01:01 -> 02:00:00:00:01:10 ARP   42  10.0.1.1 is at 02:00:00:00:01:01
# 2. DNS: ask the router's DNS for the IP address of api.keihi.example
 3   0.014ms  10.0.1.10         -> 10.0.1.1          DNS   77  query A api.keihi.example
 4   0.350ms  10.0.1.1          -> 10.0.1.10         DNS   93  response A api.keihi.example A 10.0.2.20
# 3. TCP: connect to port 3000 on the server (three messages)
 5   0.680ms  10.0.1.10         -> 10.0.2.20         TCP   74  49914 -> 3000 [SYN] Seq=0
 6   0.808ms  10.0.2.20         -> 10.0.1.10         TCP   74  3000 -> 49914 [SYN, ACK] Seq=0 Ack=1
 7   0.818ms  10.0.1.10         -> 10.0.2.20         TCP   66  49914 -> 3000 [ACK] Seq=1 Ack=1
# 4. HTTP: send the claim, get a claim number back
 8   0.891ms  10.0.1.10         -> 10.0.2.20         HTTP 266  POST /api/expenses HTTP/1.1 + JSON
 9   0.898ms  10.0.2.20         -> 10.0.1.10         TCP   66  3000 -> 49914 [ACK] Seq=1 Ack=201
10   7.011ms  10.0.2.20         -> 10.0.1.10         HTTP 269  HTTP/1.1 201 Created + JSON
11   7.033ms  10.0.1.10         -> 10.0.2.20         TCP   66  49914 -> 3000 [ACK] Seq=201 Ack=204
# 5. TCP: close the connection
12   7.206ms  10.0.1.10         -> 10.0.2.20         TCP   66  49914 -> 3000 [FIN, ACK] Seq=201 Ack=204
13   8.472ms  10.0.2.20         -> 10.0.1.10         TCP   66  3000 -> 49914 [FIN, ACK] Seq=204 Ack=202
14   8.479ms  10.0.1.10         -> 10.0.2.20         TCP   66  49914 -> 3000 [ACK] Seq=202 Ack=205

The order of the 14 packets. The numbers on the left are the No. column above

Arai's PC Router Server Who has 10.0.1.1? 1 It's 02:00:00:00:01:01 2 api.keihi.example? 3 It's 10.0.2.20 4 SYN 5 SYN, ACK 6 ACK 7 POST /api/expenses 8 ACK 9 201 Created 10 ACK 11 FIN, ACK 12 FIN, ACK 13 ACK 14 ARP part 3 DNS part 9 Open part 6 HTTP part 10 Close part 6

Seven packets went back and forth before the claim (packet 8) was even sent. First the PC asked everyone for the router's MAC address (ARP), then looked up the server's IP address from its name (DNS), then opened a connection to the server (the three TCP messages), and only then came the POST itself. Once the claim number arrived, the connection was closed. Each of these is the star of a later part.

Measured (PC side)Value
Packets14 (ARP 2, DNS 2, TCP open 3, HTTP and acks 4, close 3)
Total bytes1,333 bytes
The actual content (claim JSON 50 + reply JSON 43)93 bytes (about 7%)
From the first ARP to the last ack8.479 ms (very fast, since the whole practice network is on one machine)

AraiThe content is 93 bytes, but the total is 1,333... What's the rest?

FuruiEnvelopes, addressees and delivery slips. In the next section we open one.

7

Envelopes in envelopes

Packet 8, the claim itself, was 266 bytes. Select the layers one at a time in Wireshark and the bytes each one is responsible for turn blue.

The bytes of the same packet shown four times, with only the selected layer's part highlighted in blue: 1. Ethernet II is the first 14 bytes, 2. IPv4 the next 20, 3. TCP the next 32, and 4. HTTP the 150 bytes of text after that
Select a layer and only the bytes it is responsible for turn blue. The outer layers' headers come first, in order. The 50 bytes after the HTTP are the JSON body (A capture recorded on 24 October 2026 on a practice network the author built in the cloud, opened in Wireshark 4.2.2. The bar across the top of the window was added for the illustration.)

From the start, the Ethernet, IP and TCP headers come one after another, followed by the HTTP text and the JSON body. Written out layer by layer, it looks like this.

# 1. Ethernet II (14 bytes)
#   destination MAC 02:00:00:00:01:01 (the router), source MAC,
#   type 08 00 (IPv4 inside)
02 00 00 00 01 01 02 00 00 00 01 10 08 00
# 2. IPv4 (20 bytes)
#   byte 9 (40) = TTL 64, byte 10 (06) = TCP inside,
#   0a 00 01 0a = from 10.0.1.10, 0a 00 02 14 = to 10.0.2.20
45 00 00 fc 1b f8 40 00 40 06
06 e7 0a 00 01 0a 0a 00 02 14
# 3. TCP (32 bytes)
#   c2 fa = source port 49914, 0b b8 = destination port 3000,
#   then sequence numbers, flags and so on
c2 fa 0b b8 83 5b 4e 23 ab f5 ef c6 80 18 00 3f
18 0c 00 00 01 01 08 0a b7 e2 b8 5b 9f a1 af c2
# 4. HTTP (150 bytes)
#   from here on it is text. Lines end in 0d 0a (\r\n); a blank line ends the headers
POST /api/expenses HTTP/1.1
Host: api.keihi.example:3000
User-Agent: curl/8.5.0
Accept: */*
Content-Type: application/json
Content-Length: 50

# 5. JSON (50 bytes)
#   the claim itself. The Japanese is UTF-8, three bytes per character
{"title":"ニューヨーク出張","total":46851}

The 266 bytes. Each outer layer carries everything inside it as its content

14 Ethernet 20 IP 32 TCP 150 HTTP 50 JSON app data: 200 bytes TCP segment: 232 bytes IP packet: 252 bytes Ethernet frame: 266 bytes

On the sending side, each layer from the top down adds its own header in front and passes the result down. HTTP made 200 bytes; TCP added a 32-byte header for 232, IP added 20 for 252, and Ethernet added 14 for 266. This is encapsulation. The receiving side does the reverse: from the bottom up, each layer reads and strips its header and passes the rest up.

Every layer reads only its own header. IP doesn't read the TCP header, and TCP doesn't read the HTTP text. That is what makes the layers swappable.

POINT

Encapsulation means envelopes inside envelopes. A lower layer carries the upper layer's data whole as its content and only adds its own header in front. This claim's 50 bytes of content travelled with 216 bytes of headers.

The 266 bytes Wireshark shows don't include what gets added before and after on the cable itself (an 8-byte signal at the start and 4 bytes for checking damage at the end). We'll see those in parts 2 and 3.

8

Past the router

I recorded the same claim packet in two places: before the router (on Arai's PC) and after it (at the server). Here they are side by side.

The same submission packet captured in two places, on Arai's PC and at the server, side by side. The Ethernet destination and source MAC addresses, the IP Time to Live (64 and 63) and the Header Checksum (0x06e7 and 0x07e7) are boxed in red; the source and destination IP addresses (10.0.1.10 and 10.0.2.20) are boxed in blue
The same packet before and after the router. Both MAC addresses are swapped out and the TTL drops by one; the IP addresses stay the same (A capture recorded on 24 October 2026 on a practice network the author built in the cloud, opened in Wireshark 4.2.2. The bar across the top of the window was added for the illustration.)
FieldPC sideServer side
Destination MAC02:00:00:00:01:0102:00:00:00:02:20
Source MAC02:00:00:00:01:1002:00:00:00:02:01
TTL (hops left)6463
IP checksum0x06e70x07e7
Source IP → destination IP10.0.1.10 → 10.0.2.20same
Ports, HTTP, JSON, total length49914 → 3000, 266 bytessame

Both MAC addresses were swapped out. On the PC side it was “PC to router”; on the server side, “router to server”. That is because a MAC address is the address of the next device. The IP addresses, on the other hand, never change: they are the final destination. In postal terms, the letter changes vans at every post office but the address on the envelope is never rewritten.

The TTL is a number that drops by one at every router. A packet whose TTL reaches zero is thrown away, so a lost packet can't circle forever (traceroute in part 5 uses exactly this). Because the TTL changed, the IP header's check value (the checksum) was recalculated too.

How far up each device looks

1 Physical 2 Data link 3 Network 4 Transport 5 Session 6 Presentation 7 Application Arai's PC 1 Physical 2 Data link Switch 1 Physical 2 Data link 3 Network Router 1 Physical 2 Data link 3 Network 4 Transport 5 Session 6 Presentation 7 Application Server

Devices open the envelopes to different depths. A switch looks at layer 2, the MAC address, to choose which port to send the frame out of. A router looks up to layer 3, the IP address, to decide where to hand it next, then puts on a new layer 2 and sends it off. Only the two ends, the PC and the server, read TCP and HTTP (some devices, such as firewalls and load balancers, deliberately peek higher).

AraiI thought routers read everything inside.

FuruiOnly as far as the address. That's why JSON and video travel at the same speed. The price is that protecting the content is the ends' job. That's TLS in part 8.

9

The toolkit

Throughout the series we will check things with tools like these. All of them work on an ordinary PC.

To find outMacWindowsLinuxPart
Your own IP and MAC addressifconfigipconfig /allip addr3, 4
Whether the other end is reachablepingpingping5
The route in betweentraceroutetracerttraceroute5
Ports in uselsof -inetstat -anoss -tan6, 7
A name's IP addressdignslookupdig9
An HTTP exchangecurl -vcurl.exe -vcurl -v10
The packets themselvesWireshark (to view), tcpdump (to record)every part

Wireshark is free and runs on Windows, Mac and Linux (the latest release at the time of writing is 4.6.9 from 23 September 2026; the screenshots here are Ubuntu's 4.2.2). Open this part's capture, select the layers one by one, and you should see what the photo in §7 shows.

NOTE

Only capture packets on networks you manage yourself. On a company or school network you may see other people's traffic, so always get the administrator's permission first.

§ — On one page, and next time

  1. A network splits data into packets and passes them from device to device. The agreements on how to read them are protocols.
  2. The work is split into layers. Swap a lower layer and the upper ones carry on; faults are easier to pin down.
  3. The OSI reference model is a seven-layer ruler (All People Seem To Need Data Processing). What runs is the four-layer TCP/IP.
  4. One submission put 14 packets (ARP, DNS, TCP, HTTP, close) and 1,333 bytes on the PC's wire. The content was 93 bytes.
  5. The 266-byte claim packet was Ethernet 14, IP 20, TCP 32, HTTP 150 and JSON 50. That is encapsulation.
  6. Past a router, the MACs are swapped, the IPs stay, and the TTL drops by one.
  7. A switch looks up to layer 2, a router up to layer 3. Only the two ends read TCP and HTTP.

AraiNext is the physical layer. Isn't a cable just something you plug in?

FuruiPlugging it in works because machines keep, to the letter, agreements somebody made. Let's go and see what those 266 bytes look like on the cable.

References

The captures were taken with tcpdump on 24 October 2026 on a practice network the author built with network namespaces on Linux (Ubuntu 24.04) in the cloud: a PC, a router that also answers DNS (dnsmasq), and a server (Node.js). The request was sent with curl 8.5.0 and viewed in Wireshark 4.2.2; every number in the tables was read from these captures. The MAC addresses were set by hand for readability (locally administered addresses starting with 02). This practice network does not use IPv6 (that comes in part 4). The characters are fictional.

Old-School Networking, part 1 — the big picture / 2026.10

← Back to all posts