A worked example
32 cameras and 12 door controllers in 10.20.1.0/24, starting at 10.20.1.20. The gateway stays at 10.20.1.1, so the cameras take 10.20.1.20 to 10.20.1.51 and the controllers carry straight on from 10.20.1.52 to 10.20.1.63. That leaves 209 addresses spare in the block.
Labels are padded — CAM-01 rather than CAM-1 — so a list sorts into the order you installed it rather than putting CAM-10 next to CAM-1.
The bit worth automating is the rollover
Counting is not the hard part. Crossing an octet boundary is. In a 10.20.0.0/23 the block runs from 10.20.0.0 to 10.20.1.255, which means 10.20.0.255 is an ordinary host address rather than a broadcast. A plan written out by hand stops at 255 and starts a new row somewhere wrong. This does not:
10.20.0.250 CAM-1 Cameras
10.20.0.251 CAM-2 Cameras
10.20.0.252 CAM-3 Cameras
10.20.0.253 CAM-4 Cameras
10.20.0.254 CAM-5 Cameras
10.20.0.255 CAM-6 Cameras
10.20.1.0 CAM-7 Cameras
10.20.1.1 CAM-8 CamerasThe same applies to the network and broadcast addresses, and to the gateway. The generator steps over all three rather than handing one to a camera and leaving somebody to work out later why that one device is unreachable.
When the block is too small
It says so with the numbers, rather than producing a list that runs off the end:
- 10 devices asked for in a
192.168.1.0/29, and 5 fit. - The plan ran out of addresses: 10 were asked for and 5 fit. 192.168.1.0/29 ends at 192.168.1.6.
The subnet calculator is the place to work out which prefix you need before you plan into it.
What this does not do
- It does not know what is already on the network. Nothing here can see an existing device, so a plan can collide with one. Check the range before committing it, and keep a record afterwards — the record is the point of the exercise.
- It assumes the gateway is at the first or last usable address. That is a convention, not a rule; set it to nowhere if your site does something else.
- No DHCP reservations. If the devices are to be addressed by reservation rather than statically, this still gives you the list, but the addresses go in the DHCP server rather than the devices.
- No VLAN or switch port assignment. Addressing is one column of a commissioning sheet; the port, the room and the serial number are the others, and they come from the site.
- IPv4 only, like the subnet calculator it is built on.
Commissioning a system?
We hand over addressing, labelling and as-built records as part of an install, so the next person to touch the system is not starting from a scan of the network.
Other tools
- Voltage dropHow much voltage a run loses, and how much reaches the device at the end of it.
- Wire sizeThe smallest conductor that still gets the device enough voltage.
- PoE budgetWhat a set of cameras and door controllers asks of the switch feeding them.
- CCTV storageHow much disk a retention period needs, and how long an array will last.
- CCTV bandwidthWhat the cameras ask of the switch, recording and while being watched.
- RAID capacityWhat an array really gives you, and how many disks can fail.
- Conduit fillWhether the cable you are pulling fits the conduit, and how much room is left.
- Resistor colorsWhat the bands mean, and which resistor a supervised zone wants.
- Ohm's lawAny two of volts, amps, ohms and watts give the other two.
- Speaker loadWhether the amplifier covers the taps, with reserve left over.
- IP subnetWhat a prefix really holds, and how to carve one up by system.
