Project

General

Profile

Actions

Bug #6768

closed

DNS Resolver entry for DHCPv6 static mapping has wrong IP address

Added by Anonymous over 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Category:
DHCP (IPv6)
Target version:
Start date:
09/05/2016
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.3.2
Affected Architecture:

Description

I have added two DHCPv6 static mappings for two hosts on my network. But when resolving the hostname to IP address, the address returned by unbound is not correct.

Example:
xps-desktop has static mapping of ::3001 (prefix is xxxx:yyyy:zzzz:*7a71*::)

nslookup xps-desktop

Server: gw
Address: [LAN int address]

Name: xps-desktop.home
Addresses: xxxx:yyyy:zzzz:*7a70*::3001
192.168.1.55

The same happens for the other static DHCPv6 entry that I have as well.

As I believe the functionality for static DHCPv6 with a Track Interface prefix was added in 2.3, this likely affects all 2.3.x versions, but I only have 2.3.2 running, so I've selected that as the affected version.

Actions #1

Updated by Anonymous over 7 years ago

No, the asterisks aren't part of the address. Apparently bold text isn't supported here, despite the button above the edit field.

Actions #2

Updated by Anonymous over 7 years ago

Likely reason for this is because in entering the DHCPv6 static mapping, you're entering ONLY the host portion of the address. But in creating the DNS entry, it appears as though the prefix appended to the host portion is the base (0) prefix, not the proper prefix for the interface that the static entry is being configured on.

Actions #3

Updated by Phillip Davis over 7 years ago

I tried this in a VM. I delegated a /56 (out of the /48 I have from he.net) from my real router to the WAN of the VM (sitting in my real LAN). Then set the LAN of the VM to Track Interface with "IPv6 Prefix ID" set to "a1" (just to give a recognizable offset).

LAN ends up with an IPv6 subnet like 2001:1111:2222:ffa1::/64 ("1111" and "2222" are not the real public IP values:) - so the "a1" bit is correctly being calculated there.

I added a static mapped IP ::4242

In /var/dhcpd/etc/dhcpdv6.conf I get good-looking stuff:

subnet6 2001:1111:2222:ffa1::/64 {
range6 2001:1111:2222:ffa1::1000 2001:1111:2222:ffa1::2000;
do-forward-updates false;
option dhcp6.name-servers 2001:1111:2222:ffa1:a00:27ff:fe03:8b36;

}
host s_lan_0 {
host-identifier option dhcp6.client-id ADUID;
fixed-address6 2001:1111:2222:ffa1::4242;
option host-name teststaticipv6;
}

Can you post more detail on how this happens - WAN and LAN settings, and content from /var/dhcpd/etc/dhcpdv6.conf ?

Actions #4

Updated by Anonymous over 7 years ago

The issue isn't with DHCP... it's with DNS (unbound, in my case) resolution of a DHCPv6 static mapping.

Looking in /var/unbound/host_entries.conf, it looks like the entries are not being added with the right address.

/var/dhcpd/etc/dhcpdv6.conf:
host s_lan_1 {
host-identifier option dhcp6.client-id 00:01:00:01:xx:xx:xx:yy:yy:yy:zz:zz:zz:d7;
fixed-address6 2601:xxx:yyyy:7a71::3001;
option host-name xps-desktop;
}

/var/unbound/host_entries.conf:
...
local-data-ptr: "2601:xxx:yyyy:7a70::3001 xps-desktop.home"
local-data: "xps-desktop.home AAAA 2601:xxx:yyyy:7a70::3001"
local-data: "xps-desktop AAAA 2601:xxx:yyyy:7a70::3001"

Actions #6

Updated by Renato Botelho over 7 years ago

  • Assignee set to Renato Botelho
  • Target version set to 2.4.0
Actions #7

Updated by Phillip Davis over 7 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #8

Updated by Jim Pingle about 7 years ago

  • Target version changed from 2.4.0 to 2.3.3
Actions #9

Updated by Renato Botelho about 7 years ago

  • Status changed from Feedback to Resolved

works

Actions #10

Updated by Renato Botelho about 7 years ago

  • Status changed from Resolved to Feedback

ops, untested yet

Actions #11

Updated by Jim Pingle about 7 years ago

  • Status changed from Feedback to Resolved

Tested 2.3.3 and 2.4, correct subnet is used.

Actions

Also available in: Atom PDF