Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to make dhcpd run automatically?
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
prismbreak
n00b
n00b


Joined: 23 Jan 2004
Posts: 23
Location: Waterloo, ON, Canada

PostPosted: Tue Feb 10, 2004 9:38 pm    Post subject: How to make dhcpd run automatically? Reply with quote

Hello,

I don't really know whats going on here... but my machine can't resolve any names until I run dhcpd manually as root:
Code:
$ping www.yourmomma.com
ping: unknown host www.yourmomma.com
$ dhcpd
$ ping www.yourmomma.com
PING www.yourmomma.com (69.50.131.87) 56(84) bytes of data.
64 bytes from ... blah blah blah

Whats up with that?

before I run dhcpd, I can still ssh into the machine from another machine on my local network, so the network card is partially up, but it just doesn't resolve names.

How can I fix this so I don't have to run it manually every time?

Thanks,
John
Back to top
View user's profile Send private message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Tue Feb 10, 2004 9:46 pm    Post subject: Reply with quote

Hello,
this is odd.

Make sure that /etc/conf.d/net is correctly set-up and net.eth0, net.ethX are in your runlevels.

A cheap workaround if connection is present but your DNS servers don't get added to /etc/resolv.conf until you run dhcpcd manually is to make a back-up of a working /etc/resolv.conf and have it be restored automatically everytime you boot up. (This is a workaround because 'automatic' and 'manual' network detection should be exactly the same)

For example, DNS is working properly and you have your DNS servers listed in /etc/resolv.conf. Copy it to /etc/resolv.conf.working. Add a line to /etc/conf.d/local.start: cp /etc/resolv.conf.working /etc/resolv.conf.

I don't think this really solves your problem, but it should spare the annoyance of dhcpcd'ing by hand everytime you boot.
_________________
Hello.
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Feb 10, 2004 9:48 pm    Post subject: Reply with quote

check your /etc/resolv.conf for the correct name servers.

seems to as if you have wrong ones in there which are replaced by calling dhcpcd - but otoh they should stay resistant after a reboot... 8O
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
prismbreak
n00b
n00b


Joined: 23 Jan 2004
Posts: 23
Location: Waterloo, ON, Canada

PostPosted: Tue Feb 10, 2004 10:08 pm    Post subject: Reply with quote

Hey guys,

Thanks for the help. Checking resolv.conf was my first idea. I compare that file with another (working) machine and the files were identical. This is _before_ I ran dhcpd.

What do you mean about run-levels? I don't know how to check whatever that is.

Thanks,
John
Back to top
View user's profile Send private message
prismbreak
n00b
n00b


Joined: 23 Jan 2004
Posts: 23
Location: Waterloo, ON, Canada

PostPosted: Tue Feb 10, 2004 10:27 pm    Post subject: Reply with quote

Hi,

Found the problem. I think my /etc/conf.d/net file was overwritten on my last emerge.

I just had to change it back to "iface_eth0="dhcp".

Thanks for your help.

John
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