1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need Help with Client Mode

Discussion in 'HyperWRT Firmware' started by PCJason, Mar 7, 2005.

  1. PCJason

    PCJason Network Guru Member

    I am trying to connect one WRT54G using HyperWRT in client mode to another WRT54G using stock Linksys firmware (I can’t change settings on this router). Lets call the “untouchable†router “Router A†and the one I want to be the client “Router Bâ€. I started by resetting Router B to defaults. I then set it’s IP to be and turned off DHCP. I then setup a Startup Script on Router B. The content of the script is:

    brctl delif br0 eth1
    wl ap 0
    wl join Captain Rons Ship key 3F698D93EA07F7A998714F19F8
    ifconfig eth1 netmask
    ifconfig br0 netmask
    route add default gw

    I then telnet into Router B and tried to ping I got no replies whatsoever. So, what am I doing wrong? All I want is to connect one computer through Router B to the wireless network!

    Router A:
    SSID: Captain Rons Ship
    Security: WEP (the key above is fake)
    DHCP: Enabled

    Finally, is there anyway after I run the command “wl join†that I can make sure Router B is even seeing Router A? I’m sure I’m missing something stupid, but please help!
  2. Cassius

    Cassius Network Guru Member

    I am in the exact situation so if someone can help it would be well apreciated although i havent got DHCP on at all, but static everywhere...
  3. Cassius

    Cassius Network Guru Member

    And also i know i may get flamed for this as it is a very noob question but i still dont understand the whole eth1, br0 thingy???

    ie i know that the br0 is the bridge interface but what is eth1??? and in what circumstances is it used or referred to???
  4. Macrus

    Macrus Network Guru Member

    brctl delif br0 eth1
    wl ap 0
    wl join Captain Rons Ship key 3F698D93EA07F7A998714F19F8
    ifconfig eth1 netmask
    ifconfig br0 netmask
    route add default gw
    iptables -F
    iptables -F -t nat
    iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
  5. dellsweig

    dellsweig Network Guru Member

    How about a step by step so it will help us understand what each of these steps is accomplishing
  6. Cassius

    Cassius Network Guru Member

    Yeah a step by step guide would be fantastic and a description of the appropriate settings on the WRT54G web interface would be even better!!

    I've been trying for 2 days with no luck...

    I currently own a WAG54G Modem/Router ( yes i know it's cr@p!!) and i have just purchased a new WRT54G to run as a client of this with my PC and xbox connected to the ethernet ports of the WRT54G

    wag54g ....
    WRT54G (version 2 )......

    All IP's are static

    I have no linux experience and this is the first router i have ever bought.

    After entering the script and pressing save i try to ping and simply get request time out's

    1. What should the internet connection type be set to?? Automatic DHCP or Static... I'm running this as a client and the internet will not be directly connected to this router so this confuses me......

    2. I tried to use the script as described by Marcus but am not sure what ip address to put for eth1?? I assume br0 will be ip of WRT54G

    3. Is it good enough just to enter the start up script and press save??? or is something else needed???

    4. I know this is stupid but what if i dont have a key?? would i write:
    wl join <SSID> key <Blank> or
    wl join <SSID>

    Can somebody please help.... i couldn't stand another day of this.... please.......
  7. PCJason

    PCJason Network Guru Member

    I tried what Macrus posted, but no luck :( I then attempted to type in each command individually, and I think I might know my problem. After typing "wl ap 0" (disable access point?) the power light begins to flash and never stops until I reboot the router. The strange thing is the router is still responsive to commands while it is flashing. I also tryed to hard reset, then install Linksys offical firmware, then hard reset and install hyperwrt 2.0 (stable) then hard reset one final time, but it still flashes after typing the above command. Any help is greatly appreciated. Also, my router is a WRT54G ver. 2 incase that helps.
  8. dellsweig

    dellsweig Network Guru Member

    My guess is the link light flashes just like a wireless card that has not associated with an AP. Once you type in the commands to get it to associate, you will get a steady light.

    Just an educated guess.......
  9. Cassius

    Cassius Network Guru Member

    So we need a command like wp associate?? can someone confirm this???
  10. dellsweig

    dellsweig Network Guru Member

  11. Cassius

    Cassius Network Guru Member

    Thanks dellsweig I will try that,

    But i would like the help of someone who has definitely gotten client mode to work to outline how they did it :( or point me to a guide written somewhere....
  12. Cassius

    Cassius Network Guru Member

    Is there noone that can help :(

    Maybe its time to give up and go to sveasoft..... I really dont want to tho...
  13. Cassius

    Cassius Network Guru Member

    Ok i am begging now....

    will anyone take pity on me and help out this poor helpless hyperWRT user....

    everytime i run the instructions in telnet or script the green light just ends up flashing... and my pings can never get pass the WRT54G

    when i type wl status ( i assume this prints information about the AP im joined to) it shows the correct modem/router, however the bssid shows entried of all zeros ie 00:00:00:00:00 etc

    Please Please Please will someone help me......

    Maybe someone can answer me this then which mac address should i enable on the modem/router (WAG54G) i am trying to join??

    1. The actual WRT54G mac??
    2. The br0 mac ??

    these mac seem to differ by one letter??

    can someone please help this poor confused person :(
  14. Cassius

    Cassius Network Guru Member

    Isn't there anyone in this enitre forum who has gotten this to work before???

    Please can someone offer some advice...
  15. LordSpider

    LordSpider Guest

    Hi there,
    Just bought a WRT54GS v1.1 last week-end. I have to put it in client mode and I discovered yesterday that the Satori 4.0 version of the Sveasoft firmware does not support the v1.1. Thus HyperWRT is the only free way for me at the moment to run my WRT54GS in client mode. I'd like to run it as a real client adapter i.e scan the entire spectrum and be able to choose from a list to connect to an AP of my choice...
    I hope it's feasible and I'm starting to learn the WRT54GS commands. I'll post my results there if I have good ones. Any "client mode tutorial" would be well appreciated there too...
    Thanks !
  16. ScrewDriver

    ScrewDriver Network Guru Member

    Hi PCJason

    I bought a WRT54GS (v2.0) today and upgraded to most current release of HyperWRT. I want to connect the WRT54GS with my old Draytek Vigor 2500WE via WLAN, which (after some googling) I obviously got it done with following script for WRT54GS:

    # cat /tmp/initbridge.sh
    wl ssid ABCDEF
    wl wet 1
    wl ap 0
    wl join ABCDEF
    where the SSID ABCDEF is configured on the Vigor. The WRT54GS is the gateway to the Internet.
    I not yet tried to establish a WEP-based configuration (Vigor 2500WE does not support WPA). All hosts and routers are on the same subnet. The PC connected to Vigor (via RJ45) is able to ping the PC connected to WRT54GS (via RJ45) and is also able to access the Internet.

    Does this "wl wet 1" command help you?

    Haven't yet checked out NAT etc.

  17. Cassius

    Cassius Network Guru Member

    Thats quite interesting...

    What does the "wl wet 1" accomplish???

    I assume that creates the bridge??

    Im trying to do the exact same thing as you exept i have a WRT54G and it does not connect to the internet, instead its the other modem/router that is the gateway.....

    So im not sure how this changes the commands??

    Is it even possible to connect 2 clients to the WRT54G using hyperWRT when it is in client mode???
  18. PCJason

    PCJason Network Guru Member

    Oliver, I LOVE YOU!!! I just tried adding that to my startup and everything looks good! Also, I got WEP working by making "wl join ABCDEF" read "wl join ABCDEF key 12345678901234567890123456". So far everything is working perfectly, but I'm going to fully test it tonight. Once again, thanks again! Hopefully this helps Cassius as well.
  19. Cassius

    Cassius Network Guru Member

    Thats positive news.....

    Now i just hope that works for me....

    although my set up is a bit different.....

    Can anyone tell me how many clients can be hooked up the the WRT54G acting as the bridge???
  20. ScrewDriver

    ScrewDriver Network Guru Member


    Not tested but I don't think that there is any limitation. Since the WRT54G(S) has 4 RJ45 ports only, you could even have success with cascading some hubs to one of the ports.

  21. ScrewDriver

    ScrewDriver Network Guru Member

    Here are some links related to bridgeing and AP client mode.

    A french page, which states a problem regarding the "wl ap 0; wl wet 1" approach. My knowledge of french is not good enough to understand the problem.

    Following "Wireless Client Router" page sounds interesting to me. I will check it out the next days. Guess most commands mentioned on that page should also work with HyperWrt:

  22. Cassius

    Cassius Network Guru Member

    Well i've tried what you suggested oliver and i still can't get my WRT54G to ping the other router (WAG54G) which is connected to the internet... i continually get request timed out.....

    I effectively want to

    1. WAG54G connects to the internet
    2. WRT54G to connect to WAG54G wirelessly
    3. My PC to access the internet by connecting to the WRT54G via ethernet

    Is there something obvious i am missing please can someone tell me...

    Ill put this script up again in the hope someone can help :(

    brctl delif br0 eth1 (do i need to do this??)
    wl ssid SSID
    wl ap 0
    wl wet 1
    wl join SSID
    ifconfig eth1 netmask
    ifconfig br0 netmask
    route add default gw
  23. PCJason

    PCJason Network Guru Member

    Cassius: My entire startup script is:
    wl ssid "Captain Rons Ship"
    wl ap 0
    wl wet 1
    wl join "Captain Rons Ship" key 7F577D40B2299C72C580700F96
    Which works perfectly for me. I'm pretty sure the first line isn't even needed, but it doesn't hurt to have it there. Also, in the research I did before ScrewDriver saved the day, the first line you posted (brctl delif br0 eth1) breaks the bridge, so I ahve no idea how it could ever work after executing that command. Lastly, to the best of my knowledge, this bridiging method only allows one of the ethernet ports to be used at any given time (same as Satori). For it to allow all of the ports to work, the WRT54G would have to be in router mode, with the wireless acting as the WAN port, which is way beyond something I could ever figure out( but is the method they use in Alchemy). I hope this helps in some small way!
  24. Cassius

    Cassius Network Guru Member

    Thanks for that PCJason,

    I actually did manage to get it to work, the problem actually lay with the WAG54G i was trying to connect to, it actually has the MAc security thing on which allows only certain mac addresses to access it. At first i used the Router mac address and it would never connect, i then tried changing this mac address to the br0 mac address and all seems fine....

    Although i also had to remove that brctl delif br0 eth1 line.

    I would be very interested to hear about anyone who has been able to get client mode with multiple clients like u described... ie using wireless as WAN port, so if anyone had any infromation or resources they know of please post them.....
  25. kinemax

    kinemax Network Guru Member

    According to this document eth1 represents the WAN interface, so deleting it from the bridge seems to make sense, but then I don't understand why later eth1 needs to be configured (in "ifconfig eth1 netmask").

    I wish the HyperWRT Gurus on this board would just tell us if it's possible to setup Client-mode with HyperWRT 2.1b1 and, if so, how.
  26. Cassius

    Cassius Network Guru Member

    It is definitely possible and i have succeded in doing so, only i didnt realise that u could only have one device hooked up......
  27. mattpwill

    mattpwill Network Guru Member

    I found it pretty damned easy. It took me a while to find it out though...

    wl wet 1
    wl ap 0
    wl join [S.S.I.D.]
    Stick it in startup script. I don't use encryption, so you should probably do..

    wl join [SSID] key [key]
  28. jinjimbob

    jinjimbob Network Guru Member

    What is the correct 'wl join examplessid' line command to use to connect to another WRT54G using WPA-PSK?
  29. mattpwill

    mattpwill Network Guru Member

    I'd just like to add that I needed to set static IP for my PC. Set it like you would if it was a network card itself

Share This Page