Commit Graph

415 Commits

Author SHA1 Message Date
Donald Sharp
b6c386bbbd bgpd: Make the process_queue per bgp process
We currently have a global process queue for handling route
updates in bgp.  This is fine, in general, except there are
places and times where we plug the queue for no new work
during certain peer states of bgp update delay.  If we
happen to be processing multiple bgp instances on startup
why do we want to stop processing in vrf A when vrf B
is in a bit of a pickle?

Also this separation will allow us to start forward thinking
about how to fully integrate pthreads into route processing
in bgp.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-10-21 15:34:47 -04:00
Chirag Shah
bdaadb91e8 bgpd: use common api in bgp_get
Use consolidate api in bgp_get and bgp northbound
create callback.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-12 16:41:39 -07:00
Chirag Shah
ff8a8a7ac1 bgpd: convert global config to transactional cli
Convert global congigurations clis to transactional
clis using northbound plugin callbacks.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-03 11:25:37 -07:00
David Schweizer
c163f2971b
bgpd: set/unset bgpd no-rib option at runtime
* Added vtysh cli commands and functions to set/unset bgp daemons no-rib
  option during runtime and withdraw/announce routes in bgp instances
  RIB from/to Zebra.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2020-09-02 18:20:08 +02:00
vivek
05bd726cfe bgpd: Implement BGP-wide configuration for graceful shutdown
Add support for a BGP-wide setting to enter and exit graceful shutdown.
This will apply to all BGP peers across all BGP instances. Per-instance
configuration is disallowed if the BGP-wide setting is in effect.

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>
2020-09-19 20:38:14 -07:00
vivek
637e5ba492 bgpd: Define function to check if performing graceful shutdown
Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>
2020-09-19 12:50:46 -07:00
Donatas Abraitis
28a54742ca
Merge pull request #7031 from dslicenc/global-bgp-update-delay
Global bgp update delay
2020-09-08 21:43:51 +03:00
Don slice
d70583f78d bgpd: add global config for update-delay
Enhancement to update-delay configuration to allow setting globally
rather than per-instance.  Setting the update-delay is allowed either
per-vrf or globally, but not both at the same time.

Ticket: CM-31096
Signed-off-by: Don Slice <dslice@nvidia.com>
2020-09-08 04:27:01 -07:00
Donatas Abraitis
8336c896fd bgpd: Add neighbor <neigh> shutdown rtt command
This would be useful in cases with lots of peers and shutdown them
automatically if RTT goes above the specified limit.

A host with 512 or more IPv6 addresses has a higher latency due to
ipv6_addr_label(). This method tries to pick the best candidate address
fo outgoing connection and literally increases processing latency.

```
Samples: 28  of event 'cycles', Event count (approx.): 22131542
  Children      Self  Command  Shared Object      Symbol
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] entry_SYSCALL_64_fastpath
  +  100.00%     0.00%  ping6    [unknown]          [.] 0x0df0ad0b8047022a
  +  100.00%     0.00%  ping6    libc-2.17.so       [.] __sendto_nocancel
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] sys_sendto
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] SYSC_sendto
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] sock_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] inet_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] rawv6_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_dst_lookup_flow
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_dst_lookup_tail
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_route_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_dev_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] __ipv6_dev_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_get_saddr_eval
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_addr_label
  +  100.00%   100.00%  ping6    [kernel.kallsyms]  [k] __ipv6_addr_label
  +    0.00%     0.00%  ping6    [kernel.kallsyms]  [k] schedule
```

This is how it works:

```
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
9
~# tc qdisc add dev eth1 root netem delay 120ms
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
89
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
null
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".lastResetDueTo'
"Admin. shutdown"
```

