OpenWrt Forum Archive

Topic: Fonera Client Bridge - it works! Really simple solution!

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

Hi! After a full day's work I finally have it running. My Fonera bridges a Wireless LAN to it's own WLAN and to the Ethernet port of the Fonera. Here is how to configure it:

Run vi with the following command. There are guides on the Net on the usage of this editor.

vi /etc/config/wireless

My wireless file looks like this:

config wifi-device  wifi0
        option type     atheros
        # CHANNEL: I am not entirely sure about this,
        # but the fonera might not be able to broadcast it's own WLAN
        # to a channel other than the channel of the AP it connects to.
        # Find out the channel of the AP with the command "iwlist ath1 scan"
        option channel  6

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        # This is the name of the network you want the Fonera to broadcast. (=act as an Access Point)
        option ssid     Evernew
        option encryption wep
        option key      1
        # This key is an example. Choose your own.
        option key1     1234567890


config wifi-iface
        option device   wifi0
        option mode     sta
        # Put here the name of the Network you are connecting to as a client.
        option ssid     "Test"
        # Of course, if the network is protected, you would have to enter the appropriate data here.
        option encryption none

Then, you configure the LAN and the Bridge:

vi /etc/config/network
# Copyright (C) 2006 OpenWrt.org

config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface lan
        option ifname   eth0
        option type     bridge
        option proto    static
        option ipaddr   192.168.2.1
        option netmask  255.255.255.0

config interface wan
        option ifname   ath1
        option proto    dhcp

When you reboot, the Fonera is going to act as a router within your LAN. Your LAN means theWLAN you are creating of and the Ethernet port of the Fonera. OpenWRT provides an own DHCP server and forwards DNS requests appropriately. Have fun!

Ah I almost forgot this QUESTION: The client doesn't associate by itself, probably because the reception is not good enough. When I do "iwconfig ath1 rate 6M" it will associate immediately. Is there any smart way to put in an auto-retry feature or something of this kind. Can I pre-configure the transfer rate in the wireless-file?

(Last edited by danage on 11 Aug 2007, 02:04)

Are you able to get the same ip class on the 2 segment of the lan? (you're using dhcp for wireless...are you able to get the same class on it?)

Sorry, but what you are doing is not a bridge, but a normal routed connection.
A (software) bridge is essentially the same as a (hardware) switch, and does work on OSI layer 2 (data link layer).
Afik, the current madwifi drivers used on the fonera are incapable of doing a client side wireless bridge using STA mode, you can do this only with WDS.

The discussion might have continued from here.