dnsmasq ipv6
时间: 2023-09-21 15:02:40 浏览: 52
ipv6 addressing
Dnsmasq is a lightweight DNS and DHCP server that can support both IPv4 and IPv6. To enable IPv6 support in Dnsmasq, you need to do the following:
1. Make sure that your operating system supports IPv6.
2. Edit the Dnsmasq configuration file (usually located at /etc/dnsmasq.conf) with a text editor and add the following line to enable IPv6 support:
`listen-address=::1,127.0.0.1`
This line tells Dnsmasq to listen on both the IPv4 loopback address (127.0.0.1) and the IPv6 loopback address (::1).
3. If you want to provide IPv6 addresses to clients using DHCPv6, you can add the following lines to the Dnsmasq configuration file:
```
dhcp-range=::100,::200,constructor:eth0,ra-names
enable-ra
```
This will provide IPv6 addresses in the range of ::100 to ::200 to clients that connect to the eth0 interface. It also enables Router Advertisement (RA) messages, which allow clients to automatically configure their IPv6 addresses and default gateway.
4. Finally, restart the Dnsmasq service to apply the changes:
`sudo systemctl restart dnsmasq`
阅读全文