Configure static vs DHCP on UniFi networks
Published onby Iron
Configuring IP addresses is a critical step in any UniFi network setup. Two main methods exist for assigning IP addresses: Static IP and DHCP. Each method serves different needs and use cases, and understanding them is key to optimizing network performance.
Let's Dive In!
Table of Contents
- What is a static IP?
- What is DHCP?
- Static IP vs. DHCP: Key differences
- How to configure static IP on UniFi networks
- How to configure DHCP on UniFi networks
- Advanced DHCP options
- Best practices: Static IPs vs. DHCP
- Static IP vs. DHCP: Which one should you choose?
- Common issues and troubleshooting
- Final thoughts
What is a static IP?
A static IP is a fixed IP address assigned to a device. Unlike DHCP, which assigns addresses dynamically, a static IP remains constant. It's like having a reserved parking spot — your device will always "park" in the same spot every time.
When to use a static IP?
-
Servers and network devices (like printers, NAS, and security cameras) need a fixed address to ensure consistent access.
-
Port forwarding and firewall rules often require static IPs to ensure traffic is routed correctly.
-
Remote access becomes easier when you always know the IP of the target device.
-
IoT devices can be easier to manage with static IPs, especially if you rely on specific integrations.
What is DHCP?
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses to devices on your network. When a device connects, it gets a "lease" for a specific IP address, which can change after the lease expires. Think of it like grabbing a free parking spot every time you arrive at a busy lot.
When to use DHCP?
-
Guest devices (like smartphones, tablets, and laptops) that connect for short periods.
-
Home networks where managing static IPs for every device would be overkill.
-
Temporary devices that don't need consistent access to specific resources.
-
Large networks with many users, where manually assigning static IPs would be a headache.
Static IP vs. DHCP: Key differences
Feature | Static IP | DHCP |
---|---|---|
Address changes | Never changes | Changes when the lease expires |
Setup | Manual configuration required | Automatic (plug and play) |
Use case | Servers, cameras, IoT devices | Guest devices, laptops, phones |
Complexity | High — must assign each manually | Low — fully automatic |
Stability | Consistent, always the same IP | Changes with lease renewal |
Configuration | Configure in UniFi Network settings | No setup required |
How to configure static IP on UniFi networks
If you decide to assign a static IP to a device on your UniFi network, follow these steps.
Option 1: Set static IP using the UniFi Controller
- Log in to the UniFi Controller (like those hosted on UniHosted or locally on a Cloud Key, UDM, or self-hosted server).
- Navigate to 'Clients' from the side menu.
- Find the device you want to assign a static IP to.
- Click on the device name.
- Scroll down and select Settings.
- Toggle on Static IP.
- Enter the desired IP address (make sure it’s within your network's subnet and outside the DHCP range).
- Save changes and wait for the configuration to apply.
Tip: If you're unsure of the network range, you can find it in Settings > Networks under DHCP Server. Avoid conflicts with the DHCP pool.
Option 2: Set static IP on the device itself
Another option is to configure a static IP directly on the device (e.g., printer, NAS, or camera). This method is less common but still useful if you don't have access to the UniFi controller.
- Access the device's settings (usually through its local IP via a web browser).
- Navigate to the network settings or LAN settings.
- Set the IP to manual (instead of DHCP).
- Enter the IP, subnet mask, default gateway, and DNS server.
- Apply changes and restart the device if needed.
How to configure DHCP on UniFi networks
DHCP is typically enabled by default on UniFi networks, but you can customize the DHCP pool or range.
- Log in to the UniFi Controller.
- Go to Settings (gear icon in the lower-left corner).
- Click on Networks.
- Choose the network you want to modify.
- Under DHCP Server, define the start and end IP range.
- Save changes and let the UniFi controller apply the updates.
Pro Tip: Leave some IP addresses outside the DHCP range for static IP assignments. If your DHCP range is 192.168.1.50 to 192.168.1.250, you can reserve 192.168.1.2 to 192.168.1.49 for static IPs.
Advanced DHCP options
UniFi allows you to configure DHCP with some advanced features:
-
Lease Time: How long a device keeps its IP before the DHCP server assigns a new one.
-
Option 43: Used for devices like IP phones that need extra configuration information.
-
DHCP Reservations: This is a middle ground between DHCP and Static IPs. Devices always get the same IP, but it's managed by DHCP.
Best practices: Static IPs vs. DHCP
-
Avoid IP conflicts: If you use static IPs, make sure the addresses aren't part of your DHCP pool.
-
Document your assignments: Track which IPs are assigned to which devices.
-
Use DHCP reservations for simplicity: This method allows you to "lock in" an IP for a device while still using DHCP.
-
Prioritize network-critical devices: Use static IPs for devices like access points, security cameras, and file servers.
-
Keep things simple: Don’t assign static IPs for every device. Let DHCP handle phones, tablets, and laptops.
Static IP vs. DHCP: Which one should you choose?
Use Static IP if:
- You have servers, access points, or network printers.
- You're setting up port forwarding or firewall rules.
- You want to access devices remotely using the same IP every time.
Use DHCP if:
- You have mobile devices like phones, tablets, and guest devices.
- You don't want to manage each device's IP manually.
- You're working with a large number of devices that change frequently.
Common issues and troubleshooting
Issue 1: IP conflicts
If two devices are assigned the same IP, they’ll fight for the connection, causing network issues. Solution: Check the IP pool and static IP list to ensure there are no overlaps.
Issue 2: Devices can't connect after changing to a static IP
If you configure a static IP on a device and it can’t connect, it might be out of range. Solution: Verify that the IP address, subnet mask, and gateway are correct.
Issue 3: Devices keep losing their IPs
If devices keep changing IPs, it's likely they’re still on DHCP. Solution: Use DHCP reservation instead of static IPs, especially for mobile devices.
Final thoughts
Choosing between static IPs and DHCP isn’t about one being "better" than the other. Each has its place. Static IPs work best for critical devices like servers and IoT devices. DHCP is best for mobile and guest devices that change often. In larger networks, you’ll likely use a mix of both.
If you’re managing multiple networks, UniHosted’s cloud-based UniFi Controller can make this process much simpler. With 24/7 monitoring, automatic backups, and worldwide server locations, it’s the perfect companion for your UniFi network. You can easily configure DHCP and static IPs from the intuitive controller dashboard.
For more detailed steps on setting up UniFi networks, check out UniFi's official guide: How to Set Up UniFi.
Happy networking! If you need help configuring your UniFi network, UniHosted has you covered. We provide simple, affordable UniFi controller hosting with instant deployment and 24/7 monitoring. Check us out and start optimizing your UniFi network today! If you would like me to personally walk you through UniHosted, you can schedule a call with me here.
We host UniFi Controllers in the Cloud
Are you ready to take your UniFi Network to the next level? Deploy a UniFi Cloud Controller in minutes and manage your network from anywhere.
Free tier available
Get the best support
Join 1660+ customers
No credit card required