Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: ASUS WL-500gx in client mode

  1. #1

    ASUS WL-500gx in client mode

    Hi,
    I would like to connect to my ISP via WLAN with DHCP and NAT enabled. I can do it manually by issuing following commands:

    brctl delif br0 eth1 (maybe its not necessary, but I read it somewhere)
    wl ap 0 (no idea what I am doing)
    wl scan (not necesarry)
    wl scanresults (because I know the SSID, but I just want to be sure...)
    wl join SSID key ispkey
    udhcpc -i eth1 -s /bin/true
    ifconfig eth1 A.B.C.D netmask (not from DHCP but I know myself)
    route add default gw A.B.C.D (also not from DHCP, but I know myself)
    iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
    echo 1 > /proc/sys/net/ipv4/ip_forward

    As you can read my message, this works pretty well, but how do I have to set up my router to do this every bootup???? And why do I only get an IP-Address from udhcpc and no other stuff (gateway, dns etc...) and why do I have to set these values by myself?

    Can anybody help me with this or do I have to put a Debian on a USB stick?

    Regards
    Helge.

  2. #2
    Ok, it works.

    I edited the /usr/local/sbin/post-boot script and now it woks like charm!

    My post-boot looks as follows:
    Code:
    #!/bin/sh
    brctl delif br0 eth1
    wl ap 0
    wl join SSID key wepkey
    ifconfig eth1 `udhcpc -i eth1 -s /bin/true | awk '{if($0~/obtained/) print $3}'` netmask 255.255.0.0
    route add default gw A.B.C.D
    iptables -t nat -A POSTROUTING -j MASQUERADE
    mv /tmp/local/resolv.conf /tmp/resolv.conf
    echo 1 > /proc/sys/net/ipv4/ip_forward
    Helge.

  3. #3
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Why don't you use built-in support for the client mode?

  4. #4
    Good question...

    Where is this "build in" client mode? I have Firmware 1.9.2.7-6 and I could not find any "Client mode" in the web interface, but I would be glad if you (or somebody else) could tell me how to set it up. In the meantime it works quite well this way.

    Darkstar.

  5. #5
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Well, it's there for about a year. And most likely well documented in the ASUS manual. Wireless | Advanced | Extended Mode, then select station or ethernet bridge.

  6. #6
    Thats what I selected, but without the "wl join SSID key wepkey" my router does not connect to the specific AP of my ISP, and without "iptables -t nat -A POSTROUTING..." the NAT is not working. At least I know what I am doing, when I put in the commands manually...

    I already switched to "Router" operation mode, so that the post-boot script reduces to a "wl join..." and the post-firewall script is only "iptables -t nat...".

    Thank you for your great work, without I could not put my commands somewhere.

    Darkstar.

  7. #7
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Switch to home gateway mode, it would do iptables stuff.
    as for wep - try using both Open System and Open System or Shared key and use HEX wep key.

  8. #8
    I switched to Home Gateway mode, but it doesn't connect to the AP of my ISP. In the post-boot script I first have to kill the udhcpc process, join the AP manually and start the udhcpc again. Starting the process with "-s /tmp/udhcpc" which is a link to /sbin/rc also sets the interface and the route.

    Darkstar.

  9. #9
    Quote Originally Posted by Darkstar
    I switched to Home Gateway mode, but it doesn't connect to the AP of my ISP. In the post-boot script I first have to kill the udhcpc process, join the AP manually and start the udhcpc again. Starting the process with "-s /tmp/udhcpc" which is a link to /sbin/rc also sets the interface and the route.

    Darkstar.
    I also use the router in client mode, and I have to run a script every time I want to connect. (I never managed to get it working from the web interface)


    Last edited by gwl; 23-06-2005 at 17:29.
    [ WL-500G | fw: 1.9.2.7-7f ]

  10. #10
    Join Date
    Nov 2003
    Location
    Eindhoven
    Posts
    2,407
    Quote Originally Posted by gwl
    I also use the router in client mode, and I have to run a script every time I want to connect. (I never managed to get it working from the web interface)


    currently I'm using a WL-HDD with firmware 1.9.2.7-5 and it does automatically connect to the other AP

    used it before on a WL500g

    My little Asus Collection: Too much to fit inhere, my 2 babies:WL500w 1.9.2.7-10(OLEG) VX2SE Yellow Lamborghini notebook



    WL500g Forum Asus Files OpenDir

    Asusforum.NL -- Asusforum.DE -- Asusforum.RU -- Asusforum.PL -- Asusforum.NET -- Asusforum.EU -- Asusforum.BE -- Asusforum.ES -- Asusforum.INFO

  11. #11
    Quote Originally Posted by Antiloop
    currently I'm using a WL-HDD with firmware 1.9.2.7-5 and it does automatically connect to the other AP

    used it before on a WL500g
    I tested it this way:
    Host AP: Dlink DI-624 (dhcp on; no WDS)
    Client AP: Asus WL500G

    Configured the Asus to connect to the dlink (no wds support).
    After logging into the dlink config page, i can see the MAC of the asus listed in the clients list.
    So the Asus DOES connect.
    If I connect an ethernet cable to the asus from my laptop, I am only able to reach 192.168.1.1 (the asus router).
    In order to get it going, I had to telnet into the router and do something like:
    Code:
    echo "nameserver xxx.xxx.xxx.xxx" > /tmp/resolv.conf  
    route del default gw  
    route add default gw xxx.xxx.xxx.xxx eth2  
    udhcpc -i eth2 -s /bin/true  
    iptables -t nat -P POSTROUTING DROP  
    iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE;  
    killall dnsmasq;  
    dnsmasq;
    maybe some of these lines aren't needed... but... just in case ...
    [ WL-500G | fw: 1.9.2.7-7f ]

  12. #12
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Quote Originally Posted by gwl
    Code:
    echo "nameserver xxx.xxx.xxx.xxx" > /tmp/resolv.conf  
    route del default gw  
    route add default gw xxx.xxx.xxx.xxx eth2  
    udhcpc -i eth2 -s /bin/true  
    iptables -t nat -P POSTROUTING DROP  
    iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE;  
    killall dnsmasq;  
    dnsmasq;
    maybe some of these lines aren't needed... but... just in case ...
    Well, everything should be done by firmware itself. Just check which values are missing without your script and let me know.

    Code:
    cat /tmp/resolv.conf
    route -n
    ifconfig eth2
    iptables -t nat -L POSTROUTING

  13. #13
    I think it is a problem with the AP on the other side.

    resolv.conf: it is not set because udhcpc got no IP
    route: see above
    ifconfig: see above
    iptables: everything is ok.

    udhcpc is running and even "wl assoc" shows the AP, but somehow it dosn't work. I made it work by killing the udhcpc process on eth1, joining the AP manually with "wl join "SSID" key <not-a-hex-key>" and starting the udhcpc process again. It then gets an IP address and everything works fine. I tried to change the hex key in the nvram entry "wl0_join" but it somehow does not store the key but it reverts to hex format. I didn't try the hex format when I manually joined the AP but I will try this next time. So far it works quite well with this workaround.

    Darkstar

  14. #14
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Keys SHOULD BE SPECIFIED IN HEX FORMAT for WEP, otherwise you will get compatibility problems.

  15. #15
    I tested the client mode again. (twice)
    It worked with one AP (dlink di624),
    but didn't (fully) work with another one (3Com? Cisco)?

    Here's what I configured:
    wireless - interface
    ssid: #REMOTE_SSID#

    wireless - bridge
    ap mode: wds only
    channel: #REMOTE_CHANNEL#
    connect to AP in remote list: yes
    allow anonymous: no

    remote bridge list: MAC: #REMOTE_MAC#

    wireless - advanced
    Extended Mode: AP or WDS

    then, with the first AP (dllink) it worked.
    with the seccond AP, I got connected, but didn't get an IP, (even though, this AP has DHCP), so I set it manually this way:

    ifconfig eth2 ##MANUAL_IP## netmask 255.255.0.0 up
    echo "nameserver ##DNS_IP##" > /tmp/resolv.conf
    route add default gw ##GATEWAY_IP## eth2
    iptables -t nat -P POSTROUTING DROP
    iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE;
    killall dnsmasq;
    dnsmasq;
    [ WL-500G | fw: 1.9.2.7-7f ]

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 7
    Last Post: 25-04-2005, 23:41
  2. Replies: 5
    Last Post: 11-03-2005, 02:24
  3. AP client mode + AP repeater mode!
    By organetic in forum WL-500g Q&A
    Replies: 1
    Last Post: 27-12-2004, 18:19
  4. Asus WL-500b & Client Mode
    By cooper.zl in forum WL-500g Q&A
    Replies: 1
    Last Post: 17-10-2004, 18:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •