2015-04-26 15:00:47 +02:00
# FastNetMon and ExaBGP integration
FastNetMon could enable/disable announce of blackholed IPs (/32) to BGP core router (Cisco, Juniper, Quagga). This feature implemented with ExaBGP toolkit.
If you want to use this capability, please set following params in /etc/fastnetmon.conf and tune they to values suitable in your network:
```bash
exabgp = on
exabgp_command_pipe = /var/run/exabgp.cmd
exabgp_community = 65001:666
exabgp_next_hop = 10.0.3.114
2015-09-23 17:20:51 +02:00
exabgp_announce_host = on
2015-04-26 15:00:47 +02:00
```
Secondly, you should install, configure and run ExaBGP toolkit.
Install ExaBGP:
```bash
2015-05-14 17:49:26 +02:00
apt-get install python-pip
2015-04-26 15:00:47 +02:00
pip install exabgp
```
2015-05-11 22:22:34 +02:00
Install socat (if you haven't socat for your platform, please check this [manual ](EXABGP_INTEGRATION_WITHOUT_SOCAT.md )):
```bash
apt-get install -y socat
yum install -y socat
```
2015-04-26 15:00:47 +02:00
Create example configuration: ```vim /etc/exabgp_blackhole.conf```
Example here (please fix this configuration to your network):
```bash
group Core_v4 {
hold-time 180;
2015-05-14 18:00:14 +02:00
# local AS number
2015-04-26 15:00:47 +02:00
local-as 65001;
2015-05-14 18:00:14 +02:00
# Remote AS number
2015-04-26 15:00:47 +02:00
peer-as 1234;
2015-05-14 18:00:14 +02:00
# ID for this ExaBGP router
2015-04-26 15:00:47 +02:00
router-id 10.0.3.114;
graceful-restart 1200;
2015-05-14 18:00:14 +02:00
# Remote peer
2015-04-26 15:00:47 +02:00
neighbor 10.0.3.115 {
2015-05-14 18:00:14 +02:00
# Local IP addess which used for connections to this peer
2015-04-26 15:00:47 +02:00
local-address 10.0.3.114;
description "Quagga";
}
# Add this line for process management
process service-dynamic {
2015-05-11 22:22:34 +02:00
run /usr/bin/socat stdout pipe:/var/run/exabgp.cmd;
2015-04-26 15:00:47 +02:00
}
}
```
Run ExaBGP:
```bash
env exabgp.daemon.user=root exabgp.daemon.daemonize=true exabgp.daemon.pid=/var/run/exabgp.pid exabgp.log.destination=/var/log/exabgp.log exabgp /etc/exabgp_blackhole.conf
```
2015-04-26 15:02:32 +02:00
You could read my articles about ExaBGP configuration too: [first ](http://www.stableit.ru/2015/04/quagga-bgp-and-exabgp-work-together-for.html ) and [second ](http://www.stableit.ru/2015/04/how-to-control-exabgp-from-external-tool.html )