Skip to content

junos: add lab for BGP disable-linklocal-addr - #237

Merged
dhalperi merged 1 commit into
mainfrom
junos-bgp-disable-linklocal-addr
Sep 29, 2026
Merged

dhalperi merged 1 commit into
mainfrom
junos-bgp-disable-linklocal-addr

Conversation

@dhalperi

@dhalperi dhalperi commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Two-node vJunos-router 25.4R1.12 lab for the undocumented
disable-linklocal-addr statement. It is hidden from set protocols bgp ? but accepted at the protocol, group, and neighbor levels
(including internal groups and routing instances); it takes no
argument and is rejected under family inet6 and routing-options.
Without it, IPv6 UPDATEs carry a 32-byte MP_REACH next hop (global
plus link-local); with it at any level, only the 16-byte global
address. The receiver's installed route is the same either way, and
committing the statement sends no UPDATE until the next refresh.
The README includes the raw traceoptions, tcpdump, and CLI output.

lab_builder: add a bgp_update_next_hops check that route-refreshes a
Junos neighbor and parses the receiver's BGP update trace.
_junos_commit_check now also treats a bare syntax error. response
to a set line as a rejection; the error: match added in
#235 missed it for unknown keywords.


Prompt:

• In batfish/lab-validation, create a public, anonymized Junos lab for
  `protocols bgp disable-linklocal-addr`.

  First use `commit check` on vJunos-router 25.4R1.12 to determine exactly
  where Junos accepts the statement: protocol, group, and neighbor
  hierarchies. Record rejected forms as well as accepted forms.

  If accepted, build a minimal two-router IPv6 eBGP topology. Advertise an
  IPv6 prefix and compare the sender's advertised route and receiver's
  installed route with and without `disable-linklocal-addr`. Capture enough
  raw Junos output to establish its effect on global and link-local BGP
  next-hop addresses.

  Document the Junos version, configuration, commands, and observed
  results. Add automated checks for the supported hierarchy and behavior.
  Do not change Batfish. Commit the lab and open a lab-validation PR.

@codecov-commenter

codecov-commenter commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.59%. Comparing base (2c85390) to head (46decbc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #237   +/-   ##
=======================================
  Coverage   83.59%   83.59%           
=======================================
  Files          96       96           
  Lines        4705     4705           
=======================================
  Hits         3933     3933           
  Misses        772      772           
Flag Coverage Δ
unittests 83.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Two-node vJunos-router 25.4R1.12 lab for the undocumented
`disable-linklocal-addr` statement. It is hidden from `set protocols
bgp ?` but accepted at the protocol, group, and neighbor levels
(including internal groups and routing instances); it takes no
argument and is rejected under `family inet6` and `routing-options`.
Without it, IPv6 UPDATEs carry a 32-byte MP_REACH next hop (global
plus link-local); with it at any level, only the 16-byte global
address. The receiver's installed route is the same either way, and
committing the statement sends no UPDATE until the next refresh.
The README includes the raw traceoptions, tcpdump, and CLI output.

lab_builder: add a `bgp_update_next_hops` check that route-refreshes a
Junos neighbor and parses the receiver's BGP update trace.
`_junos_commit_check` now also treats a bare `syntax error.` response
to a `set` line as a rejection; the `error:` match added in
#235 missed it for unknown keywords.

----

Prompt:
```
• In batfish/lab-validation, create a public, anonymized Junos lab for
  `protocols bgp disable-linklocal-addr`.

  First use `commit check` on vJunos-router 25.4R1.12 to determine exactly
  where Junos accepts the statement: protocol, group, and neighbor
  hierarchies. Record rejected forms as well as accepted forms.

  If accepted, build a minimal two-router IPv6 eBGP topology. Advertise an
  IPv6 prefix and compare the sender's advertised route and receiver's
  installed route with and without `disable-linklocal-addr`. Capture enough
  raw Junos output to establish its effect on global and link-local BGP
  next-hop addresses.

  Document the Junos version, configuration, commands, and observed
  results. Add automated checks for the supported hierarchy and behavior.
  Do not change Batfish. Commit the lab and open a lab-validation PR.
```
@dhalperi
dhalperi force-pushed the junos-bgp-disable-linklocal-addr branch from 2f68227 to 46decbc Compare September 29, 2026 17:08
@dhalperi
dhalperi enabled auto-merge (squash) September 29, 2026 17:10
@dhalperi
dhalperi merged commit 512d50c into main Sep 29, 2026
146 checks passed
@dhalperi
dhalperi deleted the junos-bgp-disable-linklocal-addr branch September 29, 2026 17:30
dhalperi added a commit to batfish/batfish that referenced this pull request Sep 29, 2026
Extract and inherit `disable-linklocal-addr` at the protocol, group,
and neighbor hierarchies. Mark unsupported IPv6 BGP UPDATE next-hop
encoding at parse time.

Lab validation on vJunos-router 25.4R1.12 confirms that the statement
removes the link-local address from MP_REACH next hops.

For batfish/lab-validation#237.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants