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:
sudo fcli show bgp_announces_incoming peer_name
peer_name you can get from your BGP configuration:
sudo fcli show bgp | grep name
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:
#!/bin/bash for i in `sudo /opt/fastnetmon/app/bin/fcli show bgp_announces_incoming XXX`; do sudo /opt/fastnetmon/app/bin/fcli set main networks_list $i;done sudo /opt/fastnetmon/app/bin/fcli commit
Please replace XXX by your BGP peer name from BGP configuration of FastNetMon.
Please set execute bit for this:
chmod +x /opt/fastnetmon_network_learning.sh
And add it into cron /etc/cron.d/network_learning:
SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 1 * * * * root /opt/fastnetmon_network_learning.sh
It will add new networks from BGP session every hour. It does not delete old networks. Please do it manually from time to time.