$Id: index.html,v 1.8 2003/07/16 12:51:52 jinmei Exp $
% ./configure % make # make install
option domain-name-servers DNS_SERVER_ADDRESS;where DNS_SERVER_ADDRESS is the IPv6 numeric address of the DNS server. Multiple addresses can be specified by multiple 'option' statements. Then start the server:
# dhcp6s IFNAMEwhere IFNAME is the interface that the server should receive requests from clients. Multiple interfaces can be specified as multiple arguments.
Note: if the server is located on a different link as the client, you will need to run a DHCPv6 relay agent on the client link and (in general) to enable IPv6 multicast routing to reach the server from the relay agent.
interface IFNAME { information-only; request domain-name-servers; script "SCRIPT_PATH"; };where IFNAME is the interface name, like "fxp0", on which the host machine is connected to the network, and SCRIPT_PATH is an absolute path to a script file which processes DNS server addresses given by the sever.
#!/bin/sh rm /etc/resolv.conf for nameserver in $new_domain_name_servers; do echo nameserver $nameserver >>/etc/resolv.conf doneThis is exactly what ISC dhclient does with regards to DNS server addresses.
Save this file to somewhere in the client machine.
Assuming the script file is /sbin/dhcp6c-script and the DHCPv6 client interface is fxp0, a complete example of dhcp6c.conf is:
interface fxp0 { information-only; request domain-name-servers; script "/sbin/dhcp6c-script"; };
# dhcp6c fxp0That's it. The client should be able to get DNS server addresses from the server, and will update /etc/resolv.conf accordingly.
The following subsections describe the procedure.
fxp0:[backslash] :raflags#64:where [backslash] is the backslash character. (You may need to change the interface name "fxp0" appropriately.) If you have installed the latest version of rtadvd from KAME snapshots, you can also specify the flag as a string notation:
fxp0:[backslash] :raflags="o":
#!/bin/sh IFNAME=$1 PIDFILE=/var/run/dhcp6c.pid if [ -f ${PIDFILE} ]; then kill -HUP `cat ${PIDFILE}` else /usr/local/sbin/dhcp6c $IFNAME fiPut this script somewhere in the client host machine (we assume "/sbin/start-dhcp6c").
Then invoke the rtsold(8) daemon (which should be built from the latest KAME snapshot):
# rtsold -O /sbin/start-dhcp6c IFNAMEWhen the daemon receives a router advertisement with the O flag on, it will invoke the start-dhcp6c script, which will then (re)start the DHCPv6 client. If the host machine moves from link to link, you may also want to specify the -m option to the rtsold daemon.