OpenWrt Forum Archive

Topic: Bridge Switch - WAN/WiFi on TL-WR841N

The content of this topic has been archived on 24 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

since the wifi range of my main router (Speedport W724, dhcp+gw) is not sufficient i want to build a network bridge (TL-WR841N and OpenWRT 15.05). Furthermore i want to attach a FreeNas Server to the switch of the TL-841N, which should be visible to all all devices in the network. Both the Speedport (LAN) and the TL Router (WAN) are connected via ethernet.

For this i followed the dumb ap and the bridged ap howto. WiFi is working and the clients get dhcp leases from the main router, Wifi Roaming is working.

The problem is, that i can't connect to the FreeNAS Server (static IP 192.168.2.10). I'm not sure, how to bridge the Switch with the WAN/Wifi Interface exactly. I tried to change the IP of br-lan to 192.168.2.3, but then I can't access UCI/LUCI anymore.

My /etc/config/network looks like:

                                                                                                                       

config interface 'lan'  
    option ifname 'eth1'
    option force_link '1'   
    option type 'bridge'
    option proto 'static'   
    option ipaddr '192.168.1.1' 
    option netmask '255.255.255.0'  
    option ip6assign '60'   

config interface 'wan'  
    option ifname 'eth0'
    option _orig_ifname 'eth0'  
    option _orig_bridge 'false' 
    option proto 'static'   
    option ipaddr '192.168.2.2' 
    option netmask '255.255.255.0'  
    option gateway '192.168.2.1'
    option dns '192.168.2.1 8.8.8.8'

config switch   
    option name 'switch0'   
    option reset '1'
    option enable_vlan '1'  

config switch_vlan  
    option device 'switch0' 
    option vlan '1' 
    option ports '0 1 2 3 4'

Anyone has a idea?

Thanks, roger

(Last edited by roger12 on 29 Oct 2017, 10:54)

I do sort of the same thing, but I found it is much easier to install luci-proto-relay (which will install relayd)  I think adding that then adding an interface of proto relay-bridge and bridge the lan and the wan (im assuming that is where the connection to the other router is) should do it. 

In my config though it uses ifname ethX.1 on the lan bridge but that may be just a difference in hardware on how the cpu/switch/radios are set up between your setup and mine.

In my case I'm bridging the 5ghz radio as a client to the main router so I don't need to run the cable but have several devices connected to the switch that all get addresses etc from the main router just fine.  My main router uses 192.168.1.0/24

there are so many different ways to set things up and so many different hardware thats its hard to give correct advice without knowledge/experience on exactly the same stuff. So maybe this helps and maybe not LOL
good luck!

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.205.205'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

config interface 'wlan0'
        option proto 'dhcp'
        option delegate '0'

config interface 'br0'
        option proto 'relay'
        list network 'lan'
        list network 'wlan0'

A truly dumb AP, which is what you want, does not have a WAN network at all.  Everything in br-lan.  This will allow free flow of traffic bridged at layer 2 without any further configuration.  You can move the eth0 port to LAN so there are 5 usable ports on the AP.  One of which, it doesn't matter which one, goes to your main router.

Make sure to turn off the AP's DHCP server both IPv4 and v6.

(Last edited by mk24 on 29 Oct 2017, 18:41)

The discussion might have continued from here.