Now it’s time to start FastNetMon
1.a) Server side:
bash-4.2# cd /opt/fastnetmon/
bash-4.2# ./fastnetmon --daemonize --configuration_file /etc/fastnetmon.conf --log_file /var/log/fastnetmon.log
Verify if working:
bash-4.2# ps -ef | grep fast
root 363 1 0 13:23 ? 00:00:00 ./fastnetmon --daemonize --configuration_file /etc/fastnetmon.conf --log_file /var/log/fastnetmon.log
1.b) Client side:
From the same directory from where we have started the server we have to start also the FastNetMon client which is printing out the connections, the traffcic and eventually any banned IP.
bash-4.2# ./fastnetmon_client
More info can be found on the following link: https://fastnetmon.com/docs/bgp_flow_spec/.
Based on the version taht you are using the configuration section may be different.
Used version:
bash-4.2# ./fastnetmon --version
Version: 1.1.3 master git-38bf681f18f80259337bbb060f7040103416ba8c
B) Configure ExaBGP which is on the same Quagga5 machine
ExabGP version:
bash-4.2# exabgp -v
ExaBGP : 4.1.2-d006a34a
Python : 3.6.8 (default, Aug 7 2019, 17:28:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Uname : Linux Quagga5 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019 x86_64
Root : /usr/local
First craete the pipe file that will be used to send command to exaBGP:
#mkfifo /var/run/exabgp.cmd
#chmod +x /var/run/exabgp.cmd
Create a configuration file for exabgpas as follows:
bash-4.2#
cat config-fastnet.iniprocess service-dynamic {
run /usr/bin/socat stdout pipe:/var/run/exabgp.cmd;
encoder text;
}
neighbor 10.10.12.1 {
hold-time 180;
local-as 100;
peer-as 100;
router-id 10.10.12.3;
local-address 10.10.12.3;
api {
processes [service-dynamic];
}
}
neighbor 10.10.12.2 {
hold-time 180;
local-as 100;
peer-as 100;
router-id 10.10.12.3;
local-address 10.10.12.3;
api {
processes [service-dynamic];
}
}
Basically we are sending commands to exabgp through a pipe using socat as defined in the service-dynamic section of the config-fastnet.ini file.
Start exabgp daemon from command line as follows, for debugging purpose we don’t daemonize it .
bash-4.2# env exabgp.daemon.user=root exabgp.daemon.daemonize=false exabgp ./config-fastnet.ini