How an IP address actually works

Published on 2026-09-12 by frfrand

What the four numbers of an IP are, what private addresses and the subnet mask are for, and how a packet reaches its destination without anyone knowing the route.

How an IP address actually works

Short answer: an IP address indicates where a machine is on the network, not who it is. One part identifies the network and another identifies the machine, and the mask (/24, /16) marks where the boundary falls. If the destination is on your same network you talk to it directly; if not, you hand it to the router, and each hop only knows the next step, not the full path.

An IP address looks like a phone number: a unique identifier pointing to a machine. It's a good first approximation, but it falls short in something important.

An IP is not a name: it's a location. And that changes quite a bit how everything else works.

The four numbers

An IPv4 address is 32 bits. It is written in four groups of 8 bits (0 to 255) separated by dots because it's easier for us to read that way; the machine doesn't care.

The interesting thing is that those 32 bits are divided into two parts: one identifies the network and the other identifies the machine within that network.

Where the division falls is decided by the mask. When you see something like /24 at the end of an address, it means "the first 24 bits are the network, the remaining 8 are the machine". That gives 256 possible addresses in that segment, of which 254 are usable.

A /16 would be a much larger network (65,536 addresses) and a /30 a very small one (four, of which two are usable). It's the same idea as an area code and a local number, but with a movable boundary.

Why that matters

Because it determines who you can talk to directly.

When your machine wants to send a packet, it asks a single question: is the destination on my same network? It compares its own address and its mask with the destination address.

If it is on the same network, it talks to it directly. If not, it hands it to the router (the "default gateway") and lets it deal with it.

That is the whole algorithm. Your computer does not know the path to a server on the other side of the world. It only knows one thing: "this is not for here, I'll give it to the router". And the router does the same with the next one. The Internet works because each hop only needs to know the next step, not the full route.

Private addresses

There are three reserved ranges that never circulate on the Internet:

10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255

That is why your home router distributes addresses starting with 192.168, and that is why the same addresses exist in millions of homes at once without clashing: they never leave.

When you connect to a site, the router replaces your private address with the public one it has and notes in a table that the response goes to you. That is NAT. It is also the reason why, from the outside, no one can initiate a connection to your computer unless you configure a forwarding.

Special addresses worth recognizing

127.0.0.1 your own machine, always 0.0.0.0 "any interface" when listening 169.254.x.x could not obtain address via DHCP

The third is a free diagnosis: if a machine has an address starting with 169.254, it's not that the network is down, it's that there was no DHCP response. Almost always it's a cable, a port, or a downed DHCP server.

From name to address

None of this is used manually, because nobody remembers addresses. Between the name you type and the address there is one more step: DNS.

$ dig +short ardumaker.com $ ip route get 1.1.1.1 # por qué interfaz saldría este paquete

The second command is one of the most useful and least known: it tells you exactly what path a packet would take to that destination, with which interface and which router. When something "has no exit," that line usually contains the answer.

An IP is not an identity

It's worth closing with this because it's often misinterpreted: an IP address identifies a connection point, not a person or a device.

It changes when you change networks, it's shared among everyone behind the same router, and mobile operators put thousands of clients behind the same public address. It serves for routing. As proof of who did something, it's weak.

From IP address to a public website

When you publish an application on an ArduMaker VPS, the browser does not need to know the internal architecture. It queries the domain's DNS, obtains an IP address, and connects. At ArduMaker, that IP is not exclusive to your VPS: it is the IP of the host that houses it, shared with other VPSs, and the nginx on that host recognizes the domain and forwards the request to your VPS's nginx, which directs it to the correct process.

If a domain stops working, verify separately that it resolves to the correct IP and that the service is listening on the appropriate port. Having a public IP does not mean that all ports must be open.

Related: What is a domain · What is a port.

Frequently asked questions

What does the /24 at the end of an address mean? That the first 24 bits identify the network and the remaining 8 identify the machine: 256 addresses, of which 254 are usable.

What are private addresses? The ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, which do not circulate on the Internet. They go out to the network through the router's NAT, with its public IP.

What does an IP starting with 169.254 indicate? That the machine did not receive a response from DHCP and assigned itself an address. It is almost always a cable, a port, or a down DHCP server.

Does an IP identify a person? No. It identifies an endpoint: it changes with the network and is shared by everyone behind the same router or the same carrier NAT.

  • redes
  • IP
  • routing
  • fundamentos
  • Internet

Keep reading

All articles · VPS plans