OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: sammyrose on January 30, 2024, 08:15:42 PM

Title: [solved] DHCPv6 static mappings not being utilised
Post by: sammyrose on January 30, 2024, 08:15:42 PM
I've been upgrading my stack to IPv6 along side the existing IPv4. It's coming along, although I've run into an issue with DHCPv6 where static mappings appear to be ignored.

I currently receive a /48 from my provider, received via DHCP on WAN interface.

Each LAN VLAN then tracks the WAN interface, using assisted mode RAs for SLAAC and DHCP.

Each VLAN also has a virtual IP with a ULA, although this is not currently used or leased.

For the hosts I'm needing DNS entries, I've created static mappings with the duid, leaving the address blank for auto assignment. Each machine keeps getting other leases so that the duid duplicates.

I've rebooted opnsense and clients, and just can't figure out why the DHCPv6 server isn't matching the static mappings.

The dhcpd logs on opnsense look unremarkable. For debugging purposes,I I've dropped the time to live right down.

<190>1 2024-01-31T05:28:40+11:00 OPNsense.lan dhcpd 99864 - [meta sequenceId="32"] Solicit message from fe80::e4f7:aaaa:bbbb:e759 port 546, transaction ID 0x61C71A00
<190>1 2024-01-31T05:28:40+11:00 OPNsense.lan dhcpd 99864 - [meta sequenceId="33"] Advertise NA: address 2xxx:xxxx:1c04:1:xxxx:119a:6001:aaa2 to client with duid 00:01:00:01:2d:4b:xx:xx:xx:xx:59:3f:02:aa iaid = 1497301674 valid for 300 seconds
<190>1 2024-01-31T05:28:40+11:00 OPNsense.lan dhcpd 99864 - [meta sequenceId="34"] Sending Advertise to fe80::e4f7:aaaa:bbbb:e759 port 546
<190>1 2024-01-31T05:29:13+11:00 OPNsense.lan dhcpd 99864 - [meta sequenceId="35"] Solicit message from fe80::e4f7:aaaa:bbbb:e759 port 546, transaction ID 0x2A063D00
<190>1 2024-01-31T05:29:13+11:00 OPNsense.lan dhcpd 99864 - [meta sequenceId="36"] Advertise NA: address 2xxx:xxxx:1c04:1:xxxx:119a:6001:aaa2 to client with duid 00:01:00:01:2d:4b:xx:xx:xx:xx:59:3f:02:aa iaid = 1497301674 valid for 300 seconds


Any suggestions on what I can check?
Title: Re: DHCPv6 static mappings not being utilised
Post by: Maurice on January 30, 2024, 11:21:14 PM
What do you mean by "leaving the address blank for auto assignment"? Without static addresses, the hostnames won't be registered in Unbound.

Cheers
Maurice
Title: Re: DHCPv6 static mappings not being utilised
Post by: sammyrose on January 31, 2024, 03:50:15 PM
I ended up populating the IP address field and found that this was provided to the client.

Per the field information:

QuoteIf an IPv6 address is entered, the address must be outside of the pool.
If no IPv6 address is given, one will be dynamically allocated from the pool.
When using a static WAN address, this should be entered using the full IPv6 address. When using a dynamic WAN address, only enter the suffix part (i.e. ::1:2:3:4).

I had taken this to mean that the hostname would be set for all IP assignments matching the DUID.
Title: Re: DHCPv6 static mappings not being utilised
Post by: Maurice on January 31, 2024, 04:05:04 PM
See hostname field information:

QuoteName of the host, without domain part. If no IP address is given above, hostname will not be visible to DNS services with lease registration enabled.