Re: static dhcp6_name_servers
Roy Marples
Wed May 06 18:10:43 2015
Hi Paul
On Wednesday 06 May 2015 16:11:11 Walrath, Paul wrote:
> Is it possible to set static dhcp6_name_servers just like you can set static
> domain_name_servers?
No it's not.
static is designed to override specific DHCP values, mainly the ip address and
routes it provides as dhcpcd handles that internally. A side effect is that it
can also handle all other DHCP values as well.
However, there are several options
1) create /etc/dhcpcd.enter-hook and put new_dhcp6_name_servers="1::2"
2) add the directive env new_dhcp6_name_servers="1::2" in /etc/dhcpcd.conf
The downside of the above is that you'll see the variable in DHCP and RA hooks
as well.
One alternative solution would be to set
nooption dhcp6_name_servers
in dhcpcd.conf and then set a static resolvconf(8) entry like so
echo "nameserver 1::2" | resolvconf -a static.dhcp6
It just so happens I have a portable resolvconf implementation you can find
here if not on your OS: http://roy.marples.name/projects/openresolv/
> To allow domain name server addresses to come from a DHCPv4 server and from
> static assignment in dhcpcd.conf but not from a DHCPv6 server or ICMPv6
> router advertisement, the setup in dhcpcd.conf would be something like
> this:
>
> interface eth0
> option domain_name_servers
> static dhcp6_name_servers=2001:4860:4860:8888
>
> I don't think this works as I expect it to. What do you think?
Well, we have the problem as described above.
Also, there is no mechanism right now to ignore ND6 options, so at least this
will need to be added to dhcpcd.
Roy
Archive administrator: postmaster@marples.name