Skip to content

[docker-dhcp-relay] Add server_vrf to the DHCPv6 relay YANG and config CLI#28171

Open
AnantKishorSharma wants to merge 2 commits into
sonic-net:masterfrom
AnantKishorSharma:dhcp6relay-vrf-support
Open

[docker-dhcp-relay] Add server_vrf to the DHCPv6 relay YANG and config CLI#28171
AnantKishorSharma wants to merge 2 commits into
sonic-net:masterfrom
AnantKishorSharma:dhcp6relay-vrf-support

Conversation

@AnantKishorSharma

Copy link
Copy Markdown
Contributor

Why I did it

The SONiC-native DHCPv6 relay can now reach DHCPv6 servers through a non-default VRF (sonic-net/sonic-dhcp-relay#89 / sonic-net/sonic-dhcp-relay#117). This adds the server_vrf knob in YANG and the config CLI so operators can configure it.

How I did it

  • YANG (sonic-dhcpv6-relay): add the optional server_vrf leaf to the DHCP_RELAY list — the VRF in which the configured DHCPv6 servers are reachable; the relay binds its upstream socket to it (SO_BINDTODEVICE). Added positive and invalid-value model tests.
  • CLI (config dhcp_relay ipv6 destination add <vlan> <server> --server-vrf <vrf>): write server_vrf to DHCP_RELAY, validated against the VRF table; no container restart (the relay applies the change at runtime).

How to verify it

  • sonic-yang-models model tests pass for the new leaf (valid + invalid-value cases).
  • docker-dhcp-relay CLI plugin tests pass, including the new --server-vrf add and invalid-VRF cases.

Stacked on #28042 — until #28042 merges this PR's diff also shows its commit; it will be rebased to a clean diff afterwards.

Relates to sonic-net/sonic-dhcp-relay#89

@AnantKishorSharma

Copy link
Copy Markdown
Contributor Author

@Xichen96 @yaqiangz @jcaiMR @saiarcot895 @yxieca @kellyyeh - Please review when you have a chance.

@AnantKishorSharma

Copy link
Copy Markdown
Contributor Author

@praveen-li @dgsudharsan @venkatmahalingam @qiluo-msft @lguohan - Please review when you have a chance.

@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).

@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).

…y config at runtime

Start dhcp6relay unconditionally instead of gating it on dhcpv6_servers,
skip the dhcp_relay container restart on the IPv6 config path, and bound
the per-interface readiness wait when has_sonic_dhcpv4_relay is set.
Regenerate the affected goldens and make the cli-plugin tests version-aware.

Signed-off-by: Anant Kishor Sharma <anant.kishor-sharma@hpe.com>
…g CLI

Add the optional server_vrf leaf to sonic-dhcpv6-relay (with model tests) and a --server-vrf option to the v6 relay destination CLI. Relates to sonic-net/sonic-dhcp-relay#89.

Signed-off-by: Anant Kishor Sharma <anant.kishor-sharma@hpe.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