When using Site Magic, the subnet on a Virtual Network used by a UniFi Gateway or Console at one site could overlap with another. In this case, one of the subnets needs to change to a different IP range.
Changing the subnet itself is a straightforward task, but if you follow these steps to plan your change carefully, downtime can be reduced to a minimum or even eliminated.
Before You Begin
When the subnet changes, clients and UniFi devices need to obtain a new IP address via DHCP and regain connectivity to the network. As DHCP addresses are assigned with a lease time (86400 seconds / 1 day by default) it can take a long time before they are able to reconnect.
Before changing the subnet range, we recommend to perform the following steps:
- Check if there are any Fixed IP Addresses assigned to clients and temporarily disable this feature.
- Use the Fixed IP Address filter in the Client Devices' Display Options to quickly find these clients.
- Check if any UniFi devices are configured with a Static IP address (Network Override) and change them back to DHCP.
- Check if any clients are configured with a Static IP address on the network adapter directly and change them back to DHCP.
- Change the DHCP Lease Time on the Virtual Network from 86400 to 60 seconds.
- Over the course of the next day, the clients and UniFi devices will obtain a new DHCP lease that has a very short lease time.
Changing the Subnet
Now that the clients are using DHCP addresses with a short lease time, we can change the subnet.
- Check if there are any Firewall Rules that allow traffic to the existing IP address range. If so, duplicate these rules to also allow traffic to the new subnet.
- Change the Gateway IP/Subnet on the Virtual Network to a new IP range, for example 192.168.1.1/24 to 192.168.2.1/24.
- The clients and UniFi devices will renew their lease and will reconnect back to the network within a minute.
- Rebooting is another option to force the clients and UniFi devices to renew their lease.
- After all clients and UniFi devices have reconnected, change the DHCP Lease Time back to 86400 seconds.
- If used, change the clients and UniFi devices back to a Fixed or Static IP address inside the new IP address range.
Frequently Asked Questions
We recommend to run the DHCP server on the UniFi Gateway as the DHCP range will automatically update when the subnet is changed.