LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-20-2010, 08:39 PM   #1
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Disable dhcp polling for eth0 at boot up?


During installation I set eth0 to use dhcp to get an IP address. I then installed gnome and networkmanger which handles my interfaces and works fine. But during bootup the system pauses for 5 seconds or so while it polls for dhcp. It then times out and gives me a 169.254.xx which is then replaced when networkmanager starts up at the end of bootup.

How do I stop the polling to cut out the 5 seconds?
 
Old 04-20-2010, 08:58 PM   #2
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
How do I stop the polling to cut out the 5 seconds?
I you want to stop polling for dhcp on boot you need to change USE_DHCP[0]="yes" to USE_DHCP[0]="" in /etc/rc.d/rc.inet1.conf. This will stop dhcpcd running.
 
1 members found this post helpful.
Old 04-20-2010, 09:11 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Opps never mind. I thought network manager should have edited that file.

Last edited by jefro; 04-20-2010 at 09:14 PM.
 
Old 04-20-2010, 09:14 PM   #4
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949

Original Poster
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
!

Quote:
Originally Posted by bgeddy View Post
I you want to stop polling for dhcp on boot you need to change USE_DHCP[0]="yes" to USE_DHCP[0]="" in /etc/rc.d/rc.inet1.conf. This will stop dhcpcd running.
Very nice! The polling must have been taking longer to timeout than I noticed because that reboot was probably half of all the previous boots.

Thank you.

EDIT: That's also a nice file to know about. The init scripts have always made me a little nervous. It's probably time I start poking around to see what's going on in there.

Last edited by damgar; 04-20-2010 at 09:17 PM.
 
Old 04-20-2010, 09:41 PM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
EDIT: That's also a nice file to know about. The init scripts have always made me a little nervous. It's probably time I start poking around to see what's going on in there.
Yes - the init scripts are useful. If you wanted a dialogue driven script to do the same you can always run netconfig as root which is the same as what the installer does however editing the configuration file gives more control. Glad you got it worked out so quickly.
 
Old 04-21-2010, 12:49 PM   #6
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 631

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
I did not set eth0 to use dhcp to get an IP address during installation, but after I change my mind.
But I didnt know about USE_DHCP[0]="" in /etc/rc.d/rc.inet1.conf so I put in /etc/rc.d/rc.local a link of this script
Code:
#!/bin/bash
echo "Starting internet conection...";
ifconfig eth0 up && dhclient eth0
ifconfig eth0
I am wondering, if there is any problem with that?
 
Old 04-21-2010, 01:16 PM   #7
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
That's OK - but not really the Slackware default way of doing this. The Slackware scripts look at rc.inet1.conf for their configurations and it's here you make your settings. Slackware by default uses dhcpcd as it's dhcp client rather than dhclient. Also the included scripts have facilites to up or down interfaces from the command line.

So in a nutshell I would advise you to either run netconfig or manually change /etc/rc.d/rc.inet1.conf and disable you changes to rc.local. This will be more compliant with a stock Slackware setup.
 
Old 04-21-2010, 01:24 PM   #8
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 631

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
thank you!
 
Old 04-21-2010, 04:10 PM   #9
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
Quote:
Originally Posted by bgeddy View Post
That's OK - but not really the Slackware default way of doing this. The Slackware scripts look at rc.inet1.conf for their configurations and it's here you make your settings. Slackware by default uses dhcpcd as it's dhcp client rather than dhclient. Also the included scripts have facilites to up or down interfaces from the command line.

So in a nutshell I would advise you to either run netconfig or manually change /etc/rc.d/rc.inet1.conf and disable you changes to rc.local. This will be more compliant with a stock Slackware setup.
dhcpcd does not work for me, I have no idea why. dhclient using wicd DOES work. What effect would it have on my networking if I disable dhcpcd for ALL network devices (includng wireless) in rc.inet1 and just use dhclent in wicd to connect each time?

Bob

Last edited by BobNutfield; 04-21-2010 at 04:12 PM.
 
Old 04-21-2010, 04:36 PM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by BobNutfield View Post
dhcpcd does not work for me, I have no idea why. dhclient using wicd DOES work. What effect would it have on my networking if I disable dhcpcd for ALL network devices (includng wireless) in rc.inet1 and just use dhclent in wicd to connect each time?

