Import dhcpcd(8) into FreeBSD base.
This introduces DHCPv6 functionality to FreeBSD, and when used can also replace dhclient(8) and rtsol(8).
This exists in parallel with both of these existing tools, which continue to be the default. This can be changed by:.
- setting dhcp_client="dhcpcd" in /etc/rc.confThis exists in parallel with existing tools dhclient(8) and rtsol(8),
- removing rtsold_enable from /etc/rc.conf
- removing ifconfig_em0_ipv6="inet6 accept_rtadv" from /etc/rc.conf
- enabling dhcpcd(8) using one of the two methods below
Once set as the default, dhcpcd(8) can be used in 2 different modes:
1. Master mode - by setting dhcpcd_enable="YES" in /etc/rc.conf.
This will enabled dhcpcd(8) for all network interfaces (except those
that cannot utilise DHCP - such as firewire, tap and bridge).
By default, dhcpcd(8) will try to configure DHCPv4 and DHCPv6.
Consider modifying dhcpcd.conf(5) to further configure per interface
settings in this mode.
2. Interface mode - by setting the following parameters in /etc/rc.conf:
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="DHCP"
Setting these will enable DHCPv4 and DHCPv6 respectively on the
specified interface. These can be set independently of each other.
dhcpcd_enable should not be set in this mode (it defaults to "NO")which continue to be the default.
Future improvements which could be made to FreeBSD to improve dhcpcd(8):To use dhcpcd(8) for dynamic address allocation of IPv4 and IPv6,
- addition of address flags and process id to ifa_msghdrmake the following changes to /etc/rc.conf:
- kernel does not support route message filtering- set dhcpcd_enable="YES"
- kernel does not allow IPv6 address sharing- remove "DHCP" from the ifconfig_<iface> line
- No SIOCGIFALIAS support- remove rtsold_enable
- cannot detect route socket overflow within kernel
- kernel does not report IPv6 address flag changes
- kernel does not support userland sending ND6 advertisementsremove ifconfig_<iface>_ipv6="inet6 accept_rtadv"