Repository navigation
Add NX-OS DHCP relay server-id-override-disable field to NX SystemSpec - #634
Merged
adamtrizuljak-sap merged 1 commit intoOct 13, 2026
Merged
Conversation
Add a RelayServerIDOverrideDisable field to the NX System spec that configures the global command "ip dhcp relay information option server-id-override-disable" on NX-OS. When DHCP relay with Option 82 is active, the relay agent overrides the Server-ID (Option 54) in relayed Requests with its own interface IP by default. The DHCP server then silently drops the Request because the Server-ID no longer matches its Offer, breaking the DORA handshake after the Offer step. The setting is device-global in NX-OS (a scalar leaf under System/dhcp-items/inst-items), so it lives on the System CRD rather than the per-interface DHCPRelay CRD. EnsureSystemSettings maps the bool to the 0..1 leaf and enables the dhcp feature when the toggle is on; ResetSystemSettings replaces the leaf with its platform default. Idempotency comes from the gnmiext get-and-check layer. Signed-off-by: Adam Trizuljak <adam.trizuljak@sap.com>
adamtrizuljak-sap
force-pushed
the
feat/dhcprelay-server-id-override-disable
branch
from
October 12, 2026 15:11
3e460e9 to
4feb166
Compare
Merging this branch changes the coverage (1 decrease, 3 increase)
Coverage detailsCompared to commit abbf600 (run #38244080223)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files:
|
felix-kaestner
approved these changes
Oct 12, 2026
adamtrizuljak-sap
deleted the
feat/dhcprelay-server-id-override-disable
branch
October 13, 2026 07:36
lparz1val
pushed a commit
to lparz1val/network-operator
that referenced
this pull request
Oct 15, 2026
ironcore-dev#634) Add a RelayServerIDOverrideDisable field to the NX System spec that configures the global command "ip dhcp relay information option server-id-override-disable" on NX-OS. When DHCP relay with Option 82 is active, the relay agent overrides the Server-ID (Option 54) in relayed Requests with its own interface IP by default. The DHCP server then silently drops the Request because the Server-ID no longer matches its Offer, breaking the DORA handshake after the Offer step. The setting is device-global in NX-OS (a scalar leaf under System/dhcp-items/inst-items), so it lives on the System CRD rather than the per-interface DHCPRelay CRD. EnsureSystemSettings maps the bool to the 0..1 leaf and enables the dhcp feature when the toggle is on; ResetSystemSettings replaces the leaf with its platform default. Idempotency comes from the gnmiext get-and-check layer. Signed-off-by: Adam Trizuljak <adam.trizuljak@sap.com>
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.
Why
Add a
RelayServerIDOverrideDisablefield to the NX System spec that configures the global commandip dhcp relay information option server-id-override-disableon NX-OS.When DHCP relay with Option 82 is active, the relay agent overrides the Server-ID (Option 54) in relayed Requests with its own interface IP by default. The DHCP server then silently drops the Request because the Server-ID no longer matches its Offer, breaking the DORA handshake after the Offer step.
The setting is device-global in NX-OS (a scalar leaf under
System/dhcp-items/inst-items), so it lives on theSystemCRD rather than the per-interfaceDHCPRelayCRD.EnsureSystemSettingsmaps the bool to the 0..1 leaf and enables thedhcpfeature when the toggle is on;ResetSystemSettingsreplaces the leaf with its platform default. Idempotency comes from the gnmiext get-and-check layer.Design notes
Systemand notDHCPRelay: the command maps to a device-global DME leaf (System/dhcp-items/inst-items/…), while DHCPRelayis a per-interface CRD (a device can have several). Routing a global setting through a per-interface provider config would let relays fight over one value with no clean delete/refcount, so it belongs on the device-globalSystem` CRD. No system-wide DHCP config surface existed before this change.feature dhcp.EnsureSystemSettingsnow enables it automatically when the toggle is on. On reset the feature is left in place, since DHCP relay may still be using it.Defaultable(platform default0), so thegnmiextget-and-check layer skips the gNMI Set on steady state, and reset becomes a replace-with-default rather than a path delete (which can't disturb the sibling per-interface relay config).Changes
RelayServerIDOverrideDisable boolonSystemSpec(api/cisco/nx/v1alpha1/system_types.go).DHCPRelayServerIDOverrideDisablegNMI data element;EnsureSystemSettings/ ResetSystemSettingsrealize and reset it; introduced aFeatureDHCPconstant (replacing a raw"dhcp"` literal).Systemsample, and wired the sample into the Tiltfile.Testing
make fmt lint testall pass (envtest).Test_Payload/dhcprelayserveridoverrideverifies the leaf payload.Tested against a simulated Cisco N9K-C9300v in Clabernetes using the provided
Systemsample.spec.relayServerIdOverrideDisable: truespec.relayServerIdOverrideDisable: false