Bob
You will not be able to automatically mount remote drives (NFS, CIFS, or SMB) listed in /etc/fstab as part of startup. The services started in rc.inet2 may not be able to start or will not start correctly if none of your network connections are up.

I doubt that rc.ntpd will start correctly either.
 
Old 04-21-2010, 04:48 PM   #11
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
Thank you, hope I am not hijacking the thread. But I did not mean no networking at all. I get connected just fine to both my home network and the net, but dhcpcd will not give ne an IP address. I DO get a DHCP address when I use dhclient with wicd. dchpcd is started automatically at boot, but just results in errors. Once the boot process is complete, I just connect with wicd with dhclient. My question was about just disabling dhcpcd, not networking all together. I am getting SMB connections to other computers on my home network using the method I am using.

Bob
 
Old 04-21-2010, 05:01 PM   #12
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
In other words, your gateway has given you an IP address but you aren't getting it.

What is the result of...
Code:
ls -lart /etc/dhcpc
...?
 
Old 04-22-2010, 02:27 PM   #13
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
Quote:
Originally Posted by Richard Cranium View Post
In other words, your gateway has given you an IP address but you aren't getting it.

What is the result of...
Code:
ls -lart /etc/dhcpc
...?
No, the gateway is not giving me an address using dhcpcd. It results in:

Code:
err, wlan0: Option 43 has zero length
      err, wlan0: could not parse packet
It repaeats that several times, then times out. However, when I reach the desktop, disconnect from the failed address of 169.254..15.XX, then reconnect using wicd, which I have configured to use dhclient instead of dhcpcd, it does in fact give me the address of 192.168.1.40, which connects me to my home network and the net. I could be wrong, but I do not think this problem can be solved. I am not worried as long as I can connect. What I was asking is what the effect would be of disabling dhcpcd since I am not using it.

The request results:

Code:
bash-3.1$ ls -lart /etc/dhcpc
total 28
-rwxr-xr-x  1 root root 1359 2009-03-09 04:20 dhcpcd.sh-sample
-rw-r--r--  1 root root   42 2010-04-17 21:08 dhcpcd.duid
-rw-r--r--  1 root root  299 2010-04-18 08:16 dhcpcd-wlan1.info
-rw-r--r--  1 root root  298 2010-04-19 20:26 dhcpcd-eth0.info
-rw-r--r--  1 root root  299 2010-04-19 20:26 dhcpcd-wlan0.info
drwxr-xr-x  2 root root 4096 2010-04-22 20:02 .
drwxr-xr-x 69 root root 4096 2010-04-22 20:02 ..
Thanks

Bob
 
Old 04-22-2010, 03:46 PM   #14
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
If your gateway did not think that you had an address, you wouldn't be getting any TCP/IP traffic from your gateway.

You could perhaps log into your gateway (if that's possible; my gateway is another slackware box) to see if you have been given an address.

As for the message you are seeing...
Quote:
err, wlan0: Option 43 has zero length
err, wlan0: could not parse packet
...according to RFC 2132, that's a bad message. From the RFC...
Quote:
The code for this option is 43 and its minimum length is 1.
(http://docstore.mik.ua/rfc/rfc2132.html#s8. and scroll down to 8.4)
 
Old 04-22-2010, 04:02 PM   #15
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
Thank you for your assistance, but I am not sure I am being clear. I DO get an IP address, but only when using wicd with dhclient, and not dhcpcd. Slackware defaults inet1 to using dhcpcd when the opetion USE_DHCP="yes" is used. It is when inet1 broadcasts for a lease that I get this error message and it times out to an "unconnected" IP address of 169.XXX.XXX.XX. I do not have to query the gateway (my router) to confirm whether I have an IP addrress. I am given 192.168.1.40, but ONLY when I connect with dhclient through wicd. In short, if dhcpcd broadcasts for a lease, it does not obtain one.

Bob
 
  


Reply



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
Need help on virtual interface eth0:1 disable at boot time ravibhure Linux - Newbie 4 02-11-2010 03:12 AM
eth0 DHCP time out on boot AtomicAmish Fedora 9 06-19-2006 03:03 PM
Disable dhcpcd for eth0 on boot thomasw92 Linux - Newbie 2 04-10-2006 01:49 AM
How do I disable dhcp request at boot? EcceVery Debian 2 01-01-2006 02:07 AM
howto disable eth0 at boot time rydogg Linux - Newbie 2 06-16-2003 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:31 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