-
Notifications
You must be signed in to change notification settings - Fork 174
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
Missed DHCP Offer packet #532
Comments
Have you reported your issue to that project? |
I am fairly certain this is a socket/protocol/binding/filtering issue which is why i reported it here first. i have filed downstream to kube-vip/kube-vip#844 as well. |
Is this still an issue? |
Yeah, nothing has fixed this particular issue. I just have avoided the DHCP functionality because of this issue. |
If the client is doing a broadcast, why is the server replying to a particular IP? |
I'm a little bit confused about the notation there too, but it looks like 192.168.96.150 is the DHCP lease (and node02 is the DHCP server). |
This is normal behavior without the DHCPv4 Broadcast flag set by the client (which the client in kube-vip doesn't set). The server will unicast OFFER/ACK/NAK even if the request was broadcast (RFC2131$4.1):
A full .pcap with the entire packet contents would be helpful to get an idea what parts of the packet get filtered before it gets to the socket nclient4 uses (a single AF_PACKET/SOCK_DGRAM socket, where isc-dhcp-client has both an AF_INET/SOCK_DGRAM and AF_PACKET/SOCK_RAW socket) |
I am trying to track down an issue I experienced with https://github.com/kube-vip/kube-vip where DHCP failed to respond in a timely manner (Specifically: Invoking with --controlplane --ddns and an --address that refers to an fqdn will request a VIP from DHCP using that as a client ID). kube-vip runs in a container with host networking (I have verified that isc-dhclient works fine within that container). The relevant DHCP client usage is in https://github.com/kube-vip/kube-vip/blob/v0.8.0/pkg/vip/dhcp.go. The downstream ticket is kube-vip/kube-vip#844, but I am fairly certain this is a protocol issue.
The not-very-helpful error in kube-vip:
In this setup, I have been using eth0 as my interface (it had another static IP address, 192.168.96.3, on it too. MAC is 02:42:c0:a8:60:03). My FQDN is kube-api.cluster.internal, so kube-api gets sent as the DHCP client. node02.cluster.internal (192.168.96.4, 02:42:c0:a8:60:04) has a simple isc-dhcp-server on debian bookworm running with this conf:
I have been running both tcpdump and wireshark to see what the packet flows are, and using strace to see what is actually consumed by this library.
Firstly, I have the strace -e network for the client communications:
I was a bit concerned with the recvfrom, but eventually found out that is just some MDNS discovery thing that runs every now and then from 192.168.96.1 (the actual gateway). When i added timestamps, that is actually 4 seconds later.
Here is a tcpdump -i eth0:
Here is an strace from isc-dhclient which didn't get the info on the UDP socket (6), but on the raw socket (5). Note the different clientid (so slightly different IP returned, 192.168.96.155).
Between my many runs i made sure to clear the IPs on the machine and stop the other dhclient processes.
The text was updated successfully, but these errors were encountered: