Page MenuHomeVyOS Platform

[BMP-BGP] Routing monitoring feature
Closed, ResolvedPublicFEATURE REQUEST

Description

hi team

BGP has the ability to monitor prefix more advanced than snmp , this rfc explains how this feature works :

https://datatracker.ietf.org/doc/html/rfc7854.html

FRR supports it , we can enable it for VyOS-cli too . below I'll show the steps necessary to enable it :

#enable BMP on BGP demon

bgpd_options="   --daemon -A 127.0.0.1 -M snmp -M rpki -M bmp"

after you should restart bgp daemon and it allows to configure BMP inside BGP process , here is an example:

# FRR configuration

!
frr version 8.1

hostname BGP-BMP

 bgp router-id 10.10.10.10
 bgp log-neighbor-changes
 no bgp ebgp-requires-policy
 no bgp default ipv4-unicast
 no bgp network import-check
 neighbor 20.20.20.20 remote-as 65050
 neighbor 20.20.20.20 update-source dum10
 !
 address-family ipv4 unicast
  neighbor 20.20.20.20 activate
  neighbor 20.20.20.20 soft-reconfiguration inbound
 exit-address-family
 !
# BMP settings 
 bmp mirror buffer-limit 512000000
 !
 bmp targets bmptest
  bmp stats interval 1000
  bmp monitor ipv4 unicast pre-policy
  bmp connect 127.0.0.1 port 5000 min-retry 1000 max-retry 2000
 exit
exit

also , it has its own operational-commands :

##FRR

BGP-BMP# show bmp
BMP state for BGP VRF default:

  Route Mirroring         0 bytes (0 messages) pending
                          0 bytes maximum buffer used
                  512000000 bytes buffer size limit

  Targets "bmptest":
    Route Mirroring disabled
    Route Monitoring IPv4 unicast pre-policy
    Listeners:

    Outbound connections:
 remote           state                            timer
 -------------------------------------------------------------
 127.0.0.1:5000

also , I leave some reference link about BMP

https://blog.apnic.net/2021/12/14/better-route-monitoring-with-bmp/

https://docs.frrouting.org/en/latest/bmp.html

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Event Timeline

this PR https://github.com/vyos/vyos-1x/pull/1088 only include how to enable daemon , but it doesn't add VyOS-cli commands in BGP (the daemon only allows you to enable it).

@fernando Thanks, do you have any idea about syntax?

well , I think it should be something like this :

### FRR BMP

bmp mirror buffer-limit 512000000
 !
 bmp targets bmptest
  bmp stats interval 1000
  bmp monitor ipv4 unicast pre-policy
  bmp connect 127.0.0.1 port 5000 min-retry 1000 max-retry 2000

`

on VyOS-Cli , it looks like this:

set protocols bgp bmp mirror buffer-limit 512000000
set protocols bgp bmp targets $NAME stats interval 1000
set protocols bgp bmp targets $NAME listener $IP-ADRESS/IPV6 port $PORT
set protocols bgp bmp targets $NAME monitor <ipv4-ipv6> unicast pre-policy
set protocols bgp bmp targets $NAME connect $IP-ADRESS/IPV6 port $PORT min-retry 1000 max-retry 2000


#operational-command 

vyos@BGP-BMP:~$ show bmp 

`

I believed in this way is very intuitive but you feel free to changes any command.

hi

we found an error when we tried to upload the configuration using the frr.reload.py . I did an issues request to FRR with this problem ,here is the case:

https://github.com/FRRouting/frr/issues/10548

this issue with frr.reload.py keeps happening with stable/8.1 , we'll try it when 8.2 is stable.

2022-02-23 17:22:13,946  INFO: /var/run/frr/reload-CCG84F.txt content
['router bgp 65001\n bmp mirror buffer-limit 1600\n  bmp stats interval 1200\n',
 'router bgp 65001\n'
 ' bmp mirror buffer-limit 1600\n'
 '  bmp monitor ipv4 unicast pre-policy\n',
 'router bgp 65001\n bmp mirror buffer-limit 1600\n',
 'router bgp 65001\n bmp mirror buffer-limit 1600\n  bmp targets test55\n',
 'router bgp 65001\n bmp mirror buffer-limit 1600\n  bmp stats interval 1200\n',
 'router bgp 65001\n'
 ' bmp mirror buffer-limit 1600\n'
 '  bmp monitor ipv4 unicast pre-policy\n']
