junos: add lab for BGP receive-buffer and send-buffer - #242
Merged
Merged
Conversation
vJunos-router 25.4R1.12 lab for the undocumented `receive-buffer` and `send-buffer` statements. Both are hidden from `set protocols bgp ?` but accepted at the protocol, group, and neighbor levels, in the master instance, virtual-router and vrf instances, and logical systems; they are rejected under `family`, `multihop`, `traceoptions`, and `routing-options`. The value is a byte count from 0 to 4294967295 with an optional k, m, or g suffix (powers of 1024); hex and leading-zero octal forms are accepted. Junos displays the value with the largest suffix that divides it exactly and leaves a quotient below 1024, otherwise as plain bytes: `65536` and `0x10000` show as `64k`, `1536k` as `1572864`, and `010` as `8`. `show bgp neighbor` reports the effective sizes (neighbor over group over protocol, per direction), and changing them resets the session. dut peers with a cEOS peer in the master instance and a VR1 virtual-router, each with all three levels configured. Batfish does not parse either statement. In `display set` form the buffer lines are dut's only neighbor lines, so Batfish has no BGP peers on dut; test_main_rib_routes[dut] and test_bgp_rib_routes[dut] are sickbayed to batfish/batfish#10375. lab_builder: add a `bgp_peer_bufsize` check that asserts the buffer sizes `show bgp neighbor` reports. `_junos_commit_check` now also treats a `^` marker line in response to a `set` line as a rejection; invalid numeric values print no `error` or `syntax error` text. For batfish/batfish#10375. ---- Prompt: ``` Create a Junos lab validation for the undocumented BGP commands: set protocols bgp receive-buffer 64k set protocols bgp send-buffer 64k set protocols bgp group TEST receive-buffer 128k set protocols bgp group TEST send-buffer 128k set protocols bgp group TEST neighbor 192.0.2.1 receive-buffer 256k set protocols bgp group TEST neighbor 192.0.2.1 send-buffer 256k Determine which scopes and value formats Junos accepts. Also test within a routing instance if practical. Record the platform and exact Junos version, commit-check results, and normalized configuration output. Use anonymized names and documentation addresses. Restore the lab afterward. Add the results to batfish/lab-validation and open a PR. ```
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #242 +/- ##
=======================================
Coverage 83.59% 83.59%
=======================================
Files 96 96
Lines 4706 4706
=======================================
Hits 3934 3934
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:
|
dhalperi
added a commit
to batfish/batfish
that referenced
this pull request
Oct 2, 2026
Parse and extract `receive-buffer` and `send-buffer` at the protocol, group, and neighbor hierarchies. Apply Junos inheritance to both settings. Fixes #10375. For batfish/lab-validation#242.
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
receive-bufferandsend-bufferstatements. Both are hidden fromset protocols bgp ?but accepted at the protocol, group, and neighbor levels, in the
master instance, virtual-router and vrf instances, and logical
systems; they are rejected under
family,multihop,traceoptions,and
routing-options. The value is a byte count from 0 to 4294967295with an optional k, m, or g suffix (powers of 1024); hex and
leading-zero octal forms are accepted. Junos displays the value with
the largest suffix that divides it exactly and leaves a quotient below
1024, otherwise as plain bytes:
65536and0x10000show as64k,1536kas1572864, and010as8.show bgp neighborreports theeffective sizes (neighbor over group over protocol, per direction), and
changing them resets the session. dut peers with a cEOS peer in the
master instance and a VR1 virtual-router, each with all three levels
configured.
Batfish does not parse either statement. In
display setform thebuffer lines are dut's only neighbor lines, so Batfish has no BGP peers
on dut; test_main_rib_routes[dut] and test_bgp_rib_routes[dut] are
sickbayed to batfish/batfish#10375.
lab_builder: add a
bgp_peer_bufsizecheck that asserts the buffersizes
show bgp neighborreports._junos_commit_checknow alsotreats a
^marker line in response to asetline as a rejection;invalid numeric values print no
errororsyntax errortext.For batfish/batfish#10375.
Prompt: