I'm trying to bridge my router to the upstream router, so both routers would share the same subnet and sees all the devices within the network, the downstream router will also serve a wireless access point.
According to this thread, it is possible to bridge LAN and WAN on a OpenWrt/LEDE box, and perform SQM transparently on LEDE without changing the architecture of the network. It is desirable in my scenario, because the heavy-lifting works such as traffic accounting and user management would be done at the upstream device.
However, I don't understand how should I configure such LEDE bridge. As @silentcreek pointed out that,
I basically followed these instructions: https://wiki.openwrt.org/doc/recipes/dumbap
However, there is one step in these instructions that I didn’t follow: For devices that don’t have a real dedicated WAN port but only a switch port that is configured as WAN in the switch/VLAN configuration, it recommeds to put all the switch ports in one VLAN. You shouldn’t do that because then you don’t have a seperate WAN interface anymore on which you can perform SQM. So, simply bridge the two interfaces and you should be good.
It is easy to understand that, if you remove the VLAN for WAN and move the WAN port to the LAN VLAN, all the traffic would flow in the same network within the same bridge, and since we are doing Cake SQM and it needs two interfaces to work, we should not do it.
But I still don't understand how should you bridge the distinct VLANs for WAN and LAN together while still preserving a WAN interface in order to make SQM/Cake to work. In a default LEDE installation, there are two interface,
br-lan with wireless network and the LAN VLAN bridged together, and the
wan interface powered by the underlying
eth0.2. If I bridge Wireless, eth0.1 and eth0.2 together for the LAN interface, and set the IP address of the bridge interface to
The current configuration is,
config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fd29:8bc8:191f::/48' config interface 'lan' option type 'bridge' option proto 'static' option ipaddr '192.168.2.2' option netmask '255.255.255.0' option ifname 'eth0.1 eth0.2' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option vid '1' option ports '0t 3 4 5' # Main LAN, VLAN 1 config switch_vlan option device 'switch0' option vlan '3' option vid '3' # A dedicated Ethernet port for management option ports '0t 2' config interface 'dmz' # A dedicated Ethernet port for troubleshooting and management option proto 'static' option ifname 'eth0.3' option ipaddr '192.168.3.1' option netmask '255.255.255.0' config switch_vlan option device 'switch0' option vlan '4' # it has been deleted and recreated, thus "4". option ports '0t 1' # WAN, VLAN 2 option vid '2' config interface 'wan' option ifname 'eth0.2' option proto 'none' option auto '1' option force_link '1'
Accessing luci on the 192.168.2.2 over Ethernet is okay but the upstream router at
192.168.2.1 just became unreachable.
$ ping 192.168.2.1 PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data. From 192.168.2.101 icmp_seq=1 Destination Host Unreachable From 192.168.2.101 icmp_seq=2 Destination Host Unreachable
What's wrong? Even stranger that it works perfectly over Wi-Fi, but not Ethernet? What?! I captured the traffic on the WAN port and it seems my computer was trying to send a bunch of ARP packets to ask for the MAC address of 192.168.2.1, but my box never receives the reply. While with Wi-Fi connection, all the traffic can flow to the upstream without problem.
So, simply bridge the two interfaces and you should be good.
How? @silentcreek, could you elaborate the configuration and post your