-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 changed request scope #1269
Comments
I've seen this happen before but I haven't been able to reproduce it, does this reliably happen to you? Could you set the log level to debug? Could you also run |
Sent some logs with LOG_LEVEL=debug to your e-mail. Right now it's operating (fresh install) in single-node mode. DHCP Scope TTL is deliberately set ridiculously low so that I didn't have to wait all day for this to happen. |
I realise you probably meant the DEBUG=true should be set, so I recreated the situation and sent new logs. |
Saw that v0.14.0 was out so upgraded to it. Sent pcap.dump from the process of
Thanks for investigating the issue. |
Been experimenting a bit and I see a pattern. If the client has no IP-adress yet, the DHCP request is done with a broadcast that is forwarded by a DHCP forwarder in that subnet to Gravity.
But if the client already has an adress and is just trying to renew the lease, the request is sent directly to Gravity and not via broadcast/DHCP forwarder. This is where it gives address from the wrong scope, as if unable to determine which subnet the client is on.
Judging from the logs, the |
Nice, thanks and no worries, can confirm that 0.17.1 gives out correct address to clients in differens subnets. |
Summary: A client in a vlan/subnet first requests and gets a dhcp lease from the correct scope, but eventually Gravity says the client "changed request scope" and assigns a dhcp lease from another scope.
Client MAC address: 00:50:56:81:be:50
Correct scope: "container-dev", CIDR 192.168.212.0/23
Incorrect scope: "container", CIDR 192.168.210.0/23
Before the first request, the client has a reservation in "container-dev". The entire chain of events below.
Ubuntu 22 dhcp client releases lease and requests a new one,
dhclient -r && dhclient -v
, Gravity assigns a lease in the correct scope (yourIPAddr=192.168.212.89)After a few minutes, I've done absolutely nothing on the client or in Gravity, this is logged (looks like a request renewal). Still gets the same lease in the correct scope
After a couple of minutes again, now the interesting stuff happens. Still doing nothing on the client or in Gravity. Client appears to renew the request, this time Gravity changes the scope to the incorrect one and leases out (yourIPAddr=192.168.210.86).
Refreshing Scope views in Gravity, the reservation for 00:50:56:81:be:50 has now moved from the correct scope "container-dev" to the incorrect one "container". Interesting to see all this is happening automatically, I'm just watching the show.
The text was updated successfully, but these errors were encountered: