Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No DHCP request response when running Linux [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
XelKarin
n00b
n00b


Joined: 29 Dec 2003
Posts: 27

PostPosted: Mon Jun 11, 2012 7:48 pm    Post subject: No DHCP request response when running Linux [SOLVED] Reply with quote

I'm afraid this may be a bit off topic as it's a general issue that I'm having, but seeing as I run Gentoo I decided I would ask here. There's a coffee shop I frequent that has recently come under new ownership. They've changed their Wifi setup and now, when I'm running Linux, I get no response to my DHCP requests. I'm able to connect fine under Windows, though. I was wondering if it's possible to configure DHCP to only accept requests from certain operating systems and if that's what they may have done there?

Last edited by XelKarin on Thu Jun 14, 2012 10:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1307

PostPosted: Mon Jun 11, 2012 8:39 pm    Post subject: Reply with quote

XelKarin ...

well, no, and any out of the box wireless router wouldn't have such a 'feature', MAC address filtering perhaps, but not OS. There is probably some simpler reason behind it, but your not really giving us much to work with, like how you connect, what DHCP client you use, and any logs that show the DHCP negociation failing. Infact, what leads you to think its DHCP?

The more/better information you can provide us, the easier it'll be to figure out whats going on ... and hopefully resolve it.

best ... khay
Back to top
View user's profile Send private message
XelKarin
n00b
n00b


Joined: 29 Dec 2003
Posts: 27

PostPosted: Mon Jun 11, 2012 9:50 pm    Post subject: Reply with quote

Well, I'm running wpa_supplicant and dhcpcd. wpa_supplicant connects to the wireless network fine, but dhcpcd just doesn't receive an address. Here's my configuration and log snippets.

/etc/conf.d/net
Code:
config_eth0="dhcp"
dhcpcd_eth0="-C ntp.conf -t 10 -q"

modules_wlan0="wpa_supplicant"
wpa_supplicant_wlan0="-Dwext"
config_wlan0="dhcp"
dhcpcd_wlan0="-C ntp.conf -t 10 -q"
iwconfig_wlan0="mode managed"


/etc/wpa_supplicant/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1

network={
   ssid="friendscafe"
   key_mgmt=NONE
   wep_key0="secret"
}


wlan0
Code:
wlan0     IEEE 802.11abgn  ESSID:"friendscafe" 
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:7F:28:F8:11:7D   
          Bit Rate=1 Mb/s   Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/70  Signal level=-39 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:150   Missed beacon:0


dhcpcd log
Code:
dhcpcd[3810]: version 5.2.12 starting
dhcpcd[3810]: wlan0: using hwaddr 00:21:6a:ac:9f:6e
dhcpcd[3810]: wlan0: executing `/lib64/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd[3810]: wlan0: executing `/lib64/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd[3810]: wlan0: broadcasting for a lease
dhcpcd[3810]: wlan0: sending DISCOVER (xid 0x6b7a6538), next in 4.86 seconds
dhcpcd[3810]: wlan0: sending DISCOVER (xid 0x6b7a6538), next in 8.16 seconds
dhcpcd[3810]: wlan0: sending DISCOVER (xid 0x6b7a6538), next in 16.09 seconds
dhcpcd[3810]: wlan0: sending DISCOVER (xid 0x6b7a6538), next in 32.16 seconds
dhcpcd[3810]: timed out
dhcpcd[3810]: allowing 8 seconds for IPv4LL timeout
dhcpcd[3810]: wlan0: probing for an IPv4LL address
dhcpcd[3810]: wlan0: checking for 169.254.42.63
dhcpcd[3810]: wlan0: sending ARP probe (1 of 3), next in 1.32 seconds
dhcpcd[3810]: wlan0: sending ARP probe (2 of 3), next in 1.09 seconds
dhcpcd[3810]: wlan0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd[3810]: wlan0: using IPv4LL address 169.254.42.63
dhcpcd[3810]: wlan0: adding IP address 169.254.42.63/16
dhcpcd[3810]: wlan0: adding route to 169.254.0.0/16
dhcpcd[3810]: wlan0: writing lease `/var/lib/dhcpcd/dhcpcd-wlan0.lease'
dhcpcd[3810]: wlan0: executing `/lib64/dhcpcd/dhcpcd-run-hooks', reason IPV4LL
dhcpcd[3810]: forking to background
dhcpcd[3810]: forked to background, child pid 3830
Back to top
View user's profile Send private message
XelKarin
n00b
n00b


Joined: 29 Dec 2003
Posts: 27

PostPosted: Mon Jun 11, 2012 10:38 pm    Post subject: Reply with quote

Ok, looking at wlan0, I'm seeing that the connection is not encrypted and all packets passing through are invalid. I'm guessing I'm not properly authenticated. So it seems I'm missing something in my wpa_supplicant configuration. I tried my usual WPA configuration with this network and it didn't work. This network apparently uses WEP and I'm at a bit of a loss configuring it.
Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1307

PostPosted: Tue Jun 12, 2012 3:25 am    Post subject: Reply with quote

XelKarin ...

OK, well you should see something like the following if wpa_supplicant successfully negociates a connection ...

Code:
% awk '/wpa/{print}' /var/log/messages
Jun 10 15:27:34 hostname wpa_cli: interface wlan0 CONNECTED


As for configuring WEP:

Code:
network={
       ssid="friendscafe"
       scan_ssid=1
       key_mgmt=NONE
       wep_key0=secret
       wep_tx_keyidx=0
}


The "eapol_version=1" option I've never seen before, "eapol_flags=" yes, anyhow, none of the options you have set are strickly necessary, so perhaps comment them if you still have problems.

HTH & best ...

khay
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1484

PostPosted: Tue Jun 12, 2012 11:42 am    Post subject: Reply with quote

If it will connect under Windows, it will connect under Linux; I'm suprised
they are using WEP, but you should be able to get the configuration and
the passphrase they are using by booting Windows and checking the
configuration there.

Will
Back to top
View user's profile Send private message
XelKarin
n00b
n00b


Joined: 29 Dec 2003
Posts: 27

PostPosted: Thu Jun 14, 2012 6:47 pm    Post subject: Reply with quote

Ok, so I thought the key they gave me was a password string (yes, it was a readable word), but on closer inspection I realized it was valid hexadecimal. I removed the quotes from around wep_key0 and everything worked.
Back to top
View user's profile Send private message
khayyam
Veteran
Veteran


Joined: 07 Jun 2012
Posts: 1307

PostPosted: Thu Jun 14, 2012 9:59 pm    Post subject: Reply with quote

ok ... good ... you should now mark this thread as '[SOLVED]'

BTW, I never quote 'psk=' or 'wep_key0=' as I've also had occasions when the key is thought to include the quotes. This can happen with WPA if the key is max length (63 chars), the last quote will be truncated and so the first included as part of the psk, and of course the authentication will fail. As the quotes are not required I see no reason to use them ...

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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