Warning message:
bgpd[14807]: 192.168.0.2 shutdown due to high round-trip-time (200ms > 150ms)

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-09-07 22:30:19 +03:00
Renato Westphal
dcdaabcede
Merge pull request #7046 from qlyoung/fix-various-integer-issues
Fix various integer signedness / overflow issues
2020-09-04 22:33:48 -03:00
Quentin Young
e9faf4be72 bgpd: make flag values explicitly unsigned
When using these flag #defines, by default their types are integers but
they are always used in conjunction with unsigned integers, which
introduces some implicit conversions that really ought to be avoided.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-09-02 16:54:41 -04:00
Sebastien Merle
ef3e0d0476 bgpd: Add support for SR-TE Policies in route-maps
Example configuration:
    route-map SET_SR_POLICY permit 10
     set sr-te color 1
     !
    router bgp 1
     bgp router-id 1.1.1.1
     neighbor 2.2.2.2 remote-as 1
     neighbor 2.2.2.2 update-source lo
     address-family ipv4 unicast
      neighbor 2.2.2.2 next-hop-self
      neighbor 2.2.2.2 route-map SET_SR_POLICY in
     exit-address-family
     !
    !
Learned BGP routes from 2.2.2.2 are mapped to the SR-TE Policy
which is uniquely determined by the BGP nexthop (2.2.2.2 in this
case) and the SR-TE color in the route-map.

Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-08-31 09:09:12 +00:00
Renato Westphal
f663c5819c bgpd: convert NHT code to use rb-trees instead of routing tables
Fist, routing tables aren't the most appropriate data structure
to store nexthops and imported routes since we don't need to do
longest prefix matches with that information.

Second, by converting the NHT code to use rb-trees, we can index
the nexthops using additional information, not only the destination
address.  This will be useful later to index bgpd's nexthops by
both destination and SR-TE color.

Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-31 09:09:05 +00:00
Donald Sharp
c6d41e93e0
Merge pull request #5799 from pguibert6WIND/flowspec_ipv6
Flowspec ipv6
2020-08-26 08:26:46 -04:00
Philippe Guibert
9a659715df bgpd: support for bgp ipv6 ext community, and flowspec redirect ipv6
rfc 5701 is supported. it is possible to configure in bgp vpn, a list of
route target with ipv6 external communities to import. it is to be noted
that this ipv6 external community has been developed only for matching a
bgp flowspec update with same ipv6 ext commmunity.
adding to this, draft-ietf-idr-flow-spec-v6-09 is implemented regarding
the redirect ipv6 option.

Practically, under bgp vpn, under ipv6 unicast, it is possible to
configure : [no] rt6 redirect import <IPV6>:<AS> values.

An incoming bgp update with fs ipv6 and that option matching a bgp vrf,
will be imported in that bgp vrf.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-08-21 13:37:08 +02:00
David Schweizer
736b68f33a
bgpd: minor fix and code style compliance
* Applied style suggestions by automated compliance check.
* Fixed function bgp_shutdown_enable to use immutable message string.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2020-08-20 16:50:21 +02:00
David Schweizer
8389c83aa1
bgpd: enhancement of bgp administrative shutdown
* Added message to RFC 8203 peer notification about BGP instance
  shutdown.
* Added informational log message to instance shutdown enable/disable
  functions.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2020-08-17 11:45:02 +02:00
David Schweizer
cb9196e77a
bgpd: bgp instance administrative shutdown.
* Fixed integration in FSM and packet handling.
* Added CLI "show" output, incl. JSON.
* For review and testing only.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2020-08-14 10:23:34 +02:00
David Schweizer
9cf5943257
bgpd: bgp instance administrative shutdown.
* Changes allow administratively shutting down all peers of a BGP
  instance.
* New CLI commands "[no] bgp shutdown" in vty shell.
* For review and testing only.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2020-08-13 17:52:49 +02:00
Russ White
c6dc339540
Merge pull request #6801 from ton31337/feature/force_maximum-prefix_for_filtered_routes
bgpd: Add a knob to force maximum-prefix even for filtered routes
2020-08-11 11:52:05 -04:00
Anuradha Karuppiah
c44ab6f1f3 bgpd: support for Ethernet Segments and Type-1/EAD routes
This is the base patch that brings in support for Type-1 routes.
It includes support for -
- Ethernet Segment (ES) management
- EAD route handling
- MAC-IP (Type-2) routes with a non-zero ESI i.e. Aliasing for
  active-active multihoming
