Skip to content

SUBNET_TARGET_MASK missing from eBGP VXLAN fabric payload when manual_underlay_allocation is enabled #861

Description

@ccoueffe

Problem

When creating/updating an eBGP VXLAN fabric with manual_underlay_allocation: true, the SUBNET_TARGET_MASK parameter is not included in the NDFC fabric payload. NDFC then uses its default value instead of the user-configured vxlan.underlay.ipv4.subnet_mask.

Root Cause

In roles/dtc/common/templates/ndfc_fabric/ebgp_vxlan_fabric/general/ebgp_vxlan_fabric_general.j2, SUBNET_TARGET_MASK was nested inside the manual_underlay_allocation == false guard:

{% if not manual_underlay_allocation %}
{% if not enable_ipv6_underlay %}
  SUBNET_TARGET_MASK: "{{ subnet_mask }}"
  SUBNET_RANGE: {{ subnet_range }}
{% endif %}
{% endif %}

This incorrectly omits SUBNET_TARGET_MASK when manual allocation is enabled. However, NDFC requires this parameter regardless of allocation mode — it defines the point-to-point link prefix length used for all underlay links.

The only valid reason to omit SUBNET_TARGET_MASK is when enable_ipv6_underlay is true (IPv6 uses different parameters).

Impact

  • eBGP VXLAN fabrics with manual_underlay_allocation: true get NDFC's default subnet mask instead of the configured value
  • May cause underlay link IP addressing mismatches between data model and NDFC intent

Fix

Move SUBNET_TARGET_MASK outside the manual_underlay_allocation guard, keeping only the enable_ipv6_underlay condition. SUBNET_RANGE remains correctly gated by manual allocation (since ranges are irrelevant when IPs are manually assigned).

Affected Versions

Any ND version with eBGP VXLAN fabric using manual_underlay_allocation: true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions