Here is a script to automatically update an option for IPv6 DNS so that the hosts on your internal network use the MikroTik as the DNS (save it as ipv6-dns-upd):
Can not help you with your problem, but just a small tip.
You do not longer need ; at end of every line. ; are only need to separate several commands on same line.
In my opinion the context for that script is just wrong: if you provide a service (dns or any other), it should be served from a fixed ip. Then there is also no need for such scripts.
Further this script won’t work from time perspective: ip’s are assigned for a specific period of time. the dns option is associated with the life-cycle of the ip. If the ip of dns server changes, client won’t be notified until it needs to update its ip reservation.
Whole point is to utilize DNS Cache on router, and as most ISP’s use DHCP-PD to provide addresses…they are unfortunately dynamic.
Also, if life-cycle of an prefix expires, dhcp renew occures and you get new prefix (well usually same lease is renewed and you don’t even need to update DNS option ip) and also all clients update their adresses via RA and get new DNS server IP, so I don’t see a real problem here for home usage.
Of course it would be way better to use static addressing scheme, but it is not always possible.
As an sidenote, I personally have static IPv4 from my ISP, which I pay extra for…but they don’t offer static IPv6…it is still dynamic via DHCP-PD.
Theoretically I could utilzie link-local address for this, but it would be also quite awkward and “not correct” implementation.
Yes and I already have it set up like that, problem was with vanisihing global variable, which made it run everytime lease was renewed…caused by permissions issue.
Yes of course, but it won’t update DNS option when prefix itself changes.