WikiNano.
How the Internet Works
How the Internet Works

0/13 labs tried

An interactive field guide

How the Internet Works

You type an address, press Enter, and a page appears a moment later. In that moment your request is cut into packets, sent as pulses of light and radio, passed between machines in several countries, and rebuilt on the other side. Each chapter below has a lab where you run one of those steps yourself, and chapter 11 follows real apps like WhatsApp, YouTube and Google Drive across the world.

Clock0 ms

Follow one request

Press Enter in the address bar to watch a request cross the internet and come back with a page. Use Next step to go at your own pace.

    Clock values are rough, typical numbers. Real page loads also include connection handshakes, covered in chapters 6 and 10.

    Chapter 1 · Physical layer

    Everything becomes ones and zeros

    Text, photos and video calls all travel as long strings of bits. What carries those bits depends on the medium: voltage on copper, flashes of light in glass, or radio waves through the air.

    Each character you type is stored as a number. The letter H is 72, which is 01001000 in binary. A network card sends those eight bits one after another, then the next character, and so on.

    On a copper cable, a 1 might be a higher voltage and a 0 a lower one. In optical fiber, a laser flickers on and off billions of times a second. Wi-Fi changes the shape of a radio wave.

    Signals pick up noise along the way, and a receiver sometimes misreads a bit. That is why every chunk of data carries a checksum, a small number computed from the contents that exposes errors.

    Lab · Send a message down the wire

    Type a short message, pick a medium and transmit. Turn up the noise to see errors creep in.

    Medium
    Received—

    Press Transmit to send the message.

    Chapter 2 · Internet layer

    Big messages travel in small pieces

    The internet never sends your photo or email in one piece. It cuts data into packets of about 1,500 bytes, and each packet makes its own way to the destination.

    Every packet starts with a header, like the outside of an envelope. It says where the packet came from, where it is going, and where it fits in the sequence.

    Cutting data into packets lets millions of people share the same cables. Your packets take turns with everyone else's, so no single download can hog a link.

    Packets can arrive out of order, or not at all. The receiver uses the sequence numbers to put them back in order and asks again for anything missing.

    Lab · Split a message and send it

    Change the packet size and how many packets get lost, then send. Packets take different routes, arrive out of order, and the server rebuilds the message.

    Rebuilt at the server

    Arrival order appears here.

    
        
    Headers of all 0 packets

      Chapter 3 · Physical layer

      Light is fast. The planet is big.

      Most long-distance traffic travels as light through fiber on the sea floor. Light in glass covers about 200 km every millisecond, so distance alone sets a limit on how quickly a far-away server can answer.

      Latency is the time a signal needs to get somewhere. Network engineers usually measure the round trip, there and back, called the RTT. Bandwidth is how much data per second a link can carry. They are different things.

      A faster plan from your provider adds bandwidth. It cannot shorten the distance to a server on another continent.

      That is why large websites keep copies of their content in data centers all over the world. This is called a content delivery network, or CDN.

      Lab · Measure the planet

      Pick where you are and where the server is. The pulse on the map moves at the right speed relative to the distance. Click any dot to make it the server.

      One way: which signal gets there first?

      Satellite figures are rough. A geostationary satellite sits 35,786 km up, so every trip climbs there and back down. Low-orbit satellites fly about 550 km up and can relay by laser through the vacuum of space.

      Lab · Latency or bandwidth?

      A download takes two things: the wait for the first byte, which depends on distance, and the time to move the rest, which depends on bandwidth.

      Total time
      Waiting for distance Moving the data

      Chapter 4 · Application layer

      Names for people, numbers for machines

      Every device on the internet has an IP address, such as 203.0.113.10. People remember names instead, so the Domain Name System, DNS, translates one into the other.

      An IPv4 address is four numbers from 0 to 255, which allows about 4.3 billion addresses. That was not enough, so the newer IPv6 uses much longer addresses like 2001:db8::1.

      No single computer knows every name. DNS is a hierarchy. Root servers know who runs each ending, such as .com or .org. Those servers know who runs each domain, and each domain’s own name server knows its addresses.

      A resolver, usually run by your internet provider, walks that chain for you and remembers the answers for a while. The next lookup of the same name is almost instant.

      Lab · Resolve a name

      Look up a name and watch the resolver work its way down the hierarchy. Then look it up again and see the cache answer.

      Try
        
              

        Cached answers

        WhereNameTypeAnswerExpires in

        Chapter 5 · Internet layer

        Finding a path, one hop at a time

        No router knows the whole route to a destination. Each one reads the destination address, picks the best next hop from its routing table, and passes the packet on.

        Networks tell their neighbours which addresses they can reach, so every router builds a picture of which direction leads where. When a link fails, the news spreads and traffic shifts to another path within seconds or minutes.

        The internet has many paths between any two places. Cutting one cable rarely cuts anyone off, but it can send their traffic a long way round.

        Each packet carries a counter called TTL, for time to live. Every router lowers it by one and throws the packet away at zero, so a packet can never loop forever. The traceroute tool uses this to reveal every router on a path.

        Lab · Break the network

        Pick two cities. Click a cable once to fill it with traffic, twice to cut it, and again to repair it. The best route updates as you go.

        Choose routes by

        Cables · click to change

        Traceroute

        HopRouterThree probes, round trip
        Run traceroute to reveal each router on the path.

        Chapter 6 · Transport layer

        Reliable or fast

        IP delivers packets on a best-effort basis, with no promises. Two protocols sit on top of it and make different ones. TCP delivers every byte, in order. UDP sends packets and hopes for the best.

        TCP opens with a three-way handshake so both sides agree on starting numbers. After that, the receiver acknowledges what it gets. If an acknowledgement doesn’t come back, the sender tries again.

        TCP also watches for congestion. It starts slowly, sends more while packets get through, and backs off sharply when they get lost.

        UDP skips all of that. Video calls and online games often use it, because a packet that arrives late is useless. It is better to skip it and keep going.

        Both protocols use port numbers to hand data to the right program: 443 for secure web traffic, 53 for DNS.

        Lab · The handshake

        Every TCP connection opens with these three messages. Data can only flow once they finish, so each new connection costs one round trip.

        1. SYN“I’d like to talk. My byte numbers start at 4,301.”
        2. SYN-ACK“Fine by me. Mine start at 9,120, and I’m expecting your 4,302 next.”
        3. ACK“Got it. I’m expecting your 9,121 next.” The connection is open.

        Lab · Race: TCP against UDP

        Both lanes send the same picture, cut into 192 packets, over the same unreliable link. Raise the loss and race again.

        TCPEvery packet, in order
        UDPSend and forget

        Both lanes will send this picture. Press Start to race.

        Chapter 7 · All layers

        Envelopes inside envelopes

        Networking is split into layers. Each layer does one job and wraps the data from the layer above in its own header, like a letter in an envelope, inside a mailbag, inside a truck.

        Application
        What programs say to each other: HTTP, DNS, email.
        Transport
        Which program gets the data, and whether delivery is reliable: TCP or UDP, with port numbers.
        Internet
        Which computer, anywhere in the world: IP addresses and routing.
        Link
        The next device on this local network: Wi-Fi or Ethernet, with hardware (MAC) addresses.
        Physical
        Bits as voltage, light or radio.

        Routers only open the outer envelopes. They read the IP header to choose the next hop, then wrap the packet in a fresh frame for the next leg of the trip.

        Lab · Wrap and unwrap

        Step through a request as it leaves your laptop, passes a router and arrives at the server.

        Your laptop

        A router

        Wi-Fi frameto router 3c:22:fb:9a:10:04from laptop a4:83:e7:2b:5c:11
        IP packetfrom 192.0.2.25to 203.0.113.10TTL 64
        TCP segmentport 52814 → 443seq 1001
        HTTP request
        GET /index.html HTTP/1.1
        Host: www.example.com
        checksum 0x9A3F21C4

        The server

        Chapter 8 · Application layer

        The web’s conversation

        Once a connection is open, your browser and the server talk in HTTP. The browser sends a request. The server sends back a response that starts with a three-digit status code.

        A request names a method, such as GET to fetch something or POST to send data, a path, and headers with extra details. In the status code, 2xx means success, 3xx means look elsewhere, 4xx means the request was wrong, and 5xx means the server failed.

        One page usually needs dozens of requests: the HTML first, then stylesheets, scripts, images and fonts.

        HTTP has no memory between requests. Cookies fill the gap. The server hands the browser a token, the browser sends it back with every request, and that is how a site keeps you logged in.

        Lab · Talk to a server

        Build a request for the pretend server at www.example.com and send it. Try to collect every status code.

        Method

        What your browser sends

        
              

        What the server sends back

        
                

        Status codes collected

        Network log
        #MethodPathStatusTypeSizeTime

        Chapter 9 · Security (TLS)

        Keeping secrets on a shared network

        Your packets pass through machines you don’t control: the café’s Wi-Fi, your provider, routers on other continents. HTTPS encrypts the conversation so only your browser and the real server can read it.

        Without HTTPS, anyone on the same network can read passwords and messages as they pass. With HTTPS, they can still see which site you are visiting and how much data moves, but the contents look like random noise.

        The hard part is agreeing on a secret key with a server you have never met, over a network where anyone could be listening. A key exchange solves this. The paint-mixing lab below shows the idea.

        Encryption is not enough on its own. You also need to know you are talking to the real site. The server proves who it is with a certificate, signed by an authority your device already trusts.

        Lab · Eavesdrop on café Wi-Fi

        You log in to a shop over public Wi-Fi. Eve is on the same network, recording everything. Compare what she sees with HTTPS off and on. Use a made-up password.

        What Eve captured

        
                  

        Lab · Mix a secret in public

        Alice and Bob need a shared secret, but every message they send is visible to Eve. Paint shows the trick: mixing is easy, unmixing is practically impossible.

        Alice your browser

        Her secret color

        In public Eve sees all of this

        Common color

        Bob the server

        His secret color

        1. Alice and Bob agree on a common color in public. Eve sees it.
        2. Each picks a secret color and keeps it to themselves.
        3. Each mixes their secret into the common color and sends the mixture. Eve sees both mixtures.
        4. Each adds their own secret to the mixture they received.
        5. Both now hold the same color. Eve can’t unmix what she saw, so she can’t make it.

        Real key exchanges use huge numbers instead of paint. Combining them is quick for a computer, and undoing it would take longer than the age of the universe.

        Lab · Check the certificate

        Your browser checks each signature in the chain until it reaches an authority built into your device. Let an attacker step in and check again.

        Chapter 10 · All layers

        Putting it together: loading a page

        Loading a web page combines everything above: a DNS lookup, a handshake, setting up encryption, requests and downloads. For most pages, the waiting is mostly round trips rather than raw download speed.

        Every round trip costs the full RTT. Before the first byte of a page arrives from a server 250 ms away, you pay that price for the TCP handshake, for setting up encryption, and for the request itself.

        Newer protocols cut round trips. TLS 1.3 needs one round trip to set up encryption instead of two. HTTP/3 does the connection and the encryption setup together.

        HTTP/2 and HTTP/3 also send many files over one connection at once. With HTTP/1.1, browsers open about six connections to a site and queue the rest of the files behind them.

        Lab · Load a page

        Change the distance, the connection speed and the protocol, and watch where the time goes.

        Protocol
        Page
        Page ready in

        Chapter 11 · All layers

        Real journeys: WhatsApp, YouTube, websites and Drive

        Everything so far, applied to apps you use every day. Pick an app, where each end is and how it connects. The lab lists every device and cable on the way, draws the route on a map, and shows what the app does at each end.

        Every app follows the same basic trip. Your device turns what you did into packets. A short radio or cable hop reaches your router or a cell tower. From there it is fiber: to your provider, across the city, and, if the other end is far away, along cables on the sea floor.

        What changes from app to app is the far end. A WhatsApp message stops at WhatsApp’s servers, then goes on to your friend’s phone. A popular YouTube video usually comes from a cache inside your own provider. A website may live on another continent unless a CDN keeps a copy nearby. Google Drive stores your file in Google’s data centers, then hands it to whoever you share it with.

        Lab · Trace an app

        Choose an app and the two ends, then press Play to follow the data hop by hop. Every row in the list is a real kind of device or cable.

        Clock0 ms

        What the data travels through, by distance

          Every device and cable on the way

            Chapter 12 · Physical layer

            Undersea fiber, not satellites

            When your data crosses an ocean, it almost certainly travels through glass fiber lying on the sea floor. Satellites carry only a tiny share of the traffic between continents. Here is what the path is made of.

            Undersea cablesOver 99%of data traffic between continentsTeleGeography
            Satellites0.37%of U.S. international capacity at the last official count, in 2013FCC figures via TeleGeography
            Cables600+undersea cables in service or planned, as of 2026TeleGeography
            Length1.5 million kmof undersea cable, enough to circle the Earth about 37 timesTeleGeography
            FaultsAbout 200cable faults a year. Two-thirds come from fishing gear and ship anchorsTeleGeography

            Why cables win. One modern cable carries far more than any satellite: MAREA, between the United States and Spain, carries about 224 terabits per second. Light in a cable also has a much shorter trip than a signal bounced off a satellite 35,786 km up.

            Where satellites help. Ships, aircraft, remote villages, disaster zones, and places a cable break has cut off. Low-orbit satellites about 550 km up have made satellite internet much quicker: measured round trips are around 50 ms, against roughly half a second or more for a geostationary satellite.

            Radio is only the first hop. Even on Wi-Fi or mobile data, radio carries your data for a few metres to a few kilometres. Everything after your router or the cell tower is cable, and almost all of it is fiber.

            Inside an undersea cable

            In deep water the cable is about as thick as a garden hose. The glass fibers that carry the light are as thin as a hair.

            1. Optical fibers. Strands of glass about as thin as a hair. Pulses of light in them carry the data.
            2. Gel-filled steel tube. Keeps water away from the fibers.
            3. Steel wires. Give the cable the strength to be laid from a ship and lifted for repairs.
            4. Copper layer. Carries electricity from the shore to the amplifiers along the cable.
            5. Plastic insulation. Seals and insulates everything inside.
            6. Steel armour, near the shore only. Extra protection where anchors and fishing gear are a risk.

            Every 50 to 100 km or so, an amplifier (repeater) on the sea floor boosts the light. Power for the amplifiers travels along the copper layer from equipment on each shore.

            The media, compared

            Rough, typical figures. The speed of a signal and the amount of data a link can carry are different things.

            MediumWhere you meet itDistance per hopDelay it addsHow much it carries
            Wi-Fi radioHome, office, caféTens of metresA few ms, from sharing the airwavesUp to around a gigabit per second
            4G / 5G radioPhone to cell towerUp to a few km in citiesTens of ms on 4G, less on 5GTens to hundreds of Mbit/s
            Copper cableInside buildings, older phone lines100 m for Ethernet, a few km for DSLTinyUp to 10 Gbit/s on short runs
            Fiber on landFiber to the home, cities, countriesThousands of km, with amplifiers5 µs per kmTerabits per second per fiber
            Undersea fiberBetween continentsThousands of km, with amplifiers5 µs per kmHundreds of Tbit/s per cable
            Low-orbit satelliteRural areas, ships, aircraftAbout 550 km up and back downRound trips around 50 msA small fraction of one cable
            Geostationary satelliteRemote areas, satellite TV35,786 km up and back downAt least 480 ms round trip from distance aloneA small fraction of one cable

            Meet the hardware

            The devices you saw in the chapter 11 lab, and what each one does.

            Chapter 13 · Review

            Check what you’ve learned

            Thirteen questions. Each answer comes with a short explanation.

              Reference

              Glossary

              About How the Internet Works

              Follow one click across the world. Interactive labs on bits, packets, IP addresses, DNS, routing and what happens when the network breaks.

              Topic: Networking · Format: interactive simulation · Free, no sign-up · Updated 2026-10-15 · By Prince Vincent, WikiNano · Last reviewed 2026-10-15.

              Inside this page

              Common questions

              What happens when I open a website?
              Your device looks up the site's address through DNS, connects to a server, sends a request, and the server sends back the page, usually over encrypted HTTPS.
              What is an IP address?
              A number that identifies a device or server on a network so data can be sent to the right place.
              What is DNS?
              The Domain Name System turns names like wikinano.in into the IP addresses computers use.

              Sources and further reading

              Keep exploring