Commit Graph

4181 Commits

Author SHA1 Message Date
Yuqing Zhao
2a50c7526a tests: Add topotest for SRv6 static SIDs
Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
2025-01-18 10:28:49 +00:00
Donatas Abraitis
705e6f881b
Merge pull request #17836 from pguibert6WIND/limit_comm_list_count
limit community list count
2025-01-17 12:44:24 +02:00
Donald Sharp
acc3cfe334
Merge pull request #17727 from idryzhov/netns-all-daemons
lib: introduce global -w option for VRF netns backend
2025-01-16 08:11:07 -05:00
Christian Hopps
f71d5281ce tests: dont run ldp snmp test if no snmp
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-16 02:13:34 +00:00
Christian Hopps
b0f9c4d688 tests: fix missed grpc test requirement for frr-backend addition
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-16 02:13:34 +00:00
Igor Ryzhov
754b949889 tests: use global -w option instead of per-daemon -n
Add ability to enable -w option for all daemons in a topotest and use
this option instead of the deprecated -n.

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
2025-01-15 23:38:27 +02:00
Russ White
0bc373c573
Merge pull request #17838 from opensourcerouting/msdp-topo3
topotests: improve test reliability
2025-01-15 11:11:49 -05:00
Donald Sharp
d43bdb9568
Merge pull request #17855 from opensourcerouting/fix/bgp_enhe_capability_via_dynamic_capability
bgpd: Handle ENHE capability via dynamic capability
2025-01-15 10:34:39 -05:00
Donald Sharp
5867c32161
Merge pull request #17776 from nabahr/group-rpf-mode
PIMD: RPF lookup mode per-group, per-source
2025-01-15 10:20:24 -05:00
Donatas Abraitis
d1cfd73060 tests: Check if ENHE capability can be handled dynamically
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-14 22:46:51 +02:00
Donald Sharp
5f35096123
Merge pull request #17796 from LabNConsulting/chopps/datastore-notifications
operational-state (datastore) change notifications
2025-01-14 13:47:28 -05:00
Russ White
4212bac7de
Merge pull request #17800 from opensourcerouting/fix/import_between_vrf_respect_allowas_in
bgpd: Respect allowas-in value from the source VRF's peer
2025-01-14 10:19:26 -05:00
Russ White
b4619da938
Merge pull request #17639 from pguibert6WIND/bmp_import_vrf_view
Ability to import BMP information from a separate BGP instance
2025-01-14 08:38:37 -05:00
Philippe Guibert
bd4b8c3dac topotest: add a test to control the community-list count
Add a test to control the community-list count.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-14 13:59:45 +01:00
Donatas Abraitis
ba4122d6db
Merge pull request #17840 from Jafaral/pim-acl-test
tests: remove unnecessary wildcard fields from pim acl test
2025-01-14 09:08:41 +02:00
Christian Hopps
7f80885099 tests: add datastore notification test
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-13 23:40:52 -05:00
Rafael Zalamena
dda4f00f65 topotests: improve test reliability
Decrease the protocol timers, wait for peers to connect (and test it)
then finally wait a bit more for SAs to be propagated.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-01-13 09:26:17 -03:00
Christian Hopps
3366056bce tests: update munet to 0.15.4
- add readline and waitline functions for use with popen objects
- other non-topotest (munet native) run changes
  - vm/qemu support booting cloud images (rocky, ubuntu, debian)
  - native topology init commands

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-12 16:15:02 +00:00
Jafar Al-Gharaibeh
8b4b88d4d6 tests: remove unnecessary wildcard fields from pim acl test
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-10 17:32:30 -06:00
Nathan Bahr
590c937e8a tests: Add tests for new RPF lookup group and source list features
Expand existing pim_mrib tests to include testing lookup modes
specific to source and/or group as defined in prefix lists.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2025-01-09 21:58:22 +00:00
Jafar Al-Gharaibeh
3915dd5b53 tests: avoid nondeterministic route
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-01-09 15:44:25 -06:00
Donald Sharp
414bc26bc0 tests: bgp_srv6l3vpn_to_bgp_vrf3 needs more time
The test starts with checking for rib insertion
of routes that may take some time after system
startup to come up.  Under heavy load this may
cause this test to just fail.  Give it more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-09 13:43:58 -05:00
Donald Sharp
b46d3a1a42 tests: bgp_srv6_sid_reachability should give more time
The test starts right in on check_pings with a 10 second
time out.  Any type of delay on startup is going to cause
problems.  Give the first check_ping significant time
for the test to be fully brought up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-01-09 10:31:07 -05:00
Donatas Abraitis
929591cdb0 tests: Check if allowas-in works when importing between local VRFs
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-01-08 19:22:27 +02:00
Russ White
21fe1f4d83
Merge pull request #17707 from gromit1811/pr16811_rebased
tests: cleanup ospf6 ecmp inter area
2025-01-07 16:14:15 -05:00
Donald Sharp
96ab6ae32b
Merge pull request #17781 from LabNConsulting/chopps/fix-keyless-list-query
fix xpath query on keyless list with positional predicate
2025-01-07 13:17:37 -05:00
Donald Sharp
0a52c233d3
Merge pull request #17782 from LabNConsulting/chopps/new-notify-msg-fmt
New YANG notify msg fmt
2025-01-07 13:15:40 -05:00
Donald Sharp
1a7923e7bc
Merge pull request #17783 from LabNConsulting/chopps/new-oper-get-callback
Add new oper state get callback
2025-01-07 13:11:26 -05:00
Philippe Guibert
51cedaa30c topotests: bmp, test syncro for pre/post-policy of imported bgps
Add a test that controls that the configuration of an imported
BGP instance triggers a re-syncronisation.
Ensure that changing an attribute like route distinguisher
triggers also a re-syncronisation.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-07 15:35:32 +01:00
Philippe Guibert
6c7b2abc01 bgpd, topotests: bmp imported bgp, send peer up events when config param changed
When a BGP instance is created or becomes valid, and when a parameter
is updated (router-id, route distinguisher), the peer up messages other
than loc rib peer up messages, are sent. Add a test that controls if
peer down and peer up messages are sent accordingly with correct route
distinguisher values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-07 15:35:32 +01:00
Philippe Guibert
ca7699f4ae bgpd, topotests: bmp, send peer down when unconfiguring imported vrf
When unconfiguring an imported BGP instance, a peer down
should be sent to notify BMP collector that the BGP instance
is leaving.

