Updating IP Subnet of Dahua NVR, Dahua Switch and Dahua Cameras

harryIT

n3wb
Nov 8, 2023
7
0
UK
Hi Guys

What is the best way to update the IP addresses and range of Dahua NVR, Dahua Switch, and Dahua Cameras


Current system - No DHCP

Dahua NVR - static ip

Dahua Switch - Static Ip

5 cameras connected to switch - All static IP

What is the best way/best practice way to update all the IP addresses from 192.168.5.x to 172.16.100.x


I would connect the switch to a VLAN to provide internet access/DHCP

Should I set all the Dahua kit from static to DHCP?
 
The current system is static? As in, DHCP is disabled on the router and every device has a hard coded static IP typed into it? That sucks if so. You will have to log into each device and enable DHCP. I'd go ahead and do that and also enable DHCP on your router so you will be able to connect to the devices when you enable DHCP on them.

I assign static IP's via my router through DHCP reservation. That way I don't have to log into each and every device if I ever want to change their IPs in the future.

So you would need to create a VLAN (lets call it 10) on your router and then assign that VLAN (10) to every port on your switch you want on that VLAN. Then on your router for VLAN 10, you would setup whatever subnet you want (172.16.100/24 in your case). You will then need to restart all your devices on that switch in VLAN 10 so they get the new IP assignments. What I do is when the device I want grabs its first DHCP address from the pool but it's a device I want to have a static IP, I go into the router and override it with a DHCP reservation. I always make sure I use static IPs outside of my DHCP pool. Then I reboot that device again and it will have the static IP via the DHCP reservation list.
 
The current system is static? As in, DHCP is disabled on the router and every device has a hard coded static IP typed into it? That sucks if so. You will have to log into each device and enable DHCP. I'd go ahead and do that and also enable DHCP on your router so you will be able to connect to the devices when you enable DHCP on them.

I assign static IP's via my router through DHCP reservation. That way I don't have to log into each and every device if I ever want to change their IPs in the future.

So you would need to create a VLAN (lets call it 10) on your router and then assign that VLAN (10) to every port on your switch you want on that VLAN. Then on your router for VLAN 10, you would setup whatever subnet you want (172.16.100/24 in your case). You will then need to restart all your devices on that switch in VLAN 10 so they get the new IP assignments. What I do is when the device I want grabs its first DHCP address from the pool but it's a device I want to have a static IP, I go into the router and override it with a DHCP reservation. I always make sure I use static IPs outside of my DHCP pool. Then I reboot that device again and it will have the static IP via the DHCP reservation list.

Thank you very much. The reason there is no dhcp currently is because it’s a local network at the moment and not connected to a router.

Can I use the config tool instead of logging into it to change to dhcp.

also what’s the best way to reset the password for a dahua camera if password is
not working

thank you
 
The current system is static? As in, DHCP is disabled on the router and every device has a hard coded static IP typed into it? That sucks if so. You will have to log into each device and enable DHCP. I'd go ahead and do that and also enable DHCP on your router so you will be able to connect to the devices when you enable DHCP on them.

I assign static IP's via my router through DHCP reservation. That way I don't have to log into each and every device if I ever want to change their IPs in the future.

So you would need to create a VLAN (lets call it 10) on your router and then assign that VLAN (10) to every port on your switch you want on that VLAN. Then on your router for VLAN 10, you would setup whatever subnet you want (172.16.100/24 in your case). You will then need to restart all your devices on that switch in VLAN 10 so they get the new IP assignments. What I do is when the device I want grabs its first DHCP address from the pool but it's a device I want to have a static IP, I go into the router and override it with a DHCP reservation. I always make sure I use static IPs outside of my DHCP pool. Then I reboot that device again and it will have the static IP via the DHCP reservation list.


I don't agree with this. Assigning DHCP reservations in the router just adds another point of failure. If your router fails or gets replaced it could cause your entire surveillance system to fail. I have my cameras on an isolated subnet with manually assigned static IP's. My entire LAN could go down and it won't have any negative impacts on my surveillance system.

To the OP: However, just because I don't agree with it doesn't mean it won't work or be the best solution for you. Just understand doing it this way adds a pretty substantial point of failure into your system. If the cameras are set to DHCP and the router is unavailable, this can cause the cameras to go offline. Especially if they reboot for a power failure or some other reason.
 
