Commit Graph

4080 Commits

Author SHA1 Message Date
Donatas Abraitis
3acfcef778
Merge pull request #17728 from dmytroshytyi-6WIND/bgp_rpki_state
bgpd: add rpki current state
2025-01-01 21:15:42 +02:00
Donatas Abraitis
6fb7b3401b tests: Check prefix statistics for path-attribute discard/withdraw
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-30 12:27:00 +02:00
Dmytro Shytyi
5f50b98f8e
tests: add bgp rpki topo1 rpkiValidationState
Topotest to verify the next key-value "rpkiValidationState": "valid"

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2024-12-30 09:45:26 +01:00
Donatas Abraitis
3f6c106e48
Merge pull request #17718 from cscarpitta/fix/fix-srv6-static-route-pytestmark
tests: Fix markers in `srv6_static_route` topotest
2024-12-26 14:17:21 +02:00
Jafar Al-Gharaibeh
803ff41cc4
Merge pull request #17647 from LabNConsulting/fix-oper-test
tests: enable test failure detection and fix resulting failures
2024-12-24 12:35:32 -06:00
Carmine Scarpitta
225a1c7ed6 tests: Fix markers in srv6_static_route topotest
`srv6_static_route` is a pure staticd topotest. It does not have any
dependency on bgpd and sharpd.

Let's fix the pytestmark to include only staticd.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-24 10:38:37 +01:00
Christian Hopps
3d3ee2a1af tests: enable failure and fix broken tests
This test was not actually failing when the results didn't match. Fail
now. Also fix the tests that are now found to be failing incorrectly
(wrong expected result).

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-12-24 03:04:23 -05:00
Donatas Abraitis
9ce3b144c9
Merge pull request #17580 from varuntumbe/dev/label_pool_release_fix
BGP Labelpool : Releasing the label in labelpool when VPN session gets removed
2024-12-23 14:48:21 +02:00
Donatas Abraitis
9047ce6d9c tests: Check if enforce-first-as is working with peer-groups
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-21 17:08:01 +02:00
Jafar Al-Gharaibeh
f7fcc44292
Merge pull request #17674 from opensourcerouting/fix/bgp_show_advertised_routes_detail
bgpd: Fix show neighbor X advertised-routes detail
2024-12-20 14:01:34 -06:00
Donatas Abraitis
7508d72db9 tests: Ignore totalRoutes, totalPaths when checking strict output
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-19 21:44:50 +02:00
Donatas Abraitis
ddab988cce tests: Check if we received a DECENT amount of prefixes/paths
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-19 18:24:50 +02:00
Christian Hopps
5d7737b7eb test: fix label ordering on error diff report
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-12-19 08:13:04 -06:00
Donald Sharp
4a0e8ed8da
Merge pull request #17671 from Jafaral/static-propagation
tests: add a test case for static route propagation
2024-12-19 08:53:06 -05:00
Donatas Abraitis
b23c6e522d tests: Check if we can see advertised routes with route-map applied
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-19 10:02:19 +02:00
Jafar Al-Gharaibeh
f78b1786a6
Merge pull request #17599 from opensourcerouting/fix/reduce_default_connect_timer
bgpd: Connect retry timer backoff
2024-12-18 16:26:37 -06:00
Jafar Al-Gharaibeh
76f403cf75 tests: add a test case for static route propagation
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-12-18 12:16:15 -06:00
Russ White
c8ba5b09b3
Merge pull request #17544 from anlancs/zebra/fix-plug-interface
zebra: fix wrong nexthop status for kernel routes
2024-12-17 11:16:32 -05:00
Russ White
a3e0e4eb49
Merge pull request #17526 from raja-rajasekar/rajasekarr/evpn_bp_and_optimizations_3864372_FINAL_upstream
EVPN L2VNI/L3VNI Optimize inline Global walk for remote route installations
2024-12-17 11:15:27 -05:00
anlan_cs
2f1bd3fe4d tests: add nexthop/interface's down/up topo for kernel routes
Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-12-17 16:14:35 +08:00
varuntumbe
c8e624bfd5 topotests: Adding a test to control release of BGP labels
Adding the topotest which verifies whether label beloning to corresponding chunk has been released properly or not once
we remove the vpn session

