-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static leases assigns the same IPv6 to multiple NICs #175
Comments
I noticed the same behavior just now after recently getting IPv6 from my ISP and trying to assign different IPv6 addresses to 2 different interfaces on the same Windows server. Looking through the code, I came across the below which looks for a static lease in the config trying to match first on DUID, and falling back to MAC address. Lines 1279 to 1281 in 860ca90
Now as far as I understand, IPv6 does not actually look at the Layer 2 MAC address of the incoming packet and odhcpd is actually parsing it out of the DUID, which is defined to have the MAC address if it's a Type 1 or Type 3 DUID (See here for details on the different DUID types). Lines 1252 to 1259 in 860ca90
Given the DUID, or even embedded MAC address, are the same between both interfaces, odhcpd picks up the same static lease from the config to give to both interfaces, resulting in a conflict. I think it would make sense to add an IAID option for static leases and have odhcpd match on that as well when looking for a static lease in the config. |
This bug has now bitten me too. It would be great if we can add a feature to match DHCPv6 static leases on IAID, or DUID+IAID. Otherwise I have to set static IPv6s on all my servers and machines with more than one interface, which is quite the barrier to being fully dual-stack. |
My computer has multiple NICs (Ethernet, Wi-Fi), these NICs share the same DUID, they will get the same IPv6 address, resulting in a conflict. IAID can distinguish different NICs, but IAID seem to be randomly assigned by the OS.
I tried not to specify a DUID, but it doesn't seem to work.
Edit: I am trying to update to the latest version of odhcpd and will supplement it again after confirmation
Jun 14, 2021 (564d25e) still happens
(same DUID and different IAID)
My /etc/config/dhcp file
The text was updated successfully, but these errors were encountered: