21.07.2018

Subnet collection from BGP peering session

FastNetMon relies on networks/subnets available in your network. But in dynamic environment with big number of peers and frequent changes it may be complicated to maintain list of monitored networks up to date.

To enable this feature, please redistribute all networks which belong to your company. Please do not redistribute Full BGP table because it will overload FastNetMon’s BGP daemon.

We offer native command which can return all networks received from BGP session directly:

peer_name you can get from your BGP configuration:

You can use this data and run script to reconfigure FastNetMon’s networks lists each 10-20 minutes. We have example code for this task here.

As option, you can write this simple script /opt/fastnetmon_network_learning.sh:

Please replace XXX by your BGP peer name from BGP configuration of FastNetMon.

Please set execute bit for this:

And add it into cron /etc/cron.d/escalation_to_bgp_blackhole:

It will add new networks from BGP session every hour. It does not delete old networks. Please do it manually from time to time.