Xiaomi router DHCP static IP settings, configure NAS and printer once for lifetime use
What is DHCP static IP
Ordinary routers use DHCP dynamic allocation. The device will randomly get an IP every time it connects. Maybe today 192.168.31.10 , will become tomorrow 192.168.31.50 . This is no problem for devices such as mobile phones and tablets that are occasionally connected, but it is not possible for devices such as NAS, surveillance cameras, and network printers that require fixed addresses. Every time the IP changes, external network access and internal network mapping must be reconfigured, which is very troublesome.
Static IP means manually specifying the IP address of a device that will never change. The background management page of Xiaomi router is called 192.168.31.1 , after entering, you can see the DHCP setting options in "Application Management". Not all routers have this function, and some cheap models can only achieve similar effects by binding MAC addresses or changing DNS.
Why should we set static IPs for NAS and printers?
My Feiniu NAS did not have a static IP before, so I struggled for two weeks. The reason is very simple - the internal network address of the NAS changes frequently. Today I wanted to add remote access in the Mijia App, but I found that the IP is still the same as yesterday, but the actual device has changed to a new address. The most terrible thing is port mapping. The 8080 port configured on the optical modem points to the NAS. As a result, once the NAS IP changes, the external network cannot be opened.
Network printers have the same problem. I used to use an HP printer at home, and I could print directly when connected to WiFi. Then suddenly one day my computer couldn't find the printer. After checking for a long time, I found out that the printer IP address was changed from 192.168.31.20 became 192.168.31.45 . In the Windows system, it is necessary to delete and add the driver again, which is extremely troublesome. If it's a Mac, it's even more exaggerated. You have to go into the system settings and change the network ports one by one.
To sum up, any device in the following situation is worth setting up a static IP:
- Home media centers such as NAS and storage servers that require external network access
- Multi-device sharing of network printers and scanners
- Surveillance video recorder (NVR), which needs to play back history regularly
- Smart home gateway, such as Xiaomi’s hub or third-party Home Assistant
- A development board for running code development, such as when the N1 box is flashed as a bypass router
Steps to set static IP on Xiaomi router
This operation is actually quite simple and can be done in about two minutes. First make sure your device is connected to the router, then enter 192.168.31.1 , enter the background management interface. Note that if you use WeChat to scan the QR code to log in, some functions may not be visible. It is best to use a computer browser or enter the URL directly into the backend.
After entering, click "Application Management" in the lower left corner and find the "DHCP Service" item. By default, DHCP is turned on, and what you see is the assigned address range. Scroll down and you will see an option for "Static IP Settings" or "Address Binding". Click on it to start configuration. Note here that the IP you choose should not overlap too much with the pool automatically assigned by DHCP, otherwise two devices may compete for the same IP.
The way I recommend is to put the static IP at the beginning of the address segment. For example, the DHCP pool is 192.168.31.100 arrive 192.168.31.200 , then you put 192.168.31.10 arrive 192.168.31.50 These addresses are reserved for static binding. This way there will be no conflict and it will be easier to remember. When setting up the NAS, just use integers such as .10 and .20. This will make it clear when you check it later.
After filling in the device name and MAC address, save and restart the router, wait for it to restart, and then use the fixed IP to access the NAS or connect to the printer, and you should be able to connect stably. The whole process does not require changing any settings on the computer, it just tells the router "the IP corresponding to this MAC address will always be this number."
What else needs to be done after setting up
Many people think that setting up a static IP is the end. In fact, there is another step that is easily overlooked. If you are using the optical modem dial-up + router bridging mode, remember to check whether the optical modem is doing address binding at the same time. Otherwise, the DHCP on the optical modem side may continue to assign old addresses to the equipment, and the fight between the two parties will become even more chaotic.
Another area to pay attention to is backups. The static IP settings of the Xiaomi router are stored in the router itself. Once the factory settings are restored, all bindings will be cleared. It is recommended that you write down the IP and MAC address corresponding to each device in the mobile phone memo or WeChat File Transfer Assistant, so that if you encounter a reset situation in the future, you can quickly restore it.
If your NAS supports DDNS or has a fixed domain name, static IP will work better with DDNS. Because DDNS only recognizes the current IP, if the IP changes, external network access must frequently update the resolution. With a static IP, DDNS only needs to be configured once, and it will be effective for a long time, so there is no need to worry about it again.
Troubleshooting common problems
Many people encounter problems after assigning static IPs. There are three common situations.
The first is that the device cannot connect to the Internet. This is usually because the IP you bound is not in the DHCP pool, but DHCP is not turned off correctly. The solution is to check the allocation range of the DHCP service and ensure that the static IP is either outside the pool or clearly marked as a reserved address. There is an "Address Reservation" function in the "Advanced Settings" of the Xiaomi router. It is recommended to use this instead of handwriting the IP directly.
The second is that multiple devices grab the same IP. This situation is more common when there are multiple NAS or virtual machine soft routers running in parallel at home. The MAC address of each device must be unique, otherwise the router will not know who to bind the IP to. You can check the MAC of your computer through in ipconfig /all (Windows) or ifconfig (Linux/Mac), and then go to the router background to compare.
The third is that some applications cannot be opened after changing the static IP. This may be a cache problem. First try clearing the browser cache or changing the device to test. If it still doesn't work, you can ping the new IP address to see if it can be connected. If not, it may be blocked by the firewall, and you need to open inbound rules for the corresponding port on the NAS or target device.
One final word
Static IP is a thing that I don't know about when I don't use it. But after using it, I find that I can't live without it. Especially if you have a NAS or printer at home, setting it up once can save you a lot of trouble in subsequent maintenance. The operation entrance of Xiaomi router is relatively clear, unlike some brands that are very hidden. It is recommended that you configure the static IP after installing the equipment, and don't wait until problems arise and then come back to find them.
The accompanying pictures of this article have been displayed above. If you have any questions, you can leave a message in the comment area for discussion. If you find it useful, remember to save it for later use so you can refer to it next time you reinstall the router.
