Remix.run Logo
yjftsjthsd-h 19 hours ago

How do you handle internal DNS? I'd really like `curl http://mylaptop.internal` (or so) to work; that's easy with DHCP.

jcalvinowens 17 hours ago | parent | next [-]

You can specify the DNS server in the router advertisements. This is how you do it in radvd.conf:

    interface enp2s0f1 {
     AdvSendAdvert on;
     AdvManagedFlag off;
     AdvOtherConfigFlag off;
     IgnoreIfMissing on;
     prefix ::/64 {
      AdvOnLink on;
      AdvAutonomous on;
     };
     RDNSS fddd:deca:fbad:1::10 {
      AdvRDNSSLifetime infinity;
     };
     DNSSL internal.domain {
      AdvDNSSLLifetime infinity;
    };
    };
I haven't yet found a way to specify a local NTP server though, which is a drag. So everything not manually configured (like the voip phone) talks to the local NTP over ipv4.
yjftsjthsd-h 17 hours ago | parent [-]

Sure. And how does that internal DNS server know about your devices? I connect laptop1 and laptop2 to my network. With DHCP, they each told eg. dnsmasq their name when they connected so laptop1.mydomain.internal and laptop2.mydomain.internal both resolve to the IPs that were handed out to each device. With RDNSS+DNSSL I can tell them that they should look up records on my internal domain and against my internal DNS server, but I can't see a good way for that DNS server to know that they exist or what their hostnames are.

jcalvinowens 16 hours ago | parent [-]

Oh I see. You're supposed to use mdns, but I haven't actually done that yet, it's sort of the last thing on my list.

Mine is all static. I run a bind9 forwarder for DNS, and KEA for dhcp4. I have a little list of machines/macs/addresses as the source of truth, and a pair of python scripts that generates kea-dhcp4.conf and a bind9 zone file from that table.

When I enabled IPv6, I just put all the SLACC addresses in that table, and made the python script generate AAAA records too. But this is honestly really stupid, I need to actually use mdns...

I thought about writing a little systemd oneshot that used rfc2136 dyndns updates for home. But it feels like reinventing the wheel a bit...

yjftsjthsd-h 16 hours ago | parent [-]

Perhaps I should give mDNS another look, then. Feels like a regression, but if it works.

> When I enabled IPv6, I just put all the SLACC addresses in that table, and made the python script generate AAAA records too.

Er, isn't that just manual static assignment, then? Not SLAAC? Don't get me wrong, static addresses do make DNS easy...

jcalvinowens 16 hours ago | parent [-]

> Er, isn't that just manual static assignment, then? Not SLAAC?

Haha no, much dumber than that: I boot the machine, get the permanent SLAAC address it comes up with, put that in the static table, and re-run the script to generate the zone files. The downside is the address changes if you reinstall the OS, but I do that so rarely it honestly hasn't been a problem (and you can force the older MAC-based address generation if you want it to be stable). I wouldn't recommend this setup though...

I do also have some static addresses, like that DNS server address.

yjftsjthsd-h 16 hours ago | parent [-]

LLOL, okay yes that is. Er. An unusual setup:D As the guy who usually says "if it works"... I'm surprised that works. But only because I thought SLAAC addresses changed at least per-boot. But since that clearly isn't the case: Well, if it works...

P.S. thanks for the funniest HN comment I've read in a while

kstrauser 17 hours ago | parent | prev | next [-]

Every device on my LAN handles mDNS, or at least the ones I SSH to do.

hbogert 17 hours ago | parent | prev [-]

Nothing is stopping your router which does RA to also work in tandem with an internal dns server that can do hostnames for you mapped to slaac addresses.

yjftsjthsd-h 17 hours ago | parent [-]

I'm not sure I follow? AIUI, RA lets you tell hosts about a DNS server, and an internal DNS server could have AAAA records pointing at SLAAC addresses, but how would it know what hostnames go to those addresses?