LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-28-2005, 11:43 PM   #1
justmehere
Member
 
Registered: Jul 2005
Distribution: Mandrake 6.1
Posts: 59

Rep: Reputation: 15
How to enable dhcpcd


I 'm running Mandrake 6.1 kernel 2.2.13-7 and did not install any networking packages. I've installed the dhcpcd rpm package 1.3.17p19-3mdk. but every time i boot into Mandrake 6.1 i run the ifconfig eth0 command and its shows the ethernet information but no IP. I have to run the dhcpcd in order to get a dhcp assigned ip.

can anyone tell me what i have missed. thanks.
 
Old 07-29-2005, 12:14 AM   #2
aeruzcar
Member
 
Registered: Jul 2003
Location: Santiago, Chile
Distribution: Gentoo
Posts: 282

Rep: Reputation: 30
Maybe you shold try something like running as root "rc-update add net.eth0 default " that way the net will automatically start at boot time.
Hope this helps
 
Old 07-29-2005, 01:59 AM   #3
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
In some configuration file you'll probably have to say it needs to use DHCP to start the interface.. now I am not familiar with mandrake of that age, so the best thing to do is find out how to configure your network
(on Redhat it has been /etc/sysconfig/network-scripts/ifcfg-eth0 for ages, but I am not sure if Mandrake is using this same structure).
 
Old 07-29-2005, 07:52 AM   #4
craigs1987
Member
 
Registered: May 2004
Location: England
Distribution: SuSE linux 10.0 OSS
Posts: 78

Rep: Reputation: 15
This may work:
Code:
dhcpcd eth0
provided that the dhcpcd packages installed successfully. Hope that was some help...
Craig.
 
Old 07-29-2005, 08:27 AM   #5
justmehere
Member
 
Registered: Jul 2005
Distribution: Mandrake 6.1
Posts: 59

Original Poster
Rep: Reputation: 15
thanks to both.

aeruzcar, i'll try the rc-update command when i get home tonight. i was initially trying the update-rc command but I could not find it part of the distribution.

rhoekstra i did take a look at that script file, in fact my head is spinning from checking som many different scipt files. Can anyone of you please give me an overview or URL of how the linux startups and how these scripts are processed ? That would be greatly appreciated.
 
Old 07-29-2005, 08:37 AM   #6
justmehere
Member
 
Registered: Jul 2005
Distribution: Mandrake 6.1
Posts: 59

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by craigs1987
This may work:
Code:
dhcpcd eth0
provided that the dhcpcd packages installed successfully. Hope that was some help...
Craig.
Thanks for the reply. But that does work. I don't get an IP but when linux boots thats the problem. you have to run the command you suggested to get an IP.

Last edited by justmehere; 07-29-2005 at 08:39 AM.
 
Old 07-29-2005, 08:48 AM   #7
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
It's probably /etc/rc.d/init.d/networking that processes all network interfaces.. if you are able to follow what the scripts do, you can find out what scripts or configuration files are accessed at boot time for 'networking' to find out what it has to do.

Unfortunately, I do not have a URL for you...

I do have a question, though... Mandrake 2.2.13 ? for a reason? sounds really old to me. Is that referring to the kernel version? or is it a new version numbering of the Mandrake distros??
 
Old 07-29-2005, 12:36 PM   #8
justmehere
Member
 
Registered: Jul 2005
Distribution: Mandrake 6.1
Posts: 59

Original Poster
Rep: Reputation: 15
thanks rhoekstra

I did edit the network file /etc/rc.d/init.d/networking you mentioned but the issue still persist. i'm trying to pickup Linux using a user friendly version like Mandrake 6.1 kernel 2.2.13-7. I do have later distros like RedHat 7/8/9 and Slackware 8/9.

Thanks for the info on reading these script files any good tutorials on picking up the language ? is this command along the lines of C/Java ?
 
Old 07-29-2005, 06:32 PM   #9
justmehere
Member
 
Registered: Jul 2005
Distribution: Mandrake 6.1
Posts: 59

Original Poster
Rep: Reputation: 15
rhoekstra thanks !!!!

the problem was EXACTLY as you mentioned knowing how these scripts work. I misunderstood the documentation on editing the /etc/rc.d/init.d/network script. i had changed a comparison statement involving network variable back to what the documentation said and it works now. linux brings up the lo + eth0 on boot up with a DHCP assigned IP.

