182 Commits
Author SHA1 Message Date
Artur MakutunowiczandFUJITA Tomonori 192480fc71 Add experimental BGP-LS feature 2019-01-26 12:40:45 +09:00
FUJITA Tomonori d7e5bf22a6 fix bmp statistics
fix the regression of the adj counter due to
301b48532d

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-28 23:27:53 +09:00
FUJITA Tomonori 8e7741a0a8 api: rename ValidationDetail to Validation
Let's simply use 'validation' because there is no other validation
structure.

We could add validation results from other than rpki so drop rpki name.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-24 10:13:00 +09:00
FUJITA Tomonori 8d0a8b0ffa make the usage of type name in protobuf consistent
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-23 23:40:37 +09:00
FUJITA Tomonori 301b48532d support received, accepted, and advertised counters per family
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-26 17:49:48 +09:00
FUJITA Tomonori a5763c20d4 api: remove AddPaths from Peer and PeerGroup
AddPaths in AfiSafi should be used; it can handle configuration per
family.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-25 23:27:02 +09:00
FUJITA Tomonori 7ec6a96962 api: move RouterId to PeerState from PeerConf
It's not configuration.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-25 20:15:04 +09:00
FUJITA Tomonori 79a461c147 api: move remote_cap and local_cap to PeerState from PeerConf
Both should be in PeerState like OpenConfig.

Also remove unused supported_capabilities.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-23 21:01:03 +09:00
FUJITA Tomonori 6b05d9db0f api: rename NlriAny in api.Path to Nlri
Also rename PathAttrsAny to PathAttrs. Both are the first choice
rather than the binary format members.

Support SortType member to ListPathRequest to add an option to return
unordered paths.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-16 16:49:49 +09:00
FUJITA Tomonori c1bca25559 use google/protobuf/timestamp.proto
use google/protobuf/timestamp.proto instead of our own way to
represent time.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-16 12:23:18 +09:00
Eiichiro WatanabeandFUJITA Tomonori fa387c9065 Fix Statistics Report in BMP 2018-11-14 19:32:24 +09:00
Eiichiro WatanabeandFUJITA Tomonori 0eb3dcede5 Fix intervals for MRT 2018-11-12 21:32:07 +09:00
Eiichiro Watanabe 4cc7a81e8f Support AdminDown from config 2018-11-12 14:41:58 +09:00
FUJITA Tomonori 475818dd3c api: remove unused members
fixes #1816

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-28 22:14:41 +09:00
FUJITA Tomonori 97ad6b32ee api: change Family
fixes #1812

Avoid the cast and use strightforward data strcuture; two variables
for afi and safi instead of squashing two into one variable.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-28 15:36:50 +09:00
FUJITA Tomonori 008c961ecd policy cleanup
- remove ReplaceDefinedSet and ReplaceStatement APIs; not intutive and
  should create a new one instead of modifying the existing.

- Rename ReplacePolicyAssignment to SetPolicyAssignment API; we use
  internally SetPolicy() name from the beginning.

- Rename UpdatePolicy() to SetPolicies() API; It doesn't update
  anything so the name is confusing. It discards the all policies and
  create policies from the argument.

- Changes some member names in structures for policy.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-23 10:05:19 +09:00
FUJITA Tomonori 71e56c542e rpc cleanup
- clean up RPC function names
- rewrite gobgp command to use the api instead of config package
- delete unused client package

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-08 21:24:48 +09:00
IWASE Yusuke e2752ae0bb api: Use capability.proto in message PeerConf
The current formats of the remote/local capabilities in message PeerConf
are the binary type representation, this patch fixes to use the
structures defined in capability.proto file.

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-21 10:40:34 +09:00
IWASE Yusuke 493d024701 api: Define protobuf for BGP Capabilities
Example of protoc command:
$ export PROTOBUF=${HOME}/protobuf/src
$ export GOBGP=${GOPATH}/src/github.com/osrg/gobgp
$ protoc \
    -I ${PROTOBUF} \
    -I ${GOBGP}/api \
    --go_out=plugins=grpc:${GOBGP}/api \
    ${GOBGP}/api/gobgp.proto \
    ${GOBGP}/api/attribute.proto \
    ${GOBGP}/api/capability.proto

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-21 10:40:25 +09:00
IWASE Yusuke b992c53865 api: Use attribute.proto struct in message Vrf
The current formats of the RD and import/export RTs in message Vrf are
the binary type representation, this patch fixes to use the structures
defined in attribute.proto file.

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-19 12:01:48 +09:00
Marcin Ptaszyński 5fbd0cb243 table: support AfiSafiIn Policy Condition match 2018-06-13 20:53:17 -07:00
Satoshi Fujimoto 964bb04e22 api: Implement Shutdonw()
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:57:23 +09:00
Satoshi Fujimoto 57f103ef34 api: Implement AddCollector()
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:57:14 +09:00
Satoshi Fujimoto 000589f3cf api: Implement UpdatePolicy()
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:57:04 +09:00
Satoshi Fujimoto c821cfbc8e api: Implement PeerGroup and DynamicNeighbor API
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:56:57 +09:00
Satoshi Fujimoto 222bf4433d api: Add some fields to notify Graceful Restart state
Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:56:48 +09:00
Satoshi Fujimoto abe2efc2bf api: Fix StartServerAPI
Currently, StartServerAPI accepts few parameters
and setting such as BGP confederation and graceful restart
cannot be configured via gRPC API.

