summaryrefslogtreecommitdiffstats
path: root/bgpd/subdir.am (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Revert "bgpd: optimal router reflection cli and fsm changes"Donatas Abraitis2023-01-171-2/+0
| | | | | | This reverts commit 70cd87ca02125616e9f61f97ab504248c935bd83. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* bgpd: AFI option to query nexthops based on AFIPooja Jagadeesh Doijode2023-01-051-0/+1
| | | | | | | | | | Added ipv4 and ipv6 option to existing "show bgp nexthop" command to be able to query nexthops that belong to a particular address-family. Also fixed the warnings of MR 12171 Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
* bgpd: Implement SNMP BGP4V2-MIB (bgp4V2PeerEntry)Donatas Abraitis2022-11-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://www.circitor.fr/Mibs/Mib/B/BGP4V2-MIB.mib Compared with Arista BGP4V2-MIB implementation, almost identical (despite that Arista has slightly some additional MIBs). Example: ``` iso.3.6.1.3.5.1.1.2.1.1.1.4.192.168.10.64 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.1.1.4.192.168.10.65 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.1.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.1.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.1.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.2.1.4.192.168.10.64 = INTEGER: 0 iso.3.6.1.3.5.1.1.2.1.2.1.4.192.168.10.65 = INTEGER: 0 iso.3.6.1.3.5.1.1.2.1.2.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = INTEGER: 2 iso.3.6.1.3.5.1.1.2.1.2.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = INTEGER: 0 iso.3.6.1.3.5.1.1.2.1.2.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = INTEGER: 0 iso.3.6.1.3.5.1.1.2.1.3.1.4.192.168.10.64 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.3.1.4.192.168.10.65 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.3.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Hex-STRING: 2A 02 47 80 01 23 00 00 00 00 00 00 00 00 00 01 iso.3.6.1.3.5.1.1.2.1.3.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.3.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.4.1.4.192.168.10.64 = INTEGER: 0 iso.3.6.1.3.5.1.1.2.1.4.1.4.192.168.10.65 = INTEGER: 0 iso.3.6.1.3.5.1.1.2.1.4.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = INTEGER: 2 iso.3.6.1.3.5.1.1.2.1.4.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = INTEGER: 0 iso.3.6.1.3.5.1.1.2.1.4.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = INTEGER: 0 iso.3.6.1.3.5.1.1.2.1.5.1.4.192.168.10.64 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.5.1.4.192.168.10.65 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.5.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Hex-STRING: 2A 02 47 80 01 23 00 00 00 00 00 00 00 00 00 02 iso.3.6.1.3.5.1.1.2.1.5.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.5.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.6.1.4.192.168.10.64 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.6.1.4.192.168.10.65 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.6.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 179 iso.3.6.1.3.5.1.1.2.1.6.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.6.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.7.1.4.192.168.10.64 = Gauge32: 65000 iso.3.6.1.3.5.1.1.2.1.7.1.4.192.168.10.65 = Gauge32: 65000 iso.3.6.1.3.5.1.1.2.1.7.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 65000 iso.3.6.1.3.5.1.1.2.1.7.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 65000 iso.3.6.1.3.5.1.1.2.1.7.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 65000 iso.3.6.1.3.5.1.1.2.1.8.1.4.192.168.10.64 = Hex-STRING: C0 00 02 FC iso.3.6.1.3.5.1.1.2.1.8.1.4.192.168.10.65 = Hex-STRING: C0 00 02 FC iso.3.6.1.3.5.1.1.2.1.8.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Hex-STRING: C0 00 02 FC iso.3.6.1.3.5.1.1.2.1.8.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Hex-STRING: C0 00 02 FC iso.3.6.1.3.5.1.1.2.1.8.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Hex-STRING: C0 00 02 FC iso.3.6.1.3.5.1.1.2.1.9.1.4.192.168.10.64 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.9.1.4.192.168.10.65 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.9.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 54814 iso.3.6.1.3.5.1.1.2.1.9.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.9.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 0 iso.3.6.1.3.5.1.1.2.1.10.1.4.192.168.10.64 = Gauge32: 65002 iso.3.6.1.3.5.1.1.2.1.10.1.4.192.168.10.65 = Gauge32: 65002 iso.3.6.1.3.5.1.1.2.1.10.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 65002 iso.3.6.1.3.5.1.1.2.1.10.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 65001 iso.3.6.1.3.5.1.1.2.1.10.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 65001 iso.3.6.1.3.5.1.1.2.1.11.1.4.192.168.10.64 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.11.1.4.192.168.10.65 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.11.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = STRING: "dddd" iso.3.6.1.3.5.1.1.2.1.11.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.11.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Hex-STRING: 00 00 00 00 iso.3.6.1.3.5.1.1.2.1.12.1.4.192.168.10.64 = INTEGER: 2 iso.3.6.1.3.5.1.1.2.1.12.1.4.192.168.10.65 = INTEGER: 2 iso.3.6.1.3.5.1.1.2.1.12.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = INTEGER: 2 iso.3.6.1.3.5.1.1.2.1.12.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = INTEGER: 2 iso.3.6.1.3.5.1.1.2.1.12.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = INTEGER: 2 iso.3.6.1.3.5.1.1.2.1.13.1.4.192.168.10.64 = INTEGER: 1 iso.3.6.1.3.5.1.1.2.1.13.1.4.192.168.10.65 = INTEGER: 3 iso.3.6.1.3.5.1.1.2.1.13.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = INTEGER: 1 iso.3.6.1.3.5.1.1.2.1.13.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = INTEGER: 3 iso.3.6.1.3.5.1.1.2.1.13.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = INTEGER: 1 iso.3.6.1.3.5.1.1.2.1.14.1.4.192.168.10.64 = Hex-STRING: 4F 4B 00 iso.3.6.1.3.5.1.1.2.1.14.1.4.192.168.10.65 = Hex-STRING: 4F 4B 32 00 iso.3.6.1.3.5.1.1.2.1.14.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Hex-STRING: 69 70 76 36 00 ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* build, vtysh: extract vtysh commands from .xrefDavid Lamparter2022-10-261-27/+0
| | | | | | | | | | | | | | | | | | | Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bgpd: optimal router reflection cli and fsm changesMadhuri Kuruganti2022-10-121-0/+2
| | | | Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
* bgpd: improve labelpool performance at scaleG. Paul Ziemba2022-08-311-0/+1
| | | | | | | | | | | | | | - double the size of each new chunk request from zebra - use bitfields to track label allocations in a chunk - When allocating: - skip chunks with no free labels - search biggest chunks first - start search in chunk where last search ended - Improve API documentation in comments (bgp_lp_get() and callback) - Tweak formatting of "show bgp labelpool chunks" - Add test features (compiled conditionally on BGP_LABELPOOL_ENABLE_TESTS) Signed-off-by: G. Paul Ziemba <paulz@labn.net>
* Revert "bgpd: bgp northbound callbacks prototypes"Igor Ryzhov2021-08-031-3/+0
| | | | | | This reverts commit a1950c80a570e721503de4cf86de7a247e900781. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* build: fix `AM_LDFLAGS` usage (and gcov)David Lamparter2021-07-211-3/+3
| | | | | | | | | | | | | | | | like the other automake variables, setting `xyz_LDFLAGS` causes `AM_LDFLAGS` to be ignored for `xyz`. For some reason I had in my mind that automake doesn't do this for LDFLAGS, but... it does. (Which is consistent with `_CFLAGS` and co.) So, all the libraries and modules have been ignoring `AM_LDFLAGS` (which includes `SAN_FLAGS` too). Set up new `LIB_LDFLAGS` and `MODULE_LDFLAGS` to handle all of this correctly (and move these bits to a central location.) Fixes: #9034 Fixes: 0c4285d77eb ("build: properly split CFLAGS from AC_CFLAGS") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: adapt to version 2 of libyangChristian Hopps2021-05-131-2/+2
| | | | | | | | | Compile with v2.0.0 tag of `libyang2` branch of: https://github.com/CESNET/libyang staticd init load time of 10k routes now 6s vs ly1 time of 150s Signed-off-by: Christian Hopps <chopps@labn.net>
* bgpd: Create BGP alias names for community/large-communityDonatas Abraitis2021-05-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Show alias name instead of numerical value in `show bgp <prefix>. E.g.: ``` root@exit1-debian-9:~/frr# vtysh -c 'sh run' | grep 'bgp community alias' bgp community alias 65001:123 community-1 bgp community alias 65001:123:1 lcommunity-1 root@exit1-debian-9:~/frr# ``` ``` exit1-debian-9# sh ip bgp 172.16.16.1/32 BGP routing table entry for 172.16.16.1/32, version 21 Paths: (2 available, best #2, table default) Advertised to non peer-group peers: 65030 192.168.0.2 from home-spine1.donatas.net(192.168.0.2) (172.16.16.1) Origin incomplete, metric 0, valid, external, best (Neighbor IP) Community: 65001:12 65001:13 community-1 65001:65534 Large Community: lcommunity-1 65001:123:2 Last update: Fri Apr 16 12:51:27 2021 exit1-debian-9# ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* build: properly split CFLAGS from AC_CFLAGSDavid Lamparter2021-04-211-5/+2
| | | | | | | | `CFLAGS` is a "user variable", not intended to be controlled by configure itself. Let's put all the "important" stuff in AC_CFLAGS and only leave debug/optimization controls in CFLAGS. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: remove *.conf.sample filesQuentin Young2021-04-091-5/+0
| | | | | | | | | | Most of these are many, many years out of date. All of them vary randomly in quality. They show up by default in packages where they aren't really useful now that we use integrated config. Remove them. The useful ones have been moved to the docs. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* bgpd: North-bound implementation for bgp rmapsSarita Patra2021-03-301-0/+5
| | | | | | | | This commit introduces the implementation for the north-bound callbacks for the bgp-specific route-map match and set clauses. Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com> Signed-off-by: Sarita Patra <saritap@vmware.com>
* bgpd: Convert RPKI states to an enum and use themDonald Sharp2021-03-261-0/+1
| | | | | | Convert the rpki states to an enum and use them in the code Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* snmp: change -std=gnu99 to -std=gnu11David Lamparter2021-03-171-1/+1
| | | | | | | The point of the `-std=gnu99` was to override a `-std=c99` that may be coming in from net-snmp. However, we want C11, not C99. Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd: add MPLSVPN SNMP boilerplatePat Ruddy2021-02-021-1/+2
| | | | | | | Add infrastructure for mplsvpn MIB (RFC-4382) and the top level ScalarGroup. Signed-off-by: Pat Ruddy <pat@voltanet.io>
* Merge pull request #7639 from qlyoung/frr-luaRuss White2021-01-191-0/+2
|\ | | | | Scripting
| * bgpd: update routemap scripting exampleQuentin Young2020-12-021-0/+2
| | | | | | | | | | | | | | - Change from "match command <foo>" to "match script <script>" - Use new scripting API Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* | bgpd: add show commands for bgp labelpoolPat Ruddy2021-01-041-0/+1
|/ | | | | | | These commands allow the bgp labelpool lists and counts to be viewed for debug purposes. Signed-off-by: Pat Ruddy <pat@voltanet.io>
* bgpd: conditional advertisementMadhuri Kuruganti2020-10-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented as per the feature description given in the source link. Descriprion: The BGP conditional advertisement feature uses the non-exist-map or exist-map and the advertise-map keywords of the neighbor advertise-map command in order to track routes by the route prefix. non-exist-map : If a route prefix is not present in output of the non-exist-map command, then the route specified by the advertise-map command is announced. exist-map : If a route prefix is present in output of the exist-map command, then the route specified by the advertise-map command is announced. The conditional BGP announcements are sent in addition to the normal announcements that a BGP router sends to its peers. The conditional advertisement process is triggered by the BGP scanner process, which runs every 60 seconds. This means that the maximum time for the conditional advertisement to take effect is 60 seconds. The conditional advertisement can take effect sooner, depending on when the tracked route is removed from the BGP table and when the next instance of the BGP scanner occurs. Sample Configuration on DUT --------------------------- Router2# show running-config Building configuration... Current configuration: ! frr version 7.6-dev-MyOwnFRRVersion frr defaults traditional hostname router log file /var/log/frr/bgpd.log log syslog informational hostname Router2 service integrated-vtysh-config ! debug bgp updates in debug bgp updates out ! debug route-map ! ip route 200.200.0.0/16 blackhole ipv6 route 2001:db8::200/128 blackhole ! interface enp0s9 ip address 10.10.10.2/24 ! interface enp0s10 ip address 10.10.20.2/24 ! interface lo ip address 2.2.2.2/24 ipv6 address 2001:db8::2/128 ! router bgp 2 bgp log-neighbor-changes no bgp ebgp-requires-policy neighbor 10.10.10.1 remote-as 1 neighbor 10.10.20.3 remote-as 3 ! address-family ipv4 unicast network 2.2.2.0/24 network 200.200.0.0/16 neighbor 10.10.10.1 soft-reconfiguration inbound neighbor 10.10.10.1 advertise-map ADVERTISE non-exist-map CONDITION neighbor 10.10.20.3 soft-reconfiguration inbound exit-address-family ! address-family ipv6 unicast network 2001:db8::2/128 network 2001:db8::200/128 neighbor 10.10.10.1 activate neighbor 10.10.10.1 soft-reconfiguration inbound neighbor 10.10.10.1 advertise-map ADVERTISE_6 non-exist-map CONDITION_6 neighbor 10.10.20.3 activate neighbor 10.10.20.3 soft-reconfiguration inbound exit-address-family ! access-list CONDITION seq 5 permit 3.3.3.0/24 access-list ADVERTISE seq 5 permit 2.2.2.0/24 access-list ADVERTISE seq 6 permit 200.200.0.0/16 access-list ADVERTISE seq 7 permit 20.20.0.0/16 ! ipv6 access-list ADVERTISE_6 seq 5 permit 2001:db8::2/128 ipv6 access-list CONDITION_6 seq 5 permit 2001:db8::3/128 ! route-map ADVERTISE permit 10 match ip address ADVERTISE ! route-map CONDITION permit 10 match ip address CONDITION ! route-map ADVERTISE_6 permit 10 match ipv6 address ADVERTISE_6 ! route-map CONDITION_6 permit 10 match ipv6 address CONDITION_6 ! line vty ! end Router2# Withdraw when non-exist-map prefixes present in BGP table: ---------------------------------------------------------- Router2# show ip bgp all wide For address family: IPv4 Unicast BGP table version is 8, local router ID is 2.2.2.2, vrf id 0 Default local pref 100, local AS 2 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 Network Next Hop Metric LocPrf Weight Path *> 1.1.1.0/24 10.10.10.1 0 0 1 i *> 2.2.2.0/24 0.0.0.0 0 32768 i *> 3.3.3.0/24 10.10.20.3 0 0 3 i *> 200.200.0.0/16 0.0.0.0 0 32768 i Displayed 4 routes and 4 total paths For address family: IPv6 Unicast BGP table version is 8, local router ID is 2.2.2.2, vrf id 0 Default local pref 100, local AS 2 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 Network Next Hop Metric LocPrf Weight Path *> 2001:db8::1/128 fe80::a00:27ff:fecb:ad57 0 0 1 i *> 2001:db8::2/128 :: 0 32768 i *> 2001:db8::3/128 fe80::a00:27ff:fe76:6738 0 0 3 i *> 2001:db8::200/128 :: 0 32768 i Displayed 4 routes and 4 total paths Router2# Router2# show ip bgp neighbors 10.10.10.1 BGP neighbor is 10.10.10.1, remote AS 1, local AS 2, external link !--- Output suppressed. For address family: IPv4 Unicast Update group 9, subgroup 5 Packet Queue length 0 Inbound soft reconfiguration allowed Community attribute sent to this neighbor(all) Condition NON_EXIST, Condition-map *CONDITION, Advertise-map *ADVERTISE, status: Withdraw 1 accepted prefixes For address family: IPv6 Unicast Update group 10, subgroup 6 Packet Queue length 0 Inbound soft reconfiguration allowed Community attribute sent to this neighbor(all) Condition NON_EXIST, Condition-map *CONDITION_6, Advertise-map *ADVERTISE_6, status: Withdraw 1 accepted prefixes !--- Output suppressed. Router2# Here 2.2.2.0/24 & 200.200.0.0/16 (prefixes in advertise-map) are withdrawn by conditional advertisement scanner as the prefix(3.3.3.0/24) specified by non-exist-map is present in BGP table. Router2# show ip bgp all neighbors 10.10.10.1 advertised-routes wide For address family: IPv4 Unicast BGP table version is 8, local router ID is 2.2.2.2, vrf id 0 Default local pref 100, local AS 2 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 Network Next Hop Metric LocPrf Weight Path *> 1.1.1.0/24 0.0.0.0 0 1 i *> 3.3.3.0/24 0.0.0.0 0 3 i Total number of prefixes 2 For address family: IPv6 Unicast BGP table version is 8, local router ID is 2.2.2.2, vrf id 0 Default local pref 100, local AS 2 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 Network Next Hop Metric LocPrf Weight Path *> 2001:db8::1/128 :: 0 1 i *> 2001:db8::3/128 :: 0 3 i *> 2001:db8::200/128 :: 0 32768 i Total number of prefixes 3 Router2# Advertise when non-exist-map prefixes not present in BGP table: --------------------------------------------------------------- After Removing 3.3.3.0/24 (prefix present in non-exist-map), 2.2.2.0/24 & 200.200.0.0/16 (prefixes present in advertise-map) are advertised Router2# show ip bgp all wide For address family: IPv4 Unicast BGP table version is 9, local router ID is 2.2.2.2, vrf id 0 Default local pref 100, local AS 2 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 Network Next Hop Metric LocPrf Weight Path *> 1.1.1.0/24 10.10.10.1 0 0 1 i *> 2.2.2.0/24 0.0.0.0 0 32768 i *> 200.200.0.0/16 0.0.0.0 0 32768 i Displayed 3 routes and 3 total paths For address family: IPv6 Unicast BGP table version is 9, local router ID is 2.2.2.2, vrf id 0 Default local pref 100, local AS 2 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 Network Next Hop Metric LocPrf Weight Path *> 2001:db8::1/128 fe80::a00:27ff:fecb:ad57 0 0 1 i *> 2001:db8::2/128 :: 0 32768 i *> 2001:db8::200/128 :: 0 32768 i Displayed 3 routes and 3 total paths Router2# Router2# show ip bgp neighbors 10.10.10.1 !--- Output suppressed. For address family: IPv4 Unicast Update group 9, subgroup 5 Packet Queue length 0 Inbound soft reconfiguration allowed Community attribute sent to this neighbor(all) Condition NON_EXIST, Condition-map *CONDITION, Advertise-map *ADVERTISE, status: Advertise 1 accepted prefixes For address family: IPv6 Unicast Update group 10, subgroup 6 Packet Queue length 0 Inbound soft reconfiguration allowed Community attribute sent to this neighbor(all) Condition NON_EXIST, Condition-map *CONDITION_6, Advertise-map *ADVERTISE_6, status: Advertise 1 accepted prefixes !--- Output suppressed. Router2# Router2# show ip bgp all neighbors 10.10.10.1 advertised-routes wide For address family: IPv4 Unicast BGP table version is 9, local router ID is 2.2.2.2, vrf id 0 Default local pref 100, local AS 2 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 Network Next Hop Metric LocPrf Weight Path *> 1.1.1.0/24 0.0.0.0 0 1 i *> 2.2.2.0/24 0.0.0.0 0 32768 i *> 200.200.0.0/16 0.0.0.0 0 32768 i Total number of prefixes 3 For address family: IPv6 Unicast BGP table version is 9, local router ID is 2.2.2.2, vrf id 0 Default local pref 100, local AS 2 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 Network Next Hop Metric LocPrf Weight Path *> 2001:db8::1/128 :: 0 1 i *> 2001:db8::2/128 :: 0 32768 i *> 2001:db8::200/128 :: 0 32768 i Total number of prefixes 3 Router2# Signed-off-by: Madhuri Kuruganti <k.madhuri@samsung.com>
* bgpd: add basic packet-related tracepointsQuentin Young2020-10-231-2/+4
| | | | | | | | Add tracepoints for: - packet pushed to internal rx queue - packet dequeued from rx queue and processed Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* bgpd: bgp northbound callbacks prototypesChirag Shah2020-10-031-0/+3
| | | | | | | | This commit contains splitting of auto-generated bgp northbound callbacks into separate files. Include the files into bgp makefile. Signed-off-by: Chirag Shah <chirag@nvidia.com>
* *: add bgp yang files into makefilesChirag Shah2020-10-031-0/+13
| | | | Signed-off-by: Chirag Shah <chirag@nvidia.com>
* vtysh: dynamically generate the list of daemons for commandsIgor Ryzhov2020-10-021-0/+2
| | | | | | | Some daemons were actually missing from the static definitions: nhrpd, babeld, eigrpd and bfdd. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* bgpd: pull the multihoming code out to a separate fileAnuradha Karuppiah2020-08-051-0/+3
| | | | | | | | | | Re-org only; no other code changes. This is being done to make maintanence of MH functionality (which will have more code added to it) easy. The code moved here was originally committed via - 'commit 50f74cf13105 ("*: support for evpn type-4 route")' Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* build: make clippy Makefile rules nicerDavid Lamparter2020-04-271-15/+9
| | | | | | | These are easy to get subtly wrong, and doing so can cause nondeterministic failures when racing in parallel builds. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: use VPATH for vtysh_scanDavid Lamparter2020-04-271-17/+17
| | | | | | No need to put $(top_srcdir) everywhere. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* doc: rename man pages to frr-*David Lamparter2020-01-151-1/+1
| | | | | | | | The vrrpd one conflicts with the standalone vrrpd package; also we're installing daemons to /usr/lib/frr on some systems so they're not on PATH. Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd: remove redundant VNC build specsDavid Lamparter2019-12-131-8/+0
| | | | | | | rfapi_descriptor_rfp_utils.c is already built into libbgp.a and these include paths have no effect at all. Signed-off-by: David Lamparter <equinox@diac24.net>
* build: make BMP optionalDavid Lamparter2019-08-301-0/+2
| | | | | | Sigh. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bgpd/bmp: BMP implementationDavid Lamparter2019-08-301-0/+4
| | | | | | | | This implements BMP. There's no fine-grained history here, the non-BMP preparations are already split out from here so all that remains is BMP proper. Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd/bmp: convert BMP code into moduleDavid Lamparter2019-08-301-1/+4
| | | | | | | This is mostly here for documentation purposes to show how some code is converted into a module. Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd/bmp: Initial BMP implementation.Yasuhiro Ohara2019-08-301-0/+2
| | | | | | | | This is the initial BMP skeleton from Yasuhiro Ohara. (License/Signoff note: code published on github as GPLv2+.) Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd: vrl source-vrf route map filterChirag Shah2019-02-191-0/+2
| | | | | | | | | | | | | | | | | | | | | For VRF route leak, enable route map filter based on "source-vrf" check. Implemented match filter rule for "source-vrf" which compares leaked routes original vrf_id (where it leaked from) during importing into target VRF. Ticket:CM-23776 Reviewed By: Testing Done: Configure vrf route leak from vrf1 to vrf2, configure import vrf under vrf2 along with route-map with source-vrf filter. Add and remove source-vrf filter and checked routes were added and removed to vrf2 table via vpn (default) table. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* bgpd: fix automake fart under MSANQuentin Young2019-02-151-2/+5
| | | | | | | | | | | | | "When building without VNC, automake sees that the `bgpd_bgpd_CFLAGS` variable exists, although it is only set in the VNC-enabled case... but since the variable exists, it unconditionally drops `AM_CFLAGS` for the two bgp targets and uses `bgpd_bgpd_CFLAGS` instead, which will contain... _nothing_." This was breaking builds of bgpd binaries with MSAN enabled. Signed-off-by: David Lamparter <equinox@diac24.net> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* build: fix a whole bunch of *FLAGSDavid Lamparter2019-01-301-4/+4
| | | | | | | | | - some target_CFLAGS that needed to include AM_CFLAGS didn't do so - libyang/sysrepo/sqlite3/confd CFLAGS + LIBS weren't used at all - consistently use $(FOO_CFLAGS) instead of @FOO_CFLAGS@ - 2 dependencies were missing for clippy Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #3198 from donaldsharp/mac_rejectionRenato Westphal2019-01-101-0/+2
|\ | | | | Mac rejection
| * bgpd: Add code to dump the forthcoming mac hashDonald Sharp2018-12-121-0/+2
| | | | | | | | | | | | | | | | Add a bit of code that allows us to dump the mac hash. Future commits will actually add entries to the mac hash and then operate on it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | *: remove all MIBs for DFSG complianceDavid Lamparter2018-12-141-2/+0
|/ | | | | | | | | cf. https://wiki.debian.org/NonFreeIETFDocuments These MIBs were in our git purely for documentation purposes, they are not installed and not needed for building SNMP support. Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd: Re-use TX Addpath IDs where possibleMitch Skiba2018-11-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this patch is to address a concerning behavior of tx-addpath-bestpath-per-AS. Prior to this patch, all paths' TX ID was pre-determined as the path was received from a peer. However, this meant that any time the path selected as best from an AS changed, bgpd had no choice but to withdraw the previous best path, and advertise the new best-path under a new TX ID. This could cause significant network disruption, especially for the subset of prefixes coming from only one AS that were also communicated over a bestpath-per-AS session. The patch's general approach is best illustrated by txaddpath_update_ids. After a bestpath run (required for best-per-AS to know what will and will not be sent as addpaths) ID numbers will be stripped from paths that no longer need to be sent, and held in a pool. Then, paths that will be sent as addpaths and do not already have ID numbers will allocate new ID numbers, pulling first from that pool. Finally, anything left in the pool will be returned to the allocator. In order for this to work, ID numbers had to be split by strategy. The tx-addpath-All strategy would keep every ID number "in use" constantly, preventing IDs from being transferred to different paths. Rather than create two variables for ID, this patch create a more generic array that will easily enable more addpath strategies to be implemented. The previously described ID manipulations will happen per addpath strategy, and will only be run for strategies that are enabled on at least one peer. Finally, the ID numbers are allocated from an allocator that tracks per AFI/SAFI/Addpath Strategy which IDs are in use. Though it would be very improbable, there was the possibility with the free-running counter approach for rollover to cause two paths on the same prefix to get assigned the same TX ID. As remote as the possibility is, we prefer to not leave it to chance. This ID re-use method is not perfect. In some cases you could still get withdraw-then-add behaviors where not strictly necessary. In the case of bestpath-per-AS this requires one AS to advertise a prefix for the first time, then a second AS withdraws that prefix, all within the space of an already pending MRAI timer. In those situations a withdraw-then-add is more forgivable, and fixing it would probably require a much more significant effort, as IDs would need to be moved to ADVs instead of paths. Signed-off-by Mitchell Skiba <mskiba@amazon.com>
* bgpd: Add '[no] flood <disable|head-end-replication>'Donald Sharp2018-10-121-0/+2
| | | | | | | | | | | | | Add the '[no] flood <disable|head-end-replication>' command to the l2vpn evpn afi/safi sub commands for bgp. This command when entered as 'flood disable' will turn off type 3 route generation for the transmittal of the type 3 route necessary for BUM replication on the remote VTEP. Additionally it will turn off the BUM handling via the new zebra command, ZEBRA_VXLAN_FLOOD_CONTROL. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* build: fix not building docs w/o sphinxDavid Lamparter2018-09-091-1/+1
| | | | | | Can't build manpages without sphinx-build, oops... Signed-off-by: David Lamparter <equinox@diac24.net>
* build: move RFPLDADD to bgpd/rfp-example/librfpDavid Lamparter2018-09-081-4/+2
| | | | | | | This makes it slightly easier to replace the stub RFP code with an external implementation. Signed-off-by: David Lamparter <equinox@diac24.net>
* vtysh: make RPKI node non-conditionalDavid Lamparter2018-09-081-2/+0
| | | | | | | | | | Whether or not RPKI is enabled during build shouldn't really influence vtysh; the user can always manually install bgpd_rpki.so later and it should work. This also means that the behaviour of "RPKI module not loaded" is consistent regardless of whether it was a compile-time or runtime decision. Signed-off-by: David Lamparter <equinox@diac24.net>
* build: move vtysh & manpage listings to subdir.amDavid Lamparter2018-09-081-0/+28
| | | | | | | Since we're now building through one large Makefile, we can easily put things with their daemons and crossreference nicely. Signed-off-by: David Lamparter <equinox@diac24.net>
* build: non-recursive bgpd & rfpDavid Lamparter2018-09-081-0/+197
Note: no more --with-rfp-path on configure - badly messing with the build system like this really isn't how to do a conditional external dependency. Signed-off-by: David Lamparter <equinox@diac24.net>