On Thu, Jul 9, 2015 at 4:36 PM, Seth <[email protected]> wrote:
> I'm trying to use the following statement in /etc/dhclient.conf
>
> supersede domain-name-servers [127.0.0.1]:40;
>
> But when the machine boots and the network starts it fails to apply the
> setting. The error message is:
>
> /etc/dhclient.conf line 4: expecting decimal octet.
> supersede domain-name-servers [127.0.0.1]:40;
>                               ^
> I've also tried quoting the value "[127.0.0.1]:40" and escaping it
> \[127.0.0.1\]:40 without success.

The actual DHCP domain-name-servers option doesn't support passing
ports, so saying "act like you got this DHCP option value from the
server" can't be done with those.  You need a way to just say "insert
this line in the resolv.conf", which is the resolv.conf.tail method.


> Using the resolv.conf.tail method is undesirable as I only want a single
> nameserver entry in /etc/resolv.conf

Uh, so you want to _ignore_ the option from the server?  Then add
    ignore domain-name-servers;
to your dhclient.conf and put the desired nameserver line in your
resolv.conf.tail file.


Philip Guenther

Reply via email to