Skip to content

yang: support VLAN subinterfaces for BGP unnumbered#28095

Open
sudharr86 wants to merge 2 commits into
sonic-net:masterfrom
sudharr86:link-local-vlan-subintf-yang
Open

yang: support VLAN subinterfaces for BGP unnumbered#28095
sudharr86 wants to merge 2 commits into
sonic-net:masterfrom
sudharr86:link-local-vlan-subintf-yang

Conversation

@sudharr86

@sudharr86 sudharr86 commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Add YANG model support needed for BGP unnumbered over VLAN subinterfaces.

Why

VLAN subinterfaces need schema support for IPv6 link-local-only mode and for use as BGP neighbors. This lets configuration validation accept the link-local mode used by the CLI and neighbor-sync changes, and allows BGP neighbor entries to reference VLAN subinterfaces.

Changes

  • Add ipv6_use_link_local_only under VLAN_SUB_INTERFACE_LIST.
  • Add YANG model tests for the valid enable value and an invalid boolean-like value.
  • Allow BGP_NEIGHBOR_LIST neighbors to reference VLAN subinterface names.

Related

Validation

  • git diff --check upstream/master..HEAD
  • python3 -m json.tool src/sonic-yang-models/tests/yang_model_tests/tests/vlan_sub_interface.json
  • python3 -m json.tool src/sonic-yang-models/tests/yang_model_tests/tests_config/vlan_sub_interface.json
  • Reviewed the diff for unintended references.

Allow VLAN_SUB_INTERFACE entries to carry ipv6_use_link_local_only, matching the existing interface tables.

Add YANG model tests for a valid enable value and an invalid boolean-like value.

Signed-off-by: Sudharsan Rajagopalan <203154411+sudharr86@users.noreply.github.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).

Allow a BGP neighbor to reference a VLAN subinterface by adding the VLAN subinterface YANG module import and a leafref to the neighbor union type.

Signed-off-by: Sudharsan Rajagopalan <203154411+sudharr86@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@sudharr86 sudharr86 changed the title yang: support link-local IPv6 on VLAN subinterfaces yang: support VLAN subinterfaces for BGP unnumbered Jun 25, 2026
@azure-pipelines

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

@sudharr86 sudharr86 marked this pull request as ready for review July 2, 2026 13:49
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