A subnet (short for subnetwork) is a range of IP addresses that share the same network prefix, so devices inside it can reach each other directly while traffic for any other address goes through a router. Its size is set by the subnet mask, written either as four numbers such as 255.255.255.0 or as a slash number such as /24, and that size decides how many devices the range can hold.
Subnets come up for a business in two places. Inside the office, IT divides private addresses into subnets for staff, phones, guests and cameras. On a quote, a carrier describes a block of public static IP addresses as a subnet, such as a /29, and the slash number tells you how many of those addresses you can actually put to work.
How an IP address splits into network and host
An IPv4 address is 32 bits long, written as four numbers from 0 to 255 separated by dots. The subnet mask splits those 32 bits into two parts. The first part, the network prefix, is the same for every device in the subnet. The rest, the host part, is different for each device.
Take the address 192.168.10.37 with the mask 255.255.255.0. The mask covers the first three numbers, so the network is 192.168.10.0 and the host part is the last number, 37. Any address from 192.168.10.1 to 192.168.10.254 is on the same subnet. When this device sends to 192.168.10.80, it delivers the packet directly on the local network. When it sends to 192.168.20.5, or to any website, it hands the packet to its default gateway, the router or firewall that connects the subnet to everything else.
That is all a subnet really is: a rule each device uses to decide "local, send it straight there" or "not local, send it to the gateway." When a device has the wrong mask, it makes the wrong decision, which is why a single typo in the mask can make half the network unreachable from one computer.
Subnet masks and CIDR notation
CIDR (Classless Inter-Domain Routing, RFC 1519) replaced the old fixed class A, B and C networks in 1993. It writes the mask as a slash and the number of bits in the network prefix. A mask of 255.255.255.0 has 24 bits set, so it is written /24. The total number of addresses in a subnet is 2 raised to the power of the bits left over: a /24 leaves 8 bits, which is 256 addresses.
The number after the slash works backward from what people expect. A bigger number means a smaller subnet.
| CIDR | Subnet mask | Total addresses | Usable for devices on an ordinary network |
|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2, on point-to-point links only (RFC 3021) |
| /32 | 255.255.255.255 | 1 | A single address |
The "usable" column subtracts the network and broadcast addresses. On a carrier's static IP block, the carrier's gateway usually takes one more, which the next sections explain.
A quick way to read a mask without converting to binary: subtract the last number that is not 255 from 256. For 255.255.255.248, that is 256 minus 248, or 8. Subnets of that size start on multiples of 8 (.0, .8, .16, .24 and so on), so an address ending in .13 with that mask belongs to the subnet that runs from .8 to .15.
Network, broadcast and gateway addresses
- Network address. The first address in the range names the subnet itself, such as 192.168.10.0 for a /24. It is not assigned to a device.
- Broadcast address. The last address in the range, such as 192.168.10.255, is used to reach every device on the subnet at once. It is not assigned to a device either.
- Gateway address. One of the usable addresses belongs to the router or firewall. Convention often puts it first (.1) or last (.254), though any usable address works as long as every device is told the same one.
In an office, devices usually learn their address, mask and gateway automatically from DHCP, which hands out addresses only from the usable part of the subnet.
Worked example: a /29 static IP block from a carrier
Carriers commonly assign a small block of public addresses on dedicated circuits, and a /29 is a common size. Illustration only; the addresses come from a range reserved for documentation, and your carrier's layout may differ.
| Address | Role | Can you assign it? |
|---|---|---|
| 203.0.113.8 | Network address | No |
| 203.0.113.9 | Carrier's gateway | No |
| 203.0.113.10 to 203.0.113.14 | Your usable addresses | Yes, five of them |
| 203.0.113.15 | Broadcast address | No |
Eight addresses, five you can use: one for the firewall's main outside address and four for a VPN gateway, a mail filter or other services. Carriers differ on which address they keep for the gateway, and some route the block to your firewall over a separate small link instead, which changes the count. Ask the carrier for the full details in writing: block, mask, gateway and the exact usable range. Our page on static IP addresses covers whether you need a block at all, and our post on static IPs and BGP charts the other common block sizes.
Public subnets vs private subnets
Most office devices never use public addresses. They sit on private subnets from the ranges in RFC 1918 and share the public addresses through NAT at the firewall, which our guide to public vs private IP addresses and NAT explains.
| Public subnet from the carrier | Private subnet inside the office | |
|---|---|---|
| Who assigns it | The carrier | You or your IT provider |
| Address ranges | Globally unique addresses the carrier holds | 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 |
| Reachable from the internet | Yes, subject to your firewall | No, only through NAT or a VPN |
| Typical size | Small, often a /30 to a /28 | Whatever fits, often a /24 per segment |
| If you change carriers | You get a new block | Nothing changes |
One more range sits in between. Carriers that use carrier-grade NAT give routers addresses from 100.64.0.0/10, the shared address space in RFC 6598. A router WAN address in that range means you do not have a public subnet at all, which our page on CGNAT explains.
Planning subnets for an office
- One subnet per segment. Staff, voice, guests, cameras and payment devices each get their own subnet, usually on its own VLAN, so the firewall can apply rules between them.
- Leave room to grow. A /24 per segment is common because it is easy to read and holds 254 devices. A /27 sized for today's 25 cameras runs out when you add ten more.
- Avoid the router defaults. Home routers often use 192.168.0.x or 192.168.1.x. An office on the same range will clash with staff connecting by VPN from home.
- Plan every site at once. Give each location its own range, for example 10.1.x.x for one office and 10.2.x.x for the next, so a site-to-site VPN or SD-WAN never has to deal with overlapping subnets.
- Write it down. A one-page table of subnets, VLANs, gateways and DHCP ranges saves hours later.
How to check a device's subnet
- On Windows, open a command prompt and run ipconfig. Note the IPv4 address, subnet mask and default gateway.
- On a Mac, open the network settings, choose the active connection and look at the TCP/IP details.
- On the firewall, check the WAN settings for the outside address, mask and gateway, and each internal interface for its subnet.
- Compare the device with the plan. A device whose mask or gateway does not match the others on its segment has been set by hand or is getting settings from the wrong place.
Subnets in IPv6
IPv6 addresses are 128 bits long and use the same slash notation. An ordinary local network is a /64 by convention, which holds far more addresses than any network will ever use, and automatic address setup depends on that size. Carriers commonly assign a business a larger prefix, often a /48 or /56, to divide into many /64 subnets. Check the quote for what is included.
How FiberX helps
FiberX gets quotes from several carriers for your address and lists, for each one, the size of the static IP block, how many addresses are usable and how the carrier delivers it, so the quotes compare like for like. Most quotes for dedicated internet access include a small block, and we can also quote managed network services to plan and run the subnets inside your office. The carrier pays us, so there is no markup. Request a quote, or call or text 478-758-8091.