Staic IP vs DHCP

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
chuck8530
Posts: 94
Joined: Sun Nov 21, 2021 2:45 am

Staic IP vs DHCP

Post by chuck8530 »

Something I've never really thought about - I install a new IP cam - it gets a DHCP address. 6 months later there's a power failure - am I going to have to reconfig the camera in ZM? Or am I better off to get a static IP from the start?
an enquiring mind...
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Staic IP vs DHCP

Post by Magic919 »

Probably not. But you can test it.
-
mikb
Posts: 599
Joined: Mon Mar 25, 2013 12:34 pm

Re: Staic IP vs DHCP

Post by mikb »

Depends ... if you set up zoneminder with the camera as "192.168.X.Y" -- an IP address, and it gets issued a new address (for any reason, DHCP whim, power cut etc.) then Zoneminder will lose the camera, because it's not longer there.

Three solutions:

1) Static IP (tell the camera to use static IP and programme it there, then use that IP at ZM) -- and hope the camera doesn't do a factory reset which sets it back to some default ;)

2) Don't use an IP address. Use a hostname. Tell zoneminder your camera is at "mycam01" or "mycam01.local.domain" and then let your network's name server do its job: Mapping host names to IP addresses.

[I use a combination of 1 and 2, my cameras are at static numeric addresses, my name server knows which hosts are which IP addresses, ZM refers to them by name NOT number, nothing moves on reboot/power cut]

3) Or, give your DHCP server instructions that once an IP address is handed out, it should remain associated with that hardware MAC address forever. Then, it won't hand out random IP addresses when the device disconnects and reconnects. Most DHCP servers will have some kind of table of persistent mappings you can use for fixed devices.

Note: This is all networking-level problems, not ZoneMinder specifically -- any other machine/service will have similar issues (where did my NAS go? etc.)
ezbncs
Posts: 9
Joined: Tue Jun 28, 2022 9:35 am
Location: Minnesota

Re: Staic IP vs DHCP

Post by ezbncs »

Yup nothing to do with zoneminder directly as it does not control your network as stated. I don't use domains or sub-domains I just reserve ip's per device with my router and also mac id's to control access.
Life what's that now back to zoneminder and motion detection hell.
dougmccrary
Posts: 1209
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Staic IP vs DHCP

Post by dougmccrary »

ASUS has a similar app.
But that’s not what this is about.
For example I have 20 cameras. I assign IPs such that monitor 1 is IP 192.168.1.201.. up to 192.168.1.220.
So when I want to connect to a camera directly, I don’t need to look up the address. And neither does ZM.
DHCP won’t do that.

You may not find that useful, but I sure do.
dougmccrary
Posts: 1209
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Staic IP vs DHCP

Post by dougmccrary »

on iOS, it may help to turn off "Private Wi-Fi Address"
Post Reply