Skip to content
Contents
GuidesOpenWrt

OpenWrt DSA port mapping: from eth0.1 to lan1 and lan2

An older configuration may use eth0.1, while the new firmware shows individual switch ports. DSA exposes managed switch user ports as network devices.

An older configuration may use eth0.1, while the new firmware shows individual switch ports. DSA exposes managed switch user ports as network devices.

If access to LuCI is intermittent, first keep a known working wired management port and export the configuration.

Build a reliable port map

Save the old correspondence between case labels and VLANs. Observe ip link, bridge link and port statistics. Unplug and reconnect one test port at a time to match its software name to its carrier state.

  1. Open Network → Interfaces → Devices in LuCI and inspect br-lan and its bridge ports. Connect a test client to each port in turn. Watch for the carrier change in ip link or bridge link.
  2. Migrate one unused port from the old VLAN configuration to DSA. Test DHCP, management access and the uplink before touching an active port.

Verify the management port before migrating the rest

The old logical interface eth0.1 does not necessarily correspond to lan1. Move the remaining ports only after observing that the physical port and VLAN match. If the change fails, return through the original management port.

Three gigabit LAN ports share a 2.5G uplink: which traffic competes for it?

Consider the OpenWrt 25.12.6 board definition for the ASUS RT-AX52 (non-Pro). On the MT7531, port@0, port@1 and port@2 are labelled lan3, lan2 and lan1 respectively. The CPU port, port@6, points to gmac0. Its fixed-link declares speed 2500 and full-duplex. WAN uses gmac1 and a separate PHY. Three LAN interfaces in ip link can still share one internal link to the CPU.

Where the endpoints are Which path to verify
Two devices exchange data on the same switch and VLAN If the switch has learned the destination MAC and layer-2 hardware forwarding is active, traffic can stay inside the switch. The absence of a host capture or a corresponding increase on the CPU port does not establish packet loss.
Several LAN devices download files from the router itself Each response must travel from the host to the switch. The flows can compete in the same direction on the uplink. Also check storage, the server process and the individual gigabit client links.
A LAN device routes to WAN, or to another LAN on a different VLAN Check the route, both interfaces and the offload path. For software routing between VLANs on the same switch, traffic crosses the internal link in one direction before routing and the other direction after routing. Do not add full-duplex receive and transmit rates as though they occupied one direction.

Check the model and release with ubus call system board. Use ip -d link show, bridge link and bridge vlan show to record endpoint interfaces, VLANs and membership visible to Linux. If the driver does not report the CPU link speed, inspect port, MAC, phy-mode and fixed-link in the matching board’s device tree or schematic. Boards with multiple CPU ports may have different sharing arrangements.

Transfer a small file between the endpoints and record bytes received. Compare user-port and conduit counters before and after with ip -s link show dev DEVICE, substituting the actual interface name. Check background traffic and whether the driver exposes hardware counters for that flow. To test contention, record each flow’s direction and receiver byte count, then compare isolated and simultaneous runs during a maintenance window. No physical RT-AX52 throughput was measured here. The 2.5G figure is a board link configuration.Measure 2.5 GbE throughput with an iperf3 endpoint on each side

Reference

Reference screenshot: configuring a DSA switch from userspace

Linux kernel documentation · GPL-2.0

Explore hardware

Devices mentioned

Comments