Signed-off-by: Varun Hegde <varuntumbe1@gmail.com>
2024-12-16 21:27:28 +05:30
Rafael Zalamena
3bebb7be92
Merge pull request #17252 from nabahr/mcast-mode
Fix PIMD RPF lookup mode and nexthop tracking
2024-12-16 09:57:31 -03:00
Nathan Bahr
d334f84156 tests: Add new pim mrib tests
Test mrib overrides and rpf lookup mode changes.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-12-13 17:36:34 +00:00
Nathan Bahr
ba0a6868e5 test: Fix tests for zebra changes
Remove use of `ip multicast rpf-lookup-mode` from unrelated tests.
Looks like this test was just unlucky enough to pick that command as an
example for use here. Just changed it to something less likely to be
removed in the future.
Update route table output to include AFI SAFI output.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-12-12 13:50:31 +00:00
Rafael Zalamena
0a9422f721 topotests: topology to test MSDP originator ID
Import new topology to test originator ID configuration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-12-12 10:34:21 -03:00
Donatas Abraitis
4ac77b199e tests: Wait 30 seconds for a notification check (minimum hold-time)
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-11 17:20:49 +02:00
Philippe Guibert
95ccb5d01d bgpd, topotests: bmp, fix wrong peer distinguisher value for peer vrf up/down
When running the bgp_bmp_2 vrf test, peer vrf up/down events from the pre
and post policy are received with a wrong peer distinguisher value.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy",
> "ipv6": true, "peer_ip": "192:168::2", "peer_distinguisher": "0:0",
> "peer_asn": 65502, "peer_bgp_id": "192.168.0.2", "timestamp":
> "2024-10-16 21:59:53.111962", "bmp_log_type": "peer up", "local_ip":
> "192:168::1", "local_port": 179, "remote_port": 50836, "seq": 5}

RFC7854 mentions in 4.2 that if the peer is a "RD Instance Peer", it is
set to the route distinguisher of the particular instance the peer
belongs to.

Fix this by modifying the BMP client, update the peer distinguisher
value by filling the peer distinguisher in the bmp_peerstate function.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy",
> "ipv6": true, "peer_ip": "192:168::2", "peer_distinguisher": "444:1",
> "peer_asn": 65502, "peer_bgp_id": "192.168.0.2", "timestamp":
> "2024-10-16 21:59:53.111962", "bmp_log_type": "peer up", "local_ip":
> "192:168::1", "local_port": 179, "remote_port": 50836, "seq": 5}

Add a test to check that peer_distinguisher value is not 0:0 when an
RD instance is set.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:48:01 +01:00
Philippe Guibert
188ba91082 bgpd, topotests: bmp, fix wrong peer type for peer up/down events
When running the bgp_bmp_2 vrf test, peer up/down events from the pre
and post policy are received with a wrong peer type value

> {"peer_type": "global instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-16 21:59:53.111962",
> "bmp_log_type": "peer up", "local_ip": "192.168.0.1", "local_port": 179,
> "remote_port": 50710, "seq": 4}

RFC7854 defines RD instance peer type, and later in 4.2 requests that
the peer distinguisher value be set to non zero value when the peer type
is not global. This is the case for peer vrf instances.

Fix this by modifying the BMP client, update the peer type
value by updating the peer type value when sending peer up/down messages.

Add a check in the bgp_bmp_2 test to ensure that peer type is correctly
set.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy",
> "ipv6": true, "peer_ip": "192:168::2", "peer_distinguisher": "0:0",
> "peer_asn": 65502, "peer_bgp_id": "192.168.0.2", "timestamp":
> "2024-10-16 21:59:53.111962", "bmp_log_type": "peer up", "local_ip":
> "192:168::1", "local_port": 179, "remote_port": 50836, "seq": 5}

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:47:56 +01:00
Philippe Guibert
bc3a19e253 bgpd, topotests: bmp, fix wrong peer distinguisher for vrf route events
When running the bgp_bmp_2 vrf test, peer route messages from the pre
and post policy are received with a wrong peer distinguisher value.

