Routelearn.net
Course menu

Unit 13: Complete Packet FlowLesson 13.3 (3 of 3 in this unit)72 of 84 in the Network Fundamentals course

What Happens When You Open a Website?

You type https://routelearn.net and press Enter. Less than a second later, the page appears. In between, more than twenty separate things happen across your PC, your home network, your internet service provider and a server far away. This lesson follows every one of them in order, shows the addresses and ports at each step, and links each step to the lesson that explains it in detail.

Beginner · 25 min read · Before this: Same-subnet communication, Different-subnet communication, DNS, How NAT and PAT work

Loading a web page is the chain of steps a browser and the network carry out to fetch a page: resolving the name with DNS, delivering frames on the local network with ARP and switching, routing and NAT toward the server, opening a TCP connection secured with TLS, and exchanging an HTTPS request and response.

In simple terms: Typing a web address starts a fast relay race: find the server's address, then get your request out of your home, across the internet and back again, all encrypted and often in under a second.

This is the final lesson of the packet flow unit, and it brings the whole course together. If you have read Same-subnet communication and Different-subnet communication, you already know the core ideas: the PC decides whether the destination is local or remote, uses ARP to find the next hop's MAC address, and routers build a new frame at every hop. Now you add names (DNS), a home router doing NAT, the internet, and the protocols that make a web page secure and reliable.

All addresses in this lesson are examples from ranges reserved for documentation. The real IP address of routelearn.net, your public IP and your MAC addresses will be different, but the steps are the same.

The setup

A laptop on a typical home or small-office network opens https://routelearn.net. Here are all the devices involved:

DeviceAddress(es)MAC (on its link)Job
Laptop192.168.1.50/24, gateway 192.168.1.102:00:00:00:00:aaRuns the browser
SwitchNone neededNot used in framesJoins the LAN (often built into the home router)
Home router (router + firewall + NAT)LAN 192.168.1.1, WAN 203.0.113.25LAN …:01, WAN …:02Gateway to the internet; holds the home's one public IP address
ISP router203.0.113.1…:feThe provider's first router
DNS resolver198.51.100.53-Looks up names for the laptop (run by the ISP here)
Web server198.51.100.10, TCP port 443-Serves routelearn.net
publicLaptop192.168.1.50SwitchNATRouter + FW.1.1 | 203.0.113.25ISP router203.0.113.1DNS resolver198.51.100.53Internetmany routersWeb server198.51.100.10:443
  1. 1. URL and cache. The browser reads the URL and checks its caches. Nothing usable is cached, so it needs the network.
  2. 2. DNS query. A UDP query to port 53 asks the resolver for routelearn.net's IP address.
  3. 3. DNS answer. The resolver replies: routelearn.net is 198.51.100.10. The laptop caches it.
  4. 4. To the gateway. 198.51.100.10 is remote, so the frame goes to the router's MAC address (learned with ARP).
  5. 5. NAT and the internet. The router replaces the private source address with its public IP address and port, then internet routers forward the packet hop by hop.
  6. 6. TCP handshake. The laptop and the server agree to open a connection on port 443.
  7. 7. TLS handshake. They agree on encryption keys and the server proves it really is routelearn.net.
  8. 8. HTTPS request. The encrypted request for the home page travels to the server.
  9. 9. Response and reverse NAT. The page comes back, and the router maps port 40001 back to 192.168.1.50:51000.
  10. 10. Render. The browser decrypts, builds the page and fetches images, styles and scripts.
The whole journey in ten animated moments. The steps below break it into all 21 parts.

Why this matters

Opening a website touches almost every topic in this course. When a site won't load, the fault is in one of these steps. If you can list them in order, you can test them in order, which is the heart of a troubleshooting method. It is also a classic job-interview question.

The 21 steps at a glance

StepsPhaseWhat happens
1–2In the browserUnderstand the URL, check the cache
3–4Find the serverDNS turns routelearn.net into an IP address
5–8Leave the PCLocal or remote? ARP, frame, switch
9–10The edge routerRouting, firewall and NAT
11–13Cross the internetISP and internet routers, hop by hop
14–15Open a secure connectionTCP handshake, then TLS
16–18Ask and answerHTTPS request, response, return trip
19–21Back homeReverse NAT, receive, render

