Skip to content

Add routed port support to dhcp_relay#2276

Open
devesh-nexthop wants to merge 2 commits into
sonic-net:masterfrom
nexthop-ai:dhcp_relay_routed_ports
Open

Add routed port support to dhcp_relay#2276
devesh-nexthop wants to merge 2 commits into
sonic-net:masterfrom
nexthop-ai:dhcp_relay_routed_ports

Conversation

@devesh-nexthop

@devesh-nexthop devesh-nexthop commented Apr 1, 2026

Copy link
Copy Markdown
  • Added DHCP Relay support for routed ports.
  • For DHCP v4 add custom Circuit ID support
  • Updates to CLI and yang models.

Code changes PR:
[sonic-dhcp-relay] sonic-net/sonic-dhcp-relay#102
[sonic-buildimage] sonic-net/sonic-buildimage#26897
[sonic-mgmt] sonic-net/sonic-mgmt#24117

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@devesh-nexthop devesh-nexthop force-pushed the dhcp_relay_routed_ports branch from dce99b6 to 0131de2 Compare April 2, 2026 00:44
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

Signed-off-by: Devesh Pathak <250206677+devesh-nexthop@users.noreply.github.com>
@devesh-nexthop devesh-nexthop force-pushed the dhcp_relay_routed_ports branch from 0131de2 to f0e7e4e Compare April 2, 2026 01:18
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@devesh-nexthop devesh-nexthop marked this pull request as ready for review April 2, 2026 01:18
@ronan-nexthop

Copy link
Copy Markdown

@devesh-nexthop can we get some reviewers tagged here who have been involved in the discussion

Updated scalability requirements and enhanced routed port support in the DHCPv4 relay agent documentation. Adjusted circuit ID and chassis ID handling, and refined CLI output examples.
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
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.

@rajesh-kumar-raju rajesh-kumar-raju left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My Understanding is

  • PORT | EthernetX contains dhcp_servers/dhcpv6_servers .
  • INTERFACE|EthernetX| makes EthernetX a routed L3 Interface
  • A Plain L2 PORT Without IP should not be treated as valid DHCP relay Interface.

Can we document whether this invalid case is rejected by config/YANG validation, ignored by dhcp_relay, or logged as an error?

}

leaf circuit_id {
description "Custom Circuit ID value (used when circuit_id_format is 'custom')";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the YANG validation to use this field only when circuit_id_format is 'custom'

description "VLAN ID";
description "Interface name - VLAN or routed port";
type union {
// Comment VLAN leaf reference here until libyang back-links issue is resolved and use VLAN string pattern

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If libyang issue is no longer present, use the VLAN table reference. If this issue still present, don't remove the comment.

// VLAN interface
type string {
pattern 'Vlan([0-9]{1,3}|[1-3][0-9]{3}|[4][0][0-8][0-9]|[4][0][9][0-4])';
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either add other L3 interfaces (e.g portchannel, sub-intf) or change the scope to support for physical port.

list INTERFACE_LIST {
key name;
leaf name {
type string;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- [5.1.3 Interop with Port-Based DHCP Server](#513-interop-with-port-based-dhcp-server)
- [5.1.4 DHCP Monitor](#514-dhcp-monitor)
- [5.1.5 Dual-Tor Support](#515-dual-tor-support)
- [5.1.6 Routed Port Support](#516-physical-port-support)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like we discussed in the meeting, please clarify whether the same support is available for port-channel interfaces and routed VLAN subinterfaces as well. If it is not supported, it would be better to explicitly document this limitation and explain why the same support cannot be provided.

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.

6 participants