Rinat Baygildin
a3f1d8c19a
Add enable_only_binary flag to grpc ListPath method
...
Adding enable_only_binary allows using only binary representation of nlri and attributes on the ListPath call.
For clients who uses only binary representation it helps to significantly reduce
resource consumption by refusing unnecessary conversion.
It is vital while processing a large number of paths, e.g. full-view.
This change doesn't break backward compatibility.
2022-11-18 16:04:41 +04:00
Yuya Kusakabe
629b2c10ab
api,mup: remove unused prefix_length field in MUPInterworkSegmentDiscoveryRoute
2022-10-29 07:31:30 +09:00
Yuya Kusakabe
0f377b3a4f
api,pkg/packet/bgp: fix SRv6 Endpoint Behavior for MUP values
2022-10-16 17:01:13 +09:00
Yuya Kusakabe
30b95991ad
pkg/packet/bgp: refactor Prefix-SID
...
- Add TLVType contant values.
- Add NewPathAttributePrefixSID().
- Add SRv6ServiceTLV to support SRv6 L2 Service TLV.
- Move reserved field handling to each type of TLV,
because header and reserved field size are different for each type.
For more details, see https://www.rfc-editor.org/rfc/rfc8669.html
and https://www.rfc-editor.org/rfc/rfc9252.html .
2022-10-16 16:42:59 +09:00
Yuya Kusakabe
0a18fce70d
Fix typo in SRv6 SID Structure Sub-Sub-TLV
...
See https://www.rfc-editor.org/rfc/rfc9252.html#section-3.2.1
2022-10-16 16:42:59 +09:00
Yuya Kusakabe
975db96b86
mup: handle Type 1 ST Route Prefix as Prefix instead of single address
...
See https://www.ietf.org/archive/id/draft-mpmz-bess-mup-safi-01.html#name-bgp-type-1-session-transfor for details.
2022-09-28 11:38:26 +09:00
Yuya Kusakabe
06af56ebb4
pkg/packet/bgp,api: add SRv6 behavior for SRv6 MUP
...
- End.M.GTP6.D: 45
- End.M.GTP6.Di: 46
- End.M.GTP6.E: 47
- End.M.GTP4.E: 48
https://www.iana.org/assignments/segment-routing/segment-routing.xhtml
2022-09-01 10:34:52 +09:00
Yuya Kusakabe
438f2460b3
cli: initial support for BGP-MUP SAFI and Extended Community
2022-08-31 12:26:42 +09:00
FUJITA Tomonori
229d11635e
clean up FQDNCapability message
...
- we don't need hostlen and domainlen.
- use camel case.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2022-01-16 23:45:44 +00:00
FUJITA Tomonori
2032f591ad
add filename variable DisableMrtRequest
...
needs to specify which mrt instance is supposed to be disabled.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2022-01-13 05:26:58 +00:00
FUJITA Tomonori
711063a9f5
Add ListBmp API
...
Get the status of BMP stations.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2022-01-13 02:07:20 +00:00
FUJITA Tomonori
c9374d31f2
fix mrt proto typo
...
also make it consistent with config definition.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2022-01-12 23:32:42 +00:00
FUJITA Tomonori
ea58a919f4
Add WatchEvent API to replace MonitorPeer and MonitorTable
...
get peer and path events in order.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-14 01:11:24 +00:00
night
030274eb86
Fix spelling of LinkBandwidth
2021-12-12 04:59:26 +00:00
FUJITA Tomonori
6fc43b1114
proto: avoid global enum definitions when possible
...
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-11 10:13:12 +00:00
FUJITA Tomonori
6eeabdf01b
proto: replace 'as' with 'asn'
...
For consistency, always use 'asn' instead of 'as', 'as_number', etc.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-11 01:36:20 +00:00
FUJITA Tomonori
15920c9c99
proto: clean up peer messages
...
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-10 14:51:29 +00:00
FUJITA Tomonori
f75661f1c3
proto: add DumpType to EnableMrtRequest
...
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-10 13:43:06 +00:00
FUJITA Tomonori
24ae33b208
proto: define AsSegment Type enum
...
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-10 13:26:22 +00:00
Vallimamod Abdullah
dd270fc087
api: defines LsOspfRouteType enum for LsPrefixDescriptor
...
Allows better serialization as this field is automatically removed from
prefix descriptor when empty/unknown instead of getting
`LsOspfRouteType(0)` default value from Stringer.
2021-12-08 07:23:16 +00:00
Vallimamod Abdullah
4b11fc7bd6
api: corrects typo in validation reason enum (s/reasot/reason/)
2021-12-08 07:23:12 +00:00
FUJITA Tomonori
c593d7c8b3
switch to Go API v2 for protobuf
...
seems that sticking to Go API v1 for protobuf is headache for projects
using GoBGP.
This breaks the compatibility so bumps up the major version to 3.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-08 07:22:50 +00:00
Donatas Abraitis
27b80a935b
bgp: Implement BGP link-bandwidth extended community
...
Receiving
=========
Extended communities sent from FRR side:
```
route-map lb permit 10
set extcommunity bandwidth 10
set extcommunity soo 65001:123
exit
```
On GoBGP side it's decoded as 125000 as IEEE floating-point.
```
% sudo ./gobgp global rib 192.168.100.1/32 --json | jq '."192.168.100.1/32"'
[
{
"nlri": {
"prefix": "192.168.100.1/32"
},
"age": 1632128843,
"best": true,
"attrs": [
{
"type": 1,
"value": 2
},
{
"type": 2,
"as_paths": [
{
"segment_type": 2,
"num": 1,
"asns": [
65534
]
}
]
},
{
"type": 3,
"nexthop": "192.168.10.123"
},
{
"type": 4,
"metric": 0
},
{
"type": 16,
"value": [
{
"type": 64,
"subtype": 4,
"asn": 65534,
"bandwidth": 1250000
},
{
"type": 0,
"subtype": 3,
"value": "65001:123"
}
]
}
],
"stale": false,
"source-id": "192.168.100.2",
"neighbor-ip": "192.168.10.123"
}
]
```
Sending
=======
When sending from GoBGP side:
```
[[policy-definitions]]
name = "policy1"
[[policy-definitions.statements]]
[policy-definitions.statements.actions.bgp-actions.set-ext-community]
options = "replace"
[policy-definitions.statements.actions.bgp-actions.set-ext-community.set-ext-community-method]
communities-list = ["lb:65021:125000"]
```
We get properly encoded/decoded in FRR as well:
```
~# vtysh -c 'show ip bgp 10.33.0.0/16 json' | grep 'LB:'
"string":"RT:300:400 SoO:100:200 LB:65021:125000 (1.000 Mbps)"
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com >
2021-11-04 20:12:58 +09:00
Donatas Abraitis
c114e04958
Handle ttl-security option correctly
...
It wasn't configurable at all.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com >
2021-06-30 10:55:06 +09:00
zvfvrv
92f37d65aa
SegmentTypeB proto definition
2021-06-30 07:38:00 +09:00
Donatas Abraitis
94d720ff40
Add FQDN capability
...
It's not kinda RFC (draft), but it's implemented and used in various
other open-source software like FRRouting, Bird, ExaBGP.
It's very handy when dealing with lots of peers.
Exampe between GoBGP and FRRouting:
```
% ./cmd/gobgp/gobgp neighbor 192.168.10.123 | grep -A4 fqdn:
fqdn: advertised and received
Local:
name: donatas-pc, domain:
Remote:
name: exit1-debian-9, domain:
```
```
% vtysh -c 'show bgp neighbors 192.168.10.17 json' | jq .'"192.168.10.17".neighborCapabilities.hostName'
{
"advHostName": "exit1-debian-9",
"advDomainName": "n/a",
"rcvHostName": "donatas-pc",
"rcvDomainName": "n/a"
}
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com >
2021-05-24 09:55:03 +03:00
Carl Baldwin
9e98fcf1d6
Do not suppress initial non-established peer state in MonitorPeer
...
The issue with the initial update was that sometimes a connection had
not yet been established. Trying to get remote and local connection
data caused a segmentation violation because `fsm.conn` was nil.
Also adds a flag to MonitorPeerRequest in the GRPC API to enable the
new behavior to avoid backward incompatibility.
fixes #2047
2021-04-22 17:40:15 -06:00
Marcus Wichelmann
34ed2a2ce5
Update proto
2021-03-29 20:57:36 +02:00
Marcus Wichelmann
3c437e5aec
Added ListDynamicNeighbor message to API
2021-03-29 20:53:53 +02:00
Marcus Wichelmann
76f40ede0d
Added DeleteDynamicNeighbor message to API
2021-03-29 20:53:45 +02:00
Marcus Wichelmann
c1e7463e36
Added ListPeerGroup message to API
2021-03-29 20:53:25 +02:00
Mikael Magnusson
390e3127ce
add support for tunnel egress endpoint sub-TLV
...
As specified in draft-ietf-idr-tunnel-encaps-22.
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net >
2021-03-14 08:46:44 +09:00
Faicker Mo
cd5671baee
policy: add nexthop unchanged
...
Support config set-next-hop = "unchanged" and also cli command.
Signed-off-by: Faicker Mo <faicker.mo@ucloud.cn >
2021-03-03 09:47:50 +09:00
Milan Lenco
3339f97722
feat: add option to bind listener to a (VRF) device
...
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech >
2021-02-13 18:54:31 +09:00
Mikael Magnusson
c70d99cc91
add pb for UDP destination port sub-TLV
...
Generated with tools/grpc/genproto.sh
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net >
2021-01-23 09:03:18 +09:00
Mikael Magnusson
4c8ab0d4b5
support UDP destination port sub-TLV
...
As specified in draft-ietf-idr-tunnel-encaps.
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net >
2021-01-23 09:03:18 +09:00
Serguei Bezverkhi
57068b16fd
Add documentation, fix typo in proto and add marshal for tunne encal sub tlvs
...
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com >
2020-12-02 07:21:01 +09:00
Serguei Bezverkhi
63b958b2a7
API chages
...
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com >
2020-11-30 07:21:40 +09:00
Serguei Bezverkhi
66413b5335
API changes
...
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com >
2020-11-25 17:28:18 -05:00
Valli A. Vallimamod
b44362fddd
api: keeps backward compatibility when extending LsAddrPrefix
2020-11-10 22:17:26 +09:00
Valli A. Vallimamod
c595b56166
api: adds LS attributes to LsAddrPrefix
...
Includes `gobgp.LsNLRI` attibutes to `api.LsAddrPrefix` so that they are
distributed to all derived types (LsNodeNLRI, LsPrefixV4NLRI, and LsPrefixV6NLRI)
2020-11-10 22:17:26 +09:00
Steve Shaw
393d82f955
Adding gRPC support for modified logging level
...
Signed-off-by: Steve Shaw <shaw38@gmail.com >
2020-11-06 21:15:10 +09:00
FUJITA Tomonori
3d3d6f3438
api: add ListPathRequest's option to get binary of nlri and attributes
...
put the binary of nlri and path attribute to the response.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2020-10-21 21:09:12 +09:00
Serguei Bezverkhi
833188f526
extend attributes proto for Prefix SID support
...
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com >
2020-05-13 12:58:51 +09:00
Serguei Bezverkhi
e3001f9fe1
additional changes
...
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com >
2020-05-05 16:10:24 -04:00
Serguei Bezverkhi
8409507a7c
coding the feature
...
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com >
2020-05-05 14:31:28 -04:00
Tom Shine
f11b9c7afb
Add BGP-LS SRLG support
2020-04-24 00:25:59 +01:00
Carl Baldwin
72a0e55287
Use correct import paths for protobuf packages
...
The packages `any`, `empty`, and `timestamp` ship with protoc so there
is no need to pull them out of the go package. This simplifies the
generation script and also corrects the import paths for the standard
protobuf types.
Fixes: #2095
2019-11-06 17:59:21 +00:00
FUJITA Tomonori
853944f785
server: speed up session establishment
...
The unittest on pkg/server finishes quicker.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2019-10-21 16:10:40 +09:00
Hitoshi Irino
2f5a4d59cb
BGP connection on a speecified interface (including which is associated VRF) using syscall SO_BINDTODEVICE
2019-07-02 11:40:22 +09:00