💡 A note on order: the steps are numbered in the order you learn them, not strictly in the order packets are sent. The DNS query from step 3 is the first packet to leave the laptop, and it takes the same path out to the resolver. The packet you follow through steps 5 to 13 is the TCP SYN from step 14. You follow that SYN out, then look at the connection it starts.

Phase 1: in the browser (steps 1 and 2)

Step 1: The user enters the URL

In the browser

You type routelearn.net or https://routelearn.net and press Enter. The browser splits the URL (Uniform Resource Locator) into parts:

PartValueWhat it tells the browser
SchemehttpsUse HTTP inside TLS encryption
Hostroutelearn.netThe name to look up in DNS
Port(not written) → 443The default port for HTTPS (HTTP uses 80)
Path/Which page: the home page

If you typed only the name, the browser assumes HTTPS (or tries HTTP first and is redirected to HTTPS).

Learn more: HTTP: How the Web TalksCommon Ports to Know

Step 2: The browser checks its cache

In the browser and operating system

Fetching from the network is slow compared with reading from memory, so the browser first looks for things it already has:

  • Page cache: a saved copy of the page or its files (images, stylesheets). If a copy is still marked fresh, it can be used without asking the server at all.
  • DNS cache: a stored IP address for routelearn.net, kept by the browser and the operating system.
  • Open connections: an existing TCP and TLS connection to the same server that can be reused.

On this first visit, nothing is cached, so the browser must go to the network for everything.

Phase 2: finding the server (steps 3 and 4)

Step 3: DNS lookup

Laptop → DNS resolver

Computers connect to IP addresses, not names. DNS (Domain Name System) works like the internet's phone book. The operating system sends a small query to its configured DNS resolver (learned from DHCP) asking for the A record (IPv4 address) of routelearn.net.

The query normally travels over UDP to port 53, from a random high source port. The resolver is on another network, so this query itself goes through steps 5 to 12 below. If the resolver doesn't already know the answer, it asks the root servers, then the .net servers, then the domain's own authoritative servers.

The DNS query
Source IP : port
192.168.1.50:60123
Destination IP : port
198.51.100.53:53
Transport
UDP
Question
routelearn.net, type A
Step 1 of 4 · Query
DNS resolution · UDP port 53
Laptop
192.168.1.50
DNS resolver
198.51.100.53
Root, .net and authoritative servers
DNS hierarchy
DNS, simplified: the resolver does the searching; the laptop sends one question and gets one answer.

Step 4: The IP address is learned

On the laptop

The operating system stores the answer in its DNS cache for the record's TTL and passes 198.51.100.10 to the browser. From now on, the network only uses this IP address. The name appears again only inside TLS and HTTP. If DNS fails here, none of the later steps can happen.

Learn more: DNS Problems

Now known
routelearn.netchanged
198.51.100.10
Cached for
300 seconds
Example output from a Windows PC, written for this lesson (documentation addresses)
C:\>nslookup routelearn.net
Server:  resolver1.isp.example
Address:  198.51.100.53

Non-authoritative answer:
Name:    routelearn.net
Address:  198.51.100.10
What to look for: Server and Address at the top show which resolver answered (198.51.100.53). The Address under Name is the answer: 198.51.100.10. "Non-authoritative" means the answer came from the resolver's cache or lookup, not directly from the domain's own name server. Try it yourself with the Website to IP tool.

Phase 3: leaving the laptop (steps 5 to 8)

Step 5: Local or remote?

On the laptop

The laptop applies its subnet mask to 198.51.100.10. It is not in 192.168.1.0/24, so the server is remote and the packet must go to the default gateway. This is exactly the decision described in Different-subnet communication. (For a website on the internet, the server is practically always remote.)

The decision
My network
192.168.1.0/24
Destination network
198.51.100.x: not mine
Decisionchanged
Remote → default gateway 192.168.1.1

Step 6: ARP for the gateway's MAC address

Laptop → LAN

To put the packet in a frame, the laptop needs the router's MAC address. It checks its ARP cache; if the entry is missing, it broadcasts an ARP request for 192.168.1.1. In practice, the entry is almost always cached already, because the DNS query in step 3 needed the same gateway. The laptop never sends an ARP request for 198.51.100.10, because the server is not on its local network.

Learn more: ARP for Local and Remote Destinations

