Enable DHCPv6 in dnsmasq to distribute fixed range IPv6 addresses but failed
You are making a few different mistakes in your configuration. First of all site-local addresses have been deprecated for many years. Any documentation telling you to use addresses starting with fec0
is outdated and needs to be updated.
The replacement for site-local addresses is called unique local addresses. These are constructed by using fd
as the first octet followed by five random octets. For example you could have fdda:772b:1c61::/48
as your local prefix.
However both types of addresses mentioned above are unsuitable for computers you want to communicate with anything outside your own network. If you want those computers to communicate outside your own network, you should be assigning them addresses from the prefix your ISP have routed to you.
Additionally for many scenarios using DHCPv6 is not the best option. This depends on your specific needs, but often using just a router advertisement daemon (such as radvd
) is a more suitable choice than a DHCPv6 server.
Related videos on Youtube
Ray
Updated on September 18, 2022Comments
-
Ray almost 2 years
Help wanted! I want to create a AP in my Raspbian PI. And i choose dnsmasq as the dhcpv4 and dhcpv6 server. However, my laptop can acquire IPv4 successfully but fail to get a IPv6. Why the dnsmasq doesn't work for IPv6?
# my dnsmasq.conf domain-needed no-resolv no-poll server=8.8.8.8 server=8.8.4.4 all-servers interface=wlan0 dhcp-range=192.168.233.100, 192.168.233.200, 255.255.255.0, 12h dhcp-range=fec0::ff00, fec0::fffe/10, 12h enable-ra dhcp-option-force=26,1397 log-queries log-dhcp conf-dir=/etc/dnsmasq.d # glance at the dnsmasq log when i make a DHCP request hostapd: wlan0: STA 88:53:2e:65:8c:a4 IEEE 802.11: associated hostapd: wlan0: STA 88:53:2e:65:8c:a4 RADIUS: starting accounting session 56703A6F-00000010 hostapd: wlan0: STA 88:53:2e:65:8c:a4 WPA: pairwise key handshake completed (RSN) dnsmasq-dhcp[3585]: 2738259568 available DHCP range: 192.168.233.100 -- 192.168.233.200 dnsmasq-dhcp[3585]: 2738259568 client provides name: anri dnsmasq-dhcp[3585]: 2738259568 DHCPREQUEST(wlan0) 192.168.233.200 88:53:2e:65:8c:a4 dnsmasq-dhcp[3585]: 2738259568 tags: wlan0 dnsmasq-dhcp[3585]: 2738259568 DHCPACK(wlan0) 192.168.233.200 88:53:2e:65:8c:a4 anri dnsmasq-dhcp[3585]: 2738259568 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router, dnsmasq-dhcp[3585]: 2738259568 requested options: 15:domain-name, 6:dns-server, 119:domain-search, dnsmasq-dhcp[3585]: 2738259568 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope, dnsmasq-dhcp[3585]: 2738259568 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server, dnsmasq-dhcp[3585]: 2738259568 requested options: 121:classless-static-route, 249, 33:static-route, dnsmasq-dhcp[3585]: 2738259568 requested options: 252, 42:ntp-server dnsmasq-dhcp[3585]: 2738259568 next server: 192.168.233.254 dnsmasq-dhcp[3585]: 2738259568 sent size: 1 option: 53 message-type 5 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 54 server-identifier 192.168.233.254 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 51 lease-time 43200 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 58 T1 21600 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 59 T2 37800 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 1 netmask 255.255.255.0 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 28 broadcast 192.168.233.255 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 3 router 192.168.233.254 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 6 dns-server 192.168.233.254 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 12 hostname anri dnsmasq-dhcp[3585]: 2738259568 sent size: 2 option: 26 mtu 1397 dnsmasq-dhcp[3585]: RTR-SOLICIT(wlan0) dnsmasq-dhcp[3585]: 2738259568 available DHCP range: 192.168.233.100 -- 192.168.233.200 dnsmasq-dhcp[3585]: 2738259568 client provides name: anri dnsmasq-dhcp[3585]: 2738259568 DHCPREQUEST(wlan0) 192.168.233.200 88:53:2e:65:8c:a4 dnsmasq-dhcp[3585]: 2738259568 tags: wlan0 dnsmasq-dhcp[3585]: 2738259568 DHCPACK(wlan0) 192.168.233.200 88:53:2e:65:8c:a4 anri dnsmasq-dhcp[3585]: 2738259568 requested options: 1:netmask, 28:broadcast, 2:time-offset, 3:router, dnsmasq-dhcp[3585]: 2738259568 requested options: 15:domain-name, 6:dns-server, 119:domain-search, dnsmasq-dhcp[3585]: 2738259568 requested options: 12:hostname, 44:netbios-ns, 47:netbios-scope, dnsmasq-dhcp[3585]: 2738259568 requested options: 26:mtu, 121:classless-static-route, 42:ntp-server, dnsmasq-dhcp[3585]: 2738259568 requested options: 121:classless-static-route, 249, 33:static-route, dnsmasq-dhcp[3585]: 2738259568 requested options: 252, 42:ntp-server dnsmasq-dhcp[3585]: 2738259568 next server: 192.168.233.254 dnsmasq-dhcp[3585]: 2738259568 sent size: 1 option: 53 message-type 5 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 54 server-identifier 192.168.233.254 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 51 lease-time 43200 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 58 T1 21600 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 59 T2 37800 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 1 netmask 255.255.255.0 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 28 broadcast 192.168.233.255 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 3 router 192.168.233.254 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 6 dns-server 192.168.233.254 dnsmasq-dhcp[3585]: 2738259568 sent size: 4 option: 12 hostname anri dnsmasq-dhcp[3585]: 2738259568 sent size: 2 option: 26 mtu 1397
-
Ray over 8 yearsThanks for the tips. I just want to deploy a LAN with IPv6, so i prefer the local addresses. And DHCPv6 comes to my mind firstly because of it's simple concept. I'll try RA later.
-
kasperd over 8 years@Reimondo Router advertisements are simpler and more widely supported than DHCPv6.