LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-21-2009, 03:57 AM   #1
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Rep: Reputation: 15
"restarting" dhcpcd


Hello everyone,

I run Slackware 12.2 (no GUI) on my dell inspiron 1420 laptop, and have managed to get
connected to the wlan at my school. However, once I kill the connection and try to reconnect,
dhcpcd just sits there broadcasting a signal and never goes anywhere. After a fresh start, I
can connect really quickly without any hesitation by dhcpcd. I have looked at the man page,
and I thought the cache was screwing things up, so I also tried running: sudo dhcpcd -k wlan0,
but that didn't help me. I don't really like rebooting my computer unless absolutely
necessary, so I was hoping you could point me in the right direction of what I need to do to
make dhcpcd work like after a fresh start.

Thanks very much for your help,
Glen M. Wilson
 
Old 04-21-2009, 04:20 AM   #2
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
How do you connect ? Do you use the rc.d scripts or do you have some other application like netmanager ?
 
Old 04-21-2009, 06:19 AM   #3
Drainuzzo
Sabayon Linux Team
 
Registered: Dec 2007
Distribution: Sabayon Linux
Posts: 6

Rep: Reputation: 0
Can you try with
ifconfig wlan0 up
?
 
Old 04-21-2009, 02:18 PM   #4
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
on my system
Code:
 s# /etc/init.d/networking restart
 
Old 04-21-2009, 11:40 PM   #5
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Sorry, I forgot to say how I connect! This is what I have been doing:

sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid "BLAH"
sudo dhcpcd wlan0

This works, but only on the first try. It has been the only way to connect from the command line that I figured out so far. I'll give john test's suggestion a try today and post back. Thanks for the help!!!
-Glen
 
Old 04-22-2009, 12:23 AM   #6
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Q: What happens if you try "/etc/init.d/networking restart" (or the Moral Equivalent for your version of Slackware) as previously suggested?

Q: What happens if you "kill -9" your first instance of dhcpcd, confirm that it's dead, and retry the three commands you stated?
 
Old 04-22-2009, 02:27 AM   #7
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
I guessed that my equivalent of "/etc/init.d/networking restart" is

/etc/rc.d/rc.inet1
or
/etc/rc.d/rc.inetd.

Upon restarting, they only seemed to do anything to eth0, and even with the following (as it suggests)

/etc/rc.d/rc.inet1 wlan0 start

I was unable to connect a second time. In case it wasn't clear, I hope to be able to reconnect after running

sudo ifconfig wlan0 down

and then bringing it back up again when I need it. Is that going to mess things up? Is this screwing up some cached files when I do this?

Upon trying just "kill -9" with the appropriate pid and all that, I also had to delete the dhcpcd pid file. After this, and bringing wlan0 down and back up again and all that jazz, I was still unable to connect. It just sits at DHCP_BROADCAST and then goes through a few more lines of stuff like DHCP_DISCOVER and then decides it didn't find anything. This is the error I get in syslog:

Apr 22 09:00:57 eisenbud dhcpcd[3155]: timed out waiting for a valid DHCP server response
Apr 22 09:00:57 eisenbud dhcpcd[3155]: timed out waiting for a valid DHCP server response

It isn't the end of the world if I have to restart my computer every day, but if it works after a restart, I should be able to give the same commands to get it in the same state after a fresh start. Are there tmp files that get created or something, and not deleted when I just kill dhcpcd and bring wlan0 down that do get deleted when I restart? That is what my guess is.

Thanks again for your help! I really appreciate it.
Glen Wilson
 
Old 04-22-2009, 03:30 AM   #8
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
Using the rc.d scripts, the correct commands are
Quote:
/etc/rc.d/rc.inet1 wlan0_restart
/etc/rc.d/rc.inet1 wlan0_start
/etc/rc.d/rc.inet1 wlan0_stop
This will only work if you have properly configured rc.inet1.conf and rc.wireless.conf and if you are using wpa_supplicant (for wpa encryption), then /etc/wpa_supplicant.conf

I'm at work at the moment, so do not have samples to show you. But try googling, there are a lot of good slackware resources on how to properly configure these conf files. Just so you know its pretty simple.
 
Old 04-22-2009, 03:35 AM   #9
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
I think this should answer all your queries :
http://alien.slackbook.org/dokuwiki/...ckware:network
 
Old 04-22-2009, 09:59 AM   #10
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Hi Everyone,
I am sorry for dragging this out so long... But I added in the appropriate code to get the /etc/rc.d/rc.inet1 script to work (see code below) and it still won't restart. After inserting the code, it logs onto the network at boot time, printing the following:

