178 Commits
Author SHA1 Message Date
IWASE YusukeandFUJITA Tomonori bc3e06a55f config: TTL value for BGP packets
Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-23 18:13:19 +09:00
IWASE YusukeandFUJITA Tomonori 5bb427a994 config: Add parameters for TTL Security
Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-23 18:13:19 +09:00
Satoshi Fujimoto 85a62d8ede peer: Set NeighborAddress before initializing dynamic peers
If State.NeighborAddress is not set, setting default configs
for the dynamic peers will fail. This patch set State.NeighborAddress
before setting default configs.
And this patch avoids overwriting State.NeighborAddress if it is set.

Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-06-20 11:28:09 +09:00
Satoshi Fujimoto d75edf18d7 server: Support Dynamic Neighbor
Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-06-16 15:53:18 +09:00
Satoshi Fujimoto 369626d222 config: Option to enable Dynamic Neighbor
Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-06-16 15:53:07 +09:00
Satoshi Fujimoto be2524ee3e config: Use State to get NeighborAddress instead of Config
By introducing dynamic neighbor feature,
GoBGP can have dynamic neighbors,
and corresponding Config.NeighboAddress can be empty.

This patch sets State.NeighborAddress for all neighbors,
and gets the neighbor's address from them.

Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-06-16 09:09:47 +09:00
IWASE Yusuke 4bce52c3f3 config: Add counter for BMP statistics
Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-09 11:23:06 +09:00
FUJITA Tomonori d65df0b045 replace github.com/Sirupsen/logrus with github.com/sirupsen/logrus
The usage of "github.com/sirupsen/logrus" is recommended.

Signed-off-by: FUJITA Tomonori <[email protected]>
2017-06-07 21:04:11 +09:00
Satoshi FujimotoandFUJITA Tomonori 6e9d5b56c4 *: Support Peer-Group Configuration
This patch enables to create peer-groups,
also supports dynamic configuration to peer-groups.

Manually set fields in neighbor configs have priority over its peer-group's config,
except some fields, like "peer-as", or "minimum-advertisement-interval" and so on.

Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-06-05 14:24:45 +09:00
Satoshi FujimotoandFUJITA Tomonori 8fd9530ff9 config: Initialize Graceful Restart State
Currently, the restarting speaker ends restarting procedure
before receiving End-of-Rib markers from all helper speakers.
It is because `MpGracefulRestart.State.Enabled` is not initialized,
always evalueted to false, so the restarting speaker misunderstands
as there is not helper speaker.

This patch adds code to initialize `MpGracefulRestart.State.Enabled`.
This fixes #1296.

Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-06-05 11:40:32 +09:00
IWASE YusukeandFUJITA Tomonori bbf4b7c2a9 config: Option to enable BMP Route Mirroring
Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-03 18:18:23 +09:00
IWASE Yusuke 76ba8fcbda server/peer: Number of filtered routes to advertise
This patch extend the "AdjTable" container to store the number of the
"filtered" routes which should not be advertised to the given neighbor.
This routes mean the filterd routes because of RTC, VRFs, policy and
other constraints.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-05-22 13:12:02 +09:00
IWASE Yusuke c37b50a024 config: Add interval seconds for BMP stats reports
This patch suppose the default interval of the BMP stats reports is
0 which disable this feature and the range of this interval is 15
though 65535 seconds to follow Junos OS configuration.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-05-22 13:12:02 +09:00
IWASE YusukeandFUJITA Tomonori ea56b24395 bmp: Enable to specify all route monitoring policies
This patch adds the new key "all" for specifying the all BMP route
monitoring policies.

Configuration Example:
  [[bmp-servers]]
    [bmp-servers.config]
      address = "127.0.0.1"
      port=11019
      route-monitoring-policy = "all"

Signed-off-by: IWASE Yusuke <[email protected]>
2017-05-22 12:10:07 +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
ISHIDA Wataru c8cb20e75b policy: send a withdrawal if export policy blocks an existing route
This patch fixes a bug of export policy and implicit withdrawal.

When a path is filtered by export policy, we need to check whether the
old path (implicit withdrawn path) was sent before the new path.
If it has been sent, we need to send a withdrawal message.

Signed-off-by: ISHIDA Wataru <[email protected]>
2017-04-18 07:40:15 +00:00
IWASE YusukeandFUJITA Tomonori 0f0f13417e config/bgp_configs: Constant for Local RIB in BMP
This patch adds a constant for Local RIB routes defined in
"draft-evens-grow-bmp-local-rib".

Signed-off-by: IWASE Yusuke <[email protected]>
2017-04-17 21:57:11 +09:00
ISHIDA WataruandFUJITA Tomonori bba54bdaa1 skip asn negotiation for BGP unnumbered peers
since BGP unnumbered peers are typically trusted, skip asn negotiation
for easy configuration.

from configuration file:

```toml
[[neighbors]]
[[neighbors.config]]
neighbor-interface = "eth0"
```

from cli:

```
$ gobgp neighbor add interface eth0
```

