Networks & the Internet
Networks & the Internet is a free interactive simulation from StudyFi Lab. It runs right in your browser, with no sign-up and nothing to install.
How a packet finds its way: DNS, TCP/IP and routers
Experiments
What happens when you type a URL
First the browser needs an IP address: the DNS resolver finds it by asking the root server, the .com server and the authoritative server in turn. Then it opens a TCP connection to the web server (SYN, SYN-ACK, ACK), agrees on TLS encryption and sends an HTTP GET request. The server answers 200 OK with HTML and the browser renders the page. Every message hops across several routers.
Try this: Count how many messages are sent before the browser even sends its GET. Which steps would disappear if the address were already cached?
Packets and routing
Routers find the cheapest path with Dijkstra’s algorithm: they always settle the router with the smallest known distance and try to improve its neighbours through it (d(v) = min(d(v), d(u) + cost)). A message is split into numbered packets that may take different equal-cost paths and arrive out of order. The receiver puts them back in order in its buffer.
Try this: Send a message from A to G and watch which packet arrives first. Then break the links D–E and D–F — which path and what cost now?
The TCP/IP layers
On the way down the stack each layer wraps the data in its own header (encapsulation): TCP adds ports, IP adds addresses and the TTL, Ethernet a frame with MAC addresses and an FCS checksum. On the way up the receiver unwraps them one by one. The OSI model splits the same work into 7 layers. (With HTTPS the data would also be encrypted by TLS.)
Try this: Stop on the wire and find port 443 and the destination IP address. Then switch on OSI and see which three OSI layers the application layer covers.
IP addresses and subnets
An IPv4 address has 32 bits. The prefix length /n says how many leading bits identify the network; the other 32 − n bits number the devices. The network address has all host bits 0, the broadcast address all 1, so there are 2³²⁻ⁿ − 2 usable addresses. Two addresses are in the same network when all their network bits match.
Try this: Set 192.168.1.130/26 and check that the network starts at .128 and ends at .191. Then move the prefix: how does the host count change when you add one bit?
Frequently asked questions
What is Networks & the Internet?
Networks & the Internet is a free interactive simulation from StudyFi Lab. It runs right in your browser, with no sign-up and nothing to install. How a packet finds its way: DNS, TCP/IP and routers
Is Networks & the Internet free?
Yes. Networks & the Internet is completely free. It works in the browser on computers, tablets and phones, and you do not need an account.
What can I explore in Networks & the Internet?
What happens when you type a URL, Packets and routing, The TCP/IP layers, IP addresses and subnets.
What does the “What happens when you type a URL” experiment show?
First the browser needs an IP address: the DNS resolver finds it by asking the root server, the .com server and the authoritative server in turn. Then it opens a TCP connection to the web server (SYN, SYN-ACK, ACK), agrees on TLS encryption and sends an HTTP GET request. The server answers 200 OK with HTML and the browser renders the page. Every message hops across several routers.
What does the “Packets and routing” experiment show?
Routers find the cheapest path with Dijkstra’s algorithm: they always settle the router with the smallest known distance and try to improve its neighbours through it (d(v) = min(d(v), d(u) + cost)). A message is split into numbered packets that may take different equal-cost paths and arrive out of order. The receiver puts them back in order in its buffer.
Studying for a test?
Upload your notes and StudyFi turns them into flashcards, tests and podcasts.