vyos-1x
vyos-1x copied to clipboard
T5032: Add VRRP aware dhcp relay
Change Summary
Add the ability to disable DHCP relay on interfaces not in the VRRP MASTER state.
This feature can be enabled with set service dhcp-relay vrrp-disable.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes)
- [ ] Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
- [ ] Other (please describe):
Related Task(s)
- https://vyos.dev/T5032
Component(s) name
- dhcp-relay
- vrrp
Proposed changes
Add the ability to disable DHCP relay on interfaces not in the VRRP MASTER state.
This feature can be enabled with set service dhcp-relay vrrp-disable.
How to test
- Configure VRRP between two routers
- Configure DHCP relay on one of the VRRP interfaces
- The router in the BACKUP state should have the
isc-dhcp-relayservice stopped. - The router in the MASTER state should have the
isc-dhcp-relayservice running. - Test fail over between the routers and check the
isc-dhcp-relayservice state.
Checklist:
- [X] I have read the CONTRIBUTING document
- [X] I have linked this PR to one or more Phabricator Task(s)
- [X] I have run the components SMOKETESTS if applicable
- [X] My commit headlines contain a valid Task id
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly
This feels very "hacky", is there a reason to do so?
Does it not work/is there an issue? Does the DHCP server see the request two times? From MASTER and BACKUP router?
This feels very "hacky", is there a reason to do so?
I've implemented it using the same method as #887. Currently there's no way to disable a particular DHCP relay listen interface so this can't be accomplished with transition scripts.
Does it not work/is there an issue? Does the DHCP server see the request two times? From MASTER and BACKUP router?
Yes, the DHCP server ends up receiving packets from both routers.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This feels very "hacky", is there a reason to do so?
I've implemented it using the same method as #887. Currently there's no way to disable a particular DHCP relay listen interface so this can't be accomplished with transition scripts.
Does it not work/is there an issue? Does the DHCP server see the request two times? From MASTER and BACKUP router?
Yes, the DHCP server ends up receiving packets from both routers.
With dhcp-relay disable option, is this PR still valid? Now you may disable relays using transition scripts as requested
@devon-mar update please PR as it has conflicts
Conflicts have been resolved. A maintainer will review the pull request shortly.
With dhcp-relay disable option, is this PR still valid? Now you may disable relays using transition scripts as requested
For my use case, it does. I can use the disable option as all dhcp relay interfaces are part of a vrrp group, but this wouldn't work if only some dhcp-relay interfaces were part of a vrrp group.
The transition script method also has the disadvantage of wiping out config history if many transitions occur.
update please PR as it has conflicts
I've resolved conflicts and tested it.
@devon-mar Does the option set service dhcp-relay disable work for this case?
It will be better than using "hacking" solutions.
The implementation looks hacky
I'd recommend using set service dhcp-relay disable
Reopen this PR if required, and disable does not work in your case.
I close it.
@sever-sever
The implementation looks hacky
I do agree that it is "hacky." I implemented it based on how mdns works with VRRP, so that should probably be refactored at some point to use a less hacky solution.
It's also surprising that mdns has VRRP integration, but DHCP doesn't, given that DHCP is more commonly used, especially in enterprise environments.
I'd recommend using set service dhcp-relay disable
set service dhcp-relay disable works for me since all DHCP relay interfaces are also using VRRP. This wouldn't work though if only certain interfaces used VRRP.
This also has the downside of wiping out config history since each VRRP transition will create a new config.