Please setup ExaBGP and Quagga before this manual.
Let’s create fake process which work as proxy for relying data from Linux PIPE to ExaBGP:
1 |
vim /etc/exabgp/exabgp_pipe_provider.sh |
With this contents:
1 2 3 4 5 6 7 8 |
#!/bin/sh FIFO="/var/run/exabgp.cmd" #trap "rm -f $FIFO" SIGINT rm -f $FIFO mkfifo $FIFO tail -f $FIFO |
Set exec flag:
1 |
chmod +x /etc/exabgp/exabgp_pipe_provider.sh |
And add following (process service-dynamic ….) to ExaBGP config: /etc/exabgp_blackhole.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
group Core_v4 { hold-time 180; local-as 65001; peer-as 1234; router-id 10.0.3.114; graceful-restart 1200; static { route 10.10.10.1/32 next-hop 10.0.3.114 community 65001:666; } neighbor 10.0.3.115 { local-address 10.0.3.114; description "Quagga"; } # Add this line for process management process service-dynamic { run /etc/exabgp/exabgp_pipe_provider.sh; } } |
And run ExaBGP!
After this we could see multiple processes in process list:
1 2 3 4 |
ps aux|grep exa root 36854 0.0 0.0 52764 14604 ? S 11:47 0:00 /usr/bin/python /usr/local/bin/exabgp /etc/exabgp_blackhole.conf root 36855 0.0 0.0 4328 868 ? S 11:47 0:00 /bin/sh /etc/exabgp/exabgp_pipe_provider.sh root 36858 0.0 0.0 5800 1324 ? S 11:47 0:00 tail -f /var/run/exabgp.cmd |
We are ready!
Let’s add announce:
1 |
echo "announce route 10.10.10.123/32 next-hop 10.0.3.114 community 65001:666" > /var/run/exabgp.cmd |
If you want to disable it please use this syntax:
1 |
echo "withdraw route 10.10.10.123/32" > /var/run/exabgp.cmd |
After announce route we could see on Quagga side new prefix:
1 |
*> 10.10.10.123/32 10.0.3.114 0 65001 i |