Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Daniel Holth
Daniel Holth

Posted on • Edited on

     

Working local ipv6 DNS on dd-wrt

If you'd like to be able toping6 name on your local network based on the names requested by your hosts,

  • Disable radvd; dnsmasq will do it.
  • Disable dhcp6s; dnsmasq will do it.
  • Remove static leases. These are ipv4-only; we will define ipv6-compatible leases in configuration.
  • Set 'Additional Dnsmasq Options:
no-negcacheexpand-hostsdomain-neededenable-rano-resolvserver=8.8.8.8server=8.8.4.4dhcp-range=::1,::400,constructor:br0,ra-namesdhcp-host=00:24:8C:26:8C:67,cardamom,192.168.1.100,[::1]dhcp-host=38:f9:d3:cf:ee:86,laptop,192.168.1.104,[::18f]
Enter fullscreen modeExit fullscreen mode
  • no-negcache: Don't cache negative lookups.
  • expand-hosts: Add our network name to lookups.
  • domain-needed: Don't pass hostname-only lookups to upstream DNS.
  • enable-ra: Dnsmasq provides radvd
  • no-resolv: Stay far away from the ISP domain name servers
  • server: Use Google's
  • dhcp-range=::1,::400,constructor:br0,ra-names: Our LAN is on br0; dhcpv6 assigns addresses based on the delegated prefix, this range, and the device id. ra-names assigns DNS names to dual-stack hosts that advertise a name.
  • Our hosts. The MAC address, the desired hostname, the ipv4 address, and a portion of the ipv6 address appended to the delegated prefix from our ISP.

The ipv4 static leases were the sticking point. These need to be configured only in the dnsmasq configuration; the ipv4 dd-wrt configuration will write a hosts file and prevent dnsmasq from doing what we want.

SLAAC + ra-names doesn't seem to work for me whendhcp-host specifies a hostname and an ipv4 address only. Instead, I specify the mac address, the desired hostname, the ipv4 address, and the suffix of the ipv6 address. The suffix can be either constructed-within-range style[::18f] or whatever you want[::1],[::2].

The host will continue to use its autoconfigured address for outgoing connections and will gain an additional DHCP-assigned address that can be used for incoming connections. My Android phone ignores the assigned suffix, but gets a working assigned ipv6 name anyway.

I am using DHCPv6 with prefix delegation on the WAN side, and my Dhcp6c config is:

interface vlan2 { send ia-pd 0; send rapid-commit;# request domain-name-servers; script "/sbin/dhcp6c-state";};id-assoc pd 0 { prefix ::/56 infinity; prefix-interface br0 {  sla-id 0;  sla-len 8; };};id-assoc na 0 { };
Enter fullscreen modeExit fullscreen mode

dnsmasq is enabled and is providing local dns.

The dd-wrt "Used Domain" is set to "LAN & WLAN", adding a linedomain=<what you typed in the LAN Domain field> todnsmasq.conf.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

A contributor to the Python packaging ecosystem
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp