How the plan is built
- Each group needs one address per device. A multi-sensor camera needs one address in total, because most present all their heads through a single address; tick "One IP per head" for models that give each head its own.
- Each group gets its share of the growth, rounded up: 20% of 48 cameras is 10 spare addresses.
- Add one for the gateway. The subnet is the smallest whose usable hosts hold the total.
- Addresses are handed out in order, each group followed by its spares. The network and broadcast addresses are never assigned.
usable hosts = 2^(32 − prefix) − 2 (the network and broadcast addresses) needed = devices + spare + 1 gateway
| Prefix | Mask | Addresses | Usable |
|---|---|---|---|
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /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 and /32
A /31 has two addresses and, under RFC 3021, both are usable on a point-to-point link; there is no network or broadcast address to set aside. A /32 is a single host. Neither holds a camera network, so the planner never picks them, but the subnet calculator shows them correctly.
Factory default addresses
A new camera often comes up at its maker's default address when no DHCP server answers. If that address is inside your network, and especially if the plan gives it to another device, two devices answer at once during setup. The planner warns when that happens. Program new cameras one at a time, or leave the default address unassigned until they are all done. These defaults are only the ones stated in each maker's own documentation:
| Maker | Device | Default | When | Source |
|---|
Not listed: Amcrest, Reolink and Hikvision NVRs, whose own documents give no fixed default; UniFi, whose only statement is in a legacy guide. Avigilon, Vivotek and Axis from AXIS OS 12 fall back to a 169.254.x.x link-local address, which cannot collide with a private plan. Mobotix gives each camera its own 10.x.x.x address, printed on the camera, so check any 10.x plan against the stickers.
Private addresses
Camera networks belong in the private ranges RFC 1918 sets aside: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The planner warns if the starting network is outside them.
What this does not account for
- DHCP. The plan is for static addresses; if the site hands out some by DHCP, keep that pool outside the assigned range.
- Routing between VLANs. The VLAN field is a label on the output, nothing more; each VLAN is usually its own subnet.
- IPv6.
- Addresses already in use on the site. Check before you program.
Common questions
- What subnet do I need for 48 cameras?
- With two NVRs, three access panels and 20% growth: a /25, 126 usable addresses, of which the plan uses 66 and leaves 60 free. Without growth the same devices fit a /26.
- Does a four-head camera need four IP addresses?
- Usually not: most multi-sensor cameras present all their heads through one address. Some models give each head its own; check the datasheet and tick "One IP per head" for those.
- Why leave gaps between groups?
- So adding a camera next year does not push every device after it to a new address, or break the neat ranges that make a site easy to troubleshoot.
- Should the gateway be .1 or the last address?
- Either works; sites differ. Pick the convention the network team uses.
Sources
- RFC 950, Internet Standard Subnetting Procedure: subnet masks, and the all-zeros and all-ones host addresses not assigned to hosts.
- RFC 4632, Classless Inter-domain Routing (CIDR): prefix notation and block sizes.
- RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links.
- RFC 1918, Address Allocation for Private Internets.
- RFC 1878, Variable Length Subnet Table for IPv4: the mask and host-count values the tests check every prefix against.
Every source used on this site, and how each number is used.