ARP
Request
Who has 192.168.1.1?
Sent to
ff:ff:ff:ff:ff:ff
Replychanged
192.168.1.1 is at 02:00:00:00:00:01

Step 7: The Ethernet frame is created

On the laptop

The laptop encapsulates the first packet, a TCP SYN (step 14), layer by layer:

  • TCP header: source port 51000 (a temporary "ephemeral" port the operating system picks for this connection), destination port 443.
  • IP header: source 192.168.1.50, destination 198.51.100.10, TTL 128.
  • Ethernet header: source 02:00:00:00:00:aa, destination 02:00:00:00:00:01 (the gateway), plus an FCS (frame check sequence) trailer.

Learn more: Port Numbers and SocketsThe Ethernet Frame

Addresses at this step
Source MAC
02:00:00:00:00:aa
Destination MACchanged
02:00:00:00:00:01
Source IP : port
192.168.1.50:51000
Destination IP : port
198.51.100.10:443
TTL
128
TCP flags
SYN (first packet)

Data: The application produces data, such as an HTTPS request.

  1. Data · application
  2. Segment · transport
  3. Packet · network
  4. Frame · data link

Data: The application produces data, such as an HTTPS request. Segment: TCP adds a header with the source and destination ports. Packet: IP adds a header with the source and destination IP addresses. Frame: Ethernet adds MAC addresses in front and an error check (FCS) at the end.

On the way out each layer wraps the one above it; the receiver unwraps them in reverse (decapsulation).

Step 8: The switch forwards the frame

On the switch

The switch learns the laptop's MAC address on the port it arrived on, finds the router's MAC address …:01 in its MAC address table, and forwards the frame out of that one port, unchanged. On Wi-Fi, the access point does a similar job, then passes the frame onto the wired network.

Learn more: How a Switch Learns MAC Addresses

Addresses at this step
Source MAC
02:00:00:00:00:aa
Destination MAC
02:00:00:00:00:01
Source IP : port
192.168.1.50:51000
Destination IP : port
198.51.100.10:443

Phase 4: the edge router, firewall and NAT (steps 9 and 10)

Step 9: The router and firewall process the packet

Home router (LAN side → WAN side)

The home router is several devices in one box. In order:

  1. Router, Layer 2: the destination MAC address is its own, so it accepts the frame and removes the Ethernet header.
  2. Router, Layer 3: it looks up 198.51.100.10 in its routing table. The only match is the default route (0.0.0.0/0, "everything else"), pointing to the ISP router 203.0.113.1. The TTL drops to 127.
  3. Firewall: a stateful firewall checks its rules. Connections started from inside are normally allowed. It records this connection in its state table, so the reply will be let back in while uninvited traffic from outside is blocked.

Learn more: RoutersFirewall Basics

Decisions made
Frame
Dst MAC 02:00:00:00:00:01 = mine → accept
Routechanged
0.0.0.0/0 → 203.0.113.1 (ISP)
Firewallchanged
Outbound HTTPS allowed; state recorded
TTLchanged
128 → 127

Step 10: NAT translates the private address

Home router, WAN side

192.168.1.50 is a private address. Private addresses are not routed on the internet, so the server could never reply to it. The router therefore performs PAT (Port Address Translation, the common form of NAT):

  • It replaces the source IP 192.168.1.50 with its own public IP 203.0.113.25.
  • It may replace the source port too (here 51000 → 40001). Many routers keep the original port when it is free; either way, the port is what tells the conversations apart.
  • It writes the mapping into its NAT table so it can reverse it later (step 19).
  • It builds a new frame for the ISP link, from its WAN MAC to the ISP router's MAC.

Every device in the home shares that one public IP address.

Learn more: Why NAT Exists

Addresses at this step
Source MACchanged
02:00:00:00:00:02
Destination MACchanged
02:00:00:00:00:fe
Source IP : portchanged
203.0.113.25:40001
Destination IP : port
198.51.100.10:443
TTLchanged
127
Inside (LAN)
Laptop → router
Source MAC
…:aa
Destination MAC
…:01
Source IP:port
192.168.1.50:51000
Destination IP:port
198.51.100.10:443
TTL
128
Outside (WAN)
Router → ISP
Source MAC
…:02 (rewritten)
Destination MAC
…:fe (rewritten)
Source IP:port
203.0.113.25:40001 (rewritten)
Destination IP:port
198.51.100.10:443
TTL
127 (rewritten)

