What's new

DHCP6 Server Question

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Pikey18

New Around Here
Unsure how to do something on Merlin. For reference here is my setup:

Router:
ASUS RT-AC68U on Merlin FW 378.51
IPv4: 172.30.1.254
IPv6: 2001:xxxx:xxxx:xxxx::1

Windows Server:
IPv4: 172.30.1.1
IPv6: 2001:xxxx:xxxx:xxxx::10

I run DHCP for IPv4 from the Windows Server and wish to continue to do so. I was going to use the server for IPv6 as well but when I do that I cannot get IPv6 traffic to the internet (Router Advertisement was enabled on the ASUS router).

As I run DNS internally for various purposes I would like to either drop the DNS IP that the router provides for IPv6 (as it is the router one and breaks internal stuff) or provide the servers IPv6 address in its place using the DHCP6 server in the router.

What is the easiest way to do this?

Note I am comfortable using SSH and have Nano installed on the router and already have done some firewall scripts so understand how to do that stuff.

At the moment I have all DNS requests that hit the router being redirected to the server but it seems like a stupid way to do things so would prefer a proper solution.

Note the server has no issues giving IPv6 results when the IPv4 address is queried:

; <<>> DiG 9.3.2 <<>> www.google.com.au ANY
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1990
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.au. IN ANY

;; ANSWER SECTION:
www.google.com.au. 158 IN A 74.125.237.175
www.google.com.au. 158 IN A 74.125.237.183
www.google.com.au. 158 IN A 74.125.237.191
www.google.com.au. 158 IN A 74.125.237.184
www.google.com.au. 133 IN AAAA 2404:6800:4006:805::1017

;; Query time: 30 msec
;; SERVER: 172.30.1.1#53(172.30.1.1)
;; WHEN: Sat Apr 04 00:26:24 2015
;; MSG SIZE rcvd: 127
 
For reference here is the output from ipconfig/all from a client PC:

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : ***
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
Physical Address. . . . . . . . . : ***
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2001:****:****:****:****:****:33b2:10aa(Preferred)
Temporary IPv6 Address. . . . . . : 2001:****:****:****:****:****:9137:978c(Preferred)
Link-local IPv6 Address . . . . . : fe80::6db7:b286:33b2:10aa%3(Preferred)
IPv4 Address. . . . . . . . . . . : 172.30.1.7(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Monday, 6 April 2015 2:11:14 AM
Lease Expires . . . . . . . . . . : Wednesday, 6 May 2015 2:11:14 AM
Default Gateway . . . . . . . . . : fe80::56a0:50ff:fed8:bd60%3
172.30.1.254
DHCP Server . . . . . . . . . . . : 172.30.1.1
DHCPv6 IAID . . . . . . . . . . . : 62401138
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1C-3E-33-DD-B8-2A-72-9A-75-48
DNS Servers . . . . . . . . . . . : 2001:****:****:****::1
172.30.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled


I have used bold to emphasise the DNS entry I want to stop coming via DHCP6. My preference would be for the router to not give out a DNS address via DHCP6.
 
As nobody seemed able to help I did some playing and found out how to do it. Hopefully this helps someone else.

The DHCP6 Server is handled by DNSMASQ - so I looked at the existing config plus some research and tried the following dnsmasq.postconf script and it works:

#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh

pc_replace "dhcp-option=lan,option6:23,[::]" "dhcp-option=lan,option6:23,[2001:****:****:****::10]" $CONFIG
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top