- Initial infra for consistency checking. Consistency checking
  is a fundamental feature for active-active solutions like MLAG.
  We will try to levarage the info in the EAD-ES/EAD-EVI routes to
  detect inconsitencies in access config across VTEPs attached to
  the same Ethernet Segment.

Functionality Overview -
========================
1. Ethernet segments are created in zebra and associated with
access VLANs. zebra sends that info as ES and ES-EVI objects to BGP.
2. BGP advertises EAD-ES and EAD-EVI routes for the locally attached
ethernet segments.
3. Similarly BGP processes EAD-ES and EAD-EVI routes from peers
and translates them into ES-VTEP objects which are then sent to zebra
as remote ESs.
4. Each ES in zebra is associated with a list of active VTEPs which
is then translated into a L2-NHG (nexthop group). This is the ES
"Alias" entry
5. MAC-IP routes with a non-zero ESI use the alias entry created in
(4.) to forward traffic i.e. a MAC-ECMP is done to these remote-ES
destinations.

EAD route management (route table and key) -
============================================
1. Local EAD-ES routes
a. route-table: per-ES route-table
key: {RD=ES-RD, ESI, ET=0xffffffff, VTEP-IP)
b. route-table: per-VNI route-table
Not added
c. route-table: global route-table
key: {RD=ES-RD, ESI, ET=0xffffffff)

2. Remote EAD-ES routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=ES-RD, ESI, ET=0xffffffff, VTEP-IP)
c. route-table: global route-table
key: {RD=ES-RD, ESI, ET=0xffffffff)

3. Local EAD-EVI routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=0, ESI, ET=0, VTEP-IP)
c. route-table: global route-table
key: {RD=L2-VNI-RD, ESI, ET=0)

4. Remote EAD-EVI routes
a. route-table: per-ES route-table
Not added
b. route-table: per-VNI route-table
key: {RD=0, ESI, ET=0, VTEP-IP)
c. route-table: global route-table
key: {RD=L2-VNI-RD, ESI, ET=0)

Please refer to bgp_evpn_mh.h for info on how the data-structures are
organized.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-08-05 06:46:12 -07:00
Donatas Abraitis
dfbd3ae378 bgpd: Remove peer_afc_set()
Dead code.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-07-27 17:16:32 +03:00
Donatas Abraitis
9cbd06e0f8 bgpd: Add a knob to force maximum-prefix even for filtered routes
If _force_ is set, then ALL prefixes are counted for maximum instead of
accepted only. This is useful for cases where an inbound filter is applied,
but you want maximum-prefix to act on ALL (including filtered) prefixes.

For instance, we have a configuration like:

neighbor r1 maximum-prefix 10
neighbor r1 prefix-list custom in
!
ip prefix-list custom seq 1 permit 10.0.0.0/24
ip prefix-list custom seq 2 permit 10.0.1.0/24

This will accept only 2 prefixes and discard all others instead of
shutting down the session when 10 is reached.

With this new knob (force), we will count all received prefixes and shutdown
the session when 10 is reached.

The bigger problem is when you have lots of peers with full feed and such a
configuration like in an example.

This is kinda re-ordering of how to treat filter vs. maximum-prefix.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-07-26 23:16:37 +03:00
Quentin Young
1d4cfa5de1 Revert "Rpki Encapsulation"
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-07-14 15:38:20 -04:00
Quentin Young
1f30402b92
Merge pull request #5015 from pguibert6WIND/rpki_vrf_encapsulation
Rpki Encapsulation
2020-07-14 11:52:47 -04:00
Donatas Abraitis
aef999a28f bgpd: Show the real next-hop address in addition to hostname in show bgp
It's hard to cope with cases when next-hop is changed/unchanged or
peers are non-direct.

It would be better to show the hostname and nexthop IP address (both)
under `show bgp` to quickly identify the source and the real next-hop
of the route.

