Summary: | net-misc/dhcpcd - More than 1 dhcp server on network prevents getting an IP address | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matthew Stapleton <matthew4196> |
Component: | [OLD] Core system | Assignee: | William Hubbs <williamh> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | base-system, jer, roy |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Matthew Stapleton
2014-12-15 09:34:46 UTC
Sounds like dhcpcd is doing exactly what it should be doing according to RFC 2131[1] and RFC 3203[2]. You should probably fix your network (either of the DHCP servers or both) instead of trying to fix dhcpcd. Your whole problems seems to revolve around "[m]ore than 1 dhcp server on network". We have tools in net-analyzer/ to help you deal with that kind of situation. [1] "If the client receives a DHCPNAK message, the client restarts the configuration process." https://www.ietf.org/rfc/rfc2131.txt [2] "If the server wants to assign a new IP address to the client, it will reply to the DHCP REQUEST with a DHCP NAK. The client will then go back to the init state and broadcast a DHCP DISCOVER message." https://www.ietf.org/rfc/rfc3203 Okay thanks, The computer that was having the issue is a new Linux server intended to fix multiple issues on a remote pre-existing network and was initially configured in dhcp client mode to prevent conflicts with existing ip addresses, but due to the multiple dhcp servers (identified with tools like "nmap -sU -p 67 --script=dhcp-discover <target>), I've now configured it with a static ip address. Interestingly Windows doesn't seem to be affected by the multiple dhcp servers so I may look into that on a test network as well as test with ISC's dhclient sometime as this same NAK issue can also happen when a rogue authoritive server is placed on a network (public hotspot for example), You could regard this as a bug with the DHCP specification. Most IPv4 implementations only have a single IPv4 address. All IPv6 implementations have to have >1 IPv6 address. As the storage of addresses on an interface tries to be protocol agnostic, when IPv6 was implemented, IPv4 grew the possibility to have >1 address. However, DHCP was not really updated in this regard and the way NAK is described is really only descriptive of the single address limitation. DHCPv6 has no NAK as such - instead each address requested is either allocated or denied, thus in your situation you would have 2 IPv6 addresses via DHCPv6 instead of the NAK loop as you see. dhcpcd is strictly RFC conformant, so the behaviour you describe is actually correct, as noted as well by Jeroen Roovers. But how do we move this forwards? We cannot just pick one and ignore the other, the spec won't allow it. Luckily, you can blacklist servers in dhcpcd.conf so that you don't see NAK addresses. Per Roy's comment above, I am closing this as invalid since you can blacklist servers. If you feel there is more i can do, please feel free to comment or reopen. |