Subscriber Discussion

IP & Gateway Not On Same Network

KJ
Kenny Johnson
Dec 28, 2016

The I.T. admin for a school we are installing told us to set our camera network settings like this:

ip = 192.168.20.x
mask = 255.255.255.0
gateway = 192.168.30.1

When we try to put that on these Uniview cameras it gives an error like...
"gateway and ip not on same network"

Am I missing something?

Or did the school admin send us a wrong gateway?

Thanks!

Avatar
Brian Karas
Dec 28, 2016
IPVM

You're not missing anything.

Either one of those IP addresses is wrong, or the subnet mask is wrong. Most likely if they were using a larger a subnet mask you would be using something like 172.x.x.x or 10.x.x.x for the IP range, not 192.168.x.x, so I am guessing your gateway should be 192.168.20.1.

 

(1)
KJ
Kenny Johnson
Dec 28, 2016

Thanks for the fast reply!
Hearing it from someone else makes me feel better about it  hehe

Thats what I was thinking...

I directed the on-site tech to just set the gateway to 20.1

Since the cameras themselves dont access the internet I dont even know if the gateway really matters on the cameras themselves...

Avatar
Brian Karas
Dec 28, 2016
IPVM

If they never need to communicate outside of their LAN then it should not matter. In fact, I have sometimes purposefully set the gateway IP to an address like 192.168.20.254, which I knew would never be in use, and would certainly not be a gateway. This way there is a setting there in case any software process wants to have a value there, but it would prevent the device from actually communicating outside its network.

U
Undisclosed #1
Dec 28, 2016
IPVMU Certified

192.168.20.254

Nice. far preferable to 192.168.20.255 ;)

Avatar
Jon Dillabaugh
Dec 29, 2016
Pro Focus LLC

X.X.X.255 is not a usable IP address for a gateway. 

U
Undisclosed #1
Dec 29, 2016
IPVMU Certified

hence why it's not 'preferable'

Avatar
Jon Dillabaugh
Dec 29, 2016
Pro Focus LLC

Chances are you were given the wrong gateway IP or subnet mask, as others alluded. My best guess is that you were given the wrong gateway. 

I say this with some certainty because if the gateway of 192.168.30.1 was correct, that would mean your subnet mask would have to be 255.255.240.0, which would lead you to a subnet of 4094 hosts. That is a very large subnet that would not be easily managed. 

It's much more likely that they mistyped the gateway. 

U
Undisclosed #1
Dec 29, 2016
IPVMU Certified

I agree that the gateway address is most likely the thing that is wrong, but 

...that would mean your subnet mask would have to be 255.255.240.0, which would lead you to a subnet of 4094 hosts. That is a very large subnet that would not be easily managed.

the mask could legally be 255.255.0.0 or anything in between.  Of course you get 65536 possible hosts, but that's just possible hosts.  Its no harder to manage than a 255.255.255.0 subnet, assuming the number of actual hosts are the same.

Sometimes people make a 255.255.0.0 masked subnet purely for clerical reasons, like first floor IPs 192.168.1.x and second floor IPs 192.168.2.x.   Or by device type, etc.

But they still might only have 100 hosts total, so not a problem.

Still I doubt the mask is wrong, because it is fairly rare.

Avatar
Ilja Theuwissen
Dec 29, 2016

Guys guys guys, my god :-)

If you put devices in a network of which the management is shared, everything should be documented.

If there's no documentation, be the good guy and tell your customer that's just disaster waiting to happen. Contact the network admin and set it up with him. 

At least document all fixed ip addresses on the network. How do you know you're not breaking some other application or service when you take the .254 address? Maybe that's a printer thats currently unplugged, or something more critical.

When installing devices in a network, never "guess" the settings or put random IP addresses in. "Oh, i'll take this address or gateway, and if it works i'm off!" Also don't use a random gateway if you don't know the correct ones, that's sloppy. Use the correct one and if the camera's shouldn't be reachable outside the subnet don't use any.

(2)
U
Undisclosed #1
Dec 29, 2016
IPVMU Certified

How do you know you're not breaking some other application or service when you take the .254 address?

He says he "knows it will never be in use".  How he knows might be thru documentation or divination, but the implied point is to use only an address that will not be allocated.

...if the cameras shouldn't be reachable outside the subnet don't use any.

Apparently Brian has seen cases where the UI or later processing does not work well with a null gateway, and so this is for that use case.  I'm not sure I've seen that, but I have seen UI's that require a DNS, so I believe it.

(1)
Avatar
Ilja Theuwissen
Dec 29, 2016

ok fair enough. The most important remark was always to have documentation in place.

Avatar
Brian Karas
Dec 29, 2016
IPVM

How do you know you're not breaking some other application or service when you take the .254 address?

Because I setup the network.  I usually use .1 for gateways, .2-.10 for devices like managed switches or monitored UPSes (basically, infrastructure stuff), .11-.30 for network resources (servers, printers, etc.), .31-.99 for access control/cameras/environmental monitoring devices, .100-.200 for DHCP pool, .201-.254 is typically unassigned. (this is assuming a 'simple' /24 network).

If I did not setup the network, then I would check first with whomever had allocated IP space (which, frequently, is nobody).

Use the correct one and if the camera's shouldn't be reachable outside the subnet don't use any.

The majority of my career has been with some form of startup company, and/or working with pre-release products from other companies. I have come across countless devices with buggy implementations that want values for gateway's, even if they have no need to communicate outside of the network. It is less common in 'production' stuff, but as I alluded to in my earlier post, sometimes the software 'wants' a value there.

(2)
UM
Undisclosed Manufacturer #2
Dec 29, 2016

I have seen many ip devices in our industry that require a dns and gateway.

 

I have also seen numerous IT people give out incorrect gateways and/or sunbet mask settings.  it usually takes a few rounds to get it fixed.  they usually use an invalid setting for their pcs but windows or their dhcp server etc doesnt validate it and yell at them.

I usually use a site like subnetcalculator.com to show them that the gateway/subnet combination are invalid.

 

I also see IT folk have issues with vlans and port  forwarding.

(2)
New discussion

Ask questions and get answers to your physical security questions from IPVM team members and fellow subscribers.

Newest discussions