If `bgp default show-nexthop-hostname` is toggled the output looks like:
```
spine1-debian-9# show bgp
BGP table version is 1, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 65002
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
*  2a02:4780::/64   fe80::a00:27ff:fe09:f8a3(exit1-debian-9)
                                             0             0 65001 ?

spine1-debian-9# show ip bgp
BGP table version is 5, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 65002
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
*> 10.255.255.0/24  192.168.0.1(exit1-debian-9)
                                             0             0 65001 ?
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-07-13 16:35:29 +03:00
Philippe Guibert
fd1be68353 bgpd: add hook for running-config per vrf rpki config
rpki config can be displayed in the 'show running-config'.
there is a fix to be done yet, this is related to the order of rpki per
vrf configuration. actually, the output is not saveable in the
running-config since the rpki commands are swapped. this prevents from
running rpki config at startup.
That commit also changes the identation, since rpki configure node was
with one extra space. reducing this, and add the changes for vrf
configuration too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
044307285b bgpd: add a hook to inform a vrf is enabled/disabled
this hook can be used by plugins like rpki.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Donatas Abraitis
7f972cd8dc bgpd: Use true/false for reject_as_sets
Just remove MACROS and use true/false.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-20 12:59:52 +03:00
Donatas Abraitis
1d3fdccfe1 bgpd: Enable rfc8212 by default except datacenter profile
Some competitive vendors like Cisco, Bird, OpenBGPD,
Nokia already have this by default enabled.

The list is here: https://github.com/bgp/RFC8212

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-14 16:01:46 +03:00
vivek
f7e1c681f4 bgpd: Implement options for link bandwidth handling
Support configurable options to control how link bandwidth is handled
by the receiver. The default behavior is to automatically honor the
link bandwidths received and use it to perform a weighted ECMP BUT only
if all paths in the multipath have associated link bandwidth; if one or
more paths do not have link bandwidth, normal ECMP is performed among
the multipaths. This behavior is as recommended by
https://tools.ietf.org/html/draft-ietf-idr-link-bandwidth.

The additional options available are to (a) completely ignore any link
bandwidth (i.e., weighted ECMP is effectively disabled), (b) skip paths
in the multipath which do not have link bandwidth and perform weighted
ECMP among the other paths (if at least some paths have the bandwidth)
or (c) use a default weight (value chosen is 1) for the paths which
do not have link bandwidth.

The command syntax is
bgp bestpath bandwidth <ignore|skip-missing|default-weight-for-missing>

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
2020-03-30 20:12:31 -07:00
vivek
b1875e656c bgpd: Additional options for generating link bandwidth
Implement the code to handle the other route-map options to generate
the link bandwidth, namely, to use the cumulative bandwidth or to
base this on the number of multipaths. In the latter case, a reference
bandwidth is internally chosen - the implementation uses a value of
1 Gbps.

These additional options mean that the prefix may need to be advertised
if there is a link bandwidth change, which is a new criteria. Define a
new path (change) flag to support this and implement the advertisement.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:   Don Slice <dslice@cumulusnetworks.com>
2020-03-30 20:12:31 -07:00
Donatas Abraitis
3dc339cdc2 bgpd: Convert lots of int type functions to bool/void
Some were converted to bool, where true/false status is needed.
Converted to void only those, where the return status was only false or true.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-21 14:59:18 +02:00
Donald Sharp
8398b5d5d2 bgpd: Convert status defines to enum
Convert some status defines for the fsm to an enum
so that we cannot mix and match them in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-20 18:07:13 -04:00
Donald Sharp
d1060698b4 bgpd: Convert #define of bgp fsm events to an enum
In PR #6052 which fixes issue #5963 the bgp fsm events
were confused with the bgp fsm status leading
to a bug.  Let's start separating those out
so these types of failures cannot just
easily occur.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-20 18:01:53 -04:00
Donatas Abraitis
3893aeeea3 bgpd: Add subcodes for BGP Finite State Machine Error
Implement https://tools.ietf.org/html/rfc6608

I used python scapy library to send a notification message in OpenSent state:
```
send(IP(dst="192.168.0.1")/TCP(sport=sp,
							dport=179,
							seq=rec.ack,
							ack=rec.seq + 1,
							flags=0x18)/BGPHeader(type=3)/BGPNotification(error_code=4,
														error_subcode=0))