Highlighted fields were rewritten by the router.

Routing changes the MAC addresses and the TTL; NAT also rewrites the source IP address and port. The destination doesn't change on the way out.
The home router's NAT table after step 10
ProtocolInside (private)Outside (public)Remote server
TCP192.168.1.50:51000203.0.113.25:40001198.51.100.10:443
UDP192.168.1.50:60123203.0.113.25:40000198.51.100.53:53 (the DNS query)

Phase 5: across the internet (steps 11 to 13)

Step 11: The packet reaches the ISP

ISP router 203.0.113.1

The frame crosses the access link (DSL, cable, fibre or mobile, usually through a modem or fibre terminal) to the ISP's first router. That link may not use Ethernet at all, but the idea is the same: a Layer 2 header for this one link, wrapped around the unchanged IP packet. The ISP router removes that header, looks up 198.51.100.10 and sends the packet on.

Addresses at this step
Source MAC
02:00:00:00:00:02
Destination MAC
02:00:00:00:00:fe
Source IP : port
203.0.113.25:40001
Destination IP : port
198.51.100.10:443
TTLchanged
127 → 126 as the ISP router forwards it

Step 12: Internet routers forward it hop by hop

Many routers between networks

The internet is made of thousands of separate networks, run by different companies and connected together. Each router on the way does exactly what R1 did in Different-subnet communication: remove the frame, look up the destination, lower the TTL by one and build a new frame for the next link. A typical path crosses 8 to 20 routers.

How do they know the way? Large networks tell each other which addresses they can reach using a routing protocol called BGP (Border Gateway Protocol). You don't need the details here; the CCNA course covers it. You can watch the hops yourself with traceroute.

Learn more: Where BGP Fits

At every hop
MAC addresseschanged
Replaced (new frame)
Source IP : port
203.0.113.25:40001
Destination IP : port
198.51.100.10:443
TTLchanged
Minus 1 per router

Step 13: The server receives the packet

Web server 198.51.100.10

The last router delivers a frame to the server's MAC address. The server de-encapsulates it: its own MAC address, its own IP address, and TCP destination port 443, where the web server software is listening. Note that the server sees the home's public address 203.0.113.25, never 192.168.1.50.

Large sites rarely run on a single server. The address usually belongs to a load balancer or a content delivery network (CDN) edge server close to you, which passes the request to one of many servers behind it. The steps from your side look the same.

Addresses at this step
Destination MAC
Server's own MAC
Source IP : port
203.0.113.25:40001
Destination IP : port
198.51.100.10:443
TTL
e.g. 115 (13 routers later)

Phase 6: opening a secure connection (steps 14 and 15)

Step 14: The TCP three-way handshake

Laptop ↔ server

The packet you just followed was a SYN, the first of three messages that open a TCP connection. TCP makes the connection reliable: it numbers every byte, resends anything lost and puts the data back in order. Each side picks a random starting sequence number.

Step 1 of 3 · SYN
Laptop
192.168.1.50:51000 (seen as 203.0.113.25:40001)
Internet
via NAT
Web server
198.51.100.10:443
One round trip opens the connection. Ports are shown from the laptop's point of view.

Step 15: TLS negotiation

Laptop ↔ server, inside the TCP connection

TLS (Transport Layer Security) is what puts the "S" in HTTPS. Before any web content is sent, the browser and the server use TLS to:

  • Agree on encryption keys without ever sending the keys themselves across the network.
  • Prove the server's identity: the server sends a certificate for routelearn.net, signed by a certificate authority the browser trusts. The browser checks that the name matches, the signature is valid and the certificate has not expired.
  • Agree on the application protocol, for example HTTP/2.

With TLS 1.3, this takes one round trip. You can check any site's certificate with the SSL Checker.

Learn more: HTTPS and TLS

Step 1 of 3 · ClientHello
Browser
TLS client
TLS 1.3
inside TCP
routelearn.net
TLS server, TCP 443
The TLS 1.3 handshake, simplified. From here on, everything between the browser and the server is encrypted.

Phase 7: request and response (steps 16 to 18)

Step 16: The HTTPS request is sent

Browser → server (encrypted)

