# dhcp for ipv6



## kribo (Oct 28, 2015)

Hi guys,

I want to setup isc-dhcp server for IPv6 network. I just want DHCP service on my server send DNS IPv6 address for example 2002:8000:1:1042::2374
my topology:

client  <---> router <---> dhcpv6-server

router already config with ipv6 dhcp-relay.

My client already have IPv6 address from router advertisement message, but failed to get DNS server.  
I can see packet request DHCP from my client and relay from my router.  With tcpdump(1):

```
# tcpdump -i igb1 -s 512 -vv ip6 or proto ipv6

   16:38:23.258385 IP6 (hlim 64, next-header UDP (17) payload length: 104) fe80::ce4e:24ff:fe1e:bd00.dhcpv6-server > 2002:8000:1:1042::2374.dhcpv6-server: [udp sum ok] dhcp6 relay-fwd (linkaddr=2002:8000:1:166c:ce4e:24ff:fe1e:bd00 peeraddr=fe80::7c95:89f8:2451:32f9 (relay-message (dhcp6 inf-req (xid=b85d91 (elapsed-time 0) (client-ID hwaddr/time type 1 time 461632242 00241d05e4d3) (vendor-class) (option-request DNS-search-list DNS-server vendor-specific-info lifetime))))
   
16:38:24.266575 IP6 (hlim 64, next-header UDP (17) payload length: 104) fe80::ce4e:24ff:fe1e:bd00.dhcpv6-server > 2002:8000:1:1042::2374.dhcpv6-server: [udp sum ok] dhcp6 relay-fwd (linkaddr=2002:8000:1:166c:ce4e:24ff:fe1e:bd00 peeraddr=fe80::7c95:89f8:2451:32f9 (relay-message (dhcp6 inf-req (xid=b85d91 (elapsed-time 200) (client-ID hwaddr/time type 1 time 461632242 00241d05e4d3) (vendor-class) (option-request DNS-search-list DNS-server vendor-specific-info lifetime))))
   

16:38:26.266531 IP6 (hlim 64, next-header UDP (17) payload length: 104) fe80::ce4e:24ff:fe1e:bd00.dhcpv6-server > 2002:8000:1:1042::2374.dhcpv6-server: [udp sum ok] dhcp6 relay-fwd (linkaddr=2002:8000:1:166c:ce4e:24ff:fe1e:bd00 peeraddr=fe80::7c95:89f8:2451:32f9 (relay-message (dhcp6 inf-req (xid=b85d91 (elapsed-time 400) (client-ID hwaddr/time type 1 time 461632242 00241d05e4d3) (vendor-class) (option-request DNS-search-list DNS-server vendor-specific-info lifetime))))
```

Sorry for long output.

I try to add config subnet6 to my dhcpd6.conf


```
subnet6 2002:8000:1:166c::/64 {
  option dhcp6.name-servers 2002:8000:1:1042::2374;
}
```
then it works, but if I have huge subnet that's make me  confuse and struggle.

I just want my server only send server ipv6 address 2002:8000:1:1042::2374 to all subnet ipv6 if see dhcp6 request.

FreeBSD 9.1-RELEASE
ISC-DHCP Server 4.3.1


Sorry for my bad English.


----------

