OpenWRT One has the WAN using 2GB ethernet (eth0) and the LAN using 1GB ethernet (eth1)
I currently have a home-office network setup where the WAN connection is dual DSL over copper -- not even 1GB and not likely to be any time soon -- so I'm thinking the faster interface will be far more useful on the LAN side.
It looks utterly trivial to edit /etc/config/network to
swap 'eth0' with 'eth1' everywhere:
config interface 'wan'
option device 'eth1' #instead of eth0
config interface 'wan6'
option device 'eth1' #instead of eth0
config device
option name 'br-lan'
list ports 'eth0' #instead of eth1
while /etc/config/firewall, which only references 'wan', 'wan6' and 'lan', seems to have no reason to care which of eth[01] is which.
Seems to me this either Just Works or it instantly bricks everything (in which case I get to learn more about recovery),
but here's the real question:
Is there some lower level reason NOT to do this,
e.g., am I opening up some huge security hole because there's stuff at the kernel level that hardens eth0 against external attacks but doesn't do the same for eth1?
Or will this horribly confuse something else that I need to worry about?
(e.g., I do see the "config led" stanzas in /etc/config/system also refer to eth[01], so I'm guessing if I don't edit those too, I'll have the wrong sets of lights flashing in response to traffic, which will be hilarious but otherwise harmless)
Update: The above modification to /etc/config/network
appears to work; it did not, in fact, brick my router. I was also able to reflash a sysupgrade with "Keep settings" and I could reconnect without having to move the cable. So yay; thank you all.
The one weirdness is that the LED names are evidently tied to the physical locations of the ports, so swapping the names in network
brought the LEDs along for the ride and there was no need to edit system
. Not unexpected, but having them be named (and continue to be named) for the the higher level interfaces (wan
, lan
) in the original configuration is unfortunate and confusing.
E.g.,
amber:lan
should really be named amber:eth1
, since it's the amber light on the eth1
port, regardless of which interface that port is carrying, Likewise
mdio-bus:0f:green:wan
should be named mdio-bus:0f:green:eth0
or maybe just green:eth0
,
but I have no idea how these names get assigned (guessing it's in the kernel somewhere?)
Is this worth a bug report?