```

Logs from FRR:
```
%NOTIFICATION: sent to neighbor 192.168.0.2 5/1 (Neighbor Events Error/Receive Unexpected Message in OpenSent State) 0 bytes
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-16 09:22:22 +02:00
Sri Mohana Singamsetty
40963e96de
Merge pull request #5952 from ton31337/fix/no_need_for_if_in_filter_override
bgpd: Do not check for a maximum for peer->filter_override
2020-03-11 12:21:58 -07:00
Ruben Kerkhof
1e20238af5 treewide: fix some issues found with -Werror=undef
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-10 16:53:13 +01:00
Donatas Abraitis
73b1082ed9 bgpd: Do not check for a maximum for peer->filter_override
FILTER_MAX is 2, RMAP_MAX is 2. No point here.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-10 11:29:48 +02:00
Donald Sharp
1a21da6b01
Merge pull request #5802 from ton31337/feature/aggregate-address_origin_override
bgpd: Allow overriding ORIGIN for aggregate-address
2020-02-19 08:38:31 -05:00
Sri Mohana Singamsetty
dea8e5f275
Merge pull request #5801 from donaldsharp/bgp_peer_sort
Bgp peer sort
2020-02-17 21:39:37 -08:00
Donatas Abraitis
07d1e5d99d bgpd: Show the real reason why the peer is failed
If the peer was shutdown locally, it doesn't show up as admin. shutdown.
Instead it's treated as "Waiting for peer OPEN".

The same applies to when the peer reaches maximum-prefix count.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-14 23:23:52 +02:00
Donatas Abraitis
752022670a *: Remove break after return
Just a deadcode.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-13 15:39:54 +02:00
Donatas Abraitis
229757f195 bgpd: Allow overriding ORIGIN for aggregate-address
Override ORIGIN attribute if defined.
E.g.: Cisco and Juniper set ORIGIN for aggregated address
to IGP which is not what rfc4271 says.

This enables the same behavior, optionally.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-13 11:07:40 +02:00
Donald Sharp
bf0d28dcf7 bgpd: Create peer_sort_lookup()
The act of peer_sort() being called always set this value
even when we are just looking it up.  We need to seperate
out the idea of lookup from set.

For those places that this is immediately obvious that
this is a lookup switch over to using this function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-12 14:45:06 -05:00
Russ White
8d61adbf07
Merge pull request #5785 from ton31337/fix/replace_gtsm_hops_to_readable_macros
bgpd: Use readable macros for peer->gtsm_hops instead of literals
2020-02-11 10:40:35 -05:00
Donatas Abraitis
724935d5a2
Merge pull request #5789 from donaldsharp/bgp_ebgp_reason
bgpd: Update failed reason to distinguish some NHT scenarios
2020-02-11 10:42:23 +02:00
Donald Sharp
1e91f1d119 bgpd: Update failed reason to distinguish some NHT scenarios
Current failed reasons for bgp when you have a peer that
is not online yet is `Waiting for NHT`, even if NHT has
succeeded.  Add some code to differentiate this.

eva# show bgp ipv4 uni summ failed
BGP router identifier 192.168.201.135, local AS number 3923 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 2, using 43 KiB of memory
Neighbor        EstdCnt DropCnt ResetTime Reason
192.168.44.1          0       0    never  Waiting for NHT
192.168.201.139       0       0    never  Waiting for Open to Succeed
Total number of neighbors 2
eva#

eva# show bgp nexthop
Current BGP nexthop cache:
 192.168.44.1 invalid, peer 192.168.44.1
  Must be Connected
  Last update: Mon Feb 10 19:05:19 2020

 192.168.201.139 valid [IGP metric 0], #paths 0, peer 192.168.201.139

So 192.168.201.139 is a peer for a connected route that has not been
created on .139, while 44.1 nexthop tracking has not succeeded yet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-10 19:46:48 -05:00
Donatas Abraitis
e2521429a6 bgpd: Use readable macros for peer->gtsm_hops instead of literals
Do the same way like BGP_DEFAULT_TTL

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-10 16:23:09 +02:00
Donatas Abraitis
892fedb611 bgpd: Replace bgp_flag_* to [UN]SET/CHECK_FLAG macros
Most of the code uses macros, thus let's keep the code unified.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-06 17:11:38 +02:00