LAN/WAN bridging with the new /etc/config/network

I've noticed that on top of lan/wan there're also lan_dev and wan_dev entries in the /etc/config/network now.

How do I bridge lan and wan with those? do I need to change ifname in lan or name in lan_dev or both?

The *_dev sections cover low level details such as MAC addresses. You can usually leave them alone and never touch those sections. Bridging lan and wan should still be the same, but depends on the type of the device.

If lan and wan are separate nics (e.g. eth0.1 and eth1) you can simply change the ifname option of the existing lan bridge, e.g.:

config interface lan
  option type bridge
  option ifname 'eth0.1 eth1'

If LAN and WAN are separated through VLAN config only (e.g. eth0.1 and eth0.2) then its usually better to leave config interface lan and config interface wan as-is and to just adjust the VLAN settings instead by moving the wan swconfig port from the wan vlan group to the lan vlan group.

1 Like