summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config/bgp_configs.go6
-rw-r--r--docs/sources/bmp.md11
-rw-r--r--tools/pyang_plugins/gobgp.yang10
3 files changed, 27 insertions, 0 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index 45515d00..4df1503d 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -1171,6 +1171,9 @@ type BmpServerConfig struct {
RouteMonitoringPolicy BmpRouteMonitoringPolicyType `mapstructure:"route-monitoring-policy" json:"route-monitoring-policy,omitempty"`
// original -> gobgp:statistics-timeout
StatisticsTimeout uint16 `mapstructure:"statistics-timeout" json:"statistics-timeout,omitempty"`
+ // original -> gobgp:route-mirroring-enabled
+ //gobgp:route-mirroring-enabled's original type is boolean
+ RouteMirroringEnabled bool `mapstructure:"route-mirroring-enabled" json:"route-mirroring-enabled,omitempty"`
}
func (lhs *BmpServerConfig) Equal(rhs *BmpServerConfig) bool {
@@ -1189,6 +1192,9 @@ func (lhs *BmpServerConfig) Equal(rhs *BmpServerConfig) bool {
if lhs.StatisticsTimeout != rhs.StatisticsTimeout {
return false
}
+ if lhs.RouteMirroringEnabled != rhs.RouteMirroringEnabled {
+ return false
+ }
return true
}
diff --git a/docs/sources/bmp.md b/docs/sources/bmp.md
index e6f6e2bb..22f6a193 100644
--- a/docs/sources/bmp.md
+++ b/docs/sources/bmp.md
@@ -64,6 +64,17 @@ Please note the range of this interval is 15 though 65535 seconds.
statistics-timeout = 3600
```
+To enable route mirroring feature, specify `true` for `route-mirroring-enabled` option.
+Please note this option is mainly for debugging purpose.
+
+```toml
+[[bmp-servers]]
+ [bmp-servers.config]
+ address = "127.0.0.1"
+ port=11019
+ route-mirroring-enabled = true
+```
+
## <a name="verify"> Verification
Let's check if BMP works with a bmp server. GoBGP also supports BMP server (currently, just shows received BMP messages in the json format).
diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang
index 25299cc2..f6e7fb64 100644
--- a/tools/pyang_plugins/gobgp.yang
+++ b/tools/pyang_plugins/gobgp.yang
@@ -548,20 +548,30 @@ module gobgp {
"Reference to the address of the BMP server used as
a key in the BMP server list";
}
+
leaf port {
type uint32;
description
"Reference to the port of the BMP server";
}
+
leaf route-monitoring-policy {
type bmp-route-monitoring-policy-type;
default PRE-POLICY;
}
+
leaf statistics-timeout {
type uint16;
description
"Interval seconds of statistics messages sent to BMP server";
}
+
+ leaf route-mirroring-enabled {
+ type boolean;
+ description
+ "Enable feature for mirroring of received BGP messages
+ mainly for debugging purpose";
+ }
}
grouping gobgp-bmp-server-state {