OpenWRT questions

Scott Sullivan scott-lxSQFCZeNF4 at public.gmane.org
Tue Sep 4 14:08:47 UTC 2012


On 09/04/2012 02:03 AM, Evan Leibovitch wrote:
> Hi there.
>
> It looks like there are some are some OpenWRT experts (or at least
> expereinced users) here, and I'm hoping that someone can help he out of
> an impasse.
>
> I purchased a TP-Link TL-WR703N wifi router on eBay for $20. It seems to
> be able to do what I need -- as a light, power-sipping travel router --
> and I really only need two functions:

It's a nice device. I have a colleague and friend who has several of 
them at hacklab.to. I personally own a few of it's brother model, the 
TL-MR3020 which can be had a Canada Computers for about ~$40. The 
noticeable differences are a 3-pos switch and more LEDs, and a button in 
a 50% larger package. (For those on the list, the TL-WR703N is 2" x 2")

>  1. A portable wifi router, to allow multiple wireless devices to use
>     the Internet in a hotel room if all that's provided by the room is a
>     wired connection (it would fetch a DHCP address from the hotel, but
>     masquerade and provide DHCP addresses to wireless devices)
>
>  2. A repeater that will magnify weak wifi signals (again, useful in a
>     hotel room if they have wifi but it's weak)
>
> There are other things I may want to do with it later (especially with
> the USB port) but the above are the main two priorities.
>
> The factory ROM is in Chinese only, but the device appears to be fully
> supported by OpenWRT <http://wiki.openwrt.org/toh/tp-link/tl-wr703n>.
> I've successfully installed the OpenWRT ROM and have the LUCI web
> interface working. However, I appear to be at an impasse in making it
> perform the above tasks.

The TL-MR3020 will do most of what you ask out of the box with English 
firmware. I've currently got mine doing Wifi -> LAN bridging at home... 
although DHCP doesn't cross over with the stock firmware so I suspect 
that's where relayd comes in with OpenWRT.

> Where I'm stuck is in understanding just which of the possible
> configuration "recipes" <http://wiki.openwrt.org/doc/howto/clientmode>
> is required. For bridging the wired LAN into a wifi hotspot, do I need a
> "routed client <http://wiki.openwrt.org/doc/recipes/routedclient> (with
> masquerade)", a "routed client with relayd
> <http://wiki.openwrt.org/doc/recipes/relayclient>" (also mentioned here
> <http://trac.gateworks.com/wiki/relayd>), or something else?

To go from the LAN to the WIFI should only require setting up a linux 
bridge device between eth0 and wlan0. Those examples seem to be for 
NATing between one wifi and yours.

> What's the  best way to set this up? Can I use LUCI or am I stuck doing this in CLI?

A point I like to keep in mind is that most of the "config files" for 
software in openWRT are generated at boot from the UCI config files for 
said software. (LUCI just being a Lua Web frontend to UCI).

LUCI => UCI => /etc/config => generated .conf files.

When documentation is lacking or cryptic I've take the following tactic. 
Do a clean flash, copy /etc/config off the device then cofigure with 
LUCI and do a diff.

So, there is a clear trickle down. If you want precision control, use 
the /etc/config files. If you want to set a bunch of values have the 
rest sorted out for you, use UCI/LUCI.

> Also, how I implement the repeater? Ideally I would like the device to
> act as a repeater if wired Ethernet is not attached, and LAN-to-wifi
> router when attached.

This is where I favour the TL-MR3020 with OpenWRT. The 3-pos switch 
means you have a physical control you can read from software and make 
scripted changes from. I'm sure you can do it purely in software, but I 
have no advice at this time. Do be mindful that the built in shell is 
ash and not bash.

> And finally, does anyone have any suggestions, warnings or gotchas about
> using this device/OS?

Just what I've mentioned as I've gone along. It really is a useful 
device. We're currently looking at sticking one in our Train Overload at 
the hacklab to run it's WebGui on the train its self.

-- 
Scott Sullivan
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list