Signed-off-by: ISHIDA Wataru <[email protected]>
2017-04-04 22:07:46 +09:00
ISHIDA WataruandFUJITA Tomonori 806e4c250b config: enabled IPv4/IPv6 unicast for BGP unnumbered peer by default
Signed-off-by: ISHIDA Wataru <[email protected]>
2017-04-04 22:07:46 +09:00
IWASE YusukeandFUJITA Tomonori 64ed2f5f72 config/default: Fix the default for Zebra.Config.Version
Signed-off-by: IWASE Yusuke <[email protected]>
2017-03-27 14:43:54 +09:00
FUJITA Tomonori a2db0a7586 config: update yang file
update the yang file for the commit 59ec403de7.

Signed-off-by: FUJITA Tomonori <[email protected]>
2017-03-06 20:33:20 -08: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 3f34af3dc9 config: Detect config file type automatically
This patch enables to automatically detect the type of config file
by retrieving the extension from the config file name.
e.g.) "gobgpd.toml" will be assumed as TOML formatted file.

Note: This feature will override the format specified with the cli
"--config-type" option.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 17:20:49 +09:00
Wataru Ishida e566d55587 config: fix bug of default rpki port setting
Signed-off-by: Wataru Ishida <[email protected]>
2016-11-25 00:31:50 -05: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 3f2dd34d37 client: add golang client library
Signed-off-by: Wataru Ishida <[email protected]>
2016-11-14 02:15:45 +00:00
Wataru Ishida 480eb32783 config: add json tag for config structures
Signed-off-by: Wataru Ishida <[email protected]>
2016-11-14 02:15:44 +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 d23cea2d7c config: delete Equal() method for State structures
we only use Equal() method for configuration structures

Signed-off-by: Wataru Ishida <[email protected]>
2016-11-14 02:12:50 +00:00
Wataru IshidaandFUJITA 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 d46da74d4f policy: support large-community match/action
close #1133

Signed-off-by: Wataru Ishida <[email protected]>
2016-10-10 05:18:17 +00:00
Wataru IshidaandFUJITA Tomonori 614746ca11 *: support long lived graceful restart
Signed-off-by: Wataru Ishida <[email protected]>
2016-10-09 07:18:13 -07:00
Wataru IshidaandFUJITA Tomonori 6b6f6974fc *: Notification support for BGP GR
implement draft-ietf-idr-bgp-gr-notification-07

Signed-off-by: Wataru Ishida <[email protected]>
2016-10-09 07:15:08 -07:00
kishiguroandFUJITA Tomonori 8f4603b25a Add version to zebra-config in gobgp.yang. 2016-09-29 16:29:15 -07:00
kishiguroandFUJITA Tomonori 554f309c90 Support of ZAPI version 3 (handles VRF ID). 2016-09-29 16:29:15 -07:00
FUJITA Tomonori 199e0b0ae2 config: stop resetting Neighbor.Config.Description
Due to this bug, the description isn't set.

Signed-off-by: FUJITA Tomonori <[email protected]>
2016-08-29 14:27:42 +09: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
ISHIDA WataruandFUJITA 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
FUJITA Tomonori 2c12fa2b92 mrt: support per-peer table dump with route server configuration
Signed-off-by: FUJITA Tomonori <[email protected]>
2016-08-15 09:24:49 +09: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 a670746556 config: fix compile error on non-linux platform
Signed-off-by: ISHIDA Wataru <[email protected]>
2016-08-05 00:58:33 +00:00
ISHIDA WataruandFUJITA Tomonori 1890b4c5ef config: support unnumbered bgp peering
from configuration file:

```toml
[[neighbors]]
[[neighbors.afi-safis]]
neighbor-interface = "eth0"
peer-as = 65000
```

Signed-off-by: ISHIDA Wataru <[email protected]>
2016-08-02 10:48:58 +09:00
ISHIDA WataruandFUJITA Tomonori a46e8b6826 config: fix error propagatation in default config setting
bug introduced by e97a59c539

Signed-off-by: ISHIDA Wataru <[email protected]>
2016-08-02 10:48:58 +09:00
dspandFUJITA Tomonori c4fe45902e all logging is done with log.WithFields
Signed-off-by: dsp <[email protected]>
Signed-off-by: ISHIDA Wataru <[email protected]>
2016-07-30 12:17:37 +09:00
ISHIDA WataruandFUJITA Tomonori 7e74c11fdd config: simplify ipv6 link local address peering
from cli:

```
gobgp neighbor add fe80::902f:4eff:fe52:6985%eth0 as 65000
```

from configuration file:

```toml
[[neighbors]]
[[neighbors.afi-safis]]
[neighbors.config]
neighbor-address = "fe80::902f:4eff:fe52:6985%eth0"
peer-as = 65000
```

Signed-off-by: ISHIDA Wataru <[email protected]>
2016-07-29 16:31:35 +09:00
ISHIDA WataruandFUJITA Tomonori f3ae68b9f2 config: curve out code specific to default global config setting
Signed-off-by: ISHIDA Wataru <[email protected]>
2016-07-29 16:31:35 +09:00