View previous topic :: View next topic |
Author |
Message |
NotCourse6 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 09 Oct 2004 Posts: 79
|
Posted: Sat Dec 23, 2006 5:24 am Post subject: WEP and dhcpcd not working together [SOLVED] |
|
|
I am trying to use wpa_supplicant, dhcpcd, and WEP together. So far, I can associate with a WEP network whether it is secured or not, but cannot receive an IP address via dhcpcd when it is secure.
For instance, I am trying to connect to a network called "Luc13." This is the wireless configuration section in /etc/conf.d/net:
Code: |
#-----------------------------------------------------------------------------
# WIRELESS (802.11 support)
# Wireless can be provided by iwconfig or wpa_supplicant
# iwconfig
# emerge net-wireless/wireless-tools
# Wireless options are held in /etc/conf.d/wireless - but could be here too
# Consult the sample file /etc/conf.d/wireless.example for instructions
# iwconfig is the default
# wpa_supplicant
# emerge net-wireless/wpa-supplicant
# Wireless options are held in /etc/wpa_supplicant.conf
# Consult the sample file /etc/wpa_supplicant.conf.example for instructions
# To choose wpa_supplicant over iwconfig
modules=( "wpa_supplicant" "!iwconfig" "dhcpcd")
# To configure wpa_supplicant
#wpa_supplicant_eth0="-Dprism54" # For Prism54 based cards
#wpa_supplicant_ath0="-Dmadwifi" # For Atheros based cards
# Consult wpa_supplicant for more drivers
# By default we give wpa_suppliant 60 seconds to associate and authenticate
# 0 means we wait indefinitely
#associate_timeout_eth0=60
wpa_supplicant_wlan0="-Dhostap -iwlan0 -c/etc/wpa_supplicant.conf -dd -t"
dhcpcd_wlan0="-d -D -H"
# GENERIC WIRELESS OPTIONS
# PLEASE READ THE INSTRUCTIONS IN /etc/conf.d/wireless.example FOR
# HOW TO USE THIS ESSID VARIABLE
# You can also override any settings found here per ESSID - which is very
# handy if you use different networks a lot
#config_ESSID=( "dhcp" )
#dhcpcd_ESSID="-t 5"
# Setting name/domain server causes /etc/resolv.conf to be overwritten
# Note that if DHCP is used, and you want this to take precedence then
# set dhcp_ESSID="nodns"
#dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
#dns_domain_ESSID="some.domain"
#dns_search_path_ESSID="search.this.domain search.that.domain"
# Please check the man page for resolv.conf for more information
# as domain and search are mutually exclusive.
# You can also override any settings found here per MAC address of the AP
# incase you use Access Points with the same ESSID but need different
# networking configs. Below is an example - of course you use the same
# method with other variables
#mac_config_001122334455=( "dhcp" )
#mac_dhcpcd_001122334455="-t 10"
#mac_dns_servers_001122334455=( "192.168.0.1" "192.168.0.2" )
# When an interface has been associated with an Access Point, a global
# variable called ESSID is set to the Access Point's ESSID for use in the
# pre/post user functions below (although it's not available in preup as you
# won't have associated then)
# If you're using anything else to configure wireless on your interface AND
# you have installed any of the above packages, you need to disable them
#modules=( "!iwconfig" "!wpa_supplicant" )
#-----------------------------------------------------------------------------
|
Next, we have the configuration in /etc/wpa_supplicant.conf
Code: |
# global configuration
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
...
# for Luc13
network={
ssid="Luc13"
scan_ssid=1
key_mgmt=NONE
auth_alg=OPEN
wep_key0="XXXXXXXXXX"
wep_tx_keyidx=0
}
|
All this should be executed and handled by /etc/init.d/net.wlan0 So, here's the output when I start the script:
Code: |
$ /etc/init.d/net.wlan0 start
* Starting wlan0
* Starting wpa_supplicant on wlan0 ...
1166851104.464995: Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'hostap' ctrl_interface 'N/A' bridge 'N/A'
1166851104.465236: Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
1166851104.465291: Reading configuration file '/etc/wpa_supplicant.conf'
1166851104.465402: ctrl_interface='/var/run/wpa_supplicant'
1166851104.465451: ctrl_interface_group='0' (DEPRECATED)
1166851104.465514: eapol_version=1
1166851104.465559: ap_scan=1
1166851104.465603: fast_reauth=1
1166851104.465647: Line: 15 - start of a new network block
1166851104.465704: ssid - hexdump_ascii(len=3):
4d 49 54 MIT
1166851104.465804: scan_ssid=1 (0x1)
1166851104.465851: key_mgmt: 0x4
1166851104.465902: Line: 22 - start of a new network block
1166851104.465949: ssid - hexdump_ascii(len=7):
6c 69 6e 6b 73 79 73 linksys
1166851104.466039: scan_ssid=1 (0x1)
1166851104.466101: key_mgmt: 0x4
1166851104.466146: auth_alg: 0x1
1166851104.466212: wep_key0 - hexdump(len=10): [REMOVED]
1166851104.466259: wep_tx_keyidx=0 (0x0)
1166851104.466305: Line: 32 - start of a new network block
1166851104.466351: ssid - hexdump_ascii(len=5):
4c 75 63 31 33 Luc13
1166851104.485580: scan_ssid=1 (0x1)
1166851104.485633: key_mgmt: 0x4
1166851104.485678: auth_alg: 0x1
1166851104.485730: wep_key0 - hexdump(len=10): [REMOVED]
1166851104.485777: wep_tx_keyidx=0 (0x0)
1166851104.485824: Line: 42 - start of a new network block
1166851104.485871: ssid - hexdump_ascii(len=4):
6c 61 73 73 lass
1166851104.485962: key_mgmt: 0x4
1166851104.486056: Priority group 0
1166851104.486128: id=0 ssid='MIT'
1166851104.486171: id=1 ssid='linksys'
1166851104.486214: id=2 ssid='Luc13'
1166851104.486256: id=3 ssid='lass'
1166851104.486308: Initializing interface (2) 'wlan0'
1166851104.525314: EAPOL: SUPP_PAE entering state DISCONNECTED
1166851104.525436: EAPOL: KEY_RX entering state NO_KEY_RECEIVE
1166851104.525480: EAPOL: SUPP_BE entering state INITIALIZE
1166851104.525528: EAP: EAP entering state DISABLED
1166851104.525618: EAPOL: External notification - portEnabled=0
1166851104.525683: EAPOL: External notification - portValid=0
1166851104.526101: SIOCGIWRANGE: WE(compiled)=20 WE(source)=18 enc_capa=0xf
1166851104.526158: capabilities: key_mgmt 0xf enc 0xf
1166851104.526308: Added alternative ifindex 3 (wifi0) for wireless events
1166851104.526362: WEXT: Operstate: linkmode=1, operstate=5
1166851104.526445: Added alternative ifindex 3 (wifi0) for wireless events
1166851104.557008: Own MAC address: 00:05:3c:04:04:ee
1166851104.557130: wpa_driver_hostap_set_wpa: enabled=1
1166851104.591954: wpa_driver_hostap_set_key: alg=none key_idx=0 set_tx=0 seq_len=0 key_len=0
1166851104.592179: wpa_driver_hostap_set_key: alg=none key_idx=1 set_tx=0 seq_len=0 key_len=0
1166851104.592338: wpa_driver_hostap_set_key: alg=none key_idx=2 set_tx=0 seq_len=0 key_len=0
1166851104.592495: wpa_driver_hostap_set_key: alg=none key_idx=3 set_tx=0 seq_len=0 key_len=0
1166851104.592649: wpa_driver_hostap_set_countermeasures: enabled=0
1166851104.592697: wpa_driver_hostap_set_drop_unencrypted: enabled=1
1166851104.592762: Setting scan request: 0 sec 100000 usec
1166851104.593979: ctrl_interface_group=0
1166851104.594281: Added interface wlan0
1166851104.594338: Daemonize.. [ ok ]
* Starting wpa_cli on wlan0 ... [ ok ]
* Backgrounding ...
|
iwconfig gives this output:
Code: |
wifi0 IEEE 802.11b ESSID:"Luc13"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:17:74:98:EB
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:3033-3139-3139-3531-3033 Security mode:open
Power Management:off
wlan0 IEEE 802.11b ESSID:"Luc13"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:17:74:98:EB
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:3033-3139-3139-3531-3033 Security mode:open
Power Management:off
Link Quality=59/70 Signal level=-40 dBm Noise level=-99 dBm
Rx invalid nwid:0 Rx invalid crypt:134 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:6229 Missed beacon:0
|
Yet ifconfig tells me this:
Code: |
wifi0 Link encap:UNSPEC HWaddr 00-05-3C-04-04-EE-20-A1-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:197 errors:0 dropped:0 overruns:0 frame:0
TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:71470 (69.7 Kb) TX bytes:26730 (26.1 Kb)
Interrupt:11
wlan0 Link encap:Ethernet HWaddr 00:05:3C:04:04:EE
inet6 addr: fe80::205:3cff:fe04:4ee/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:177 overruns:0 frame:0
TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1770 (1.7 Kb) TX bytes:26128 (25.5 Kb)
Interrupt:11
|
I don't have an IPv4 address, which I need. If I try running dhcpcd -d -D -H wlan0, I get this output:
Code: |
Info, MAC address = 00:05:3c:04:04:ee
Debug, broadcasting DHCP_REQUEST for 18.252.7.245
Debug, timed out waiting for DHCP_ACK response
Debug, broadcasting DHCP_DISCOVER
Error, timed out waiting for a valid DHCP server response
|
I'm really perplexed. Does anyone have any ideas?
-Ricardo-
Last edited by NotCourse6 on Sun Dec 24, 2006 2:33 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Sat Dec 23, 2006 11:16 am Post subject: Re: WEP and dhcpcd not working together |
|
|
NotCourse6 wrote: | iwconfig gives this output:
Code: |
wifi0 IEEE 802.11b ESSID:"Luc13"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:17:74:98:EB
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:3033-3139-3139-3531-3033 Security mode:open
Power Management:off
wlan0 IEEE 802.11b ESSID:"Luc13"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:17:74:98:EB
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:3033-3139-3139-3531-3033 Security mode:open
Power Management:off
Link Quality=59/70 Signal level=-40 dBm Noise level=-99 dBm
Rx invalid nwid:0 Rx invalid crypt:134 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:6229 Missed beacon:0
|
[ |
Rx invalid crypt:134
I would say that the WEP key is wrong.
If you think it's right then I suggest you take your problem to the hostap mailing list. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NotCourse6 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 09 Oct 2004 Posts: 79
|
Posted: Sun Dec 24, 2006 2:05 am Post subject: |
|
|
The WEP key is definitely correct, since the same key works for my Windows machine. It's a 10-digit hexadecimal entry. Also, when I booted up my computer (without an ethernet cable plugged in or anything), I get zero invalid crypt errors but a huge mess of invalid misc errors:
Code: |
eth0 no wireless extensions.
lo no wireless extensions.
Warning: Driver for device wifi0 has been compiled with version 20
of Wireless Extension, while this program supports up to version 18.
Some things may be broken...
wifi0 IEEE 802.11b ESSID:"Luc13"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:17:AA:94:AE
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:3033-3139-3139-3531-3033 Security mode:open
Power Management:off
wlan0 IEEE 802.11b ESSID:"Luc13"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:17:AA:94:AE
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:3033-3139-3139-3531-3033 Security mode:open
Power Management:off
Link Quality=45/70 Signal level=-54 dBm Noise level=-99 dBm
Rx invalid nwid:0 Rx invalid crypt:6 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:1252 Missed beacon:0
sit0 no wireless extensions.
|
There's a couple courses of action that I think I can pursue. First, I could try updating the system programs, drivers, et cetera, but I'm not certain which ones I need to look at. Second, I could try looking at the invalid miscellaneous errors, but have no idea where to retrieve those. Finally, I'm going to look around the prism mailing lists for any information and write an e-mail if I can't find the answer I need. Please help where you can.
-Ricardo- |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NotCourse6 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 09 Oct 2004 Posts: 79
|
Posted: Sun Dec 24, 2006 2:37 am Post subject: |
|
|
I solved it, but I'm not sure why my solution works.
What I did was comment out the line in /etc/wpa_supplicant.conf that reads:
ssid_scan=1
So, now the configuration block is:
Code: |
# for Luc13
network={
ssid="Luc13"
# scan_ssid=1
key_mgmt=NONE
auth_alg=OPEN
wep_key0=0319195103
wep_tx_keyidx=0
}
|
ifconfig gives me:
Code: |
wifi0 Link encap:UNSPEC HWaddr 00-05-3C-04-04-EE-20-31-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:332 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27300 (26.6 Kb) TX bytes:12732 (12.4 Kb)
Interrupt:11
wlan0 Link encap:Ethernet HWaddr 00:05:3C:04:04:EE
inet addr:192.168.0.16 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::205:3cff:fe04:4ee/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:239 errors:0 dropped:63 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15750 (15.3 Kb) TX bytes:12252 (11.9 Kb)
Interrupt:11
|
Finally, iwconfig reads:
Code: |
$ iwconfig
eth0 no wireless extensions.
lo no wireless extensions.
Warning: Driver for device wifi0 has been compiled with version 20
of Wireless Extension, while this program supports up to version 18.
Some things may be broken...
wifi0 IEEE 802.11b ESSID:"Luc13"
Mode:Managed Access Point: 00:12:17:AA:94:AE Bit Rate:11 Mb/s
Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:0319-1951-03 Security mode:open
Power Management:off
wlan0 IEEE 802.11b ESSID:"Luc13"
Mode:Managed Access Point: 00:12:17:AA:94:AE Bit Rate:11 Mb/s
Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:0319-1951-03 Security mode:open
Power Management:off
Link Quality=43/70 Signal level=-53 dBm Noise level=-96 dBm
Rx invalid nwid:0 Rx invalid crypt:7 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:4836 Missed beacon:0
sit0 no wireless extensions.
br0 no wireless extensions.
|
This is a bit misleading. iwconfig does not seem to reset its statistics when net.wlan0 has been stopped. If someone would kindly tell me how to reset iwcofig's variables, then I could give more accurate readings. Also, any insight as to why commenting out the line ssid_scan=1 solves the problem would be greatly appreciated.
Thanks for the help!
-Ricardo- |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|