Subnetting for Video Surveillance

Published Apr 30, 2019 13:40 PM

This guide explains when subnetting is used on security networks, and how it works. We explain how to add or remove IP addresses to your range, borrowing bits, and the role of the subnet mask.

free image

****** **** ****** ** ******* *********** on:

  • *** ********* **** *****
  • *** **** ** *** ****** ****
  • ********* *** ** ****
  • ********* *** ** ****
  • ****** *** ** ********

Why ****** ** ***** ************

***** *** * *** ******* ************** may **** ** ****** ***** ******** network, ******** *****:

  • ******* *** ** *********
  • ******* ********
  • **** ** **************

Running *** ** *********, *** ******* **********

*** **** ****** ** ******* ****** is ***.***.*.* (* ***** * *******) which ******** *** **** *********. *******, in **** ***-***** ************ *** ******** systems, **** ** * ******, ****, or ***** ********, ***** ********* *** be ******* ******** ** ******* *** NVRs. *******, ****** ****** ******* *** consume ** ******* *** **** **********. Wireless ****** ** ******* ****** ******* consume ********** *********. ********* ******* ******** will **** ******* *********, ***.

** ****** ******** ****** **** ** one *** (***.***.***.* ** ***.***.***.*), *** network ***** ** ********** *** ********* which *** ** **** *** ********** devices. ***** *** **** **** **** amount, ** ***** * **** ** 255.255.240 ***** ******* ****** *,*** ******* on *** ******.

Network ********

** ***** ********* ******* *** ********* logical ******** (*.*., ************ **. ******* LAN **. *****), * ****** ** subnet ** ********* **** ********* * device ** *******. ** ****** ****** find *** ***** ** *** ***** host.

********** ** **** ***** ******** *********, ***** ** **** **** *********** on ****.

Ease ** **************

********* ********** ****** *** ** ****** an ** ****** **** * ********* and ********** ****** ** *****. **** scanning * ******* ** ***** ********** ****** * ***** ******* ** ** quicker ** **** * ******* *******, closer ** ****** ** ****** **-*** devices, ****** **** **** ********* ** unused *********; *.*.

******** ***.**.*.* - ***.**.***.*** **** ****** 255.255.0.0 = **,*** *********

******** ***.**.*.* - ***.**.*.** **** ****** 255.255.255.224 = ** *********

*** ******* **** *** ********* ****** mask **** **** ***** * ***** to **** **** * ********* ****, like******** ** *******, ***** *** ******* ****** **** will **** **** *******.

Subnetting ******

*** ****** **** ** * ********* configuration ** *** ** *******, *** determines ***** ***** ** ** ** address ******* *** "*******" **. *** "host." ** ********, *** **** ******** of ********, ************ ********, *** ******* subnet *****, **** ****** ********* **********, for *** ** ******* *****, **** commonly ***.***.***.*.

[****, *** **** ***** ** *** only ********* **** ******* ********* ***** are ****** **** * ******* *****.]

*********Addresses / ******* ** *********

********** ******* *** ****** **** **** classfull (***** * = ***.*.*.*, * = ***.***.*.*, * = ***.***.***.*) ** classless ***** ******** **** ** ****** those ******, *** ** ***** ** changes *** ****** ** ***** *** networks. *** *** ****** ** ****** increase ***** *** ******** ******** ** decrease ***** *** ******** ********. *** graphic ***** ***** *** ****** ***** for **** ***** *** *** ****** of ***** *** ******** ********** **** each.

Default Subnet Masks and Classes

*** ***** ***** ***** *** **** make ** *** ****** ****. *** network **** *** *'*, *** * bits ** * *'* (********) = 255. *** **** **** *** *'*, which ******** = *. *** ******* below ***** *** ******* ****** **** for **** *****, *** ********** ****.

Subnet Masks Represented in Bits

Subnet **** ********** ******** *** *****

********* **** *** ********* ****** ***** is **********, **** ****** ********* **********. The *** **** **** ** **** is ** ********* **** **** *** other **** ** **** ** ******** 1 ** * ** * ** 1. ** **** ***** *** ******* then **** *** ******** **** *** network *******, *** **** **** ******** are ******* **** *** ******** **** the **** *******.

Subnets ** ***** ***********

*** ****** ****** ******** ***** ******* over *** ****** *********, ****** ***** are **** ***** **** ** ****** the ******* ** ** ********** ****** or *******. **** ** **** ** changing *** **** ***** ** *** mask. *** ***** *** **** ** removed, ** ********** *** **** ****** becomes *********.

** * ********* *******, ******** ****** mask **** ***.***.***.* ** ***.***.***.* ** * ***.***.*.* ******* ****** users ** ****** **** *** ***.***.*.* network ******* ***** * ******, * total ** *** ***** ******* ** 255, *********** ******** ********* ** *********. Changing *** **** ** ***.***.***.* ******* this ******* ** *,*** *** (***.***.*.*-***.***.*.***). This ** *********** *****.

