14.5. 用于 IPv6 的 DHCP(DHCPv6)
自带有
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
DHCPv 6 服务器、客户端和中继代理功能的 4.x 版本以来,ISC DHCP 包括对 IPv6( DHCPv6 )的支持。代理同时支持 IPv4 和 IPv6,但代理一次只能管理一个协议;对于双重支持,必须为 IPv4 和 IPv 6 单独启动它们。例如,通过编辑对应的配置文件 /etc/dhcp/dhcpd.conf 和 /etc/dhcp/dhcpd6.conf 来配置 DHCPv 4 和 DHCPv6,然后发出以下命令:
systemctl start dhcpd systemctl start dhcpd6
~]# systemctl start dhcpd
~]# systemctl start dhcpd6
DHCPv6 服务器配置文件可以在 /etc/dhcp/dhcpd6.conf 中找到。
示例服务器配置文件可以在
/usr/share/doc/dhcp-版本/dhcpd6.conf.example 中找到。
简单的
DHCPv6 服务器配置文件类似如下:
subnet6 2001:db8:0:1::/64 {
range6 2001:db8:0:1::129 2001:db8:0:1::254;
option dhcp6.name-servers fec0:0:0:1::1;
option dhcp6.domain-search "domain.example";
}
subnet6 2001:db8:0:1::/64 {
range6 2001:db8:0:1::129 2001:db8:0:1::254;
option dhcp6.name-servers fec0:0:0:1::1;
option dhcp6.domain-search "domain.example";
}
要为客户端分配
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
fixed-address,基于网络接口卡的 MAC 地址,请使用 hardware ethernet 参数:
host otherclient {
hardware ethernet 01:00:80:a2:55:67;
fixed-address6 3ffe:501:ffff:100::4321;
}
host otherclient {
hardware ethernet 01:00:80:a2:55:67;
fixed-address6 3ffe:501:ffff:100::4321;
}
shared-network 中的配置选项和 IPv6 的组声明与 IPV4 相同。如需了解更多详细信息,请参阅 例 14.5 “shared-network lack” 和 例 14.6 “grouprigger” 中演示的示例。