I suppose I'll have to read up on scripting...is that what they call shell scripting in all of those rc.* files ?

cheers
 
Old 07-29-2005, 07:12 PM   #10
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
Quote:
is that what they call shell scripting in all of those rc.* files ?
yup! and it's awesome, in my humble opinion. that's one reason i use slackware, because it forces me to do everything that way, and i end up learning so much about how my computer works.

here are a couple good resources for beginners:

RUTE User's Guide
- this is an excellent guide for any linux beginner, the section i linked to is on basic commands but i suggest picking up a copy for your shelf

Advanced Bash-Scripting Guide

Bash Guide For Beginners


those should get you started. good luck, and have fun!
 
Old 07-29-2005, 08:29 PM   #11
justmehere
Member
 
Registered: Jul 2005
Distribution: Mandrake 6.1
Posts: 59

Original Poster
Rep: Reputation: 15
mcd, thanks for the scripting resources. thats the reason i wanted to try out Mandrake 6.1 because I was told way back that its the distribution for beginners like me. I'll agree this is ONE way to learn linux by just trying out things. Though in my case I've been trying Linux on and off for the past 1-2 years but for some reason its starting to sink in now.

Notably it REALLY helps to have knowledgable Linux users here @ LQ

Cheers
 
Old 07-30-2005, 02:34 AM   #12
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
justmehere, I didn't tell to alter the script, and luckily I read that you have restored that script (if I understood you correctly).. it was just for you to analyse what you system 'does' at boot time to determine if the system is starting up... it compares variables and if . . . then . . . and so on.. If you see the dhcpcd command anywhere, you can see what it is comparing to determine whether or not to start dhcpcd... in that case you see which variable has to be set in your ifcfg-eth0 file for it to be started with dhcpcd... that is basically what I was referring at.. But I reckon you got that when you responded later on . . . That's good.. that's the best way to learn about the system....

I have had this often in the past... 'How do I make my system do . . .'.. I went to my /etc/init.d and went to look at the corresponding startup script to see how it determines what to do... works great!...
By the way, those files are all BASH scripts.

Also, the distro you are using or referring to are pretty old...

Distros are mostly freely downloadable... and the 2.2 kernel is very old, and as such is the construction of the script files and stuff...

I'd suggest moving to a new OS.. as not only you'll be having a newer kernel, the scripts are more and more developed to handle more sophisticated actions.

I am using Fedora... now Fedora, as well as SuSE, have a graphicly interfaced configuration tools to configure your Linux, but you are NOT forced to use those. You could decide (like me) to stay on the command line and find out about all the scripts like above...

But as newer distros use newer tools and scripts, I recommend moving to a newer OS...
Good luck!
 
Old 07-31-2005, 11:33 AM   #13
justmehere
Member
 
Registered: Jul 2005
Distribution: Mandrake 6.1
Posts: 59

Original Poster
Rep: Reputation: 15
rhoekstra,

what i have found is that the /etc/rc.d/rc* script file runs the script /etc/rc.d/init.d/network which checks for the presence of a /etc/sysconfig/network if there AND Network var is set to "yes" the susequent scripts are run (i.e. /etc/sysconfig/network-scripts/ifcfg-eth0.

I know that this distribution is quite old but I find that its easy naviagating around and installing RPM packages. Maybe its because I installed a barebone installation making it really simple for navigating the filesystem. I do plan to move on to a later distribution but for now I'm having fun playing around this configuration.

cheers
 
Old 07-31-2005, 12:54 PM   #14
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
I can understand that... but the current Fedora release still uses RPMs and doesn't force any graphical guis for managing.. just my thought...

Always good when I read that someone is willing to get to know an OS from 'under the hood' .. ..

Cheers,
 
  


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
dhcpcd afruscione Linux - Networking 3 03-21-2007 03:33 AM
dhcpcd rwescoat Linux - Networking 14 10-16-2004 12:53 PM
Help with dhcpcd jamescov Slackware 3 11-21-2003 04:25 PM
dhcpcd chrismiceli Linux - Networking 2 10-21-2002 11:09 AM
Please help, dhcpcd! majon96 Linux - Newbie 3 05-19-2002 12:55 PM

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

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