OpenWrt Forum Archive

Topic: [How to] bridgeAP via ethernet with DHCP from bridge?

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

------------------------------------
Using Openwrt on a TP MR3040.
------------------------------------


What i want to achieve is this -
----------------------------------

TL-MR3040 to connect to 'main router' via 'ethernet cable only' (TL-MR3040's WAN port to main router's LAN port) and then internet is then shared via 'wifi' AP on the TL-MR3040 to multiple wifi clients.

Client should then only gets their ip addresses from 'wifi' (DHCP on the TL-MR3040) and not from the 'main router'.



What i have now is -
----------------------

TL-MR3040 is connected to 'main router' via 'ethernet cable only' and then internet is then shared via 'wifi' AP on the TL-MR3040 to wifi client.

Client does connect okay to the internet, however client only get its ip address from DHCP on the 'main router' and not from DHCP on the TL-MR3040.


Any comments or help or direction will be most appreciated.

Thanks smile

p.s.

Please note that the TL-MR3040 has only one ethernet port, so any possible solution should take this into consideration.

(Last edited by des245 on 24 Jun 2013, 14:45)

Is the lan port set as WAN?
network

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'

Check the repeater config #2 on this post:
https://forum.openwrt.org/viewtopic.php?id=39077
Cheers

(Last edited by dabyd64 on 23 Jun 2013, 12:38)

dabyd64 wrote:

Is the lan port set as WAN?
network

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'

Check the repeater config #2 on this post:
https://forum.openwrt.org/viewtopic.php?id=39077
Cheers

Thanks for dropping by mate ...appreciated.

Will have a look and try your suggestion out and will report back if successful smile

dabyd64 wrote:

Is the lan port set as WAN?
network

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'

Check the repeater config #2 on this post:
https://forum.openwrt.org/viewtopic.php?id=39077
Cheers

Hi dabyd64

I am afraid your suggestions didnt get things working as i need it to be sad

It could be because i didnt really undertand what you suggested thought, however this is what happened:

I did change lan to wan as you suggested but the result of that was me not being able to get an ip from the TL-MR3040 via wifi or ethernet and had to use the TL-MR3040 'failsafe-mode' in order to be able to telnet into it and then change 'network' setting back to what it was before, only then was i able to then get an ip as normal from it again.

I also checked out the link you quoted but that is for connecting to a mainrouter's wifi signal and repeating it via a wifi-AP on the second router e.g. on the TL-MR3040...where wifi clients then connect to the TL-MR3040 wifi-AP and get their ip addresses from the TL-MR3040, whilst the mainrouter only sees the connection from the TL-MR3040.

...what i want to do is similar but slightly different:-

I want to connect from the TL-MR3040 to a mainrouter via ethernet ports only (TL-MR3040's WAN port to main router's LAN port) using ethernet cable and then create a wifi-AP on the TL-MR3040 for clients to connect to and most importantly for these wifi clients to get their ip from the TL-MR3040 only and not from the mainrouter. I only want the mainrouter to see and give out an ip to the TL-MR3040 (and not for the mainrouter to see the clients connected to the TL-MR3040).


Cheers mate smile

p.s.

dont worry about me bricking the TL-MR3040, i know how to use either 'failsafe-mode' or go in via serial to fix it, so i am willing to try any suggestion big_smile

(Last edited by des245 on 24 Jun 2013, 14:36)

OpenWrt, by default, bridges the wireless network to the LAN, i.e. br-lan. You want to "break" that bridge and define eth0 as wan/dhcp. Delete

option ifname 'eth0'
option type 'bridge'

in /e/c/network interface 'lan' section and introduce what dabyd64 just posted.

If you're lost, please post TL-MR3040's default /e/c/network, /e/c/wireless.

Also, if you mess up but still have access to ssh, issue

# firstboot

to reset the router to default settings.

EDIT: option ipaddr in interface 'lan' section certainly need to be different from host router subnet, e.g. host router=192.168.1.1/24, TL-MR3040=192.168.2.1/24