The browser sends an HTTP request through the encrypted TLS channel. Decrypted, it looks roughly like this:

GET / HTTP/2
:authority: routelearn.net
user-agent: Mozilla/5.0 (...)
accept: text/html
accept-language: en-GB

On the wire, routers see only the IP addresses, the ports and encrypted bytes. The URL path and the HTTP headers are hidden. The packet follows the same route as the SYN: steps 7 to 13 again, including NAT.

Addresses at this step
Source MAC
02:00:00:00:00:aa
Destination MAC
02:00:00:00:00:01
Source IP : port
192.168.1.50:51000
Destination IP : port
198.51.100.10:443

Step 17: The server responds

On the server

The web server finds (or generates) the home page and replies with a status code and the content:

HTTP/2 200
content-type: text/html; charset=utf-8
cache-control: public, max-age=0, must-revalidate

<!DOCTYPE html><html> ... the page ... </html>

200 means OK. Other common codes are 301 (moved), 404 (not found) and 500 (server error). A page larger than one packet is split across many TCP segments, which the laptop acknowledges as they arrive.

The reply leaves the server
Source IP : portchanged
198.51.100.10:443
Destination IP : portchanged
203.0.113.25:40001
Content
HTTP 200 + HTML (encrypted by TLS)
TTL
64 (a common server default)

Step 18: Return traffic crosses the internet

Server → internet → home router

The reply simply swaps the source and destination. It is addressed to the public address 203.0.113.25:40001, because that is the only address the server ever saw. Internet routers forward it hop by hop, as in step 12. The return path doesn't have to use the same routers as the outgoing path, and often doesn't.

Addresses at this step
Source IP : portchanged
198.51.100.10:443
Destination IP : portchanged
203.0.113.25:40001
MAC addresses
New at every hop
TTL
Starts at e.g. 64, minus 1 per hop

Phase 8: back home (steps 19 to 21)

Step 19: NAT is reversed

Home router, WAN → LAN

The home router receives a packet for 203.0.113.25:40001. It looks in its NAT table and finds that port 40001 belongs to 192.168.1.50:51000, and the firewall confirms that the packet belongs to a connection started from inside. The router rewrites the destination, routes the packet onto the LAN and builds a new frame from …:01 to the laptop's …:aa (using its own ARP cache for 192.168.1.50).

Addresses at this step
Source MACchanged
02:00:00:00:00:01
Destination MACchanged
02:00:00:00:00:aa
Source IP : port
198.51.100.10:443
Destination IP : portchanged
192.168.1.50:51000
Arriving from the ISP
WAN side
Source IP:port
198.51.100.10:443
Destination IP:port
203.0.113.25:40001
Delivered on the LAN
LAN side
Source IP:port
198.51.100.10:443
Destination IP:port
192.168.1.50:51000 (rewritten)

Highlighted fields were rewritten by the router.

On the way back, NAT changes the destination (not the source). Without the NAT table entry, the router would not know which device to send the packet to.

Step 20: The browser receives the data

On the laptop

The frame goes through the switch to the laptop, which unwraps it from the bottom up:

  1. Ethernet: the destination MAC address is mine and the FCS is good → pass up to IP.
  2. IP: the destination 192.168.1.50 is mine → pass up to TCP.
  3. TCP: port 51000 belongs to the browser's connection. TCP acknowledges the data and puts the segments back in order.
  4. TLS: decrypts the bytes and checks that they were not changed on the way.
  5. HTTP: passes the status code, headers and HTML to the browser.
The frame that reaches the laptop
Source MAC
02:00:00:00:00:01
Destination MAC
02:00:00:00:00:aa
Source IP : port
198.51.100.10:443
Destination IP : port
192.168.1.50:51000

Step 21: The page is rendered

In the browser

The browser reads the HTML and builds the page structure. The HTML refers to more files (stylesheets, scripts, fonts, images), so the browser requests those too. Files from routelearn.net reuse the existing TCP and TLS connection; files from other domains need their own DNS lookup and connection (steps 3 to 20 again). Finally, the browser lays out the page and draws it on the screen, usually in well under a second.

The running address table

Here is the same TCP connection seen at each point on the path. Notice what changes: the MAC addresses at every router, the source IP address and port at NAT (the destination on the way back), and nothing else.

