OpenWrt Forum Archive

Topic: OpenWRT DHCP and Wifi Bridge

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

My setup:
- Public Wifi HotSpot which i can successfuly connect to with my Laptop.
- 2x TP-Link TL-WR841N/ND v11 / OpenWrt Chaos Calmer 15.05.1 r49208 / LuCI for-15.05 branch (git-16.090.31416-605d1f1)

What i want to achive:
[Hotspot] --(WLAN)--> [TP-Link1] --(WLAN)--> [TP-Link2] --(Ethernet)--> PC with DHCP IP from [TP-Link1] and Internet from [Hotspot]


TP-Link1 is sucessfuly connect to Hotspot. I've created an WLAN Accesspoint(WDS) named OpenWRT in the network "LAN"
The gateway of Interface LAN(br-lan) was set to Hotspot IP and is a bridge between eth0 and OpenWRT.
With this setup I receive an IP from TP-Link1 and Internet is workin via Ethernet and Wifi.

Now i'm trying to connect TP-Link2 to TP-Link1. I tried the recipe for an Dump Accesspoint  but it's not working for me.
For the LAN interface on TP-Link2 i set Static IP to 192.168.1.2
I connected via Wifi to TP-Link1 in Client(WDS) mode. Created another WLAN Accesspoint named OpenWRT2 and bridged the interface LAN(br-lan) the same way as for TP-Link1.

And that's the point where I'm stuck now. My PC got an IP from TP-Link2 but i've no Internet and i cannot reach TP-Link1

If i enable Masquerading in Firewall settings for zone LAN on TP-Link2 i've Internet but cannot reach TP-Link1 webinterface.

Configs are here: pastebin.com/x5p9hVEE

I hope you can help me. Many thanks in advance.

Hi, sys00

I guess you neither can ping your TP-Link1 nor the internet (from TP-Link2 or your laptop), right?
In any case I would recommend you to put a gateway in the TP-Link2 network config:

...
option ipaddr '192.168.1.2'
option gateway '192.168.1.1'
...

To test if you can ping the internet use:

ping 8.8.8.8

(Its the google dns server)
If you can ping now the internet but cannot browse any webside you also need to put an dns after the gateway e.g.:

option dns '8.8.8.8'

Hopefully the internet should now work normally on your laptop.

Now you can think about the the dhcp thing you mentioned.

(Last edited by benny.1337 on 16 Sep 2017, 17:42)

Hi benny,
thanks for reply.

As i've written i have access to internet (and can ping google dns of course) if i enable Masquerading in TP-Link2.
Setting 192.168.1.1 as gateway has no effect.

So you need active Masquerading in TP-Link2? Or would it be ok to have Masquerading in TP-Link1 only?

I was assuming you enabled Masquerading in TP-Link2 only for testing. Can you ping the internet when Masquerading  is off in TP-Link2 (after setting the gateway)?

Tomorrow I'll try to rebuild your setup, maybe it's only a firewall config problem...

Turn off the DHCP server in unit 2. 

That one is a simple bridge between the STA(WDS), its local AP, and your Ethernet users.  All routing and DHCP is handled by unit 1.

(Last edited by mk24 on 20 Sep 2017, 16:36)

The discussion might have continued from here.