Skip to content

fix ipv4 subnet mask with manual allocation ebgp - #860

Open
ccoueffe wants to merge 1 commit into
netascode:developfrom
ccoueffe:fix/ipv4_subnet_mask_ebgp
Open

fix ipv4 subnet mask with manual allocation ebgp#860
ccoueffe wants to merge 1 commit into
netascode:developfrom
ccoueffe:fix/ipv4_subnet_mask_ebgp

Conversation

@ccoueffe

@ccoueffe ccoueffe commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Related Issue(s)

Fixes missing SUBNET_TARGET_MASK in eBGP VXLAN fabric payload when manual_underlay_allocation is enabled.

Related Collection Role

  • cisco.nac_dc_vxlan.dtc.create
  • other — roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/general/

Related Data Model Element

  • vxlan.underlay

Proposed Changes

The SUBNET_TARGET_MASK parameter was nested inside the manual_underlay_allocation == false guard in the eBGP fabric template. This meant that when using manual underlay allocation, the subnet mask was not sent to NDFC — causing fabric creation/update to use NDFC defaults instead of the user-defined value.

SUBNET_TARGET_MASK is required by NDFC regardless of whether IP allocation is manual or automatic — it defines the point-to-point link prefix length for the underlay. The only condition where it should be omitted is when IPv6 underlay is enabled (since IPv6 uses a different parameter).

Fix: Moved SUBNET_TARGET_MASK outside the manual_underlay_allocation guard, keeping only the enable_ipv6_underlay condition:

Condition Before (broken) After (fixed)
manual=false, ipv6=false ✅ Rendered ✅ Rendered
manual=true, ipv6=false ❌ Missing ✅ Rendered
manual=false, ipv6=true ❌ Omitted ❌ Omitted
manual=true, ipv6=true ❌ Omitted ❌ Omitted

Test Notes

Tested with eBGP VXLAN fabric using manual_underlay_allocation: true and subnet_mask: 30. Verified:

  • SUBNET_TARGET_MASK: "30" now appears in the fabric payload ✅
  • SUBNET_RANGE remains correctly omitted for manual allocation ✅
  • IPv6 underlay correctly omits SUBNET_TARGET_MASK

Cisco Nexus Dashboard Version

ND 4.1+

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Assigned the proper reviewers

@ccoueffe ccoueffe self-assigned this Jul 31, 2026
@ccoueffe
ccoueffe marked this pull request as ready for review July 31, 2026 17:11
@ccoueffe
ccoueffe requested a review from a team as a code owner July 31, 2026 17:11
@ccoueffe
ccoueffe requested a review from juburnet July 31, 2026 17:11
@ccoueffe ccoueffe added 0.9.0 Release 0.9.0 ready for review PR Ready for Review bug Something isn't working labels Jul 31, 2026

@juburnet juburnet left a comment

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.

Approved.

@juburnet
juburnet requested a review from marehler August 10, 2026 16:09

@marehler marehler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me.

@juburnet
juburnet requested a review from mikewiebe August 11, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.9.0 Release 0.9.0 bug Something isn't working ready for review PR Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SUBNET_TARGET_MASK missing from eBGP VXLAN fabric payload when manual_underlay_allocation is enabled

4 participants