line 3: % Unknown command[24]:   bmp stats interval 1200
line 7: % Unknown command[24]:   bmp monitor ipv4 unicast pre-policy
line 18: % Unknown command[24]:   bmp stats interval 1200
line 22: % Unknown command[24]:   bmp monitor ipv4 unicast pre-policy
2022-02-23 17:22:15,731 WARNING: frr-reload.py failed due to
vtysh (exec file) exited with status 2
vyos@vyos:~$ ls

I've been testing , now we are able to configure BMP with load configuration .in latest version 8.2.2(they solved these issues)

2022-03-19 19:44:46,067 DEBUG: Running Frr Config (Pass #1)
frr version 8.2.2
frr defaults traditional
hostname debian
log syslog
log facility local7
hostname vyos
service integrated-vtysh-config
!
router bgp 65001
no bgp ebgp-requires-policy
no bgp default ipv4-unicast
no bgp network import-check
neighbor 172.16.50.2 remote-as 65050
neighbor 172.16.50.2 description ISP1
neighbor 172.16.50.2 update-source eth1
neighbor 172.16.120.2 remote-as 65035
neighbor 172.16.120.2 description ISP2
neighbor 172.16.120.2 update-source eth2
!
address-family ipv4 unicast
network 10.10.10.10/32
neighbor 172.16.50.2 activate
neighbor 172.16.50.2 soft-reconfiguration inbound
neighbor 172.16.120.2 activate
neighbor 172.16.120.2 soft-reconfiguration inbound
exit-address-family
!
bmp mirror buffer-limit 1600
!
bmp targets test55
bmp stats interval 1200
bmp monitor ipv4 unicast pre-policy
exit
exit
!
end
2022-03-19 19:44:46,080  INFO: /var/run/frr/reload-PMKSUG.txt content
['ip route 0.0.0.0/0 172.16.50.1 eth0 tag 210 210\n',
 'router bgp 65001\n bmp mirror buffer-limit 1600\n',
 'ip route 0.0.0.0/0 172.16.50.1 eth0 tag 210 210\n',
 'router bgp 65001\n bmp targets test55\n',
 'router bgp 65001\n bmp targets test55\n  bmp stats interval 1200\n',
 'router bgp 65001\n'
 ' bmp targets test55\n'
 '  bmp monitor ipv4 unicast pre-policy\n']

and process work without extra setting:

vyos@vyos:~$ ps aux | grep bmp
frr          975  0.0  3.2 190420 15924 ?        Ssl  19:25   0:00 /usr/lib/frr/bgpd -d -F traditional --daemon -A 127.0.0.1 -M snmp -M rpki -M bmp
vyos        2240  0.0  0.1   6180   664 ttyS0    S+   19:50   0:00 grep bmp

``

PR https://github.com/vyos/vyos-1x/pull/2627

set system frr bmp
commit
run restart bgp

set protocols bgp system-as '65001'
set protocols bgp neighbor 192.168.122.11 address-family ipv4-unicast
set protocols bgp neighbor 192.168.122.11 remote-as '65001'

set protocols bgp bmp mirror-buffer-limit '256000000'
set protocols bgp bmp target foo address '127.0.0.1'
set protocols bgp bmp target foo port '5000'
set protocols bgp bmp target foo min-retry '1000'
set protocols bgp bmp target foo max-retry '2000'
set protocols bgp bmp target foo mirror
set protocols bgp bmp target foo monitor ipv4-unicast post-policy
set protocols bgp bmp target foo monitor ipv4-unicast pre-policy
set protocols bgp bmp target foo monitor ipv6-unicast post-policy
set protocols bgp bmp target foo monitor ipv6-unicast pre-policy
fernando changed the task status from Open to Needs testing.Dec 13 2023, 10:07 PM

when it's merge , I will test with the controller to see if we are able to get BMP with the new FRR version.

Will be available in the next rolling release

Viacheslav moved this task from Open to Finished on the VyOS 1.4 Sagitta board.
Viacheslav moved this task from Open to Finished on the VyOS 1.5 Circinus board.