Skip to content

Add Validation functions BGP BFD for FRR/EOS#3534

Draft
snuffy22 wants to merge 4 commits into
ipspace:devfrom
snuffy22:validate-bfd-bgp
Draft

Add Validation functions BGP BFD for FRR/EOS#3534
snuffy22 wants to merge 4 commits into
ipspace:devfrom
snuffy22:validate-bfd-bgp

Conversation

@snuffy22

Copy link
Copy Markdown
Contributor

Made the validation plugin be able to take BFD information similar to the OSPF one.

Works with both EOS and FRR.

Not entirely sure if is correct how I made change to the DUT with enabling BFD in the topology.

(py3-snuff) netlab@netlab:~/snuffy-netlab/tests/integration/bgp.session$ netlab validate
[WARNING] Topology source file(s) have changed since the lab has started
[INFO]    Reading validation tests from /home/netlab/snuffy-netlab/tests/integration/bgp.session/13-bfd.yml
[session_v4] Check IPv4 EBGP sessions with DUT [ node(s): x1 ]
[PASS]       x1: Neighbor 10.1.0.1 (dut) is in state Established
[PASS]       Test succeeded in 0.1 seconds

[bgp_bfd_v4] Check IPv4 EBGP sessions with DUT [ node(s): x1 ]
[PASS]       x1: All specified BGP neighbor parameters have the expected values
[PASS]       Test succeeded in 0.1 seconds

[bfd_v4]     Check BFD peer on X1 [ node(s): x1 ]
[PASS]       Validation succeeded on x1
[PASS]       Test succeeded in 0.1 seconds

[bfd_v4_dut] Check BFD peer on DUT [ node(s): dut ]
[PASS]       Validation succeeded on dut
[PASS]       Test succeeded in 0.2 seconds

[SUCCESS]    Tests passed: 4

@ipspace ipspace left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I'm perfectly fine with checking BFD status with a plugin, I'm wondering whether we need this as the integration test checks whether the tested device starts BFD, so we cannot configure BFD-for-BGP, so we won't get BFD info in the BGP neighbor anyway.

Having said that, it would be nice to have BFD-with-BGP checking functionality, but I think the parameter has to be be three-state: None (not interested in BFD), False (BFD must NOT be running) and True (BFD MUST be running).

Comment thread netsim/validate/bgp/eos.py Outdated
Comment thread netsim/validate/bgp/eos.py Outdated
Comment thread netsim/validate/bgp/frr.py Outdated
Comment thread netsim/validate/bgp/frr.py Outdated
if data.peerBfdInfo.status != "Up":
raise Exception(f'{k} expected value UP actual {data.peerBfdInfo.status}')
else:
raise Exception(f'Neighbor data structure does not contain attribute peerBfdInfo')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would reword this along the lines of "No BFD information for BGP peer {n_id}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted

nodes:
dut:
bgp.as: 65000
bgp.bfd: True

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong. You see, the point is that DUT runs BFD with one peer but not the other.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only 1 peer in the bgp.session version of this BFD test topology currently...

Comment thread tests/integration/bgp.session/13-bfd.yml Outdated
Comment thread tests/integration/bgp.session/13-bfd.yml
Comment thread tests/integration/bgp.session/13-bfd.yml Outdated
Cover the FRR default-timer regression by forcing BFD down and documenting how to reproduce it with FRR 10.5.1.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jbemmel

jbemmel commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Took the liberty to add a test for FRRouting/frr#22097

@ipspace

ipspace commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Took the liberty to add a test for FRRouting/frr#22097

Why on earth would we test every device against an FRR bug that has already been fixed? Nope.

@jbemmel

jbemmel commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Took the liberty to add a test for FRRouting/frr#22097

Why on earth would we test every device against an FRR bug that has already been fixed? Nope.

Because it’s a quick minimal test that checks whether BFD actually works as intended.

If there's a way to only run it if dut is FRR then we could add that if you prefer. I think it might be useful

@ipspace

ipspace commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Because it’s a quick minimal test that checks whether BFD actually works as intended.

It's not our job to check whether implementations "work as intended". We have to do our best to configure them correctly.

If there's a way to only run it if dut is FRR then we could add that if you prefer. I think it might be useful

If you feel like creating a test suite for FRR, please go ahead. However, although I report everything we find to my FRR contacts, that's not the job of netlab integration tests.

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.

3 participants