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

default dhcp - If checked, this scope will be used for clients when their network can't be determined. #1077

Open
Simon-CR opened this issue Jun 19, 2024 · 4 comments

Comments

@Simon-CR
Copy link

Hi,

so I have multiple scope configured handing out IPs without issues (all via relay).

I enabled the "If checked, this scope will be used for clients when their network can't be determined." on one of my scope. All of a sudden dhcp client that had IP addresses from their respective scope started getting IPs from the "default" enabled scope instead.. turning it off returned things to normal

@BeryJu
Copy link
Owner

BeryJu commented Jun 20, 2024

hmm, yeah the intended functionality of this is that "as a last resort", if scope can't be detected via network/relay then the scope with this flag enabled should be used, it shouldn't affect correct matches to other scopes

@Simon-CR
Copy link
Author

what are the criteria for a scope to be detected via network/relay? all my configured subnet / scope are using the same relay server that throws the request to gravity.

@BeryJu
Copy link
Owner

BeryJu commented Jun 20, 2024

https://github.com/BeryJu/gravity/blob/main/pkg/roles/dhcp/scopes.go#L107-L128 is the logic to find a scope for a DHCP request

@tompaah
Copy link

tompaah commented Oct 30, 2024

I'm having an issue similar to this. Three VLANS with ip-helper configured (dhcp forwarder by Cisco terms), thus three DHCP scopes (named: container, container-dev, ilo). None of them are marked as "Default".

I made a "Reservation" for one machine in the "ilo" scope. When fetching a DHCP adress, it got an address from the "ilo" scope. So far so good.

But next time, when renewing the address (TTL is set to 3600, it renewed after approx. 1/2 hour so I guess renewal normally happens after 1/2 the time has elapsed) it got an adress from the "container" scope and thus became unresponsive on the network (wrong IP adress for the subnet).

Can I provide anything in form of logs or other stuff?

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

3 participants