Skip to content
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

DHCP does not accept unicast and does not request broadcast #47

Open
MinDBreaK opened this issue Jul 17, 2023 · 0 comments
Open

DHCP does not accept unicast and does not request broadcast #47

MinDBreaK opened this issue Jul 17, 2023 · 0 comments

Comments

@MinDBreaK
Copy link

I have implemented a DHCP server for internal use in the company. While it is working for most devices, I had trouble making it work with VPC. The base of the server is a CoreDHCP server with a range plugin modified.

According to the RFC :

If the 'giaddr' field in a DHCP message from a client is non-zero,
the server sends any return messages to the 'DHCP server' port on the
BOOTP relay agent whose address appears in 'giaddr'. If the 'giaddr'
field is zero and the 'ciaddr' field is nonzero, then the server
unicasts DHCPOFFER and DHCPACK messages to the address in 'ciaddr'.
If 'giaddr' is zero and 'ciaddr' is zero, and the broadcast bit is
set, then the server broadcasts DHCPOFFER and DHCPACK messages to
0xffffffff. If the broadcast bit is not set and 'giaddr' is zero and
'ciaddr' is zero, then the server unicasts DHCPOFFER and DHCPACK
messages to the client's hardware address and 'yiaddr' address. In
all cases, when 'giaddr' is zero, the server broadcasts any DHCPNAK
messages to 0xffffffff.

However, the VPC set a Client IP Address (ciaddr) but does not accept unicast packets. Manually setting the response to broadcast assigns the IP correctly.

A solution could be not to send the Client IP Address so the DHCP server rely on the RFC and broadcast the response. While it might be the easiest, it will probably break other components.

Another solution could be to assign the IP address during the offer and accept the ACK packet dispatched via Unicast. If the process fails, then we remove the IP address from the interface.

Let me know if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant