How Data Travels Across the Internet

GoSetup TeamFebruary 22, 202659 views

In Part 1, we explained how a device joins a network. In Part 2, we examined how a connection is established.

Now the question is: What happens after the data leaves your local network? How does a packet travel from your home to a server somewhere in the world — and back?

Let's break it down.

1. Private vs Public IP Addresses

Inside your home network, devices use private IP addresses.

Examples:

192.168.1.25
10.0.0.15
172.16.0.5

These addresses are not routable on the Internet. They only work inside local networks.

However, your router has a public IP address assigned by your Internet Service Provider (ISP).

For example:

203.0.113.10

This public IP represents your entire network on the Internet. All outgoing traffic from your devices appears to come from this single public address.

2. NAT — Network Address Translation

Since private IP addresses cannot travel across the Internet, the router performs NAT.

When your device sends traffic:

192.168.1.25:51534 → 142.250.190.78:443

the router modifies it before sending it out. It replaces the internal address and port with:

203.0.113.10:62001 → 142.250.190.78:443

The router stores this mapping in a translation table.

When the response comes back:

142.250.190.78:443 → 203.0.113.10:62001

the router checks the table and forwards it to:

192.168.1.25:51534

This allows multiple devices inside your home to share one public IP address.

This specific technique is often called PAT (Port Address Translation).

3. Why NAT Exists

IPv4 uses 32-bit addresses. That allows for approximately 4.3 billion unique IP addresses.

When IPv4 was designed, the number of Internet-connected devices was small.

Today we have:

  • smartphones
  • laptops
  • smart TVs
  • IoT devices
  • vehicles
  • industrial systems

IPv4 addresses became insufficient.

NAT was introduced as a practical solution to extend the life of IPv4. It allows entire private networks to operate behind a single public IP address.

4. Routing Across the Internet

Once the packet leaves your router, it enters your ISP's network.

From there, it is forwarded through multiple routers across the Internet.

Each router:

  • examines the destination IP
  • consults its routing table
  • forwards the packet to the next hop

At every hop:

  • the MAC address changes
  • the IP address remains the same
  • the destination stays constant

The packet travels across many autonomous systems until it reaches the server's network.

5. The Server Response

When the server receives the packet:

  • it processes the request
  • generates a response
  • sends packets back to the source public IP

Those packets travel back across the Internet.

When they reach your router:

  • NAT translates the public IP back to the private IP
  • the packet is delivered to your device

The connection is maintained using:

  • IP addresses
  • ports
  • the NAT translation table

6. IPv6 — The Long-Term Solution

NAT solved the IPv4 shortage temporarily. However, the architectural solution is IPv6.

IPv6 uses 128-bit addresses. This provides an almost unlimited address space.

With IPv6:

  • every device can have a globally unique IP address
  • NAT is no longer required for address conservation
  • end-to-end connectivity becomes simpler

IPv6 was designed to replace IPv4, though both currently coexist.

7. The Complete Journey

Let's summarize the full path of a request:

  1. Your device builds a transport segment (Part 2).
  2. The IP layer wraps it into a packet.
  3. The router performs NAT.
  4. The packet travels through multiple Internet routers.
  5. The server processes the request.
  6. The response travels back.
  7. NAT translates the destination back to your private IP.
  8. Your device receives the response.

From the user's perspective, this entire process happens in milliseconds. Behind the scenes, multiple protocols cooperate to make it possible.

Conclusion

When data travels across the Internet, several mechanisms work together:

  • Private IP addresses inside local networks
  • Public IP addresses assigned by ISPs
  • NAT translating between them
  • Routing tables guiding packets across networks
  • IPv6 expanding global address space

The Internet is not a single network. It is a massive system of interconnected networks, cooperating to deliver packets from one endpoint to another.

Found this helpful? Share it!

Stay Updated

Get notified about new articles

No spam. Unsubscribe anytime.