> {"peer_type": "route distinguisher instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-31 08:19:58.111963",
> "bmp_log_type": "update", "origin": "IGP", "as_path": "65501 65502",
> "bgp_nexthop": "192.168.0.2", "ip_prefix": "172.31.0.15/32", "seq": 15}

RFC7854 mentions in 4.2 that if the peer is a "RD Instance Peer", it is
set to the route distinguisher of the particular instance the peer
belongs to.

Fix this by modifying the BMP client:
- update the peer distinguisher value by unlocking the filling of the peer distinguisher in the function.
This change impacts monitoring messages.
- add the peer distinguisher computation for mirror messages
- modify the bgp_bmp_2 vrf test, update the peer_distinguisher value

> {"peer_type": "route distinguisher instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "444:1", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-31 08:19:58.111963",
> "bmp_log_type": "update", "origin": "IGP", "as_path": "65501 65502",
> "bgp_nexthop": "192.168.0.2", "ip_prefix": "172.31.0.15/32", "seq": 15}

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:29:37 +01:00
Philippe Guibert
96aea62fe2 bgpd, topotests: bmp, fix wrong peer type for vrf route messages
When running the bgp_bmp_2 vrf test, peer route messages from the pre
and post policy are received with a wrong peer type value

> {"peer_type": "global instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-31 08:19:58.111963",
> "bmp_log_type": "update", "origin": "IGP", "as_path": "65501 65502",
> "bgp_nexthop": "192.168.0.2", "ip_prefix": "172.31.0.15/32", "seq": 15}

In addition to global instance peers, RFC7854 defines RD instance peers.
This value can be used for peers which are on a BGP VRF instance, for
example with an L3VPN setup.

When configuring a BGP VRF instance, the peer type should be seen as an
RD instance peer.

Fix this by modifying the BMP client:
- update the peer type for vrf mirror and monitoring messages
- modify bgp_bmp_2 vrf test to control the peer_type value

> {"peer_type": "route distinguisher instance", "policy": "pre-policy", "ipv6": false,
> "peer_ip": "192.168.0.2", "peer_distinguisher": "0:0", "peer_asn": 65502,
> "peer_bgp_id": "192.168.0.2", "timestamp": "2024-10-31 08:19:58.111963",
> "bmp_log_type": "update", "origin": "IGP", "as_path": "65501 65502",
> "bgp_nexthop": "192.168.0.2", "ip_prefix": "172.31.0.15/32", "seq": 15}

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:29:37 +01:00
Philippe Guibert
d55a5864dd topotests: bgp_bmp, expose peer_distinguisher in loc-rib
The BMP implementation currently only supports global and
loc-rib instance types. When loc-rib is selected, the
peer_distinguisher is set to the route distinguisher of
the L3VRF where the BGP instance is. This functionality has
not been tested until now, because the peer distinguisher
value had been explicitly omitted in the bmp messages.

Expose the peer distinguisher value in all BMP messages
received. This change requires to modify the expected output
for loc-rib when the BGP instance is in a L3VRF.

The handling of peer distinguisher value for RD instances
will follow in the next commits.

Link: https://www.rfc-editor.org/rfc/rfc7854.html#section-4.2

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-11 11:29:37 +01:00
Jafar Al-Gharaibeh
ccb57ad10f
Merge pull request #17521 from opensourcerouting/msdp-sa-limit
pimd: MSDP per peer SA limit
2024-12-10 11:36:50 -06:00
Russ White
3f6bf6d03c
Merge pull request #17608 from opensourcerouting/fix/vpn_import_routes_allowas-in
bgpd: Import allowed routes with self AS if desired
2024-12-10 11:24:15 -05:00
Rajasekar Raja
0f2cb27310 bgpd: backpressure - Optimize EVPN L3VNI remote routes processing
Anytime BGP gets a L3 VNI ADD/DEL from zebra,
 - Walking the entire global routing table per L3VNI is very expensive.
 - The next read (say of another VNI ADD/DEL) from the socket does
   not proceed unless this walk is complete.

