Skip to content

Make the BGP multipath limits of the SONiC default VRF configurable #2559

Description

@berendt

Category: feature | Scope: Small

Description

The SONiC configuration generator writes a fixed multipath limit of two into the BGP address families of the default VRF, for eBGP and for iBGP alike. A switch with more than two equal-cost paths to a destination installs only two of them, however it is cabled.

This change makes both limits configurable. max_ebgp_paths and max_ibgp_paths become separate knobs. Each applies to the IPv4 and the IPv6 unicast address family of the default VRF, since a segment uses the same uplink bundle for both. Where neither is set, both fall back to one shared default value, so an untouched deployment keeps generating what it generates today.

Three sources feed the value, in decreasing precedence:

  • A per-device override in the sonic_parameters custom field, for the one switch whose cabling differs from the rest of its segment.
  • A segment-wide default in the config context, following the _segment_ naming the syslog and SNMP settings already use, so a whole fabric is set in one place.
  • A general parameter on the conductor, which supplies the fallback when NetBox carries neither of the other two.

The scope is the default VRF. The address families generated per VRF for EVPN keep their current fixed values.

Motivation

Fabrics get built with more than two uplinks per leaf. With the limit pinned at two, the surplus links carry no traffic under ECMP: the bandwidth is paid for and idle, and the only way to change that today is to patch the generator and redeploy it.

The three levels match how the number is actually decided. A fabric has one uplink count, so the segment default covers nearly every switch in it. The conductor-wide parameter sets a house value for a whole deployment without touching NetBox. The per-device override covers the exception that every fabric acquires as it grows.


Drafted by planwerk-agent with Claude:claude-opus-5[1m]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions