Assume the upstream router has an IP address of 192.168.10.1/24. The OpenWrt device is connected via a single LAN port and is accessible from the local network for software source access. OpenWrt requires a separate management IP address within the same subnet, a next-hop to the external network, and accessible DNS services. The IP address must not conflict with any other device; therefore, reserve the address outside the upstream DHCP pool, or explicitly configure an address reservation.
Prepare a method for relogging before changing the address
Record the current LAN IP address, uplink subnet, and computer network card settings. In LuCI, go to "Network → Interfaces" and edit the logical interface connected to the uplink. For static IPv4 address, use 192.168.10.2/24 if it is confirmed to be unused. Set the IPv4 gateway to the uplink's 192.168.10.1. Enter a custom DNS value with the actual DNS server providing name resolution; only fill in the same address if the uplink indeed provides DNS services. Menu labels may vary slightly depending on the LuCI version.
If the uplink is responsible for DHCP in this broadcast domain, the single-port device should not allocate another set of leases. After applying, log in again using the new IP address. If the management address has changed to a different subnet, first instruct the computer to renew the lease from the upstream device, or temporarily assign an idle IP address in the same subnet to the wired network interface; after verification, restore the original address acquisition method. If using the LuCI rollback application workflow and unable to connect, wait for the rollback to occur, or restore the previous LAN configuration via the reserved local console.
Acceptance of this device and other devices on the same network
ip -4 route show default
ip -4 route get 1.1.1.1
nslookup example.org
The local device's default next-hop should be the upstream device, and the routing source address should be the newly configured management address. Then, have a regular client renew its lease, and verify that it continues to obtain an IP address and the original gateway from the expected DHCP server. It is not required to change the default gateway for all connected devices to point to this single-port device.
Reference
Related guide · Set up OpenWrt as a bridged access point and keep DHCP on the main router
Comments