ISHIDA Wataru and FUJITA Tomonori
9a45ed09b0
cli: add current option to monitor commands
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2017-02-15 00:10:15 +09:00
ISHIDA Wataru and FUJITA Tomonori
52356c26f8
server: add a current option to WatchBestPath()
...
also, use it for zebra integration
Signed-off-by: ISHIDA Wataru <[email protected] >
2017-02-15 00:10:15 +09:00
IWASE Yusuke and FUJITA Tomonori
64360afd45
cli: Administrative Shutdown Communication on disable neighbor
...
This patch adds "--reason" option support into the disable neighbor command
which can specify "Administrative Shutdown Communication" on the BGP Cease
NOTIFICATION message.
Usage:
$ gobgp neighbor <neighbor address> disable --reason "some messages"
Signed-off-by: IWASE Yusuke <[email protected] >
2017-02-03 22:47:34 -08:00
IWASE Yusuke and FUJITA Tomonori
1063bcab1e
cli: Communication on Administrative Shutdown NOTIFICATION
...
This patch enable to send an arbitrary message on the Cease NOTIFICATION
message with "Administrative Shutdown" and "Administrative Reset" subcodes
with "--reason" option.
Usage:
$ gobgp neighbor <neighbor address> shutdown --reason "some messages"
$ gobgp neighbor <neighbor address> reset --reason "some messages"
Reference: https://tools.ietf.org/html/draft-ietf-idr-shutdown-04
Signed-off-by: IWASE Yusuke <[email protected] >
2017-02-03 22:47:34 -08:00
Wataru Ishida
bb42a6832f
api: add a UUID field to Path structure
...
Signed-off-by: Wataru Ishida <[email protected] >
2017-01-22 00:37:58 -05:00
ISHIDA Wataru and FUJITA Tomonori
10b91fbb3f
api: check grpc request is not nil
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-11-06 02:36:22 +09:00
Hiroshi Yokoi
ae496021e0
policy: allow using invert condition in statement
...
Signed-off-by: Hiroshi Yokoi <[email protected] >
2016-12-14 15:28:37 -08:00
Hiroshi Yokoi and FUJITA Tomonori
2c66865d5e
policy: ext-community and large-community can be included in conditions
...
Signed-off-by: Hiroshi Yokoi <[email protected] >
2016-12-10 07:51:20 -08:00
Wataru Ishida and FUJITA Tomonori
cbf72956de
server: don't assume (*api.Path).Nlri is ipv4 NLRI
...
use (*api.Path).Family to decide how to decode (*api.Path).Nlri
closes #1185
Signed-off-by: Wataru Ishida <[email protected] >
2016-12-10 06:55:36 -08:00
kishiguro and FUJITA Tomonori
499a5fd6c3
client: AddNeighbor API doesn't include apply-policy information
2016-12-04 19:41:41 -08:00
Chris Stockton and FUJITA Tomonori
38c47609a2
api: Update the grpc server to accept the local address and remote port from the transport config
...
This allows using the gobgp/client to send a transport config with a port number.
2016-11-23 05:43:57 -08:00
kishiguro and FUJITA Tomonori
7006ec15fe
api: Fix client.AddNeighbor() API does not properly configure AFI/SAFI bug
...
When we use gRPC API to add neighbor. Even if we specify,
config.Neighbor.AfiSafis parameter, it is ignored in
NewPeerFromConfigStruct(). Adding to that even if we fix the issue,
NewNeighborFromAPIStruct() count Families twice. So resulting neighbor
has duplicated Families configuration. This patch fixed both problems.
2016-11-21 13:42:35 +09:00
FUJITA Tomonori
e11b09d7ea
server: disable advertised number calculation with multiple neighbors
...
AdjRibOut isn't in memory so needs to be calculated on the fly.
Doing such for multiple neighbors consumes too much CPU (especially
there are lots of routes).
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-11-18 14:00:51 +09:00
Wataru Ishida
93d1dca70a
config: simplify route-disposition configuration
...
before:
```yaml
actions:
route-disposition:
accept-route: true
reject-route: false
```
after
```yaml
action:
router-disposition: accept-route
```
Signed-off-by: Wataru Ishida <[email protected] >
2016-11-17 23:22:55 -05:00
Wataru Ishida
1e22e529c9
config/api: create admin-state type
...
align with session-state
Signed-off-by: Wataru Ishida <[email protected] >
2016-11-14 02:15:47 +00:00
Wataru Ishida
c4ced97e76
cli: use client library
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-11-14 02:15:46 +00:00
Wataru Ishida
3f2dd34d37
client: add golang client library
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-11-14 02:15:45 +00:00
Wataru Ishida
926ab34220
config: use struct type instead of []byte for capability and open msg
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-11-14 02:15:35 +00:00
Wataru Ishida
b77dc6aa54
policy: fix bug of policy with multiple statements
...
policy can have multiple statements. In each statement, when condition
is matched, route-action is finally evaluated after actions with mods.
When route-action is 'none', we contine to next statement if it exists.
When route-action is 'accept' or 'reject', we stop proceeding.
This patch fixes a bug that route-action can't be set to 'none' which
means route-action always be set to 'accept' or 'reject' and can't proceed
to the next statement.
Signed-off-by: Wataru Ishida <[email protected] >
2016-11-14 00:58:25 +00:00
Wataru Ishida
e4cd6e08f6
bmp: fix wrong monitoring policy type translation
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-11-05 15:54:52 +00:00
Wataru Ishida and FUJITA Tomonori
a17832195c
support neighbor belongs to VRF
...
$ gobgp vrf add red rd 100:100 rt both 100:100
$ gobgp neighbor add 10.0.0.1 as 2 vrf red
$ gobgp vrf red neighbor
Peer AS Up/Down State |#Advertised Received Accepted
10.0.0.1 2 never Active | 0 0 0
Signed-off-by: Wataru Ishida <[email protected] >
2016-11-04 13:19:47 +09:00
FUJITA Tomonori
be9918a163
remove label allocation completely
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-11-03 02:49:59 -07:00
Wataru Ishida
1f4a3192af
cli/api: support getting table summary information
...
$ gobgp global rib summary -a ipv4
$ gobgp neighbor 10.0.0.1 local summary
$ gobgp neighbor 10.0.0.1 adj-in summary
$ gobgp neighbor 10.0.0.1 adj-out summary
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-16 14:07:06 +00:00
Wataru Ishida
d46da74d4f
policy: support large-community match/action
...
close #1133
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-10 05:18:17 +00:00
Vincent Bernat and FUJITA Tomonori
ddb9303bb5
table: ensure compatibility with archs where int == int32
...
MED actions are expected to be int64 and AS are expected to be
uint32. Use ParseInt/ParseUint instead of Atoi for those until the tests
pass on ARM.
2016-10-08 06:11:08 -07:00
Chris Stockton
60ebbb99b4
Allow creating a server with a user specified grpc server.
2016-10-04 15:03:44 -07:00
Wataru Ishida
7c8b1973e7
cli: support specifying vrf-id when creating vrf
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-04 05:04:26 +00:00
FUJITA Tomonori
dfe1b71fd2
api: add id to VrfRequest
...
to support VRF ID for Zebra Protocol v3.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-09-30 05:50:25 -07:00
kishiguro and FUJITA Tomonori
554f309c90
Support of ZAPI version 3 (handles VRF ID).
2016-09-29 16:29:15 -07:00
Wataru Ishida and FUJITA Tomonori
10142c11f9
server/table: fix a bug of vrf route injection
...
regression due to 43dc07d723
before:
$ gobgp vrf add vrf01 rd 100:100 rt both 100:100
$ gobgp vrf vrf01 rib add 10.0.0.0/24
$ gobgp global rib -a ipv4
Network Next Hop AS_PATH Age Attrs
*> 10.0.0.0/24 0.0.0.0 00:00:19 [{Origin: ?} {Extcomms: [100:100]}]
after:
$ gobgp vrf add vrf01 rd 100:100 rt both 100:100
$ gobgp vrf vrf01 rib add 10.0.0.0/24
$ gobgp global rib -a ipv4
Network not in table
$ gobgp global rib -a vpnv4
Network Labels Next Hop AS_PATH Age Attrs
*> 100:100:10.0.0.0/24 [16000] 0.0.0.0 00:00:19 [{Origin: ?} {Extcomms: [100:100]}]
Signed-off-by: Wataru Ishida <[email protected] >
2016-09-13 00:49:17 -07:00
FUJITA Tomonori
eef1fc0a75
add RemoteRouterId to config.NeighborState
...
Stop using config.NeighborState's Description in a hacky way for the
remote Router Id.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-26 18:15:03 +09:00
FUJITA Tomonori
982a5b448f
zebra: add grpc api
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-26 17:29:38 +09:00
Wataru Ishida and FUJITA Tomonori
26c232f2c4
api: publish ToPathApi(*table.Path)
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-08-25 15:53:14 +09:00
Wataru Ishida and FUJITA Tomonori
3235c0618c
api/cli: kill cmd package custom path/destination structs
...
reuse table package
Signed-off-by: Wataru Ishida <[email protected] >
2016-08-25 15:53:14 +09:00
Wataru Ishida and FUJITA Tomonori
b3c874da25
server/api: fix GetRib API to return sorted destination
...
the feature has been broken.
Signed-off-by: Wataru Ishida <[email protected] >
2016-08-25 15:53:14 +09:00
Wataru Ishida
430a4f93e8
api: enable to set/get UseMultiplePaths global setting
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-08-21 07:17:34 +00:00
ISHIDA Wataru and FUJITA Tomonori
cd4b0107c3
policy: support route-type condition
...
// match with routes locally generated
$ gobgp policy statement s0 add condition route-type local
// match with routes received from eBGP peers
$ gobgp policy statement s0 add condition route-type external
// match with routes received from iBGP peers
$ gobgp policy statement s0 add condition route-type internal
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-08-17 21:23:08 +09:00
ISHIDA Wataru
0a9375a40e
api: support address family filtering of MonitorRib API
...
the feature was somehow dropped
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-08-16 03:47:03 +00:00
FUJITA Tomonori
411bf84633
support mrt table dump (TABLE_DUMPv2 format)
...
Only global rib dumping is supported for now.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-14 07:51:42 +09:00
ISHIDA Wataru and FUJITA Tomonori
b19731ffea
api/cli: api/cli support for unnumbered bgp
...
fron cli:
```
$ gobgp neighbor add interface eth1 as 65000
$ gobgp neighbor del interface eth1
$ gobgp neighbor eth1
Peer AS Up/Down State |#Advertised Received Accepted
eth1 65000 00:00:05 Establ | 0 0 0
```
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-08-02 10:48:58 +09:00
ISHIDA Wataru and FUJITA Tomonori
bb15c18402
api/cli: add LocalAddress to PeerConf struct
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-07-29 16:31:35 +09:00
ISHIDA Wataru and FUJITA Tomonori
59997e8daa
server: move default config setting logic inside BgpServer's methods
...
We have three ways to configure gobgp. config file, grpc api and native lib.
Every methods eventually call (*server.BgpServer).Start() or
(*server.BgpServer).AddNeighbor() when starting bgp server or adding
neighbors.
This commit moves default config setting logic inside them to remove
redundant code in grpc_server.go and simplify the usage of native lib.
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-07-29 16:31:35 +09:00
ISHIDA Wataru and FUJITA Tomonori
e97a59c539
config: curve out code specific to default neighbor config setting
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-07-29 16:31:35 +09:00
FUJITA Tomonori
af98780240
move grpc_server.go from server/ to api/
...
Now all gRPC code was moved to api/.
server/ isn't dependent on gRPC anymore.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-29 00:43:52 +09:00
Ben Agricola and FUJITA Tomonori
ed62f3f3d9
Add shorter prefix search
...
Adds a shorter-prefixes search mode that finds any identical-or-less-specific routes
than the input values.
Bug-Url: #1006
Signed-off-by: Ben Agricola [email protected]
2016-07-11 21:41:01 +09:00
FUJITA Tomonori
140008ec2a
api: catch up the latest grpc
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-06-07 04:53:35 +09:00
ISHIDA Wataru and FUJITA Tomonori
aca6fd6ad4
server: refactoring for monitorbestchanged api. use watcher infra
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-06-06 12:43:20 +09:00
ISHIDA Wataru and FUJITA Tomonori
70434c96d2
policy: add support setting self ip address as next-hop
...
from configuration file
[policy-definitions.statements.actions.bgp-actions]
set-next-hop = "self"
from cli
$ gobgp policy statement stmt1 add action next-hop self
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-05-26 23:19:04 +09:00
ISHIDA Wataru
0dbf1d87cb
policy: add local-pref action
...
$ gobgp policy statement st01 add action local-pref 110
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-05-25 02:53:42 +00:00
ISHIDA Wataru and FUJITA Tomonori
c7e1f88da3
cli: include route-reflector/route-server infomation in Peer message
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-05-21 07:45:12 +09:00