Skip to content
Contents
GuidesOpenWrt

OpenWrt swapped eth0 and eth1 after an upgrade. Which ports are WAN and LAN?

An old binding can now point to another socket. On a GoWin R86S with an Intel I211 and two I225-V controllers, the model alone cannot distinguish the matching pair. Disconnect the internet uplink, keep local console access, back up settings and photograph the wiring.

An old binding can now point to another socket. On a GoWin R86S with an Intel I211 and two I225-V controllers, the model alone cannot distinguish the matching pair. Disconnect the internet uplink, keep local console access, back up settings and photograph the wiring.

Match names to paths and sockets

Use SSH or the console to record the current MAC, carrier and PCI path. Adapt the example names. MACs can be overridden and hardware changes can move paths. The last two commands check the WAN binding and LAN bridge members. If absent, check actual devices in LuCI. Both screenshots show a two-NIC VirtIO VM running OpenWrt 25.12.6 x86/64. We tested the method without reproducing an R86S upgrade.

for p in /sys/class/net/eth*; do
    echo "$p"
    cat "$p/address" "$p/carrier"
    readlink -f "$p/device"
done
uci get network.wan.device
ls /sys/class/net/br-lan/brif

OpenWrt 25.12.6 · eth0 / br-lan · eth1 / WAN

Change one non-management link at a time

Use an isolated test computer. Substitute the port for eth1 and run both lines before unplugging, after unplugging and after reconnecting and waiting for negotiation. In the capture, eth1 at 0000:00:04.0 reads 1, 0, 1. NO-CARRIER changes back to LOWER_UP. If the device is disabled or the read fails, check administrative state before blaming the cable. Label each socket. Test the management port only with independent access.

cat /sys/class/net/eth1/carrier
ip link show eth1

eth1 · 1 → 0 → 1 · NO-CARRIER → LOWER_UP

Verify LAN before reconnecting WAN

In LuCI, open Network, Interfaces, Devices to check LAN bridge members, then edit the WAN binding. Preserve VLANs, dial-up layers and firewall zones. Keep raw WAN traffic out of the management bridge. Renew the computer lease and sign in locally before restoring the uplink. Check the default route, DNS and a real page, then reboot and recheck the mapping. If locked out, leave changes unconfirmed for automatic rollback or restore the backup at the console.

Check IRQ distribution when a multi-gig OpenWrt router misses line rate

Explore hardware

Comments