I have arch 0.6 running as a dhcp client. I would like to set it up so that I use a static dns server. The problem being the dhcpd overwrites /etc/resolv.conf upon every network restart. Could one of you tell me what is the proper way to avoid dhcp from assigning the nameserver, but still getting the ip/gateway. Thanks.
Take a look in /etc/rc.conf in the Interfaces section (this is from my file):
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# (prefix an interface in INTERFACES with a ! to disable it)
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
# eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
Notice the commented-out '# eth0 ' line and the 'eth0="dhcp" line above it. Well, you've got to comment out (or remove the line with 'dhcp' and put fixed IP addresses as in the commented out '# eth0' line. When you use the '/etc/rc.d/network start' command, dhcp should not start.
Thanks. In my case, I do want dhcp to start, just not assign the dns servers.
I have come from a mdk past, there it was a case of adding PEERDNS=no to the /etc/sysconfig/network configuration file. I also found an example using dhclient.conf, but this does not work. I assume that I either need to pass an argument to dhcpcd or set up something in /etc/dhcpc, but I am not sure what.
EDIT: Never mind, I found it. There is a -R flag for dhcpcd that 'does not replace /etc/resolv.conf'