Add a test that controls the presence of the peer down loc-rib
message.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-07 15:35:32 +01:00
Philippe Guibert
62891717e3 bgpd, topotests: bmp imported bgp, add loc-rib peer up support when vrf flaps
Add the emission of a loc-rib peer up event for an imported bgp instance
when vrf state changes. Add a test to control in the BMP collector
that the peer up message is the one from that BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-07 15:35:31 +01:00
Philippe Guibert
2bd5cd1b81 bgpd, topotests: bmp imported bgp, add loc-rib peer up support when router-id changes
Add the emission of a loc-rib peer up event for an imported bgp instance
at route-id reconfiguration. Add a test to control in the BMP collector
that the peer up message is the one from that BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-07 15:35:31 +01:00
Philippe Guibert
ab31e964e4 bgpd, topotests: bmp, add loc-rib peer up event for imported bgp
Add the emission of a loc-rib peer up event for an imported bgp instance
at import-vrf configuration. Add a test to control in the BMP collector
that the peer up message is the one from that BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-07 15:35:31 +01:00
Philippe Guibert
f52e963b98 topotests: bgp_bmp, add test for import-vrf-view service
Add a test with a new peer defined in a VRF, and where
the BGP updates are imported in the BMP instance of the
default BGP instance.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-07 15:35:31 +01:00
Martin Buck
a09d98a95e tests: ospf6_ecmp_inter_area, no shutdown r7/r8 eth3
Drop eth3 shutdown from ospf6d.conf - it doesn't do anything there. And it
actually shouldn't do anything: eth3 on r7/r8 are used as loopback-like
interfaces to inject the address on eth2 into OSPFv3. So they need to be up
for eth2 to work as expected.

