OpenWrt Forum Archive

Topic: 2nd router as wifi->eth bridge

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

Hi Folks,

I have a DLINK DSL2740B (C3) loaded up with the latest OpenWRT firmware, and I'm trying to get it to connect to the AP in my house (from my shed)

The router inside is a factory firmware Technicolor router supplied by Telstra (ISP) and I have some devices in the shed that don't have wireless cards.

I'm hoping that I can use the DLINK's wifi card to connect to the wifi in the house and provide ethernet access to the shed.

I've read a few tutorials etc, but nothing seems to either line up with what I'm seeing in the latest version, or make sense (probably the later over the former)

Any pointers, or straight up "this isn't going to work like you expect" would be greatly appreciated.

This is a tempoary setup in the shed, trying to utilise existing surplus hardware before I go down the route of spending money running a length of cat6 out there.

Cheers

I see no reason why this couldn't work. The setup is somewhat special, but can be done at least from the command-line and perhaps from LuCI as well.

The DSL2740B is an ADSL-router and as such, the default OpenWRT settings should configure the DSL-port as a WAN access route. In your setup, however, you'd need to create a wireless STA config (https://wiki.openwrt.org/doc/howto/clientmode) to act as the WAN access route, and then create a separate network for the LAN in the shed.

I would avoid bridging the Wi-Fi link directly with the local Ethernet adapter (and the LAN ports). First, it might not even work, and second, bridging the Wi-Fi link to LAN makes the OpenWRT router twiddle its thumbs while it could do useful work. It is quite capable of servicing the local network in the shed; there's no need to ask for DHCP or DNS services from the primary router inside your house, and by doing so cause unnecessary load on the Wi-Fi link when it is not needed. Use the OpenWRT router's hardware to the maximum benefit, so to speak. Utilize the Wi-Fi link when devices in the shed need to access the Internet.

If you need to access the clients inside the house's wireless network from the cabled network behind the OpenWRT router, then the config gets somewhat more difficult. You did not mention about this, so my first suggestion was to use what is called a "Routed client mode with masquerading". Check the link I posted earlier for a description of this scenario.

access to the machines in the shed from the house would be handy, I'd like to be sitting in the house SSH'd into the machines rather than sitting out there in the cold!

I've read that link a few times, and I think I'm going to have to get stuck in to the CLI of the router to get the most out of it.

Looking at the link I posted in more detail, it seems it might be somewhat old, so things might've developed so far that bridging the interfaces works just fine. Give it a shot, and see how it goes.

You can't put an ordinary AP-STA link into a bridge.  This is the only kind of link that an ISP provided router with stock firmware usually supports.

Make a routed client.  Take the unused internal DSL off of the WAN and connect the wifi client instead.

To log into machines in the shed from the house, you can forward ports through the shed router, or try relayd.

Using an Ethernet cable or another OpenWrt router in the house with AP(WDS) mode will allow you to have a true bridge.

(Last edited by mk24 on 26 Jun 2017, 14:49)

mk24 wrote:

You can't put an ordinary AP-STA link into a bridge.  This is the only kind of link that an ISP provided router with stock firmware usually supports.

A curiosity question: since it is possible to create a wireless AP and bridge it with the local LAN ports of a router, exposing the same network through both connection mediums, then what exactly will happen if you change the wireless AP into an STA and connect it to a remote AP instead? How will it break down? Is it so that the network configuration from /etc/config/network cannot be applied properly to the wireless interface? Or some other problem?

I have never tested this scenario personally, so I'm curious to know if you have some first-hand experience of the symptoms, and how the problems manifest.

In regular STA, the MAC of the wifi radio is required to be the ultimate destination of the packet.  There is not a way to forward it on through layer 2 bridge.

The driver will disable the STA interface when asked to bridge it.

A WDS link transmits an additional MAC of the final destination. This is also called 4 address mode vs 3 address.

I see. Thanks for the explanation!

The discussion might have continued from here.