Subnetting Examples

** *** *** ****** ***** ****** available *********, ***** *** ***** ********** ********* ****** ***********.

Comments (27)
UD
Undisclosed Distributor #1
Apr 30, 2019

You touch on the skirts of it, but everyone involved in setting up private networks should be familiar with RFC1918.  This defines the private subnets set aside for personal use, i.e. traffic from any device with one of these addresses will be dropped on the live Internet instead of forwarded on/processed.  These subnets include 10.x.x.x, 172.16.10.x-172.16.31.x and 192.168.x.x.

Subnetting can be a tricky beast, misplacing one bit will make devices unreachable and drive you insane.  If you're doing this for a living I found the Cisco books for their CCNA networking to be amazingly insightful (down to the bit level) even if you don't plan on pursuing the certification.

Good information!

 

(4)
(10)
BB
Bob Brislin
May 01, 2019
IPVMU Certified

RFC1928 has 3 bit blocks set aside for the private space :

24-bit block: 10.0.0.0 ~ 10.255.255.255 : 8-bit subnet (255.0.0.0)

20-bit block: 172.16.0.0 ~ 172.31.255.255: 12-bit subnet (255.240.0.0)

16-bit block: 192.168.0.0 ~ 192.168.255.255: 16-bit subnet (255.255.0.0)

 

 

UD
Undisclosed Distributor #1
May 02, 2019

RFC1928 references SOCKS Protocol Version 5, not private IP addressing.

RFC1928

(Edited to provide a better link)

 

BB
Bob Brislin
May 02, 2019
IPVMU Certified

Fat fingered - I meant RFC 1918

UI
Undisclosed Integrator #2
May 01, 2019

This is all beyond me. I doubt I will ever need to interact with a network containing more than 254 devices. 

The one thing I don't quite understand is how for instance a router with an address of 192.168.1.1 is able to interact with something with an address of of 192.168.2.XXX. If that 3rd digit doesn't match, wouldn't it be unreachable by the router? Or does it become reachable when the subnet digit is changed?

Avatar
Sergio Guzman
May 01, 2019
Pine Crest School • IPVMU Certified

Just type in google a subnet chart and you can pick the one you want. It's not that difficult.

 

Avatar
Craig Mc Cluskey
May 01, 2019

The subnet mask determines which other addresses a device at a specific address can reach. For any bit in the subnet mask which is a "1", the reachable address must be identical to that of the device's specific address.