Based on original PR#16811 commit:

    eth3 shutdown is not applied because it is ospf6d.conf.

    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2025-01-07 15:22:02 +01:00
Martin Buck
763069cd3b tests: ospf6_ecmp_inter_area, use router_json_cmp
Use router_json_cmp when checking for proper nexthops to get better
diagnostics in case of mismatches. Add step() messages to see which check
failed.

Based on original PR#16811 commit:

    expect_num_nexthops() errors are not understandable.

    Use router_json_cmp.

    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2025-01-07 15:21:58 +01:00
Russ White
2a90c80f49
Merge pull request #17733 from pguibert6WIND/bmp_event_changes
BMP handling of BGP configuration changes
2025-01-07 09:06:43 -05:00
Russ White
5d75339c12
Merge pull request #17773 from LabNConsulting/chopps/more-oper-test-fix
tests: improve test reliability
2025-01-07 09:02:41 -05:00
Russ White
7f2be9a595
Merge pull request #17474 from sougata-github-nvidia/rib_ip_protocol_cleanup
zebra: Fix ip protocol route-map issue.
2025-01-07 08:45:07 -05:00
Russ White
c9c9608c70
Merge pull request #17431 from krishna-samy/bgpd_json_commits
bgpd: show json output changes to optimize various show commands
2025-01-07 08:43:55 -05:00
Christian Hopps
e729676cfe tests: add test for new northbound get function
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-07 07:01:46 -05:00
Christian Hopps
5755ce395b tests: fe-client: only pick mgmtd FE notify selectors once
- adapt fe_client to new notification message format

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-07 05:34:11 -05:00
Christian Hopps
0ce15fb0f7 tests: add unit test case for keyless list xpath queries
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-07 01:24:38 -05:00
Christian Hopps
c5a2a65122 tests: improve test reliability
Test for presence of IPv6 kernel routes too.

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-06 08:53:12 -05:00
Sougata Barik
86b294698f zebra: Fix ip protocol route-map issue.
"ip/ipv6 protocol any route-map <route map>" cli is setting
wrong route type ( ZEBRA_ROUTE_MAX ), It should set route type
ZEBRA_ROUTE_ALL.

Ticket: #4101560

Signed-off-by: Sougata Barik <sougatab@nvidia.com>
2025-01-06 17:02:21 +05:30
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
Philippe Guibert
e4bbe12c17 topotests: bgp_bmp, add peer message test when RD changes
Add a test to control the peer up and down message sent when the route
distinguisher is updated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-30 15:13:38 +01:00
Philippe Guibert
7da91a8fb9 topotests: bmp_collector, fix display peer distinguisher IP:AS2B
The peer distinguisher format was badly displayed when a per peer
header is sent with an IP:AS2B format.

>  {"peer_type": "loc-rib instance", "is_filtered": false, "policy": "loc-rib",
> "peer_distinguisher": "None:2", ...

The IP header is incorrectly read. Fix it.

> {"peer_type": "loc-rib instance", "is_filtered": false, "policy": "loc-rib",
> "peer_distinguisher": "3.3.3.5:2", ...

Fixes: 875511c466 ("topotests: add basic bmp collector")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-30 15:13:38 +01:00
Philippe Guibert
69c6a41fd2 topotests: bgp_bmp, add peer up message test when router-id changes
Add a test to control the value of the peer bgp id of loc-rib peer up
messages when the bgp router-id is reconfigured.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-30 15:13:38 +01:00
Philippe Guibert
eb570f0a70 topotests: bgp_bmp, add a test to check for bgp vrf peer loc-rib message
Add a test where, when the vrf interface is flapping, a peer down and a
peer up message are sent. This test, when used with ASAN, detects the
memory leak of the open_tx and open_rx messages of the loc-rib.

Refresh the method of updating the SEQ value when reading the peer
messages: only update to the last matching SEQ value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-12-30 15:13:37 +01: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