1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-09-26 01:20:59 +02:00
fastnetmon-rewritten/docs/BGP_FLOW_SPEC.md
2015-07-14 16:10:30 +03:00

1.2 KiB

All this docs about ExaBGP 4.0 (Git master branch)

Clone code:

cd /usr/src/
git clone git clone https://github.com/Exa-Networks/exabgp.git

Thay are not compatible with ExaBGP 3.0

vim /root/announcer.py:

#!/usr/bin/python
 
fl=open("/var/run/exabgp.cmd", "w")
 
fl.write("announce flow route source 4.0.0.0/24 destination 127.0.0.0/24 protocol [ udp ] source-port [ =53 ] destination-port [ =80 ] packet-length [ =777 =1122 ] fragment [ is-fragment dont-fragment ] rate-limit 1024" + '\n')
fl.flush()
 
fl.close

Please be careful about flush and trailing '\n'!!!

vim /etc/exabgp_flowspec.conf:

process announce-routes {
    run /usr/bin/socat stdout pipe:/var/run/exabgp.cmd;
    encoder json;
}

neighbor 127.0.0.1 {
    router-id 1.2.3.4;
    local-address 127.0.0.1;
    local-as 1;
    peer-as 1;
    group-updates false;

  family {
        ipv4 flow;
    }
    api {
        processes [ anounce-routes ];
    }
}

Run it:

cd /usr/src/exabgp
env  exabgp.api.file=/tmp/exabgp.cmd exabgp.daemon.user=root exabgp.daemon.daemonize=false exabgp.daemon.pid=/var/run/exabgp.pid exabgp.log.destination=/var/log/exabgp.log sbin/exabgp --debug /etc/exabgp_flowspec.conf