WhereSrc MACDst MACSource IP : portDestination IP : portTTL
Laptop → router (LAN)…:aa…:01192.168.1.50:51000198.51.100.10:443128
Router → ISP (after NAT)…:02…:fe203.0.113.25:40001198.51.100.10:443127
Across the internetNew at every hop203.0.113.25:40001198.51.100.10:443−1 per hop
Arriving at serverlast routerserver203.0.113.25:40001198.51.100.10:443e.g. 115
Server reply (internet)New at every hop198.51.100.10:443203.0.113.25:4000164, −1 per hop
Router → laptop (NAT reversed)…:01…:aa198.51.100.10:443192.168.1.50:51000e.g. 51
✅ The three rules that explain the whole table
  • MAC addresses change at every router, because they only describe the current link.
  • IP addresses and ports stay the same end to end, except where NAT rewrites them (source on the way out, destination on the way back).
  • TTL goes down by one at every router.

What happens when a step fails

Step that failsTypical causeWhat you see
3–4 DNSResolver down, wrong DNS server, typo in the name"This site can't be reached… DNS_PROBE_FINISHED_NXDOMAIN" or "server not found". Pinging an IP still works.
5–6 Gateway / ARPWrong or missing gateway, router offNothing outside the LAN works. A ping to 192.168.1.1 fails.
8 Switch / Wi-FiCable, port, Wi-Fi associationNo link, or an APIPA address (169.254.x.x) because DHCP also failed.
9–11 Router / ISPInternet connection down, firewall ruleThe LAN works, but the internet doesn't. Traceroute stops after hop 1 or 2.
12–13 Internet / serverRouting problem, server downTimeouts. Traceroute stops partway. Other sites load normally.
14 TCPNothing listening on 443, firewall blocking"Connection refused" (a reset came back) or "timed out" (nothing came back).
15 TLSExpired or wrong certificate, wrong clock on the PCA full-page browser warning such as "Your connection is not private".
16–17 HTTPMissing page, application errorA 404 or 500 error page. The network is fine!

💡 The error message tells you which step failed. A DNS error means you never got past step 4. A certificate warning means steps 1 to 14 all worked. A 404 page means the network did its job.

Troubleshooting: test the steps in order

  1. Steps 5–6: ipconfig, then ping 192.168.1.1. Is my address right, and can I reach the gateway?
  2. Steps 9–12: ping a well-known public IP. Does the internet path work without DNS?
  3. Steps 3–4: nslookup routelearn.net. Does DNS answer?
  4. Step 14: Test-NetConnection routelearn.net -Port 443 (PowerShell). Can a TCP connection be opened?
  5. Steps 15–17: curl -I https://routelearn.net. Does TLS succeed, and what status code comes back?
Example output from a Windows PC, written for this lesson (documentation addresses; real paths differ)
C:\>tracert -d routelearn.net
Tracing route to routelearn.net [198.51.100.10]
over a maximum of 30 hops:

  1     1 ms     1 ms     1 ms  192.168.1.1
  2     8 ms     7 ms     8 ms  203.0.113.1
  3    10 ms     9 ms    10 ms  192.0.2.17
  4     *        *        *     Request timed out.
  5    14 ms    13 ms    14 ms  192.0.2.130
  6    15 ms    15 ms    15 ms  198.51.100.10

Trace complete.
What to look for: hop 1 is the home router (step 9), hop 2 is the ISP router (step 11), and the rest are internet routers (step 12), ending at the server 198.51.100.10. A single row of stars in the middle, followed by later hops that answer, usually just means that router doesn't reply to traceroute. It is still forwarding traffic.
Example output from Windows PowerShell, written for this lesson (documentation addresses)
PS C:\> Test-NetConnection routelearn.net -Port 443
ComputerName     : routelearn.net
RemoteAddress    : 198.51.100.10
RemotePort       : 443
InterfaceAlias   : Wi-Fi
SourceAddress    : 192.168.1.50
TcpTestSucceeded : True
What to look for: RemoteAddress shows that DNS worked, and TcpTestSucceeded : True shows that routing and the TCP handshake to port 443 worked. One command checks all three. Notice that SourceAddress is the private address: the PC doesn't know about NAT.
Example output from a Windows PC, written for this lesson (documentation addresses)
C:\>netstat -n | findstr :443
  TCP    192.168.1.50:51000     198.51.100.10:443      ESTABLISHED
