Repository navigation
junos: add lab for BGP path-selection compare-cluster-length-before-originator-id - #238
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #238 +/- ##
=======================================
Coverage 83.59% 83.59%
=======================================
Files 96 96
Lines 4705 4706 +1
=======================================
+ Hits 3933 3934 +1
Misses 772 772
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…riginator-id
vJunos-router 25.4R1.12 lab for the undocumented `path-selection
compare-cluster-length-before-originator-id` statement. It is hidden
from `set protocols bgp path-selection ?` but accepted as a leaf in the
master instance, virtual-router and vrf instances, and logical systems;
`path-selection` does not exist at the group or neighbor level. dut
receives two reflected iBGP paths for 203.0.113.0/24 that tie until the
originator-ID step: A with a one-entry cluster list and originator
10.255.0.9, B with a two-entry cluster list and originator 10.255.0.1.
Without the statement Junos selects B ("Router ID"); with it, A
("Cluster list length"). Committing or deleting the statement on a
live session changes the selection without a session reset. dut runs
both states at once, in the master instance and a KNOB virtual-router.
The reflectors and originators are cEOS.
Batfish does not parse the statement and selects B in both instances;
test_bgp_rib_routes[dut] is sickbayed to batfish/batfish#10370 and to
#239, since JunosValidator drops Batfish's iBGP
routes in non-default VRFs before matching.
lab_builder: add a `bgp_active_path` check that asserts a Junos
prefix's active BGP path by originator ID and the inactive reason on
the other paths.
Junos BGP parser: accept the `(Originator)` flag and the `Cluster
list:` and `Originator ID:` lines that reflected routes add to the
`as-path` field.
For batfish/batfish#10370 and #239.
----
Prompt:
```
• Create a public lab-validation experiment for Junos
`compare-cluster-length-before-originator-id`.
Use vJunos-router and anonymized addresses, ASNs, and hostnames. Validate:
1. Whether this syntax commits:
set protocols bgp path-selection compare-cluster-length-before-originator-id
2. Whether it also commits under a routing instance. Check and document
rejection at plausible unsupported levels such as group and neighbor.
3. Its route-selection behavior. Advertise two otherwise equivalent iBGP
routes for the same prefix:
- one with a shorter cluster list but a larger originator ID
- one with a longer cluster list but a smaller originator ID
Arrange the attributes so the originator-ID and cluster-list comparisons
prefer opposite paths. Record the selected path without the statement,
then enable the statement and record whether the selected path changes.
Capture the Junos version, commit results, relevant configuration, received
BGP attributes, and selected-route output. Explain any lab limitations in
the README and keep all committed artifacts suitable for a public GitHub
repository.
```
Six vJunos-router VMs oversubscribed the lab host's CPU, so only dut
runs Junos and the other nodes are cEOS.
dhalperi
force-pushed
the
junos-bgp-cluster-length-before-originator-id
branch
from
September 30, 2026 06:06
687dfdb to
82e751b
Compare
dhalperi
enabled auto-merge (squash)
September 30, 2026 06:07
dhalperi
added a commit
to batfish/batfish
that referenced
this pull request
Sep 30, 2026
Extract the per-instance BGP path-selection setting and convert it to the cluster-list-length tie-breaker. Make that tie-breaker compare cluster-list length before originator ID. Fixes #10370. For batfish/lab-validation#238.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vJunos-router 25.4R1.12 lab for the undocumented
path-selection compare-cluster-length-before-originator-idstatement. It is hiddenfrom
set protocols bgp path-selection ?but accepted as a leaf in themaster instance, virtual-router and vrf instances, and logical systems;
path-selectiondoes not exist at the group or neighbor level. dutreceives two reflected iBGP paths for 203.0.113.0/24 that tie until the
originator-ID step: A with a one-entry cluster list and originator
10.255.0.9, B with a two-entry cluster list and originator 10.255.0.1.
Without the statement Junos selects B ("Router ID"); with it, A
("Cluster list length"). Committing or deleting the statement on a
live session changes the selection without a session reset. dut runs
both states at once, in the master instance and a KNOB virtual-router.
The reflectors and originators are cEOS.
Batfish does not parse the statement and selects B in both instances;
test_bgp_rib_routes[dut] is sickbayed to batfish/batfish#10370 and to
#239, since JunosValidator drops Batfish's iBGP
routes in non-default VRFs before matching.
lab_builder: add a
bgp_active_pathcheck that asserts a Junosprefix's active BGP path by originator ID and the inactive reason on
the other paths.
Junos BGP parser: accept the
(Originator)flag and theCluster list:andOriginator ID:lines that reflected routes add to theas-pathfield.For batfish/batfish#10370 and #239.
Prompt:
Six vJunos-router VMs oversubscribed the lab host's CPU, so only dut
runs Junos and the other nodes are cEOS.