This commit fixes this API to accept all the parameters
which is configurable in a configuration file/

Signed-off-by: Satoshi Fujimoto <[email protected]>
2018-06-13 13:56:30 +09:00
IWASE Yusuke 417f8ba6f5 api: Use api/attribute.proto structure in gRPC API
Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-13 10:54:00 +09:00
IWASE Yusuke 84987fb873 api: Define protobuf structure for BGP Path Attributes
Example of protoc command:
$ export PROTOBUF=${HOME}/protobuf/src
$ export GOBGP=${GOPATH}/src/github.com/osrg/gobgp
$ protoc \
    -I ${PROTOBUF} \
    -I ${GOBGP}/api \
    --go_out=plugins=grpc:${GOBGP}/api \
    ${GOBGP}/api/gobgp.proto \
    ${GOBGP}/api/attribute.proto

Signed-off-by: IWASE Yusuke <[email protected]>
2018-06-13 08:55:27 +09:00
urbanandFUJITA Tomonori 5d15b3f290 table: support nexthop match policy 2018-06-05 19:57:21 +09:00
IWASE YusukeandFUJITA Tomonori 0423ac05e9 cli: Implement "neighbor update" command
Signed-off-by: IWASE Yusuke <[email protected]>
2018-05-31 16:19:01 +09:00
IWASE YusukeandFUJITA Tomonori 568c7aab62 api: Support current flag in MonitorPeerState API
This patch adds "current" flag in MonitorPeerState API and enables to
get the current (existing) neighbors when gRPC client connecting to
GoBGP daemon.

Signed-off-by: IWASE Yusuke <[email protected]>
2018-01-12 21:36:57 +09:00
IWASE YusukeandFUJITA Tomonori f32673bbec api: Activate address family using Peer.AfiSafis
Currently, to configure per AFI-SAFI settings when adding neighbor
via gRPC API, it is require to specify the both Peer.Families and
Peer.AfiSafis fields. If Peer.Families is omitted, settings in
Peer.AfiSafis are ignored and the given address families are not
activated.

This patch enables to configure per AFI-SAFI settings and activate
the address family with only Peer.AfiSafis (without Peer.Families).

Note: For the backward compatibility, if only Peer.Families is
specified, this patch creates per AFI-SAFI settings with the default
settings.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-11-16 09:59:45 +09:00
IWASE YusukeandFUJITA Tomonori 6c6cd6efad api: Define constants for address families
To call some gRPC APIs, it is required to specify the address family
value which is combined value of AFI and SAFI values, so users of gRPC
APIs need to calculate this value.

This patch introduces the constants for the address families for the
convenience.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-11-16 09:59:45 +09:00
IWASE YusukeandFUJITA Tomonori 36786073c1 api: Enable to set/get add-paths config via gRPC
Signed-off-by: IWASE Yusuke <[email protected]>
2017-10-03 14:53:44 +09:00
IWASE Yusuke 9b278ba79b api: GetPath API alternative to GetRib
With the extremely large RIBs, GetRib gRPC API hits the limits of each
message size, because this API is using simple request/response RPC.

This patch introduces a new API GetPath which using streaming RPC and
can retrieve RIBs even if extremely large.

Note: GetRib can be replaced with GetPath and obsoleted in the future.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-09-25 15:30:16 +09:00
Eiichiro WatanabeandFUJITA Tomonori d92d319931 gobgp: support local-rib/all option in command "gobgp bmp add" 2017-08-29 18:38:33 +09:00
FUJITA Tomonori 22772c0e62 add LocalPathIdentifier
add-path support needs two identifiers, remote (rx) and local
(tx). The remote identifiers are assigined by remote peers, the local
ones are assigned by gobgpd itself.