#############
Polling for DHCP server on interface eth0:
Broadcasting DHCP_REQUEST for 81.210.235.17
timed out waiting for DHCP_ACK response
Broadcasting DHCP_DISCOVER
timed out waiting for a valid DHCP server response
/etc/rc.d/rc.M: wlan0 information: 'Any ESSID'
Error for wireless request "Set Nickname" (8B1C) :
SET failed on device wlan0 ; Operation not supported.
Polling for DHCP server on interface wlan0:
Broadcasting DHCP_DISCOVER
broadcastAddr option is missing in DHCP server response. Assuming 10.87.87.255
dhcpIPaddrLeaseTime=86400 in DHCP server response.
dhcpT1value is missing in DHCP server response. Assuming 43200 sec
dhcpT2value is missing in DHCP server response. Assuming 75600 sec
DHCP_OFFER received from ■ (10.87.87.254)
Broadcasting DHCP_REQUEST for 10.87.87.144
dhcpIPaddrLeaseTime=86400 in DHCP server response.
dhcpT1value is missing in DHCP server response. Assuming 43200 sec
dhcpT2value is missing in DHCP server response. Assuming 75600 sec
DHCP_ACK received from ■ (10.87.87.254)
Broadcasting ARPOP_REQUEST for 10.87.87.144
#########

then, once I am at the command line, I issue the restart command: sudo /etc/rc.d/rc.inet1 wlan0_restart, and get:

#########
/etc/rc.d/rc.inet1: wlan0 information: 'Any ESSID'
Error for wireless request "Set Nickname" (8B1C) :
SET failed on device wlan0 ; Operation not supported.
Polling for DHCP server on interface wlan0:
Broadcasting DHCP_DISCOVER
timed out waiting for a valid DHCP server response
#########

Also, upon trying it the way I mentioned above in all possible combinations that made sense, I was still unable to get things going. So, unless anybody else has any ideas, I'll take this as a cue to not use my laptop at school and study.

Thanks!
Glen
 
Old 04-22-2009, 12:02 PM   #11
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
sorry... here is my entry in /etc/rc.d/rc.inet1.conf

####
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]=""
WLAN_ESSID[4]=FREIFLUG
 
Old 04-22-2009, 02:32 PM   #12
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
One thing, your rc.wireless script is being run, and it need not be. So remove the execute bits from rc.wireless, so that its not run.

is the ESSID correct (FREIFLUG) ?

You should be able to get more information from /var/log/messages
Just grep it for rc.inet1
Quote:
sudo grep rc.inet1 /var/log/messages
 
Old 04-23-2009, 01:19 AM   #13
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks for the help Libu! Maybe this will be interesting. After removing the execute bits from /etc/rc.d/rc.wireless, I couldn't connect with the rc.inet1 script. I'm going to compare the logs of when it works and when it doesnt to see what the difference is. Thanks for the help.
-Glen
 
Old 04-23-2009, 02:58 AM   #14
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
You must also set the debug option in rc.inet1.conf to get more information in /var/log/messages

Quote:
DEBUG_ETH_UP="yes"
 
Old 04-23-2009, 08:38 AM   #15
wilson47
Member
 
Registered: Jan 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Hi Libu,

Thanks for your help! I added that line in and was going through the debugging stuff, and the idea hit me to try using dhcpcd to get an IP address from another one of the schools wireless networks. I was able to get an IP address for this other network, although, since it is a VPN I couldn't actually use it. However, whatever that did was good enough to let me get an IP address with dhcpcd with the network I can use (FREIFLUG). It isn't really a fix, but at least I can get internet without having to always restart my laptop! Thanks very much for your help.

Best regards,
Glen
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configure error installing "dhcpcd-1.3.22" on AMD 64 and 64 bit ubuntu 6.10 qanopus Linux - Software 1 12-29-2006 10:50 PM
Run command "dhcpcd wlan0" when connecting with KInternet or at boot baraujo SUSE / openSUSE 1 05-27-2006 06:07 AM
error "Set Frequency" (8b04) : when restarting rc.inet1 tux31337 Linux - Wireless Networking 1 02-13-2006 03:47 PM
"**** /sbin/dhcpcd: not running" messages on shutdown/reboot Nylex Slackware 2 01-22-2006 09:12 AM
tying "dhcpcd" into "ifconfig" up and down Riddick Linux - Software 8 09-10-2005 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration