You are not logged in.

#1 2004-10-14 17:50:47

cbozic
Member
From: Morgantown, WV, USA
Registered: 2004-01-31
Posts: 77

DHCP without DNS

Is there anyway I can use DHCP on my eth0 interface without having it overwrite my /etc/resolv.conf with the DHCP server's DNS settings?

Offline

#2 2004-10-14 17:53:24

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: DHCP without DNS

dhcp and dns should be independant... primary and secondary dns servers should be set by dhcp...

as long as eth0 is up and a valid interface, then

dhcpcd eth0

should set up dhcp.

personally I've never had to touch resolv.conf settings

Offline

#3 2004-10-14 18:01:23

cbozic
Member
From: Morgantown, WV, USA
Registered: 2004-01-31
Posts: 77

Re: DHCP without DNS

primary and secondary dns servers should be set by dhcp...

Right, but how do I keep DHCP from overwriting my own DNS settings in /etc/resolv.conf?  I have a working DNS that is provided to me by my DHCP server.  I want to use a different DNS server than what my DHCP server gives me and I don't want to have to change my /etc/resolv.conf every time I boot.   I can manually run dhcpcd -r to keep this from happening but I want to know how to set up rc.conf to do this for me automatically.

Offline

#4 2004-10-14 18:05:56

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: DHCP without DNS

look here:
http://bbs.archlinux.org/viewtopic.php? … cd+rc+conf

yeah, it's a hack.... but it works

Offline

#5 2004-10-14 18:18:54

cbozic
Member
From: Morgantown, WV, USA
Registered: 2004-01-31
Posts: 77

Re: DHCP without DNS

That link points me to a file called /etc/conf.d/network that doesn't exist on my system.  From what I understood of that thread, it doesn't exist on anyone's system.  They were referring to how nice it would be if that file existed and I have to say I agree.  smile  But, that doesn't help me at this moment.  Any other ideas?

Offline

#6 2004-10-14 19:09:21

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: DHCP without DNS

please reread the thread - the initial post says

But the network init script uses dhcpcd, and sends the hostname defined in /etc/rc.conf. So I modified rc.conf to include a DHCP_HOSTNAME variable, and used that in /etc/rc.d/network.

it's a fix for your problem.  declare a variable in rc.conf and edit the network script

Offline

#7 2004-10-14 19:27:27

cbozic
Member
From: Morgantown, WV, USA
Registered: 2004-01-31
Posts: 77

Re: DHCP without DNS

I did read the thread and I already edited my network startup script in that way.  I just didn't like to end this thread with a hack fix.  smile  I wanted to see if there was any other way to do this under the current system so that if the right package were to be upgraded, my changes don't get wiped out. 

The fix you suggested did help me out for the time being though.  Thanks!

Offline

#8 2004-10-14 19:38:12

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: DHCP without DNS

I would go to the bug report section on the home page and add a "feature request"

Offline

#9 2004-10-14 19:47:58

cbozic
Member
From: Morgantown, WV, USA
Registered: 2004-01-31
Posts: 77

Offline

Board footer

Powered by FluxBB