Signed-off-by: FUJITA Tomonori <[email protected]>
2017-07-26 08:09:02 +09:00
Satoshi Fujimoto 810ba2f791 api: Add RPKI detailed information structure
Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-07-19 09:44:20 +09:00
Wataru IshidaandFUJITA Tomonori 87f0b0bdc5 api/cli: support showing path-identifier
$ gobgp neighbor <neighbor address>
ID  Network              Next Hop             AS_PATH              Age        Attrs
2   10.0.0.10/32         10.10.1.2                                 01:05:35   [{Origin: i} {LocalPref: 100}]
1   10.0.0.10/32         10.10.1.1                                 01:05:35   [{Origin: i} {LocalPref: 100}]
3   10.1.0.10/32         10.10.1.3                                 01:05:35   [{Origin: i} {LocalPref: 100}]

Signed-off-by: Wataru Ishida <[email protected]>
2017-07-04 15:02:10 +09:00
IWASE YusukeandFUJITA Tomonori 0111219af1 api: Enable to compose AfiSafi message structure
Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-26 14:21:57 +09:00
IWASE YusukeandFUJITA Tomonori f257609804 api: Introduce AfiSafi message structure in Peer
Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-26 14:21:57 +09:00
FUJITA Tomonori 83684d5e62 api: add graceful restart support to AddNeighbor API
Signed-off-by: FUJITA Tomonori <[email protected]>
2017-06-12 12:53:14 +09:00
Wataru Ishida 9b9a65d410 *: support replace-peer-as (aka as-override)
we use the term replace-peer-as instead of as-override
since openconfig is using it.

cli

```
$ gobgp n add <neighbor-addr> as <asn> replace-peer-as
```

config

```
neighbor:
  config:
    peer-as: <asn>
    neighbor-address: <neighbor-addr>
  as-path-options:
    config:
      replace-peer-as: true
```

Signed-off-by: Wataru Ishida <[email protected]>
2017-05-10 08:15:00 +00:00
Wataru Ishida 1f053c25c4 *: support remove private as
cli

```
$ gobgp n add <neighbor-addr> as <asn> remove-private-as (all|replace)
```

config

```
neighbor:
  config:
    peer-as: <asn>
    neighbor-address: <neighbor-addr>
    remove-private-as: all
```

Signed-off-by: Wataru Ishida <[email protected]>
2017-05-10 08:05:47 +00:00
ISHIDA Wataru 0f62519cd7 server: ignore routes when local AS is in AS_PATH
RFC4271 9.1.2 Phase 2: Route Selection

If the AS_PATH attribute of a BGP route contains an AS loop, the BGP
route should be excluded from the Phase 2 decision function.  AS loop
detection is done by scanning the full AS path (as specified in the
AS_PATH attribute), and checking that the autonomous system number of
the local system does not appear in the AS path.  Operations of a BGP
speaker that is configured to accept routes with its own autonomous
system number in the AS path are outside the scope of this document.

Also this commit adds support for allow-own-as option to relax this.

Signed-off-by: ISHIDA Wataru <[email protected]>
2017-05-09 11:10:45 -04:00
Wataru Ishida 86d9587f75 cli: speed up showing a specific defined-set
Signed-off-by: Wataru Ishida <[email protected]>
2017-05-06 09:30:10 -04:00
FUJITA Tomonori 7fc7956946 improve performance of getting single neighbor information
avoid calculation of the number of adjout that will not be used.

Signed-off-by: FUJITA Tomonori <[email protected]>
2017-04-20 15:31:27 +09:00
IWASE Yusuke 59ec403de7 config: Config values for Nexthop Tracking with ZClient
For configuring the Nexthop Tracking features with ZClient, this patch
adds the config values:
 - "nexthop-trigger-enable" enables to the Nexthop Tracking features.
   Please note this features is only available with version 3 or later,
   and "true" by the default with that version.
 - "nexthop-trigger-delay" specifies the delay sec to update the
   nexthops triggered by the events from Zebra daemon. The default is
   5 secs and the same with the default of Cisco's routers.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-03-06 11:11:54 +09:00
IWASE Yusuke c06423e60b cli: Enable to get nexthop reachability state
This patch enables GoBGP CLI to get the best path based on the nexthop
reachability state.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-03-06 11:11:54 +09:00