I know it's bad to resurrect old posts, but when searching for "Slackware use dhcp with static nameserver", this one is one of the top results.
From Slackware 13.37 (maybe previous versions as well), you can add this to your card config in "
rc.inet1.conf":
Code:
DHCP_KEEPRESOLV[x]="yes"
Replace x by your card number.
Using DHCP, your
/etc/resolv.conf will not be modified.
Please note that this is a "per network card" setting. If using several NICs, and want to
always use a static DNS server, make the change for each NIC.