dnsmasq ipv6 prefix
时间: 2024-01-30 18:50:56 浏览: 86
ipv6协议
3星 · 编辑精心推荐
dnsmasq is a lightweight DNS and DHCP server that can be used to provide IPv6 prefix delegation (PD) to clients on a network. To configure dnsmasq for IPv6 PD, follow these steps:
1. Edit the dnsmasq configuration file, typically located at /etc/dnsmasq.conf.
2. Add the following lines to the file:
dhcp-range=::1000,::1fff,constructor:eth0,ra-names,slaac
enable-ra
dhcp-option=option6:dns-server,[DNS server IPv6 address]
This configuration sets up a DHCPv6 range from ::1000 to ::1fff on the eth0 interface, enables Router Advertisement (RA) messages, enables stateless address autoconfiguration (SLAAC), and specifies the DNS server IPv6 address to be provided to clients.
3. Save the configuration file and restart the dnsmasq service.
For example, on a Debian-based system, run:
sudo systemctl restart dnsmasq
Alternatively, you can use the following command to restart dnsmasq on most systems:
sudo service dnsmasq restart
With these steps, dnsmasq should now be providing IPv6 PD to clients on your network.
阅读全文