You type smarttutorials.net into your browser and press Enter. A moment later the page is there. It feels like one action. It is not.
In that moment your laptop asked the devices around it a question, looked up an address, opened a connection to a computer it had never talked to, agreed a secret code with it, asked for the page and got it back. Dozens of small messages crossed your home network and the internet, and every one of them followed rules that you are going to learn in this course.
This first lesson is the whole journey at a glance. Do not worry about understanding every step yet. The point is to see the map. Every later lesson zooms into one part of it.
Watch one press of Enter
Below is a small network: your laptop, your home router, “the internet” (squashed into one cloud, because the real thing is thousands of routers), a DNS server that knows addresses, and the web server that holds the page.
Press play. Each coloured tag moving along a cable is one message. The colours match the phases at the top, and each phase says which module of this course explains it.
One press of Enter, message by message
-
laptop: curl https://smarttutorials.net/
Your laptop wants to talk to the home router, but it only knows the router's address on paper (192.168.1.1). To put a message on the cable it needs the router's hardware address, so it shouts a question to everyone nearby.
- Time
- 0 µs
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → ff:ff:ff:ff:ff:ff (broadcast)
- ARP
- who has 192.168.1.1? tell 192.168.1.20
- On the wire
- 64 bytes
- laptop ARP cache
- 192.168.1.1: asking (INCOMPLETE)
-
home-router: ARP: 192.168.1.1 is at 02:00:00:00:01:01
The router answers. This little exchange is ARP, and you will take it apart in Module 2.
- Time
- 100.512 µs
- Cable
- home-router eth0 → laptop eth0
- Ethernet
- 02:00:00:00:01:01 → 02:00:00:00:00:20
- ARP
- 192.168.1.1 is at 02:00:00:00:01:01
- On the wire
- 64 bytes
- home-router ARP cache
- 192.168.1.20 is at 02:00:00:00:00:20
-
laptop: DNS query: smarttutorials.net A?
laptop asks its DNS server for the A record of smarttutorials.net. laptop saves it in its ARP cache: 192.168.1.1 is at 02:00:00:00:01:01.
- Time
- 201.024 µs
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 198.51.100.53
- TTL
- 64
- UDP ports
- 40704 → 53
- DNS
- query smarttutorials.net A
- On the wire
- 82 bytes
- laptop ARP cache
- 192.168.1.1 is at 02:00:00:00:01:01
- home-router NAT table
- udp 192.168.1.20:40704 → 203.0.113.2:40704
-
laptop: DNS query: smarttutorials.net AAAA?
It asks twice at the same time: once for an IPv4 address (an "A" record) and once for an IPv6 address (an "AAAA" record). You will meet both kinds in Module 3.
- Time
- 201.68 µs
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 198.51.100.53
- TTL
- 64
- UDP ports
- 40704 → 53
- DNS
- query smarttutorials.net AAAA
- On the wire
- 82 bytes
-
dns: DNS answer: smarttutorials.net is 192.0.2.80
The answer: smarttutorials.net lives at 192.0.2.80. Notice the long gap in time. The question had to cross the internet and come back.
- Time
- 12.303 ms
- Cable
- dns eth0 → internet eth1
- Ethernet
- 02:00:00:00:00:53 → 02:00:00:00:0f:02
- IP
- 198.51.100.53 → 203.0.113.2
- TTL
- 64
- UDP ports
- 53 → 40704
- DNS
- smarttutorials.net A = 192.0.2.80
- On the wire
- 98 bytes
-
dns: DNS answer: smarttutorials.net is (no records)
dns answers the DNS question.
- Time
- 12.304 ms
- Cable
- dns eth0 → internet eth1
- Ethernet
- 02:00:00:00:00:53 → 02:00:00:00:0f:02
- IP
- 198.51.100.53 → 203.0.113.2
- TTL
- 64
- UDP ports
- 53 → 40704
- DNS
- smarttutorials.net AAAA = (none)
- On the wire
- 82 bytes
-
laptop: TCP SYN seq=0
laptop opens a TCP connection: SYN, "let us talk", with its starting sequence number. laptop's connection is now SYN-SENT.
- Time
- 24.406 ms
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 192.0.2.80
- TTL
- 64
- TCP ports
- 44789 → 443
- TCP flags
- SYN
- seq / ack
- 0 / – (relative)
- On the wire
- 70 bytes
- laptop TCP
- SYN-SENT → SYN-SENT
- home-router NAT table
- tcp 192.168.1.20:44789 → 203.0.113.2:44789
-
web: TCP SYN-ACK seq=0 ack=1
web agrees: SYN-ACK. It acknowledges the SYN and picks its own starting number. web's connection is now SYN-RECEIVED.
- Time
- 36.508 ms
- Cable
- web eth0 → internet eth2
- Ethernet
- 02:00:00:00:00:80 → 02:00:00:00:0f:03
- IP
- 192.0.2.80 → 203.0.113.2
- TTL
- 64
- TCP ports
- 443 → 44789
- TCP flags
- SYN ACK
- seq / ack
- 0 / 1 (relative)
- On the wire
- 70 bytes
- web TCP
- LISTEN → SYN-RECEIVED
-
laptop: TCP ACK seq=1 ack=1
laptop acknowledges what it has received. laptop's connection is now ESTABLISHED.
- Time
- 48.609 ms
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 192.0.2.80
- TTL
- 64
- TCP ports
- 44789 → 443
- TCP flags
- ACK
- seq / ack
- 1 / 1 (relative)
- On the wire
- 64 bytes
- laptop TCP
- SYN-SENT → ESTABLISHED
-
laptop: TLS ClientHello
Now they agree on a secret code. From here on, nobody along the way can read what is sent: that is the S in HTTPS (Module 7).
- Time
- 48.61 ms
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 192.0.2.80
- TTL
- 64
- TCP ports
- 44789 → 443
- TCP flags
- PSH ACK
- seq / ack
- 1 / 1 (relative)
- TLS
- ClientHello
- On the wire
- 248 bytes
-
web receives TCP ACK seq=1 ack=1
web gets the frame. web's connection is now ESTABLISHED.
- Time
- 60.711 ms
- Ethernet
- 02:00:00:00:0f:03 → 02:00:00:00:00:80
- IP
- 203.0.113.2 → 192.0.2.80
- TTL
- 56
- TCP ports
- 44789 → 443
- TCP flags
- ACK
- seq / ack
- 1 / 1 (relative)
- On the wire
- 64 bytes
- web TCP
- SYN-RECEIVED → ESTABLISHED
-
web: TLS ServerHello + encrypted handshake
web sends TLS ServerHello + encrypted handshake.
- Time
- 60.716 ms
- Cable
- web eth0 → internet eth2
- Ethernet
- 02:00:00:00:00:80 → 02:00:00:00:0f:03
- IP
- 192.0.2.80 → 203.0.113.2
- TTL
- 64
- TCP ports
- 443 → 44789
- TCP flags
- PSH ACK
- seq / ack
- 1 / 191 (relative)
- TLS
- ServerHello + 4 encrypted records
- On the wire
- 1402 bytes
-
laptop: TLS Finished
laptop sends TLS Finished.
- Time
- 72.849 ms
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 192.0.2.80
- TTL
- 64
- TCP ports
- 44789 → 443
- TCP flags
- PSH ACK
- seq / ack
- 191 / 1345 (relative)
- TLS
- encrypted data
- On the wire
- 122 bytes
-
laptop: HTTP request (encrypted)
The actual request: "please send me the page". It is encrypted, so the routers it passes through only see scrambled bytes.
- Time
- 72.85 ms
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 192.0.2.80
- TTL
- 64
- TCP ports
- 44789 → 443
- TCP flags
- PSH ACK
- seq / ack
- 255 / 1345 (relative)
- TLS
- encrypted data
- On the wire
- 162 bytes
-
web: HTTP 200 (encrypted)
The page comes back, also encrypted.
- Time
- 84.954 ms
- Cable
- web eth0 → internet eth2
- Ethernet
- 02:00:00:00:00:80 → 02:00:00:00:0f:03
- IP
- 192.0.2.80 → 203.0.113.2
- TTL
- 64
- TCP ports
- 443 → 44789
- TCP flags
- PSH ACK
- seq / ack
- 1345 / 359 (relative)
- TLS
- encrypted data
- On the wire
- 183 bytes
-
laptop: TCP FIN-ACK seq=359 ack=1470
The browser (here, a tool called curl, which does the same job in a terminal) shows the page and closes the connection politely.
- Time
- 97.059 ms
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 192.0.2.80
- TTL
- 64
- TCP ports
- 44789 → 443
- TCP flags
- FIN ACK
- seq / ack
- 359 / 1470 (relative)
- On the wire
- 64 bytes
- laptop TCP
- ESTABLISHED → FIN-WAIT-1
-
web: TCP FIN-ACK seq=1470 ack=360
web has nothing more to send: FIN. web's connection is now CLOSE-WAIT. web's connection is now LAST-ACK.
- Time
- 109.16 ms
- Cable
- web eth0 → internet eth2
- Ethernet
- 02:00:00:00:00:80 → 02:00:00:00:0f:03
- IP
- 192.0.2.80 → 203.0.113.2
- TTL
- 64
- TCP ports
- 443 → 44789
- TCP flags
- FIN ACK
- seq / ack
- 1470 / 360 (relative)
- On the wire
- 64 bytes
- web TCP
- ESTABLISHED → CLOSE-WAIT
- web TCP
- CLOSE-WAIT → LAST-ACK
-
laptop: TCP ACK seq=360 ack=1471
laptop acknowledges what it has received. laptop's connection is now FIN-WAIT-2. laptop's connection is now TIME-WAIT.
- Time
- 121.262 ms
- Cable
- laptop eth0 → home-router eth0
- Ethernet
- 02:00:00:00:00:20 → 02:00:00:00:01:01
- IP
- 192.168.1.20 → 192.0.2.80
- TTL
- 64
- TCP ports
- 44789 → 443
- TCP flags
- ACK
- seq / ack
- 360 / 1471 (relative)
- On the wire
- 64 bytes
- laptop TCP
- FIN-WAIT-1 → FIN-WAIT-2
- laptop TCP
- FIN-WAIT-2 → TIME-WAIT
-
web receives TCP ACK seq=360 ack=1471
web gets the frame. web's connection is now CLOSED.
- Time
- 133.363 ms
- Ethernet
- 02:00:00:00:0f:03 → 02:00:00:00:00:80
- IP
- 203.0.113.2 → 192.0.2.80
- TTL
- 56
- TCP ports
- 44789 → 443
- TCP flags
- ACK
- seq / ack
- 360 / 1471 (relative)
- On the wire
- 64 bytes
- web TCP
- LAST-ACK → CLOSED
Switch to the Timeline view to see the same journey as a picture over time: one column per device, one arrow per message. The long arrows across the middle are the trips across the internet. They are where most of the waiting happens.
The journey in five phases
Every time you open a website, the same five things happen, nearly always in this order.
- Find your way out (ARP). Your laptop finds the hardware address of your home router, the door to the rest of the world. Module 2.
- Find the address (DNS). A name like
smarttutorials.netis for people. Computers use numbers, so your laptop asks a DNS server to translate. Module 6. - Open a connection (TCP). The laptop and the web server agree to talk, so lost messages can be noticed and sent again. Module 5.
- Lock it (TLS). They agree on keys, so everything after this is private and cannot be changed on the way. Module 7.
- Ask and receive (HTTP). The browser asks for the page, the server sends it. Module 7.
Under all five, two more things are always at work. IP addresses and routers (Module 3) carry each message across many networks to the right place. Your home router (Module 4) gave your laptop its address when it joined the network, and it quietly rewrites every message on the way out, because your laptop’s address only means something inside your home.
In the real world
Real browsers do more than this lab. They often already know the address (they keep recent DNS answers for a while), they may reuse a connection they opened a second ago, and they ask for dozens of files for one page: pictures, styles, scripts. A big website’s page can need well over a hundred messages. But each one follows the phases above.
How you will learn
Every lesson has labs like the one above. You can play them, step back and forth, and answer the questions before each important step. In most of them you can also press Try it to type your own commands.
Later in the course you get a lab you can build yourself: drag in laptops, switches and routers, wire them up, and break them on purpose. The packets you see are real: the course checks every one against the same tools network engineers use, and checks the order of messages against real computers talking to each other.
Recap
- Opening a website takes many small messages, not one.
- First your laptop finds its router (ARP), then the website’s address (DNS).
- Then it opens a connection (TCP), locks it (TLS) and asks for the page (HTTP).
- Most of the waiting is messages crossing the internet and coming back.
Quick check
-
The laptop cannot connect without an address, and cannot ask for a page without a connection.
-
DNS is the internet's address book. You will see how it works in Module 6.
-
After the TLS handshake, the request and the page travel encrypted. Routers along the way see only scrambled bytes.
Join the discussion