Skip to content

[dhcp-relay] Change default DHCPv4 relay from isc to sonic-dhcpv4-relay#28115

Open
ashutosh-agrawal wants to merge 1 commit into
sonic-net:masterfrom
ashutosh-agrawal:dhcp/default-sonic-dhcpv4-relay
Open

[dhcp-relay] Change default DHCPv4 relay from isc to sonic-dhcpv4-relay#28115
ashutosh-agrawal wants to merge 1 commit into
sonic-net:masterfrom
ashutosh-agrawal:dhcp/default-sonic-dhcpv4-relay

Conversation

@ashutosh-agrawal

@ashutosh-agrawal ashutosh-agrawal commented Jun 27, 2026

Copy link
Copy Markdown
Member

Why I did it

Change the default DHCPv4 relay implementation from isc-dhcpv4-relay to sonic-dhcpv4-relay. Devices that do not explicitly set has_sonic_dhcpv4_relay in DEVICE_METADATA (e.g. old configs that pre-date the feature) should now default to sonic-dhcpv4-relay.

Work item tracking
  • Microsoft ADO:

How I did it

Two places enforce the default when has_sonic_dhcpv4_relay is absent:

  1. YANG model (src/sonic-yang-models/yang-models/sonic-device_metadata.yang) — default "false"default "true", governs the value emitted by sonic-cfggen.
  2. Runtime fallback (src/sonic-dhcp-utilities/dhcp_utilities/dhcprelayd/dhcprelayd.py) — .get("has_sonic_dhcpv4_relay", "False").get("has_sonic_dhcpv4_relay", "True"), governs behavior when the key is missing from ConfigDB at runtime.

Devices that explicitly set has_sonic_dhcpv4_relay: false are unaffected.

How to verify it

On a device with no has_sonic_dhcpv4_relay key in DEVICE_METADATA, confirm that dhcprelayd starts sonic-dhcpv4-relay instead of dhcrelay (isc).

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608

Tested branch (Please provide the tested image version)

Description for the changelog

Change default DHCPv4 relay from isc-dhcpv4-relay to sonic-dhcpv4-relay.

Link to config_db schema for YANG module changes

https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md

A picture of a cute animal (not mandatory but encouraged)

Change the default DHCPv4 relay implementation from isc-dhcpv4-relay to
sonic-dhcpv4-relay in both the YANG model and the runtime dhcprelayd
fallback, so devices without an explicit has_sonic_dhcpv4_relay setting
use sonic-dhcpv4-relay out of the box.

Signed-off-by: Ashutosh Agrawal <ashu@cisco.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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

Successfully merging this pull request may close these issues.

2 participants