If you have a subnet mask of 255.255.255.0, a device at 192.168.1.1 would be able to reach devices at          192.168.1.2 to 192.168.1.254. [It's 254 since 255 is usually reserved.] The first three "octets" being 255 are all "1"s, so a reachable device's address must be identical to the first three octets of the device at 192.168.1.1, i.e., 192.168.1  .

If you changed the subnet mask to 255.255.252.0, a device at 192.168.1.1 would be able to reach devices at 192.168.1.2 to 192.168.3.254.

See Undisclosed #3's "Subnet mask quick reference" below and RFC1918 at tools.ietf.org. (if you are really interested).

(7)
U
Undisclosed #5
May 01, 2019

Or does it become reachable when the subnet digit is changed?

Yes, this is the concept of subnet masks exactly.

When one device with an IP address wants to connect to another device with an IP address, one of the first things it needs to determine is if that other device is on the same LAN (meaning it can send packets to it directly), or if it on a remote network (meaning the packets need to be sent to a router, who can then route them to the appropriate remote network).

The subnet mask and local IP address are used to compute which IPs are local and which are remote.

If you use a subnet mask like 255.255.255.240, then even devices where the 3rd digit (octet) match won't necessarily be able to send packets directly to each other. (subnet masks where the 4th octet are non-zero are more common in datacenters where you might only be allocated 8 IP addresses for your specific use).

DL
DC Long
May 02, 2019

All devices on the same subnet are on the same broadcast domain  talk directly and can not be firewall from EACH OTHER.  A bad network card can cause issues on the entire broadcast domain.  Routes between private subnets must be routed by a router.  So you need real router such as Cisco Mikrotik, etc. Security mandates Like Hippa require network isolation via separate networks IE.  subnets

(1)
UD
Undisclosed Distributor #1
May 02, 2019

You may never need to deal with networks containing more than 254 devices, but chances are that you will encounter networks that were setup to deal with less.  The most common situation would be a small business that has requested a small block of public IP addresses in order to host something on their own network and provide access to the Internet.  The ISP will issue the minimum amount of IP addresses that it can get away with (they charge pretty heftily for public IP addresses) and they will use IP subnetting to do this.  In most cases a company will get a block of 8 public IP addresses which be a 255.255.255.240 subnet (of these only 6 are actually accessible, the first of the block is the "network" block and the the last of the block is the "broadcast" address, network is all 0's in the address, broadcast is all 1's)

It does get pretty complex, I still find myself working the bit chart -> 128 - 64 - 32 - 16 - 8 - 4  - 2 - 1, but I enjoy it.

Hope I didn't confuse things too much more.

 

UD
Undisclosed Distributor #1
May 02, 2019

Correction: 255.255.255.240 provides a block of 16 IP addresses, I should have said 255.255.255.248 provides 8 addresses, of which 6 are usable.

U
Undisclosed #6
May 02, 2019

You can use https://angryip.org/ as a poor layman's tool to find how many subnets you can reach by using a static ip and launching angry.

Using IP: 192.168.1.1  SUB: 255.255.255.0

Using IP: 192.168.1.1  SUB: 255.255.248.0

Yayy, IPVMSTER..yes I am bored, should be finishing quotes.

(2)
(1)
U
Undisclosed #3
May 01, 2019

Have a look

(7)
UI
Undisclosed Integrator #4
May 01, 2019

Great article! - If you are new to CCTV, is there a book/course that someone can recommend on learning networking from dummy level to a decent standard?  

JH
John Honovich
May 01, 2019
IPVM

#4, thanks for your first comment, yes, see our 2019 IP Networking Book and our Spring 2019 IP Networking Course (which starts next Tuesday).

Avatar
Jon Dillabaugh
May 01, 2019
Pro Focus LLC

Just a small critique here. When you increase your network size, it isn’t called subnetting, it’s called supernetting. Sub infers that you are making something smaller. Super means making it larger. 

(2)
(2)
Avatar
Lynn Harold
May 03, 2019

You beat me to it!  I was going to also add, that if there is even the minutest possibility of increasing the scope of your network, to be certain to place the critical/static addresses at the bottom of the address scope.  For example, use x.x.x.1 for your Logical Default Gateway (assuming something like .2 and .3 will be the physical interfaces for redundant/failover routers) and reserve the rest of the single-digit last octet address for other network-specific devices. This way, if you ever have to expand, you don't have reprogram all your devices, and the network gear doesn't sit in the middle of your address scheme (I'm picky that way).

For a simple/small implementation, I always plan an addressing scheme based on the known Day-1 requirements, plus a 3 year out potential expansion forecast.  Something like this -

x.x.x.0 - network address
x.x.x.1 - Default G/W
x.x.x.2 - x.x.x.10 - network devices, DNS, SNTP, etc.
x.x.x.11 - x.x.x.30 - servers, storage, workstations (maybe)
x.x.x.31 - x.x.x.40 - encoders, decoders, audio, I/O, intercoms
x.x.x.41 - x.x.x.50 - reserved for who-knows-what may come
x.x.x.51 - x.x.x.254 - cameras (bottom-up) and access control (top-down)

For a larger implementation, video and access (and intrusion?) might be on separate VLANs.

(1)
(2)
U
Undisclosed #6
May 03, 2019

True but a subnet is always a sub of another net while a super is never a super of a supernet. Might as well add sub/super nets to IPv6 to further discombobulate the donkey logic of noobs.

Avatar
Jon Dillabaugh
May 03, 2019
Pro Focus LLC

The sub vs super tag is about the relation to a standard subnet mask for a given network class. All networks are divided into subnets. The difference is whether it’s a bigger (super) or smaller (sub) subnet than the standard subnet. 

Avatar
Cary Menage
May 03, 2019
IPVMU Certified

How many device discovery tools lack the ability to deal with supernetting? I know that AD lacked this ability in their discovery tool a few years back, they only had options for A,B or C.

Also frustrated by many tools not accommodating multiple NIC's or Network adapters.

 

It never cease to amaze me, how many of these "dinosaurs" lack fundamental networking knowledge...

(1)
Avatar
Mike Dotson
May 03, 2019
Formerly of Seneca • IPVMU Certified

FWIW...I use Advanced IP Scanner all the time and it does see all the active NICs on a machine and allows you to scan all of them in a scan.  A very useful tool.

(2)
VK
Vasiles Kiosses
Jun 04, 2019

Do you have a similar report on IPV6?  Address space issues go away with V6 but a good understanding of the specification is very important.

Avatar
Bobby Mancia Jr.
Jun 09, 2019
MIZELA CORPORATION • IPVMU Certified

Should I apply subnet masks to all connected cameras?

Avatar
Jon Dillabaugh
Jun 09, 2019
Pro Focus LLC

Yes all network connected devices must have a common subnet mask. 

(1)
U
Undisclosed #7
Jun 09, 2019
IPVMU Certified

Yes all network connected devices must have a common subnet mask.

Avatar
Bobby Mancia Jr.
Jun 09, 2019
MIZELA CORPORATION • IPVMU Certified

Hi Jon, Thank you for your response. Same goes to you U#7.

RB
Rean Bootsma
May 17, 2022
IPVMU Certified

Very nicely broken down and graphically presented, thanks!