What to look for: this is the laptop's view of the connection. The local side shows its private address and ephemeral port, 192.168.1.50:51000. The remote side is the server on port 443, and ESTABLISHED means the TCP connection is open.

Learn more: Viewing Connections on Your Computer

Example output from a Linux or macOS terminal, written for this lesson (headers shortened)
$ curl -sI https://routelearn.net
HTTP/2 200
content-type: text/html; charset=utf-8
cache-control: public, max-age=0, must-revalidate
What to look for: the first line, HTTP/2 200. A 200 status proves that every step from DNS to the HTTP response worked. You can see a site's headers without a terminal by using the HTTP Headers tool.

Learn more: A Troubleshooting MethodEssential Windows Network Commands

Common mistakes

  • Thinking the laptop sends the frame to the web server's MAC address. It sends the frame to the gateway's MAC address. On this path, only the last router needs to know the server's MAC address.
  • Thinking the web server sees your 192.168.x.x address. It sees the home router's public address after NAT.
  • Thinking HTTPS hides which site you visit. It hides the page and its content, but the IP addresses, and usually the site name, are still visible on the path.
  • Thinking DNS happens on every request. Answers are cached for their TTL, so repeat visits usually skip step 3.
  • Assuming a site is down because ping fails. Many servers ignore ping but serve HTTPS normally. Test port 443 instead.
  • Forgetting the return trip. Half of the journey is the reply, and it depends on the NAT table and the firewall's state table.
✅ Key takeaways
  • The browser checks caches first, then uses DNS to turn the name into an IP address.
  • The server is remote, so the laptop uses ARP to find the gateway's MAC address and sends the frame there.
  • The home router routes, filters (firewall) and translates (NAT) before handing the packet to the ISP.
  • Internet routers forward the packet hop by hop: new MAC addresses, the same IP addresses, and the TTL minus one.
  • TCP opens a reliable connection, TLS secures it, and only then is the HTTP request sent.
  • The reply comes back to the public IP, NAT reverses it, and the browser unwraps and renders the page.

Knowledge check

Predict · scenario 1

The laptop sends the TCP SYN for routelearn.net. What destination MAC address is in the frame as it leaves the laptop?

Predict · scenario 2

The SYN from 192.168.1.50:51000 passes through the home router and reaches the web server. What source IP address and port does the server see?

Predict · scenario 3

A user can open websites by IP address, but every site by name fails with 'server not found'. Which step is failing?

Predict · scenario 4

The browser shows 'Your connection is not private' because the certificate has expired. Which steps definitely worked?

Predict · scenario 5

After the home router, the SYN passes through 12 more routers (the ISP router included) before reaching the server. Assuming every link is Ethernet, how many different frames carry it from the laptop to the server?

Related lessons

Each step above has its own full lesson elsewhere in the course. Revisit DNS, ARP fundamentals, The default gateway, How NAT and PAT work, Firewall basics, The three-way handshake, HTTPS and TLS and HTTP: how the web talks. For a shorter overview of the same journey, see the summary in What is a computer network?. Next up is the troubleshooting unit, where you will use this step-by-step picture to find faults.

FAQ

How long do all these steps take?
Usually well under a second. On a good connection, the DNS lookup, the TCP handshake and the TLS handshake each take about one round trip of perhaps 10 to 50 milliseconds, and cached answers skip some of them entirely. Most of the waiting time is spent downloading and rendering the page itself.
Can my internet provider see which pages I visit on an HTTPS site?
It can see the IP addresses and ports, and usually the site's name (from the DNS query and the TLS server name), so it can tell that you visited routelearn.net. It cannot see the page path, the content or your form data, because those travel inside the encrypted TLS connection.
Why does the second visit to a website load faster?
Many steps are skipped. The IP address is cached by the browser and the operating system, the gateway's MAC address is in the ARP cache, files such as images and stylesheets may be in the browser cache, and the browser may reuse an existing TCP and TLS connection.
Is the IP address in this lesson the real address of routelearn.net?
No. This lesson uses documentation addresses (198.51.100.10 for the server, 203.0.113.25 for the home's public IP address) that are reserved for examples. Real sites, including this one, are often served from a content delivery network (CDN), so the address you get depends on where you are.