Interfaces are swapped in nanostation-m from 18.x to 19.x


so I would like to upgrade the firmware to 19.x, but one problem is that in some devices like nanostation m5 and to confirm nanostation m5 xw the interfaces are swapped:

  • in 18.x
    • eth0 is br-lan
    • eth1 is wan
  • in 19.x
    • eth0 is wan
    • eth1 is br-lan

as this is not reachable from internet, accepting traffic from wan is fine

I'm worried, specially:

  • because some devices have poe passthrough, so, this swapping can harm other devices (and cause problems in network stability) poe passthrough uses gpio pins, so I don't think that it is affected (we will see)
  • what will happen from 19.x to 20.x ? another swap?

I would appreciate recomendations about how to handle this situation

If there is a clear procedure (getting mac address from 18.x?), no problem I can automate it from 18.x and apply to 19.x though scripting (firmware is custom and I can put whatever I want). In general, the way I do it is putting everything on the firmware so no extra configuration is needed. So I don't reuse config from 18.x, and that way, I don't have to care about backward compatibility


since 20x will have DSA for it's switch's driver
I'd say it would change for all devices

I'm guessing you upgraded from an ar71xx target to ath79? AFAIK, this change is related to the transition to ath79 and that things will not change moving forward on ath79. There have been warnings about the fact that the configuration files may not be compatible across the target transition, and this would be one such artifact. If the physical ports, by default, perform the same functions, it should be a non-issue in the long term, provided that the configuration is not kept (or restored) after the transition to the new ath79 target (these settings should just be reconfigured manually).

That said, if the new mappings cause a functional swap of the ports (I'm guessing that by default "main" has been WAN and "secondary" as LAN), I would suggest filing a bug for that since it could mess people up later.

DSA is not yet on the table for ath79[0], ipq40xx or ipq806x - yes, it's supposed to happen, but it's not there right now (and given the timing is unlikely to happen for 20.x.0).

[0] ath79 is not as uniform as ipq40xx or ipq806x, so there might be some ath79 devices already using DSA drivers (e.g. the tl-wr941nd v2/ v3 comes to mind), but in general the ar8327/ ar8337 based switch chips are still using swconfig in OpenWrt.

1 Like

Today I spend time in this issue. Nanostation m5 xw is not affected, in fact, I succesfully migrated fine from 18.x to 19.x without problems (because is one interface: eth0, with internal vlan eth0.1 (lan) and eth0.2 (wan). Got confused, sorry.

I also have seen that is not that complicated (at least for our network), most of our devices have only one interface (eth0).

Tomorrow I expect to spend time testing migration from 18.x to 19.x in Nanostation m5. This device is very present in our network).

OK, so the problem is when we recycle a target for different devices, and you forgot that A is A and B is B.

after I touched the antenna, that nanostation-m is in reality a nanostation loco XM. When it has two network interfaces, the network interfaces are swapped, but if it only has one defined in /etc/config/network, it works fine. Let's count this as a good solution and let's move on.

real nanostation-m (nanostation XM, not loco) ar71xx in 19.x works fine with same configuration as 18.x. nanostation-m ath79 in 19.x works very bad, I hope we got it fixed soon.

Sorry for opening the discussion. Now I got the situation more clarified and I will open the bug reports, discussion or pull requests whenever it has to be done.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.