I don't agree with this. Assigning DHCP reservations in the router just adds another point of failure. If your router fails or gets replaced it could cause your entire surveillance system to fail. I have my cameras on an isolated subnet with manually assigned static IP's. My entire LAN could go down and it won't have any negative impacts on my surveillance system.

To the OP: However, just because I don't agree with it doesn't mean it won't work or be the best solution for you. Just understand doing it this way adds a pretty substantial point of failure into your system. If the cameras are set to DHCP and the router is unavailable, this can cause the cameras to go offline. Especially if they reboot for a power failure or some other reason.
Thank you

For example, I have a dahua nvr, switch and 10 cameras statically setup on 192.168.1.x network. No internet or router setup yet.

What is the best way and order, to update everyone device to a 172.16.100.x

will I update everyone camera first, then switch then NVR

once I have all the devices updates to the correct address, I will create a VLAN on router and create a trunk port on the switch so I can connect to the internet so can access remotely. Then will add all static ip addresses into dhcp exclusion.

would that work?

would appreciate help on the order of updating Ip addresses on the devices

Thank you
 
It depends on what router you have. If you plug a PC into the switch you can add the 172.16.100 subnet to your NIC so you can access devices on both subnets. I would switch them over one by one, then create the VLAN. Just make sure assign the static IP's outside of the DHCP range. You can also set them all to dhcp, then assign the DHCP reservations in the router, then make the NVR and cameras static in their interface.
 
I don't agree with this. Assigning DHCP reservations in the router just adds another point of failure. If your router fails or gets replaced it could cause your entire surveillance system to fail. I have my cameras on an isolated subnet with manually assigned static IP's. My entire LAN could go down and it won't have any negative impacts on my surveillance system.

To the OP: However, just because I don't agree with it doesn't mean it won't work or be the best solution for you. Just understand doing it this way adds a pretty substantial point of failure into your system. If the cameras are set to DHCP and the router is unavailable, this can cause the cameras to go offline. Especially if they reboot for a power failure or some other reason.

There are lots of ways to skin a cat and your way is fine for a small network but it doesn’t scale worth a flip. Im at ~70 static IPs in my business. If I ever wanted to change the subnet schema, using your method, I’d have to block off the better part of my day in order to change it device by device. Having it centralized makes management so much easier.

If you are really worried about a router failure then you can mitigate that with a longer DHCP lease time like 2 weeks or similar. That would give you enough time to either fix or replace the router in question assuming the end devices weren’t rebooted in the meantime.

I’ve never experienced a router failure to be honest. Had plenty of switch ports and switch failures and also end device failures but never a total router failure. I guess it doesn’t mean it can’t happen of course but it’s just not something that is likely to happen in my opinion.

YMMV
 
Last edited:
There are lots of ways to skin a cat and your way is fine for a small network but it doesn’t scale worth a flip. Im at ~70 static IPs in my business. If I ever wanted to change the subnet schema, using your method, I’d have to block off the better part of my day in order to change it device by device. Having it centralized makes management so much easier.

If you are really worried about a router failure then you can mitigate that with a longer DHCP lease time like 2 weeks or similar. That would give you enough time to either fix or replace the router in question assuming the end devices weren’t rebooted in the meantime.

I’ve never experienced a router failure to be honest. Had plenty of switch ports and switch failures and also end device failures but never a total router failure. I guess it doesn’t mean it can’t happen of course but it’s just not something that is likely to happen in my opinion.

YMMV

You have 70 IP cameras in your business? I'm not recommending manually assigning static IP addresses at each device like workstations, printers etc. I would definitely want to assign DHCP reservations to those devices via the firewall. Ideally the IP cameras would be physically separated from your LAN. Sometimes that may not be practical though. Out of all the years I've been running IP cameras I've never had to change the subnet of my statically assigned IP cameras.

In your situation it's different because you most likely have IT staff on site or someone that manages the router/firewall. In a residential setting, a lot of people use the networking gear that their ISP provides them. So allowing that to handle the DHCP reservations for a surveillance system is a recipe for disaster. Some ISP's change out the modem/router just because the customer upgraded their speed package. Sometimes they blindly change it out when there's a service issue just because they don't know what else to do lol.

Even if you have a large number of IP cameras, I can't think of a reason you would need to change the subnet (assuming a common subnet was not used like 192.168.1.x).