OpenWrt Forum Archive

Topic: configuring openWRT as STAtion for external PC

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

Hi All,

With a WRT54GS, V1.1 and BackFire (10.03-beta, r19944) loaded, how do you configure the unit so that a PC can be plugged into the LAN port ?

Several hours have been spent trying to get this working. It has been configured as an AP OK, so there is a pretty good chance that the wireless sub-system is OK.

A WEP 64 key is also required - is this ASCII (apparently 5 characters), hex, or other format ?

Having stared that the openWRT config screens for some time, it is very clear that I haven't a clue about bridging. Are there any newbie descriptions specific to openWRT available ?

Thanks,

Mark

NB The associated AP is a DI-614+ that has a DHCP server running, wireless laptops can already attach OK.

I do this routinely, and since I just upgraded to BackFire 10.03-rc1, I can describe the procedure.

1.  Configure your network IP and gateway (static) in /etc/config/network.  I am using an example where your home network range is 192.168.1.0/24, and you've chosen an IP ending in .254 for your OpenWRT bridge, and your router is at .1:

/etc/config/network

config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.254
        option netmask  255.255.255.0
        option gateway  192.168.1.1

2.  Presumably your OpenWRT bridge does not need to provide DHCP or DNS services, because your AP or other gateway already provides those services.  You should therefore disable OpenWRT's dnsmasq service in order to not conflict with those services:

# rm /etc/rc.d/S60dnsmasq

This will prevent dnsmasq from starting at next boot.

3.  If you want DNS to work on your OpenWRT bridge, you should configure DNS to point statically to your nameservers.  I assume your gateway provides this function:

# rm /etc/resolv.conf
# echo 'nameserver 192.168.1.1' > /etc/resolv.conf

4.  OpenWRT wireless configuration is fairly well documented.  The settings I use here are for my WRT54GL, but your settings may always differ slightly from these, so don't blindly paste these settings in without understanding them:

/etc/config/wireless

config wifi-device  wl0
        option type     broadcom
        option channel  5

config wifi-iface
        option device   wl0
        option network  lan
        option mode     sta
        option ssid     YOUR_SSID
        option encryption wep
        option key      XXXXXXXXXXXXXXXXXXXXXXXXXX

The important items are "option mode" set to "sta" (for STAtion mode), "options ssid" set to the SSID you're associating with, "option encryption" set to "wep", and "option key" set to the 26-digit hex key that you're using (for 128-bit encryption) or the 10-digit hex key you're using (for 64-bit encryption).

After a reboot you should find that your device associates with your AP.  Note that, if it doesn't, you no longer have a source of DHCP for your computer, so you will not get an IP when you plug in.  In that case, you must statically assign your computer an IP in order to be able to connect to 192.168.1.254 in order to debug and troubleshoot the problem.

If the bridge is able to establish the connection to the AP, then your AP will be able to extend DHCP service to you, and everything will work like magic.

Hope this helps you.  smile


P.S.  I have had NO LUCK getting WPA2 to work in this configuration.  I'm hoping to solve that issue soon.

The discussion might have continued from here.