Manual

Addresses and prefixes

Subnetting without the arithmetic panic: a prefix says how much of the address is the network.

People get nervous around the slash. They should not. A prefix answers one question, and once you can answer that question the tables and the sums are a formality.

An address has two halves

Read 192.168.10.25 as a street address. Part of it says which street, and part of it says which house. In 192.168.10.25/24 the /24 is the line that separates the two: the first part is the network, the last part is the device.

An IPv4 address is four numbers, each from 0 to 255. Underneath they are 32 ones and zeros, eight per number. The prefix counts how many of those 32 are fixed for everyone in the network. A /24 means the first 24 are fixed, which is exactly the first three numbers, and the fourth number is free.

So 192.168.10.25/24 says: I live in the network 192.168.10, and I am number 25 in it. Anyone else whose address starts with 192.168.10 is my neighbour, and my computer can talk to them directly. Anything else has to go through the router.

Reading it aloud

You say 192.168.10.0/24 as "one ninety two dot one sixty eight dot ten dot zero, slash twenty four". People also say "the ten network" or "the one ninety two one sixty eight ten range", because in practice the third number is what tells two networks apart.

Some people say "the mask" and write 255.255.255.0. That is the same thing in older clothes: every 255 is eight fixed bits, three times eight is 24. You will see it in Windows dialogues and in old documentation. RouterOS and the configurator use the slash.

How many fit

Each step in the prefix halves or doubles the network. One number lower means twice as big.

PrefixAddressesUsable for devicesTypical use
/3042A link between two routers
/2986A few fixed servers
/281614A small rack
/24256254An office or home network
/23512510A busy guest network
/2210241022A hall full of phones
/1665,53665,534Never as one network. Room to cut up.

You do not have to memorise the table. Remember that /24 is 254 and that each step down doubles it, and you can rebuild any line of it.

The two addresses you cannot use

Two addresses in every network are spoken for.

  • The network address is the lowest one, all device bits zero: 192.168.10.0. It is the name of the network itself. You write it on your plan and in routes, you do not put it on a device.
  • The broadcast address is the highest one, all device bits one: 192.168.10.255. Something sent there is meant for everybody on the network at once.

That is why 256 becomes 254. And it is why a /31 has nothing left over, and why a /30, with four addresses, gives exactly two usable ones. Two is enough for a cable between two routers and nothing else. A management network with a switch, two access points and your laptop does not fit in a /30, and this is the sum people get wrong first.

In practice one more address is spoken for: the router itself, usually the first one, 192.168.10.1. It is not reserved by any rule, it is a habit worth keeping.

Reading a range without counting

As long as you stay at /24 or wider on a round boundary, you never have to do binary. A /24 runs from x.x.x.0 to x.x.x.255. A /16 runs from x.x.0.0 to x.x.255.255.

Below a /24 the last number is cut into blocks the size of the network, starting at zero. A /28 is blocks of 16: 0 to 15, 16 to 31, 32 to 47 and so on. So 192.168.10.20/28 is in the block 16 to 31, its network address is .16, its broadcast is .31, and the usable addresses are .17 to .30. The same trick works for /29 with blocks of 8 and /30 with blocks of 4.

This is also where a quiet mistake lives. 192.168.10.40/30 is fine, because 40 is the start of a block of four. 192.168.10.41/30 is a device address inside that same block, not the start of one. Some equipment accepts it and tidies it up silently, some tells you off, and you are left comparing two configurations that look different but are not.

Bigger is not better

A /24 is the right size for almost every network you will build, even one with twelve devices in it. You are not short of private addresses, and a /24 reads well: the third number is the network, the fourth is the device. Going smaller to save addresses buys you arithmetic at every future change. Going bigger than a /24 is only worth it when hundreds of devices really do belong in one network, and remember that they then also share one broadcast domain. See planning your addresses.

IPv6 uses the same slash notation with much larger numbers, and the habit there is to give every network a /64 and stop counting. See IPv6.

Where the tool picks this up

You enter your networks as address and prefix in LAN and DHCP, and the configurator checks them against each other for overlap and for addresses that fall outside their own network.

Want to try it right away? Open the configurator