[dhcp_relay]: sonic dhcp relay agent for IPv4#4004
Merged
Blueve merged 7 commits intosonic-net:masterfrom Nov 5, 2025
Merged
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Changes for SONiC DHCPv4 Relay feature
fec2687 to
7bc70b1
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ac508b7 to
d2504bf
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
e802b0c to
da368e3
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Blueve
reviewed
Oct 28, 2025
Blueve
reviewed
Oct 28, 2025
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
3981e9b to
2cd5c7c
Compare
Collaborator
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
|
Commenter does not have sufficient privileges for PR 4004 in repo sonic-net/sonic-utilities |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Blueve
previously approved these changes
Oct 29, 2025
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d85f6cb to
1064f43
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Blueve
approved these changes
Nov 3, 2025
gordon-nexthop
pushed a commit
to nexthop-ai/sonic-utilities
that referenced
this pull request
Nov 25, 2025
Currently SONiC uses the 'isc-dhcp-relay' package to allow DHCP relay functionality on IPv4 networks. With this PR we are adding sonic dhcp relay agent for IPv4 as described in this HLD(sonic-net/SONiC#1938). What I did Added dependency checks in SONiC config CLI to prevent deletion of interfaces, VRFs, and VLANs that are in use by DHCPv4 relay configurations. Added/updated unit tests. How I did it Implemented a new function check_dhcpv4_relay_dependencies to check if an interface or VRF is referenced in the DHCPV4_RELAY table. Called this function before allowing deletion of portchannels, loopbacks, VRFs, and VLANs. Modified the VLAN deletion logic to block removal if the VLAN is present in the DHCPV4_RELAY table. Extended the test suite to verify that deletion is blocked when dependencies exist and allowed after cleanup. How to verify it Run the updated unit tests: they now include cases where deletion of interfaces, VRFs, or VLANs in use by DHCPv4 relay is attempted and should fail. Manually test by configuring DHCPv4 relay on an interface/VRF/VLAN, then attempt to delete it using the CLI; the command should fail with an appropriate error message. After removing the DHCPv4 relay configuration, deletion should succeed.
YairRaviv
pushed a commit
to YairRaviv/sonic-utilities
that referenced
this pull request
Jan 12, 2026
Currently SONiC uses the 'isc-dhcp-relay' package to allow DHCP relay functionality on IPv4 networks. With this PR we are adding sonic dhcp relay agent for IPv4 as described in this HLD(sonic-net/SONiC#1938). What I did Added dependency checks in SONiC config CLI to prevent deletion of interfaces, VRFs, and VLANs that are in use by DHCPv4 relay configurations. Added/updated unit tests. How I did it Implemented a new function check_dhcpv4_relay_dependencies to check if an interface or VRF is referenced in the DHCPV4_RELAY table. Called this function before allowing deletion of portchannels, loopbacks, VRFs, and VLANs. Modified the VLAN deletion logic to block removal if the VLAN is present in the DHCPV4_RELAY table. Extended the test suite to verify that deletion is blocked when dependencies exist and allowed after cleanup. How to verify it Run the updated unit tests: they now include cases where deletion of interfaces, VRFs, or VLANs in use by DHCPv4 relay is attempted and should fail. Manually test by configuring DHCPv4 relay on an interface/VRF/VLAN, then attempt to delete it using the CLI; the command should fail with an appropriate error message. After removing the DHCPv4 relay configuration, deletion should succeed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes for SONiC DHCPv4 Relay feature
Currently SONiC uses the 'isc-dhcp-relay' package to allow DHCP relay functionality on IPv4 networks.
With this PR we are adding sonic dhcp relay agent for IPv4 as described in this HLD(sonic-net/SONiC#1938).
What I did
How I did it
How to verify it
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)