Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcp timing out [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
BlakeJob
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2004
Posts: 80

PostPosted: Tue Nov 22, 2005 1:59 pm    Post subject: dhcp timing out [SOLVED] Reply with quote

Yesterday I arrived at my inlaws and I booted into linux but could not pick up their router (windows XP does just fine). Here is the script I am running (I use this script for other places without a problem). It should be noted that I lately did an emerge -u world and it installed a lot of things (it had been a month), but at home my wireless still ran without a problem afterwards.

Facts:
- they do not use encryption
- iwlist sees their router
- in the script below i've tried using iwconfig wlan0 ap instead of essid
- with the essid i put in the correct essid and i've tried it with and without quotations
- i'm using a broadcom driver (64bit, as i run 64 bit gentoo)
- todays ago i was able to connect to MY home router (i'm at a new router)
- I added the iwconfig wlan0 commit line after someone said to in another topic
- tcpdump is below
- dmesg and messages show nothing unusual (except messages shows that it timed out)
- i've tried the timeout period at 10, 20 and 60 seconds.
- i can connect to the router by wire just fine.

Code:

#!/bin/bash
/usr/bin/sudo /sbin/modprobe ndiswrapper
/usr/bin/sudo /sbin/iwconfig wlan0 mode Managed
/usr/bin/sudo /sbin/iwconfig wlan0 key off
/usr/bin/sudo /sbin/iwconfig wlan0 essid "ESSID_CORRECT_VALUE"
/usr/bin/sudo /sbin/iwconfig wlan0 commit
/usr/bin/sudo /sbin/ifconfig wlan0 up
/usr/bin/sudo /sbin/dhcpcd -t 20 wlan0


tcpdump:
Code:

tcpdump: WARNING: wlan0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 96 bytes
12:21:05.566825 fe80::290:4bff:fe5d:f921 > ip6-allrouters: icmp6: router solicitation
12:21:08.169368 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:90:4b:5d:f9:21, length: 548
12:21:09.566147 fe80::290:4bff:fe5d:f921 > ip6-allrouters: icmp6: router solicitation
12:21:13.565539 fe80::290:4bff:fe5d:f921 > ip6-allrouters: icmp6: router solicitation
12:21:16.223146 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:90:4b:5d:f9:21, length: 548
12:21:24.001983 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:90:4b:5d:f9:21, length: 548
12:21:28.098339 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:90:4b:5d:f9:21, length: 548
12:21:36.251100 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:90:4b:5d:f9:21, length: 548
tcpdump: pcap_loop: recvfrom: Network is down
8 packets captured
16 packets received by filter
0 packets dropped by kernel


any help is appreciated... i do not care for windows XP :-)


Last edited by BlakeJob on Wed Nov 23, 2005 7:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
BlakeJob
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2004
Posts: 80

PostPosted: Wed Nov 23, 2005 3:23 am    Post subject: update Reply with quote

So I tried using wpa_supplicant with debugging on instead of iwconfig. Here is the error I get from wpa_supplicant (again it is able to scan and see the router) when trying to connect:

Code:

ioctl[SIOCGIFADDR]: Cannot assign requested address
Back to top
View user's profile Send private message
BlakeJob
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2004
Posts: 80

PostPosted: Wed Nov 23, 2005 1:05 pm    Post subject: Reply with quote

I am using kernel 2.6.13-r5

I tried compiling IOCTL support into the kernel but that did not help. I don't know how much i can take windows XP! :-)

I've searched on Google and didn't come across anything. does anyone have an idea?
Back to top
View user's profile Send private message
BlakeJob
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2004
Posts: 80

PostPosted: Wed Nov 23, 2005 5:58 pm    Post subject: Reply with quote

*bump*

By the way I did try to reset the router, but that did not help.
Back to top
View user's profile Send private message
BlakeJob
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2004
Posts: 80

PostPosted: Wed Nov 23, 2005 7:33 pm    Post subject: Reply with quote

OK I finally got it!

So after trying this four hours upon hours I (including setting up wpa_supplicant) something weird, but good started happening. I would boot and run the script in the post above, and it would say dhcp already started.... [weird]... so anyways i decided to do /etc/init.d/net.wlan0 stop and it stopped! THIS IS WEIRD B/C IT SHOULD NEVER HAVE STARTED (as far as im concerned, b/c it was not in the runlevel and i do not know of any depends on it!). So then i ran script AS ROOT (sudo didn't do the trick) and it worked!!

So now i removed wpa_supplicant and updated by init script to be how it really should be (it was not setup correctly, it was just a home made script of mine). So anyways I set it up to have my home network and my in-laws, i then rebooted into my wireless runlevel and here I am typing this up.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Nov 24, 2005 9:48 am    Post subject: Reply with quote

BlakeJob wrote:
so anyways i decided to do /etc/init.d/net.wlan0 stop and it stopped! THIS IS WEIRD B/C IT SHOULD NEVER HAVE STARTED (as far as im concerned, b/c it was not in the runlevel and i do not know of any depends on it!). So then i ran script AS ROOT (sudo didn't do the trick) and it worked!!


It should have started because you have hotplug-base and udev installed and this is what they do.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
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