LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Netgear WG311/ Fedora C1/WEP/ (https://www.linuxquestions.org/questions/linux-wireless-networking-41/netgear-wg311-fedora-c1-wep-145117/)

laltopi 02-12-2004 01:29 AM

Netgear WG311/ Fedora C1/WEP/
 
hi,

I have this setup working without WEP enabled. However, it does not work when enabled.

Here are some outputs:

[root@localhost network-scripts]# ifup ath0
Cannot get driver information: Operation not supported

Determining IP information for ath0...PING 192.168.0.1 (192.168.0.1) 56(84) byte s of data.

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2021ms
, pipe 4
failed.


[root@localhost network-scripts]# iwconfig ath0
ath0 IEEE 802.11g ESSID:"MYLAN" Nickname:"localhost.localdomain"
Mode:Managed Frequency:2.462GHz Access Point: 00:09:XX:XX:XX:XX
Bit Rate:1Mb/s Tx-Power:off Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:6035-E8D8-BE17-094E-0E8A-FE62-7B Security mode:open
Power Management:off
Link Quality:51/94 Signal level:-44 dBm 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

I see that signal quality is good. Keys are setup. But cannot get connection.

ifcfg-ath0
-------------------
DEVICE=ath0
BOOTPROTO=dhcp
WIRELESS=yes
MODE=Managed
ESSID=MYLAN
CHANNEL=11
KEY=6035E8D8BE17094E0E8AFE627B


It did not take the values from this file, but from iwconfig command.

Also, when running without encryption, I get connection only if I run 'ifconfig ath0 up'.
Apart from the fact that one is binary and the other shell script, what is the diff between ifup and ifconfig.

I get an error when I run ifup. See above.

Any pointers will be appreciated and shared.

Thanks.

finegan 02-13-2004 01:16 AM

if-up is just a script that feeds info to ifconfig and iwconfig, the error is probably trying to set a channel in managed mode, that's what the AP is for... it determines the channel, manual selection is for ad-hoc mode.

Are you certain the key matches to the one on the WAP? As in the WAP knows its sending a hex key and not an ascii string or a "passphrasing" method that would be reliant on windows to work. Also, you've got your card running in open mode and the WAP might be in restricted mode, which really shouldn't matter, but who knows...

Also, might want to try a 64-bit key instead of a 128-bit one, see if that doesn't hork, something simple like: 1234567890

Last, never thought of this until just now, but the atheros driver is imported from FreeBSD, and how they declare a hex key as opposed to an ascii string is to have 0x infront of the key, he might have brought that over....

That's all I can think of now, the AP looks associated, so 90% of the headaches are over with.

Cheers,

Finegan

Guru3 02-13-2004 10:08 AM

Also, in FC1 and RH9, maybe in other versions too, there is a wierd bug where if you use the graphical networking tool, it messes up the files for the wap keys, or at least that is my experience. That is, in keys-interface file, it changes KEY=XXXX-XXXX-XX (my example is 64-bit) to KEY=s:XXXX-XXXX-XX. If you don't have a keys-interface file, in /etc/sysconfig/networking/devices or /etc/sysconfig/network-scripts, put one in both, that is where I have it in my copy of FC1. If you don't have the keys-interface files (by interface I mean eth1, etc.) try adding them, and removing the KEY= line in the ifcfg-interface file. The keys-inteface file is just one line "KEY=XXXX-XXXX-XX" and I think the '-' are important. I have the ifcfg-interface file in /etc/sysconfig/networking/devices and linked to /etc/sysconfig/network-scripts and it seems to work perfectly. Hope I have made myself clear...

laltopi 02-13-2004 11:21 PM

I tried ( tired) with 64 bit key, it still did not work. It works only without encryption.
I tried what Guru suggested. No go here as well. Interestingly, when I ran redhat-config-netowrk-gui, it did not pick up the card, even the modules loaded.
I was still getting the authentication failure (reason 13).

how do specify what mode, restricted or open?
I tried various options shown in man pages of iwconfig.
iwconfig ath0 key restricted xxxx(26 or 13xs) etc.

anything else i could try, i am running out of ideas.

Guru3 02-14-2004 02:13 AM

How do you know it works without encryption? Do you change the settings on the AP? Try double checking and making sure you don't have one value of the key off. After that I do not see any reason why it should not work.

laltopi 02-14-2004 02:46 AM

It works because I get an IP address from WAP, not only that, /etc/resolv.conf gets set,
netstat -rn has a default gateway entry and most of all I can ping the outside world.

The key has been double-triple checked, I copy and pasted the key.

One thing Finegan mentioned was the WAP could be 'sharedkey/restricted' mode, how do I set that using iwconfig.

iwconfig output has 'Security mode: open'. iwpriv mode sets a,g, or both.

One more thing whats the difference between the following commands:
iwconfig ath0 key xxxxxxxx
iwconfig ath0 enc xxxxxxxx

laltopi 02-14-2004 03:14 AM

Here are some outputs and file settings:

#modprobe ath_pci
[root@localhost root]# modprobe ath0
Warning: loading /lib/modules/2.4.22-1.2115.nptl/net/ath_hal.o will taint the kernel: non-GPL license - Proprietary
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module ath_hal loaded, with warnings
Module wlan loaded, with warnings
Module ath_pci loaded, with warnings

#tail -f /var/log/messages
Feb 14 00:51:47 localhost kernel: ath_hal: 0.9.6.11
Feb 14 00:51:48 localhost kernel: wlan: 0.7.3.1 BETA
Feb 14 00:51:48 localhost kernel: ath_pci: 0.8.5.2 BETA
Feb 14 00:51:48 localhost kernel: PCI: Found IRQ 11 for device 00:10.0
Feb 14 00:51:48 localhost kernel: ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3 Feb 14 00:51:48 localhost kernel: ath0 : 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Feb 14 00:51:48 localhost kernel: ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps Feb 14 00:51:48 localhost kernel: ath0: 802.11 address: 00:09:XX:XX:XX:XX
Feb 14 00:51:48 localhost kernel: ath0: Atheros 5212: mem=0xfece0000, irq=11
Feb 14 00:51:49 localhost kernel: ip_tables: (C) 2000-2002 Netfilter core team
Feb 14 00:51:50 localhost dhclient: DHCPREQUEST on ath0 to 255.255.255.255 port 67 Feb 14 00:51:58 localhost last message repeated 2 times
Feb 14 00:52:06 localhost dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8 Feb 14 00:52:14 localhost dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 19 Feb 14 00:52:33 localhost dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 18


[root@localhost root]# iwconfig ath0
ath0 IEEE 802.11 ESSID:"MYLAN" Nickname:"localhost.localdomain"
Mode: Managed Frequency: 2.457GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate: 1Mb/s Tx-Power: off Sensitivity=0/3
Retry:off RTS thr: off Fragment thr: off
Encryption key: off
Power Management: off
Link Quality:0/94 Signal level:-95 dBm 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


Dont know what 'Missed beacon' is.

[root@localhost root]# iwconfig ath0 key 9e08b517889e34098c248887ac
[root@localhost root]# iwconfig ath0
ath0 IEEE 802.11 ESSID:"MYLAN" Nickname:"localhost.localdomain"
Mode:Managed Frequency:2.462GHz Access Point: 00:09:XX:XX:XX:XX
Bit Rate:1Mb/s Tx-Power:off Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:9E08-B517-889E-3409-8C24-8887-AC Security mode:open
Power Management:off
Link Quality:60/94 Signal level:-35 dBm 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

The AP Mac address is set and Link Quality goes from 0 -> 60. Encryption key is set, but Security Mode is open.

On my AP is Netgear WG614, Authentication type is set to Shared Key, Encryption strength is 128bit and the Key is 9E08B517889E34098C248887AC

#ifconfig -a
ath0 Link encap:Ethernet HWaddr 00:XX:XX:XX:XX:XX
BROADCAST 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:199
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Memory:c692e000-c693e000

lo Link encap:Local Loopback
LOOPBACK MTU:16436 Metric:1
RX packets:6562 errors:0 dropped:0 overruns:0 frame:0
TX packets:6562 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5844188 (5.5 Mb) TX bytes:5844188 (5.5 Mb)

[root@localhost root]# ifup ath0
Cannot get driver information: Operation not supported

Determining IP information for ath0...PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.341/3.341/3.341/0.000 ms, pipe 2
SIOCADDRT: File exists
done.

[root@localhost root]# ifconfig ath0 up
[root@localhost root]#


There is no error message when I run ifconfig, but nasty errors when ifup is run.

Hope this gives you a clue, I certainly need a second set of eyes to look at this.

Thanks.

Guru3 02-14-2004 03:26 AM

iwconfig eth1 key resttricted XXXX... But besides that, can you post your ifcfg-ath0 file? There are a lot of settings in that for wireless too, which could be part of the problem, maybe, and why ifup would give nasty errors. But besides that, everything else looks fine... Also, do you do ifconfig ath0 down, the iwconfig, the ifconfig ath0 up? That was what was wrong for me for a while (with my cisco card). It was turned out for me that you can only use iwconfig when the interface is down, I don't know if that applies to your card, but it might be worth a shot...

laltopi 02-14-2004 03:44 AM

# cat ifcfg-ath0
# Netgear Atheros Wireless WG311
STARTMODE=hotplug
ONBOOT=no
DEVICE=ath0
BOOTPROTO=dhcp
WIRELESS=yes
MODE=Managed
ESSID=MYLAN
CHANNEL=11
KEY=9e08b517889e34098c248887ac


I did the following
#ifconfig ath0 down
#iwconfig ath0 key 9e08b517889e34098c248887ac
#iwconfig ath0 ap 00:XX:XX:XX:XX:XX
#iwconfig ath0 essid MYLAN
#iwconfig ath0 channel 11
#ifconfig ath0 up

still no ip.

Its late here in Calif, I will try again in the morning. Thanks for looking at this though.

finegan 02-14-2004 01:21 PM

Maybe the dhcp request is just getting horked up, let's ignore if-up entirely for a minute.

#ifconfig ath0 up
#iwconfig ath0 mode managed
#iwconfig ath0 key 9e08b517889e34098c248887ac
#iwconfig ath0 essid MYLAN
#ifconfig ath0 192.168.0.101 up
#route add default gw 192.168.0.1

Then check and make certain there's a nameserver entry in /etc/resolv.conf

Then see if "route" will run cleanly, i.e. not hang looking for the gateway, also pinging 192.168.0.1 is a good enough test.

Cheers,

Finegan

sidamos 02-14-2004 05:01 PM

HI!

Does the WG311 "just work" with Fedora Core 1 or what did you do to make it work (without encryption)?

I am about to buy a WG311 and I need to know, if it works OK with Fedora.

Also, the WG311 is supposed to get 108 MBit update with the Windows drivers. What about 108 MBit with Fedora?

Thanks!

Thomas

laltopi 02-14-2004 08:03 PM

[gradeone@localhost gradeone]$ cat iwconfig.sh
#!/bin/bash

set -x
ifconfig ath0 up
iwconfig ath0 mode managed
iwconfig ath0 key 9e08b517889e34098c248887ac
iwconfig ath0 ap XX:XX:XX:XX:XX:XX
iwconfig ath0 essid MYLAN
iwconfig ath0 channel 11
iwconfig ath0 rate auto
ifconfig ath0 192.168.0.101 up
route add default gw 192.168.0.1


[root@localhost network-scripts]# iwconfig ath0
ath0 IEEE 802.11 ESSID:"MYLAN"
Mode:Managed Frequency:2.462GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate:1Mb/s Tx-Power:off Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:9E08-B517-889E-3409-8C24-8887-AC Security mode:open
Power Management:off
Link Quality:57/94 Signal level:-38 dBm 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

[root@localhost network-scripts]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.0.1
search localdomain
[root@localhost network-scripts]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ath0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ath0

[root@localhost network-scripts]# ifconfig
ath0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:208131 errors:141960 dropped:0 overruns:0 frame:141938
TX packets:39769 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:16778559 (16.0 Mb) TX bytes:2226982 (2.1 Mb)
Interrupt:11 Memory:c692e000-c693e000

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:3959 errors:0 dropped:0 overruns:0 frame:0
TX packets:3959 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3598061 (3.4 Mb) TX bytes:3598061 (3.4 Mb)

[root@localhost network-scripts]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.101 icmp_seq=0 Destination Host Unreachable
From 192.168.0.101 icmp_seq=1 Destination Host Unreachable
From 192.168.0.101 icmp_seq=2 Destination Host Unreachable

--- 192.168.0.1 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4046ms
, pipe 4

Finegan, the above is the output. I ran it from shell script, saves typing. If after all
this it does not work, I am going to do the windoze way, reformat, reinstall and re-everything.


Thomas, go to MADWiFi and follow the directions to the letter. It works like a charm w/o encryption.


All times are GMT -5. The time now is 10:45 AM.