So for triggers where a bulk of L3VNI's are flapped, this results in
huge output buffer FIFO growth spiking up the memory in zebra since bgp
is slow/busy processing the first message.

To avoid this, idea is to hookup the BGP-VRF off the struct bgp_master
and maintain a struct bgp FIFO list which is processed later on, where
we walk a chunk of BGP-VRFs and do the remote route install/uninstall.

Ticket :#3864372

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-12-09 08:46:16 -08:00
Donatas Abraitis
77857dc210 tests: Check if vpn routes can be imported if allowas-in is set
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-08 21:44:52 +02:00
Corey Siltala
7c2c70dd2b tests: Add basic multicast boundary test
Add simple test to show filtering of IGMP joins using new "ip multicast
boundary" filtering with access-lists, include test of existing prefix-
list based "ip multicast boundary oil" command.

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-12-06 14:44:52 -06:00
Donatas Abraitis
03ea25af68
Merge pull request #17545 from pguibert6WIND/peerup_loc_rib_wrong_format
bgpd: fix peer up message for loc-rib not sent
2024-12-06 14:47:48 +02:00
Donatas Abraitis
3d15035491
Merge pull request #17579 from donaldsharp/timer_connect_bgp_vrf_netns
Timer connect bgp vrf netns
2024-12-06 14:26:33 +02:00
Donald Sharp
a5c5b87389 tests: Fix invalid escape seq seen in bgp_nexthop_ipv6
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 14:08:20 -05:00
Donald Sharp
dc372568ad tests: Convert to using neighbor X timers connect 1 for exabgp using tests
For those tests using exabgp convert them all to use `neighbor X timers
connect 1`.  I have noticed that occassionally when looking at the
support files for tests run that peers are in a wait period for
reconnecting which is longer than the test is waiting to converge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 14:08:12 -05:00
Donald Sharp
645a82ec60 tests: bfd_profiles_topo1 is taking a long time to reconnect
Make it faster

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-05 10:19:55 -05:00
Philippe Guibert
f921a8d09a topotests: bmp, test that loc-rib peer up message is sent
Add a test at startup to ensure that peer up message for loc-rib is
correctly set.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-05 15:42:10 +01:00
Rafael Zalamena
0d904c28c3 topotests: test new MSDP SA limit feature
Test that only the limit amount of SAs is learned from the peer.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-12-05 10:38:56 -03:00
Jafar Al-Gharaibeh
59b0a6e339
Merge pull request #17502 from opensourcerouting/msdp-shutdown
pimd: implement MSDP shutdown command
2024-12-04 21:57:18 -06:00
Russ White
e9c9db0122
Merge pull request #17542 from opensourcerouting/fix/peer-group_remote_as_regression
bgpd: Fix remote-as with peer-group
2024-12-03 10:05:44 -05:00
Mark Stapp
426dc2b7e2
Merge pull request #17547 from donaldsharp/some_cleanups
Some cleanups
2024-12-03 08:57:28 -05:00
Philippe Guibert
d1301f1c2a topotests: save bgp_bmp json temp files to bmp log folder instead of /tmp
Some temporary files are hardwritten in /tmp folder. Use the bmp log
folder instead. Replace the bmp log file argument with bmp log folder.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-02 18:44:53 +01:00
Louis Scalbert
f2eb14d381 tests: save bmp pcap in logdir instead of /tmp
DEBUG_PCAP can be set True to manually enable pcap debugging when
running bmp tests.

Save bmp pcap in logdir (ie. /tmp/topotests/bgp_bmp.bgp_bmp_X/ instead
of /tmp.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-02 18:44:53 +01:00
Louis Scalbert
b12e04fdf1 tests: fix bmp test parallelization
Multiple BMP tests can run in parallel but, when one instance ends,
it kills the BMP server process of all BMP tests.

Save the PID of a BMP server and only kill it at the end.

Link: https://github.com/FRRouting/frr/issues/17465
Fixes: 875511c466 ("topotests: add basic bmp collector")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-12-02 18:44:53 +01:00
Louis Scalbert
bbf8ee1769 tests: add py extension to bmpserver
to help identify the file type. And apply black.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-12-02 18:44:53 +01:00