Changing default behavior on first boot

When I first boot up openwrt, it assigns eth0 to be the LAN interface (well it looks like it creates a bridge).

Is there a way to change it so when I reflash my device, I don't need to unhook all the cables?

not enough information given...

please supply device, fw version and intended outcome...


The easiest for me to test with are VMWare and VirtualBox hosts. There, I'm using openwrt-21.02.

I have also tested on a physical Nexx WT3020H, but I'm more interested in running it virtually at this time. It is currently running and old snapshot of 19.07.

My intended outcome is that upon flashing the openwrt image to the (virtual) device, that eth0 is WAN and eth1 is the LAN.

Currently, after flashing I have to reconfigure my virtual interfaces, connect to openwrt, reconfigure it, and then reconfigure my host.

1 Like

The default is reverse:

  • eth0 LAN
  • eth1 WAN

You can change them after boot. If you save settings (which you can only do on the same version), they usually don't change.


Out of curiosity, is there any particular reason the reverse is the default? To me it seems like that it is counterintuitive.

I assume that means the only way to change it is building a custom image, correct?

if your running virtually then you just flip what is connected where...

to bake the change into an image...

  • use ./files/etc/config/network ( pre-populate with existing router config file )
  • /etc/board.d/02_network ( create case statement matching board with flipped eth0/eth1 )

I can think of a really good one:

Due to the firewall setup, you cannot access the router from WAN. The first interface setup (i.e. LAN) has access. This is especially important if a person were to only specify one interface on the VM.


I guessed that file might be an option. :smiley: I'm just not super comfortable reading shell scripts yet, so I wasn't sure.

That is something I considered. Could this thinking also be a possible reason that the LAN interface is also bridged by default? If a user was to enable a wireless radio they would just need to add it to the bridge and everything would "just work?"

No it can't be. It's bridged to the VLAN so you can add a WiFi chip without further setup.

You got it! :+1:

(BTW, you don't have to make 2 replies to each of us per reply, we can all see them.)

If you're referring to the 2nd interface...I already noted:

FYI, all subsequent interfaces will not be configured by default. They can be used as you desire. :wink:


Sorry I was on my phone. It was clearer to me to break things apart when I couldn't see the conversation easily. :joy:

As in eth2 to ethN correct? It looks like eth1 (like you mentioned) is configured for WAN.

1 Like

Yes, correct.

  • eht0 LAN
  • eth1 WAN
  • ethx - infinity un configured
1 Like

@anon50098793 @lleachii Thank you for this kind and helpful interaction here!


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