IP addresses: every device needs one
For a packet to reach a device, the device needs an address — its IP address. IPv4 writes it as four numbers 0–255, like 192.168.1.10, giving about 4 billion addresses — which the world has run out of. IPv6 is the successor, with an effectively unlimited pool written in hexadecimal.
An address splits into two parts: a network part (which network the device is on) and a host part (which device on that network). A subnet mask — or the /24 style suffix — marks where that split falls.
Public, private, and NAT
Some address ranges are private (like 192.168.x.x) — reused inside millions of homes and offices, never routed on the open internet. Your devices share one public address to the outside world, and the router performs NAT (Network Address Translation) to juggle which internal device each reply belongs to. This is a big part of how IPv4 stretched to cover far more devices than it has addresses.
Addresses are usually handed out automatically by DHCP — when a device joins a network, DHCP leases it an IP so nobody configures it by hand.
Routing: how a packet crosses the internet
The internet is a mesh of routers, each a junction that forwards packets closer to their destination. A router keeps a routing table — a set of rules of the form "for addresses in this range, send them out that way." It does not know the whole path; it only needs to know the next hop.
A packet therefore travels by many independent hops, each router making a local decision, until it arrives. Different packets of the same message can even take different routes and be reassembled at the end — the resilience that lets the internet route around failures.
No one knows the whole route
A router only decides the next hop, not the full path. That local, hop-by-hop design is exactly why the internet survives cables being cut — packets simply flow around the damage.
DNS: names instead of numbers
People remember stemlinepk.com, not an IP address. The Domain Name System is the internet's phone book: it translates a human-readable domain name into the IP address the routers actually use. Your device asks a DNS resolver, which works its way up the naming hierarchy until it finds the answer, then caches it so the next lookup is instant.
So typing a web address triggers a DNS lookup first (name → IP), and only then does the browser open a connection to that IP.
A worked example
You type stemlinepk.com into a browser at home. Trace, in order, the addressing and routing steps that get the request to the server.
- DNS lookup: the name stemlinepk.com is resolved to the server's IP address.Routers work with IP addresses, not names, so the name must be translated first.
- Your device (a private IP from DHCP) sends the request; the home router applies NAT so it leaves under your one public IP.Private addresses are not routable on the internet, so NAT maps the internal device to the public address.
- The packet hops router to router, each consulting its routing table for the next hop toward that IP.Routing is hop-by-hop; no single router knows the whole path.
- The server replies; NAT on your router directs the response back to the right internal device.NAT remembers which internal device made the request so the reply is delivered correctly.
Name → IP via DNS, out through NAT to the public internet, hop-by-hop routing to the server, and NAT steers the reply back — addressing and routing working together.