Hesp needed to get started with exabgp

856 views
Skip to first unread message

Mark Hieber

unread,
Mar 10, 2017, 9:22:45 AM3/10/17
to exabgp-users

I started working with exabgp. My requirements are very simple. I have a Linux VM and I would like to setup a BGP session between the host and the VM. This is the path where I have exabgp

[root@localhost ~]# whereis exabgp
exabgp: /usr/sbin/exabgp /etc/exabgp /usr/share/man/man1/exabgp.1.gz

I wrote a .conf file in /etc/exabgp/exabgp.conf

[root@localhost ~]# cat /etc/exabgp/exabgp.conf
group VM {
router-id 1.2.3.4;

neighbor 5.6.7.8 {
local-address 1.2.3.4;
local-as 65000;
peer-as 65000;
}
process add-routes {
run /root/example.py;

}
}

My script to announce the routes are in /root/example.py and I chmod it to 755

#!/usr/bin/env python

from sys import stdout
from time import sleep

messages = [
'announce route A.A.A.A next-hop self',
'announce route B.B.B.B next-hop self',
]

sleep(5)

#Iterate through messages
for message in messages:
stdout.write( message + '\n')
stdout.flush()
sleep(1)

#Loop endlessly to allow ExaBGP to continue running
while True:
sleep(1)

I am currently running this manually as /usr/sbin/exabgp /etc/exabgp/exabgp.conf

1. Does my conf look correct? I saw it needs to be a conf.ini in some examples. Where should the conf file be?

2. Does my example script look correct? Again where should I put the script, any suggested path.

3. I did not have a exabgp.env, so I did a /usr/sbin/exabgp --fi > /etc/exabgp/exabgp.env. How can I change the logging destination or any other parameters in the env file?

4. How can I run exabgp continuously? So if the VM reboots I would like exabgp to auto start.

5. Are there any other healthchecks I should be performing?

Thanks


newbie

unread,
Mar 22, 2017, 6:03:05 AM3/22/17
to exabgp-users
Hello Mark,

  1. Your config looks fine and you can run exabgp config with any name. It can be .cf, .conf etc., You can place your config file on /etc/exabgp
  2. You can place your script at any path but make sure you give the same path of your script file in your exabgp config file.
  3. You can change the logging destination on the exabgp.env which you have generated.
  4. To run exabgp continously and even at startup, make it as a daemon service and you can place the exabgp config file on the daemon script.
  5. If you want to run any healthchecks you can use healthcheck.py script for the same.

Hope this helps.

Best Regards,
Sangeeth G

Thomas Mangin

unread,
Mar 24, 2017, 10:58:17 AM3/24/17
to exabgp-users
Please keep in mind that if you use master, every command will be ACK with a message back that you MUST read (otherwise it will lock ExaBGP).

Thomas

--
You received this message because you are subscribed to the Google Groups "exabgp-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exabgp-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages