OpenWrt Forum Archive

Topic: WRT54G as AP and client at the same time - client doesn't work

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

Hi everybody,

My head will soon explode because of this problem. Please help.

I have a Linksys WRT54G v. 2.2 with Kamikaze (7.09) installed. I would like to set it up so that clients, both wired and wireless, can see each other and, at the same time, have access to the Internet which is available from another wireless AP. Please note that I do not have access to the other AP and so I cannot set up WDS.

                     cable
wired client ----------+             wifi
                             WRT54G -------- Another AP -------- Internet
wireless client -------+
                        wifi

The problem is that when I set it up (see config files below), local network works, but I can't connect to the other AP (and Internet).

/etc/config/network

#### VLAN configuration 
config switch eth0
    option vlan0    '1 2 3 4 5*'
    option vlan1    '0 5*'


#### Loopback configuration
config interface loopback
    option ifname    "lo"
    option proto    static
    option ipaddr    127.0.0.1
    option netmask    255.0.0.0


#### LAN configuration
config interface lan
    option ifname    eth0.0
    option proto    static
    option ipaddr    '192.168.2.1'
    option netmask    '255.255.255.0'
    option gateway    ''
    option dns    ''
    option type    'bridge'


#### WAN configuration

config "interface" "wan"
    option proto    'dhcp'
    option ifname    'wl0 eth0.1'

/etc/config/wireless

config wifi-device  wl0
    option type     broadcom
    option channel    '3'
    option disabled    '0'

    # REMOVE THIS LINE TO ENABLE WIFI:

config "wifi-iface" ""
    option device    'wl0'
    option mode    'ap'
    option ssid    'my_ssid'
    option hidden    '0'
    option encryption    'psk'
    option network    'lan'
    option isolate    '0'
    option bgscan    '0'
    option wds    '0'
    option key    'secret_key'

config "wifi-iface" ""
    option device    'wl0'
    option mode    'sta'
    option ssid    'other_ap_ssid'
    option hidden    '0'
    option encryption    'wep'
    option network    'wan'
    option isolate    '0'
    option bgscan    '0'
    option wds    '0'
    option key    '1'
    option key1    'some_hex_digits'

/etc/config/dhcp

config dhcp
    option interface    lan
    option start     100
    option limit    150
    option leasetime    '720m'
    option ignore    '0'

config dhcp
    option interface    wan
    option ignore    1

Now I have some questions:

1. Any idea why this doesn't work?
2. How can I get some extra information to explain connection problem between my WRT54G and the other AP?
3. The other AP offers addresses in 192.168.1.x range, does it mean I cannot use that range in my local network? (currently I don't)
4. The other AP works on channel 3, does it mean I need to use the same channel for my wireless network? (I guess so, because there's only one place to set channel number, so I use it)
5. The other AP uses WEP and I'd like to use WPA on my wireless network, can it be a problem?

Again, any help would be appreciated! Thank you!

sad

1. Are you sure the channel, the SSID, and WEP key matches your client/sta to their AP?
2. iwconfig? I have to tell you that I found this extremely simple to make work with 8.09.1
3. Depends on if you are routing or bridging. Looks like you are routing because your wireless client is on vlan 'wan' and your AP is on vlan 'lan' so in your configuration you want your subnet to be different, which it is.
4. I think wl0 can only use 1 channel which means if you configure two virtual interfaces on that interface they have to be on the same channel which means they have to be on the same channel as the remote AP because your client interface needs to connect to their AP on that channel.
5. I believe the client virtual interface should be able to use WEP with their AP and you should be able to use WPA on your AP virtual interface but don't take that to the bank because I just started playing with virtual wireless interfaces the other day. I can test it tonight though unless someone has more educated information for you.

Also, what is the output from the "ifconfig" and "iwconfig" commands?

Thanks for answer Void Main.

1. The only thing I may be unsure about is whether key1 is calculated properly. I followed these instructions to calculate it. It's a 64 bit (5 characters, 10 hex digits) key.
2. Ok, I'll try it and see if it shows anything interesting. I might also consider upgrading the firmware.
3. Actually I don't mind my clients being on the same network as the other AP, so I might try changing routing to bridging. Would changing 'wan' to 'lan' suffice to do it?
4. That's what I thought.
5. I'll try using WEP on my network if nothing else works.

I'll post output from ifconfig and iwconfig as soon as I have access to the router (i.e. tomorrow).

Here is the output of ifconfig:

root@OpenWrt:~# ifconfig 
br-lan    Link encap:Ethernet  HWaddr 00:12:17:D5:18:02  
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:754 errors:0 dropped:0 overruns:0 frame:0
          TX packets:613 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:62050 (60.5 KiB)  TX bytes:126323 (123.3 KiB)

eth0      Link encap:Ethernet  HWaddr 00:12:17:D5:18:02  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:32345 (31.5 KiB)
          Interrupt:5 

eth0.0    Link encap:Ethernet  HWaddr 00:12:17:D5:18:02  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:5566 (5.4 KiB)

eth0.1    Link encap:Ethernet  HWaddr 00:12:17:D5:18:02  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:26486 (25.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:342 (342.0 B)  TX bytes:342 (342.0 B)

wl0       Link encap:Ethernet  HWaddr 00:12:17:D5:18:04  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:841 errors:0 dropped:0 overruns:0 frame:10031
          TX packets:723 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:83232 (81.2 KiB)  TX bytes:167879 (163.9 KiB)
          Interrupt:4 Base address:0x1000 

wl0.1     Link encap:Ethernet  HWaddr 00:12:17:D5:18:04  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

And here is the one from iwconfig:

root@OpenWrt:~# iwconfig 
lo        no wireless extensions.

eth0      no wireless extensions.

eth0.0    no wireless extensions.

eth0.1    no wireless extensions.

br-lan    no wireless extensions.

wl0       IEEE 802.11-DS  ESSID:"other_ap_ssid"  
          Mode:Master  Frequency:2.422 GHz  Access Point: 00:0E:2E:BA:EB:CA   
          Tx-Power:19 dBm   
          RTS thr:2347 B   Fragment thr:2346 B   
          Encryption key:<too big>
          Link Noise level:-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wl0.1     no wireless extensions.

I wonder why it says "Encryption key:<too big>"...

Thanks, I'll give it a try.
Unfortunately this will have to wait until Monday.

I tested it today again and suddenly it works! Strange. I haven't changed anything. Anyway I'm happy now smile

The discussion might have continued from here.