WAN issue private/public IPs

I have what I think is a bonkers issue with the WAN configuration on my Raspberry Pi 4 system complete with 2 x TP-Link UE300 Gigabit Ethernet interfaces. These 2 are used for connecting my pair of Draytek Vigor 130 VDSL modems to my 2 Internet connections.

Initially all was working fine via WAN1 then I added WAN2 and all was still fine but I assume still only using a single WAN because I hadn't installed the luci-app-mwan3 package at that time. I have a backup from this stage.

Once I installed luci-app-mwan3 I lost Internet connection (which I now understand is normal) and had an issue getting it working. So I uninstalled the luci-app-mwan3 package but that gave an error (don't have the message). I then reverted to the earlier backup and again had Internet connectivity.

Then the strange stuff seemed to happen. I wanted to rename the WAN interfaces so I deleted them and recreated them. Once I did the recreation the links came up but didn't' work and I noticed that the IP addresses assigned for the PPPoE connection were private (10.115.245.x/32). Previous to this issue they have always been public addresses specific to the 2 different service providers. I'm not sure if the installation and removal of luci-app-mwan3 (with the errors) has caused this, or is a red-herring?

The really weird thing now is that if I use my working backup then all is good (albeit without mwan3) then if I just delete and re-add one of the WAN interfaces if changes from a public to private address. I have compared the network config file before/after and there's no difference in it. It just seems that the delete/add action it having some issue which I can't fathom. I have no idea why I'm getting a private IP address allocated.

I have even done a subsequent luci-app-mwan3 package installation and removal without error and that hasn't changed anything. Just to see if that cleaned anything up.

Any thoughts appreciated.

Raspberry Pi 4B
2 x TP-Link UE300 Gigabit Ethernet
OpenWrt 22.03.3

Regarding the private address on the wan link, this is something that you should discuss with your ISP. Most likely they lock somehow the identity of your connection and then they see a new identity when you start with a new name.
Renaming the wan interfaces is not necessary, you can adjust mwan3 configuration to the current names.
There is a first step to take before configuring mwan3, which a lot of people ignore. You need to assign metrics to the wan interfaces.
In case all these won't work, you can post here the following to provide more help.

Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have

ubus call system board; \
uci export network; uci export mwan3; uci export firewall; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru

Thanks for you thoughts. FYI the renaming was for unrelated cosmetic reasons not for mwan3.

The situation I have now is without mwan3 installed.

I do a restore from the previous backup and Internet works. My pppoe interface shows a public IP as expected. I then delete the interface/device configuration and reinstate it. Same config, different name and then it shows a private IP. No Internet connectivity. This process is repeatable, not an ISP issue.

I compare the configuration files and no obvious difference.

Hence the confusion.

I will provide configuration when I am able to.

If the configuration is the same, there is not much we can do to help you. Your ISP is assigning you the wan IP, they should know why this happens.


Once possible scenario is this:

  • your 'working' configuration might include a MAC address that is specified in the config file itself,
  • your non-working one may not include the MAC, so OpenWrt may use a MAC that is programmed into the factory data of your device.

If those are different, the ISP will not necessarily issue an IP address to the 'new' MAC address until they have cleared the previous MAC association/lock.

Just an idea, but may or may not be the case in your situation since we haven't seen any configurations.


Thank you all for your thoughts. I have discovered the issue.

I have two different service providers and thus different PAP/CHAP credentials for each.
What's happening is that the two USB connected Gigabit Ethernenet adaptors and the associated configuration are swapping. I've proved that when there's a problem with the credentials I get assigned a private IP address and when working a public one as expected.

I think this might be due to the lack of bonding of a given eth1/eth2 to a specific USB3.0 port on the Raspberry Pi, thus the 'random' swapping.

I will post separately re. that, since it's a slightly differnet issue.

Thanks again.

Hotplug could be useful there.