In OpenWrt, a logical interface does not necessarily correspond to one physical Ethernet port.1 An interface can represent a bridge, VLAN, Wi-Fi network, or tunnel. Understanding this helps avoid mistakes when adding VLANs or multiple WANs.
Three components to distinguish
- Device: a lower-level network device or bridge.
- Interface: a logical configuration containing a protocol, IP address, and gateway.
- Firewall zone: a group of interfaces sharing firewall policies.
For example, lan can run on a bridge device containing several LAN ports and internal SSIDs.
View configuration with LuCI
Open Network → Interfaces. You can inspect:
- IPv4 and IPv6 addresses.
- DHCP client, Static address, or PPPoE protocol.
- The device in use.
- DHCP server status.
- Firewall zone.
Do not change the LAN IP remotely without a fallback path. After clicking Save & Apply, the computer may lose its connection and need to obtain a new address.
Configure a static address
A typical static LAN interface has:
| |
When OpenWrt is used as an access point, its management address should be in the main router's subnet and its DHCP server is usually disabled. Do not apply this to a gateway router unless you understand the device's role.
Configure WAN with DHCP
When an upstream modem or router assigns an address automatically:
- Open the
waninterface. - Select DHCP client as the protocol.
- Check the device attached to the WAN port.
- Click Save & Apply.
- Check the assigned address and default route.
Commands for checking the connection:
| |
If an IP address responds but domain names do not, check DNS. If there is no default route, check the WAN protocol, cable, and upstream device.
Configure with UCI
List the current interfaces:
| |
Show only LAN:
| |
Apply a UCI change only after creating a backup:
| |
If you are connected through the LAN address over SSH, the session may be interrupted after reload.
Network troubleshooting checklist
- Check the physical link and device.
- Check whether the interface has an IP address.
- Check whether the DHCP client received a lease.
- Check the default route.
- Ping the gateway before testing the Internet.
- Check DNS after IP connectivity works.
- Check the firewall zone if packets are blocked.
Conclusion
LuCI is convenient for observation and quick changes, while UCI is useful for scripts and repeated operations. Whichever method you use, check the device, interface, route, and firewall zone in that order.


Góp Ý / Bình Luận / Đánh giá