GoBGP supports BGP Monitoring Protocol (RFC 7854), which provides a convenient interface for obtaining route views.
Assume you finished Getting Started.
Add [bmp-servers] session to enable BMP.
[global.config]
as = 64512
router-id = "192.168.255.1"
[[bmp-servers]]
[bmp-servers.config]
address = "127.0.0.1"
port=11019The supported route monitoring policy types are:
- pre-policy (Default)
- post-policy
- both (Obsoleted)
- local-rib
- all
The pre-policy and post-policy types report the Adj-RIB-In of each peer, so
they carry only the routes received from that peer. Routes that GoBGP
originates itself, such as the ones added through the API or the CLI, injected
from a VRF, or redistributed by zebra, are reported by the local-rib type
instead. That is the Loc-RIB Instance Peer of RFC 9069, which replaced Section
8.2 of RFC 7854.
Enable post-policy support as follows:
[[bmp-servers]]
[bmp-servers.config]
address = "127.0.0.1"
port=11019
route-monitoring-policy = "post-policy"Enable all policies support as follows:
[[bmp-servers]]
[bmp-servers.config]
address = "127.0.0.1"
port=11019
route-monitoring-policy = "all"To enable BMP stats reports, specify the interval seconds to send statistics messages. The default value is 0 and no statistics messages are sent. Please note the range of this interval is 15 though 65535 seconds.
[[bmp-servers]]
[bmp-servers.config]
address = "127.0.0.1"
port=11019
statistics-timeout = 3600To enable route mirroring feature, specify true for route-mirroring-enabled option.
Please note this option is mainly for debugging purpose.
[[bmp-servers]]
[bmp-servers.config]
address = "127.0.0.1"
port=11019
route-mirroring-enabled = trueLet's check if BMP works with a bmp server. You can find some OSS BMP server implementations such as yambp, OpenBMP, etc.