mirror_frr/bgpd
Philippe Guibert 1bb550b63c 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>
2022-09-05 22:26:25 +02:00
..
rfapi bgpd: Fix test for matching UN prefix and the peer 2022-08-30 12:06:19 +03:00
rfp-example *: Properly use memset() when zeroing 2022-05-11 14:08:47 +03:00
.gitignore
bgp_addpath_types.h
bgp_addpath.c bgpd, lib, staticd, tests: Convert to using FOREACH_AFI_SAFI 2020-11-14 18:53:03 -05:00
bgp_addpath.h
bgp_advertise.c bgpd: Convert from bgp_clock() to monotime() 2022-08-24 08:23:40 -04:00
bgp_advertise.h bgpd: Rename baa_new/baa_free/etc functions to be human-readable 2022-07-25 16:45:06 +03:00
bgp_aspath.c bgpd: Do not check if the whole as-path has target ASN when using as-override 2022-07-29 20:43:22 +03:00
bgp_aspath.h bgpd: Do not check if the whole as-path has target ASN when using as-override 2022-07-29 20:43:22 +03:00
bgp_attr_evpn.c *: Properly use memset() when zeroing 2022-05-11 14:08:47 +03:00
bgp_attr_evpn.h bgpd: Fixing memcmp to avoid coverity issue 2022-01-31 21:50:50 -08:00
bgp_attr.c bgpd: Treat as withdraw if we receive as path with AS_SET / AS_CONFED_SET 2022-08-15 21:41:15 +03:00
bgp_attr.h bgpd: add resolution for l3vpn traffic over gre interfaces 2022-09-05 22:26:25 +02:00
bgp_bfd.c bgpd: Replace zlog_info -> zlog_debug under BGP_DEBUG() 2022-06-21 11:59:52 +03:00
bgp_bfd.h bgpd: improve BFD with timers configuration 2021-03-23 12:40:11 -03:00
bgp_bmp.c Merge pull request #11691 from mxyns/bmp-vpnv4monupd-fix 2022-08-01 07:49:18 -04:00
bgp_bmp.h bmp: add a interface source to bmp connect command 2022-06-16 12:51:11 +02:00
bgp_btoa.c bgpd: Convert inet_ntoa to %pI4/inet_ntop 2020-10-18 11:22:30 +03:00
bgp_clist.c Revert "bgpd: Drop internet community check from community_list_match()" 2022-08-24 08:46:56 +03:00
bgp_clist.h bgpd: Align bgp_clist.h to our standards 2022-05-12 10:20:28 -04:00
bgp_community_alias.c bgpd: Fix memory leak for community alias 2022-07-16 16:18:07 +03:00
bgp_community_alias.h bgpd: fix memory leaks in bgp_alias2community_str 2021-08-11 12:09:15 +03:00
bgp_community.c bgpd: Fix memory leak for community stuff 2022-07-16 16:41:31 +03:00
bgp_community.h bgpd: Align bgp_community.h to our standards 2022-05-12 10:20:28 -04:00
bgp_conditional_adv.c bgpd: apply cond-adv policy to update group 2022-08-11 10:58:17 -04:00
bgp_conditional_adv.h bgpd: add knob to config cond-adv scanner period 2021-07-13 13:19:14 -04:00
bgp_damp.c bgpd: Convert from bgp_clock() to monotime() 2022-08-24 08:23:40 -04:00
bgp_damp.h bgpd: Align bgp_damp.h to our standards 2022-05-12 10:20:28 -04:00
bgp_debug.c Merge pull request #11093 from donaldsharp/allow_martians 2022-06-28 10:38:57 -04:00
bgp_debug.h bgpd: Make bgp_debug.[ch] take const struct peer * and return bool 2022-05-13 08:40:41 -04:00
bgp_dump.c bgpd: Convert from bgp_clock() to monotime() 2022-08-24 08:23:40 -04:00
bgp_dump.h bgpd: Align bgp_dump.h to our standards 2022-05-12 10:20:28 -04:00
bgp_ecommunity.c bgpd: Rename ecomm_intersect() to ecommunity_include() 2022-08-19 12:50:29 +03:00
bgp_ecommunity.h bgpd: Rename ecomm_intersect() to ecommunity_include() 2022-08-19 12:50:29 +03:00
bgp_encap_tlv.c *: Replace 4/16 integers to IPV4_MAX_BYTELEN/IPV6_MAX_BYTELEN 2021-07-01 23:54:39 +03:00
bgp_encap_tlv.h
bgp_encap_types.h
bgp_errors.c bgpd: implement SendHoldTimer 2022-05-19 12:14:40 +02:00
bgp_errors.h bgpd: implement SendHoldTimer 2022-05-19 12:14:40 +02:00
bgp_evpn_mh.c bgpd: Cleanup memory for missing hashes 2022-08-30 13:46:26 +03:00
bgp_evpn_mh.h bgpd: remove one unnecessary parameter for evpn-mh 2022-05-09 08:27:20 -04:00
bgp_evpn_private.h bgpd: remove unncessary check for evpn 2022-05-10 22:21:32 -04:00
bgp_evpn_vty.c bgpd: Break immediatelly and print vty_out instead of double checking for JSON 2022-08-30 11:46:00 +03:00
bgp_evpn_vty.h bgpd: CLI to advertise gateway IP overlay index 2021-06-07 17:58:22 -07:00
bgp_evpn.c bgpd: Cleanup memory for missing hashes 2022-08-30 13:46:26 +03:00
bgp_evpn.h bgpd: Convert bgp_addpath_encode_[tr]x() to bool from int 2022-02-01 13:31:16 +02:00
bgp_filter.c bgpd: Free memory for as-path filter if regexp is wrong 2022-07-22 17:43:45 +03:00
bgp_filter.h bgpd: add seqno in bgp as-path access-list policy 2021-03-17 22:06:53 -07:00
bgp_flowspec_private.h bgpd, lib: support for flow_label flowspec type 2020-08-21 13:37:08 +02:00
bgp_flowspec_util.c *: Properly use memset() when zeroing 2022-05-11 14:08:47 +03:00
bgp_flowspec_util.h bgpd: ipv6 flowspec address decoding and validation 2020-08-21 13:37:08 +02:00
bgp_flowspec_vty.c bgpd: Use bgp_attr_[sg]et_ecommunity for struct ecommunity 2022-02-04 15:56:20 +02:00
bgp_flowspec.c *: Properly use memset() when zeroing 2022-05-11 14:08:47 +03:00
bgp_flowspec.h bgpd: flowspec code support for ipv6 2020-08-21 13:37:08 +02:00
bgp_fsm.c Merge pull request #11833 from opensourcerouting/feature/bgp_neighbor_soo 2022-08-30 11:17:53 -04:00
bgp_fsm.h bgpd: Remove various macros that overlap THREAD_OFF 2022-07-21 08:27:36 -04:00
bgp_io.c bgpd: Convert from bgp_clock() to monotime() 2022-08-24 08:23:40 -04:00
bgp_io.h
bgp_keepalives.c *: frr_with_mutex change to follow our standard 2022-07-20 15:50:32 -04:00
bgp_keepalives.h
bgp_label.c bgpd: Drop label_ntop/label_pton functions 2022-06-01 16:45:22 +03:00
bgp_label.h bgpd: Drop label_ntop/label_pton functions 2022-06-01 16:45:22 +03:00
bgp_labelpool.c bgpd: Convert prefix2str to %pFX 2022-08-25 14:35:27 +03:00
bgp_labelpool.h *: require semicolon after DEFINE_<typesafe...> 2021-03-17 06:18:39 +01:00
bgp_lcommunity.c *: Fix spelling of strucutre 2022-04-19 08:19:37 -04:00
bgp_lcommunity.h bgpd: Allow setting BGP [large]community in route-maps 2022-04-09 17:34:06 +03:00
bgp_mac.c bgpd: Generate and advertise gateway IP overlay index with EVPN RT-5 2021-06-07 17:58:22 -07:00
bgp_mac.h
bgp_main.c bgpd: When specifying listen address for bgpd we shouldn't imply no fib flag 2022-08-08 21:30:14 +03:00
bgp_memory.c bgpd: Drop unused memory types 2022-08-30 13:46:14 +03:00
bgp_memory.h bgpd: Drop unused memory types 2022-08-30 13:46:14 +03:00
bgp_mpath.c bgpd: Change single value bitfield to a bool 2022-05-12 10:20:28 -04:00
bgp_mpath.h bgpd: Align bgp_mpath.h to our standards 2022-05-12 10:20:28 -04:00
bgp_mplsvpn_snmp.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
bgp_mplsvpn_snmp.h bgpd: implement mplsL3VpnVrfRtTable 2021-02-02 09:37:13 +00:00
bgp_mplsvpn.c Merge pull request #11833 from opensourcerouting/feature/bgp_neighbor_soo 2022-08-30 11:17:53 -04:00
bgp_mplsvpn.h Merge pull request #11523 from pguibert6WIND/bgp_no_retain 2022-07-26 08:50:59 -04:00
bgp_network.c bgpd: Remove various macros that overlap THREAD_OFF 2022-07-21 08:27:36 -04:00
bgp_network.h bmp: add a interface source to bmp connect command 2022-06-16 12:51:11 +02:00
bgp_nexthop.c bgpd: Drop bnc_str() function 2022-08-25 14:35:28 +03:00
bgp_nexthop.h bgpd: Drop bnc_str() function 2022-08-25 14:35:28 +03:00
bgp_nht.c bgpd: add resolution for l3vpn traffic over gre interfaces 2022-09-05 22:26:25 +02:00
bgp_nht.h bgpd: prevent routes loop through itself 2021-07-12 13:57:36 +02:00
bgp_open.c bgpd: Make sure peer-groups/unnumbered work too with BGP role 2022-06-28 18:32:11 +03:00
bgp_open.h bgpd: Add RFC9234 implementation 2022-06-17 13:14:46 +03:00
bgp_packet.c bgpd: Convert from bgp_clock() to monotime() 2022-08-24 08:23:40 -04:00
bgp_packet.h bgpd: Activate Graceful-Restart when receiving CEASE/HOLDTIME notifications 2022-05-14 21:43:55 +03:00
bgp_pbr.c *: Properly use memset() when zeroing 2022-05-11 14:08:47 +03:00
bgp_pbr.h bgpd: fallback proto icmp/v6 to appropriate l3 filter 2020-08-21 13:37:08 +02:00
bgp_rd.c bgpd: delay "stream_new" in str2prefix_rd() 2022-05-02 09:23:51 -04:00
bgp_rd.h bgpd: support for Ethernet Segments and Type-1/EAD routes 2020-08-05 06:46:12 -07:00
bgp_regex.c
bgp_regex.h
bgp_route.c Merge pull request #11833 from opensourcerouting/feature/bgp_neighbor_soo 2022-08-30 11:17:53 -04:00
bgp_route.h bgpd: add BGP_ATTR_MP_NEXTHOP_LEN_IP6 macro 2022-08-04 17:54:42 +00:00
bgp_routemap_nb_config.c bgpd: add resolution for l3vpn traffic over gre interfaces 2022-09-05 22:26:25 +02:00
bgp_routemap_nb.c bgpd: add resolution for l3vpn traffic over gre interfaces 2022-09-05 22:26:25 +02:00
bgp_routemap_nb.h bgpd: add resolution for l3vpn traffic over gre interfaces 2022-09-05 22:26:25 +02:00
bgp_routemap.c bgpd: add resolution for l3vpn traffic over gre interfaces 2022-09-05 22:26:25 +02:00
bgp_rpki.c bgpd: Do not show polling_period default value in CLI for RPKI 2022-06-21 18:49:10 +03:00
bgp_rpki.h bgpd: Convert RPKI states to an enum and use them 2021-03-26 08:23:33 -04:00
bgp_script.c bgpd: Make sure we pop the table from the stack when decoding struct attr 2022-03-29 17:47:28 +03:00
bgp_script.h bgpd: Update bgp_script encoders and decoders 2021-06-22 05:03:07 +08:00
bgp_snmp.c bgpd: Convert from bgp_clock() to monotime() 2022-08-24 08:23:40 -04:00
bgp_table.c *: use semicolon after printfrr_ext_autoreg_{p,d} 2022-01-14 13:33:57 +01:00
bgp_table.h bgpd: Make sure bgp_dest lock/unlock tracepoints works for LTTng as well 2021-09-23 20:00:54 +03:00
bgp_trace.c *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
bgp_trace.h bgpd: lttng tracepoint for local events received from zebra 2021-10-15 10:37:02 -07:00
bgp_updgrp_adv.c bgpd: Improve indentation in bgp_updgrp_adv.c 2022-07-27 12:17:16 -04:00
bgp_updgrp_packet.c bgpd: Inconsistencies in SNT counters with default-originate 2022-07-06 05:38:35 +00:00
bgp_updgrp.c Merge pull request #11833 from opensourcerouting/feature/bgp_neighbor_soo 2022-08-30 11:17:53 -04:00
bgp_updgrp.h bgpd: Send route update when modifying access/aspath/prefix lists 2022-08-05 15:06:00 +03:00
bgp_vnc_types.h
bgp_vpn.c bgpd: Convert vty_out to vty_json for JSON 2021-11-25 17:51:12 +02:00
bgp_vpn.h
bgp_vty.c Merge pull request #11833 from opensourcerouting/feature/bgp_neighbor_soo 2022-08-30 11:17:53 -04:00
bgp_vty.h Merge pull request #11523 from pguibert6WIND/bgp_no_retain 2022-07-26 08:50:59 -04:00
bgp_zebra.c bgpd: Remove redundant test against ifp for DEBUG messages 2022-08-30 11:35:05 +03:00
bgp_zebra.h bgpd: Align bgp_zebra.h to our standards 2022-05-12 10:20:28 -04:00
bgpd.c Merge pull request #11833 from opensourcerouting/feature/bgp_neighbor_soo 2022-08-30 11:17:53 -04:00
bgpd.conf.sample2
bgpd.h Merge pull request #11833 from opensourcerouting/feature/bgp_neighbor_soo 2022-08-30 11:17:53 -04:00
IMPLEMENTATION.txt
Makefile
subdir.am Revert "bgpd: bgp northbound callbacks prototypes" 2021-08-03 23:36:31 +03:00