(Last edited by orange on 25 Jun 2013, 10:00)

orange wrote:

OpenWrt, by default, bridges the wireless network to the LAN, i.e. br-lan. You want to "break" that bridge and define eth0 as wan/dhcp. Delete

option ifname 'eth0'
option type 'bridge'

in /e/c/network interface 'lan' section and introduce what dabyd64 just posted.

If you're lost, please post TL-MR3040's default /e/c/network, /e/c/wireless.

Also, if you mess up but still have access to ssh, issue

# firstboot

to reset the router to default settings.

EDIT: option ipaddr in interface 'lan' section certainly need to be different from host router subnet, e.g. host router=192.168.1.1/24, TL-MR3040=192.168.2.1/24


Hi orange,

I believe i misunderstood what dabyd64 suggested i do, however with your very clear directions i was able to sort things out and now have it exactly as i wanted.

Thank you very much for taking time to help me...appreciated smile

...and of-course a big thank you to dabyd64 for his input as well big_smile

You're very welcome. Trying to help people, I myself very much appreciate if someone actually takes the time/care to explain his/her problem the best that he/she can. This IMO deserves care in answering. Glad that we sorted out this particular issue for you. Have fun!

orange wrote:

You're very welcome. Trying to help people, I myself very much appreciate if someone actually takes the time/care to explain his/her problem the best that he/she can. This IMO deserves care in answering. Glad that we sorted out this particular issue for you. Have fun!


Thanks man smile ...I wish there were more people like you, who not only try to help others as best they can, but also sensitive enough to appreciate others efforts too.

...i endeavour everyday to do just that...the world sure needs more of that.

Have fun too mate big_smile

des245 wrote:

Thanks man smile ...I wish there were more people like you, who not only try to help others as best they can, but also sensitive enough to appreciate others efforts too.

...i endeavour everyday to do just that...the world sure needs more of that.

Have fun too mate big_smile

Thanks man, much appreciated! I'm with you on that one.

(Last edited by orange on 26 Jun 2013, 23:59)

@des245:
Sorry I was out of country when you sent me pm.  I am glad you are fine now.
Recently, I have been playing with Gargoyle.  I found it has a very nice user interface.  Especially, if you want to set up the networking part, it is much easier to use.  I only had problem if I want to install new kernel modules but usually you don't need to.
In particular, if you want to set up a repeater in the same subnet.  It seems very hard and I still don't how to do it in Openwrt.  However, for Gargoyle, it is almost trivial.

twinclouds wrote:

In particular, if you want to set up a repeater in the same subnet.  It seems very hard and I still don't how to do it in Openwrt.  However, for Gargoyle, it is almost trivial.

It's a patch by Gargoyle devs actually, i.e. ARP-NAT. You may configure relayd to get bridged clientmode with OpenWrt. While it isn't the same from an implementation perspective, it is from a user perspective.

Read http://wiki.openwrt.org/doc/howto/clien … ode.issues and http://wiki.openwrt.org/doc/recipes/relayclient

EDIT: Patch is at http://www.gargoyle-router.com/gargoyle … pnat.patch

(Last edited by orange on 27 Jun 2013, 12:34)

twinclouds wrote:

@des245:
Sorry I was out of country when you sent me pm.  I am glad you are fine now.
Recently, I have been playing with Gargoyle.  I found it has a very nice user interface.  Especially, if you want to set up the networking part, it is much easier to use.  I only had problem if I want to install new kernel modules but usually you don't need to.
In particular, if you want to set up a repeater in the same subnet.  It seems very hard and I still don't how to do it in Openwrt.  However, for Gargoyle, it is almost trivial.

Hi twinclouds , no probs mate, orange was kind enough to put me right smile

Gargoyle sound interesting...will have a look at it.

Thanks for stopping by though.

des245,

I am trying to accomplish the exact same thing that you are.

Would you post or send me your MR3020 modifications that worked for you (/etc/config/network, /etc/config/wireless and any others)?

Thanks,
Joe

The discussion might have continued from here.