DHCP configs

Francis Dupont fdupont at isc.org
Mon Mar 19 14:18:46 UTC 2012


as it seems I have some free time (?!) I am working on the DHCP configs:

on SD-AFTRs as the DHCPv6 server config (BTW not critical, IMHO
we shan't use them):

-------------------------------- dhcpd6.conf --------------------------------
# softwire new options:
#  softwire: AFTR endpoint
#  defroute: unused
#  defgateway: default gateway
# (but IPv6 routing doesn't work for other reasons in this testbed)

option dhcp6.aftr code 64 = ip6-address;
option dhcp6.defroute code 123 = ip6-address;
option dhcp6.defgateway code 99 = ip6-address;

# lease time: default 1 hour, maximum 1 day

default-lease-time 3600;
max-lease-time 86400;
authoritative;

host sdb4_1 {
     host-identifier option dhcp6.client-id 74:44:01:93:67:1b;
     fixed-address6 2001:db8:0:1::2;
     option dhcp6.aftr 2001:db8::1;
     option dhcp6.name-servers 2001:db8:0:1::1;
     option dhcp6.defgateway 2001:db8:0:1::1;
}

host sdb4_2 {
     host-identifier option dhcp6.client-id c4:3d:c7:9d:df:1e;
     fixed-address6 2001:db8:0:1::3;
     option dhcp6.aftr 2001:db8::1;
     option dhcp6.name-servers 2001:db8:0:1::1;
     option dhcp6.defgateway 2001:db8:0:1::1;
}

# don't forget this

subnet6 2001:db8:0:1::/64 {}
-------------------------------- end --------------------------------

To be run on interface eth1 by (please adjust patch)
/usr/local/sbin/dhcpd -d -6 -cf /usr/local/etc/dhcpd6.conf eth1
(note the -d redirect the logs to the stdout/stderr)

For the TSV (aka IPv6-Transport DHCPv4 SerVer) I need the IPv4 addresses.

Now for the SD-B4s:

The CRA (IPv6-transport Client Relay Agent) has no config file
and is launched by:
dhccra -d -i <wan-interface> <tsv-ipv6-address>
(same note about the -d flag)

The (likely unused) DHCPv6 client config should be like:

---------------------------- dhclient6.conf ----------------------------
option dhcp6.aftr code 64 = ip6-address;
option dhcp6.defgateway code 99 = ip6-address;

interface "ethXXX" {
          also request dhcp6.aftr;
          also request dhcp6.defgateway; 
}
-------------------------------- end --------------------------------

It is run with something like:
dhclient -6 ethXXX -q -nw -cf dhclient6.conf -lf dhclient6.leases \
 -pf dhclient6.pid
(-q == quiet and -nw == no wait, i.e., the opposite of -d)

The script is more interesting, BTW there is an example in
conf/b4-openwrt/files
Note if we can share the script file it is not safe for other files.

Regards

Francis Dupont <fdupont at isc.org>

PS: according to my previous proposal, the port range options should be:

option port-range-min code 240 = unsigned integer 16;
option port-range-max code 241 = unsigned integer 16;

use with:

option port-range-min 1024;
option port-range-max 1535;

and

also request port-range-min, port-range-max;

${old,new)_port_range_{min,max}


More information about the sdcpe-devel mailing list