2023-02-08 13:17:09 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-10-30 08:45:43 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Vmware
|
|
|
|
* Sarita Patra
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FRR_BGP_ROUTEMAP_NB_H_
|
|
|
|
#define _FRR_BGP_ROUTEMAP_NB_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern const struct frr_yang_module_info frr_bgp_route_map_info;
|
|
|
|
|
|
|
|
/* prototypes */
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_local_preference_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_local_preference_destroy(struct nb_cb_destroy_args *args);
|
2021-07-18 11:14:24 +02:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_alias_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_alias_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_script_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_script_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_origin_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_origin_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_rpki_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_rpki_destroy(struct nb_cb_destroy_args *args);
|
2022-08-31 22:00:26 +02:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_rpki_extcommunity_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_rpki_extcommunity_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2023-05-10 22:37:47 +02:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_source_protocol_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_source_protocol_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_probability_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_probability_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_source_vrf_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_source_vrf_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_peer_ipv4_address_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_peer_ipv4_address_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_peer_interface_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_peer_interface_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_peer_ipv6_address_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_peer_ipv6_address_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_peer_local_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_peer_local_destroy(struct nb_cb_destroy_args *args);
|
2024-09-25 14:27:54 +02:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_src_peer_ipv4_address_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_src_peer_ipv4_address_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_src_peer_interface_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_src_peer_interface_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_src_peer_ipv6_address_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_src_peer_ipv6_address_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_access_list_num_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_access_list_num_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_access_list_num_extended_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_access_list_num_extended_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_list_name_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_list_name_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_evpn_default_route_create(struct nb_cb_create_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_evpn_default_route_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_evpn_vni_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_evpn_vni_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_evpn_route_type_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_evpn_route_type_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_route_distinguisher_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_route_distinguisher_destroy(struct nb_cb_destroy_args *args);
|
2025-01-10 17:29:10 +01:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_community_limit_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_community_limit_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2024-02-23 23:06:41 +01:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_create(
|
|
|
|
struct nb_cb_create_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
void lib_route_map_entry_match_condition_rmap_match_condition_comm_list_finish(struct nb_cb_apply_finish_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_comm_list_name_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_comm_list_name_exact_match_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_comm_list_name_exact_match_destroy(struct nb_cb_destroy_args *args);
|
2023-06-27 21:36:01 +02:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_comm_list_name_any_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_comm_list_name_any_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_ipv4_address_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_ipv4_address_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_ipv6_address_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_match_condition_rmap_match_condition_ipv6_address_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_distance_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_distance_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_rt_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_rt_destroy(struct nb_cb_destroy_args *args);
|
bgpd: Implement Node Target Extended Communities
kttps://datatracker.ietf.org/doc/html/draft-ietf-idr-node-target-ext-comm
unet> sh r1 vtysh -c 'sh ip bgp nei 192.168.1.2 adver'
BGP table version is 1, local router ID is 192.168.1.1, vrf id 0
Default local pref 100, local AS 65001
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.10.10.10/32 0.0.0.0 0 32768 i
Total number of prefixes 1
unet> sh r1 vtysh -c 'sh ip bgp nei 192.168.1.3 adver'
BGP table version is 1, local router ID is 192.168.1.1, vrf id 0
Default local pref 100, local AS 65001
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.10.10.10/32 0.0.0.0 0 32768 i
Total number of prefixes 1
unet> sh r2 vtysh -c 'show ip bgp 10.10.10.10/32'
% Network not in table
unet> sh r3 vtysh -c 'show ip bgp 10.10.10.10/32'
BGP routing table entry for 10.10.10.10/32, version 1
Paths: (1 available, best #1, table default)
Advertised to non peer-group peers:
192.168.1.1
65001
192.168.1.1 from 192.168.1.1 (192.168.1.1)
Origin IGP, metric 0, valid, external, best (First path received)
Extended Community: NT:192.168.1.3 NT:192.168.1.4
Last update: Tue Apr 11 23:19:33 2023
unet>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-04-05 14:51:45 +02:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_nt_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_nt_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_soo_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_soo_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_ipv4_address_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_ipv4_address_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_ipv4_nexthop_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_ipv4_nexthop_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_ipv6_address_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_ipv6_address_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_preference_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_preference_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_label_index_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_label_index_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_local_pref_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_local_pref_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_weight_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_weight_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_origin_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_origin_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_originator_id_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_originator_id_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_table_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_table_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_atomic_aggregate_create(struct nb_cb_create_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_atomic_aggregate_destroy(struct nb_cb_destroy_args *args);
|
2022-10-12 20:06:47 +02:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_aigp_metric_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_aigp_metric_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_prepend_as_path_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_prepend_as_path_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_last_as_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_last_as_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_exclude_as_path_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_exclude_as_path_destroy(struct nb_cb_destroy_args *args);
|
bgpd: Add `set as-path replace <any|ASN>` cmd for route-maps
```
route-map tstas permit 10
set as-path replace 1
exit
```
Before:
```
donatas-laptop(config-router-af)# do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 13
Paths: (1 available, best #1, table default)
Advertised to non peer-group peers:
192.168.10.65
65000 1 2 3 123
192.168.10.65 from 192.168.10.65 (10.10.10.11)
Origin IGP, metric 0, valid, external, best (First path received)
Last update: Mon Apr 25 10:39:50 2022
```
After:
```
donatas-laptop(config-router-af)# do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 15
Paths: (1 available, best #1, table default)
Advertised to non peer-group peers:
192.168.10.65
65000 65010 2 3 123
192.168.10.65 from 192.168.10.65 (10.10.10.11)
Origin IGP, metric 0, valid, external, best (First path received)
Last update: Mon Apr 25 10:40:16 2022
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-25 09:34:36 +02:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_replace_as_path_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_replace_as_path_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_community_none_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_community_none_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_community_string_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_community_string_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_large_community_none_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_large_community_none_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_large_community_string_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_large_community_string_destroy(struct nb_cb_destroy_args *args);
|
2024-02-23 23:06:41 +01:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_aggregator_create(
|
|
|
|
struct nb_cb_create_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_aggregator_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
void lib_route_map_entry_set_action_rmap_set_action_aggregator_finish(struct nb_cb_apply_finish_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_aggregator_aggregator_asn_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_aggregator_aggregator_address_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_comm_list_num_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_comm_list_num_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_comm_list_num_extended_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_comm_list_num_extended_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_comm_list_name_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_comm_list_name_destroy(struct nb_cb_destroy_args *args);
|
2024-02-23 23:06:41 +01:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_create(
|
|
|
|
struct nb_cb_create_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
void lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_finish(struct nb_cb_apply_finish_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_lb_type_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_bandwidth_modify(struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_bandwidth_destroy(struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_two_octet_as_specific_modify(struct nb_cb_modify_args *args);
|
2021-08-02 21:27:55 +02:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_none_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_none_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2021-05-21 11:04:00 +02:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_evpn_gateway_ip_ipv4_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_evpn_gateway_ip_ipv4_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_evpn_gateway_ip_ipv6_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_evpn_gateway_ip_ipv6_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2023-05-22 15:36:06 +02:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_color_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_color_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
bgpd: add resolution for l3vpn traffic over gre interfaces
When a route imported from l3vpn is analysed, the nexthop from default
VRF is looked up against a valid MPLS path. Generally, this is done on
backbones with a MPLS signalisation transport layer like LDP. Generally,
the BGP connection is multiple hops away. That scenario is already
working.
There is case where it is possible to run L3VPN over GRE interfaces, and
where there is no LSP path over that GRE interface: GRE is just here to
tunnel MPLS traffic. On that case, the nexthop given in the path does not
have MPLS path, but should be authorized to convey MPLS traffic provided
that the user permits it via a configuration command.
That commit introduces a new command that can be activated in route-map:
> set l3vpn next-hop encapsulation gre
That command authorizes the nexthop tracking engine to accept paths that
o have a GRE interface as output, independently of the presence of an LSP
path or not.
A configuration example is given below. When bgp incoming vpnv4 updates
are received, the nexthop of NLRI is 192.168.0.2. Based on nexthop
tracking service from zebra, BGP knows that the output interface to reach
192.168.0.2 is r1-gre0. Because that interface is not MPLS based, but is
a GRE tunnel, then the update will be using that nexthop to be installed.
interface r1-gre0
ip address 192.168.0.1/24
exit
router bgp 65500
bgp router-id 1.1.1.1
neighbor 192.168.0.2 remote-as 65500
!
address-family ipv4 unicast
no neighbor 192.168.0.2 activate
exit-address-family
!
address-family ipv4 vpn
neighbor 192.168.0.2 activate
neighbor 192.168.0.2 route-map rmap in
exit-address-family
exit
!
router bgp 65500 vrf vrf1
bgp router-id 1.1.1.1
no bgp network import-check
!
address-family ipv4 unicast
network 10.201.0.0/24
redistribute connected
label vpn export 101
rd vpn export 444:1
rt vpn both 52:100
export vpn
import vpn
exit-address-family
exit
!
route-map rmap permit 1
set l3vpn next-hop encapsulation gre
exit
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-09-20 11:50:52 +02:00
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_l3vpn_nexthop_encapsulation_modify(
|
|
|
|
struct nb_cb_modify_args *args);
|
|
|
|
int lib_route_map_entry_set_action_rmap_set_action_l3vpn_nexthop_encapsulation_destroy(
|
|
|
|
struct nb_cb_destroy_args *args);
|
2020-10-30 08:45:43 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|