Skip to content

Arista EOS: locally-originated BGP paths have weight 0 and local-pref 100, not 32768 and 0 #152

@dhalperi

Description

@dhalperi

Problem

Batfish models locally-originated BGP paths on Arista EOS with weight
32768, but the device actually uses weight 0. This produces a
test_bgp_rib_routes "weight difference" failure on every Arista lab
that has a network statement, aggregate-address, or equivalent
local origin.

Evidence

Reproducer snapshot: snapshots/eos_ceos_bgp_weight_experiment. Each
test router has two prefixes where a received path competes with a
locally-originated path:

  • 10.100.0.0/24 — stock network 10.100.0.0/24, received path has
    weight 10000 via neighbor <peer> weight 10000.
  • 10.200.0.0/24network 10.200.0.0/24 route-map SET_WEIGHT_50000
    (route-map sets weight 50000), same received-side weight.

EOS 4.36 output on both multi-agent and ribd agents:

  • 10.100.0.0/24: received (weight 10000) wins. Device explicitly
    prints Not best: Path weight on the local path, which shows
    weight 0.
  • 10.200.0.0/24: local (weight 50000) wins via the same Path weight step.

The effective default weight for a locally-originated BGP path on
Arista EOS is therefore 0, not 32768. Route-map set weight on a
network statement does apply.

The EOS manual §16.5.6.108 ("default weight for paths that the router
originates is 32768") describes the no neighbor weight reset
semantics, not the actual effective default of a locally-originated
path.

Scope

Affects Arista EOS only. Cisco IOS/IOS-XE and most other vendors do
use 32768 as the default local weight; Batfish's DEFAULT_LOCAL_WEIGHT
is correct for those vendors.

Impact — sickbay entries this replaces

The following sickbay.yaml entries currently reference issues #6
and/or #7 for this root cause and should be re-pointed here:

Next Steps

  1. Fix Batfish: for Arista EOS vendor config, locally-originated BGP
    paths (from network, aggregate-address, and redistribute) should
    start with weight 0 rather than DEFAULT_LOCAL_WEIGHT (32768).
  2. Once Batfish emits weight 0 for these paths, the validator weight
    comparison will match and the sickbay entries can be removed.

Closes #6, closes #7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions