Hey,
Setting up exabgp between two neighbors. All look ok. but the interface route from peer is not imported into routing table. Do I need to allow for non-directly connected next-hop? If so, what's the config knob? Or I am missing something else. Really appreciate the help!
Dave
------------------------------------------------------
Neighbor 1 (lvs21)
daveqi@lvs21:~$ sudo cat /etc/exabgp/bgp.conf
# healthcheck for lb
process nlb-service {
run python -m exabgp healthcheck -s --interval 10 --increase 0 --cmd "test -f /etc/lb/lb-ready -a ! -f /etc/lb/lb-disable";
encoder text;
}
template {
neighbor lb {
router-id 10.142.0.8;
local-address 10.142.0.8;
local-as 65000;
peer-as 65000;
hold-time 6;
family {
ipv4 unicast;
}
api nlb-service {
processes [ nlb-service ];
}
}
}
# First router
neighbor 10.142.0.4 {
inherit lb;
}
daveqi@lvs21:~$ sudo cat /usr/local/etc/exabgp/exabgp.env
[exabgp.api]
ack = true
chunk = 1
cli = true
compact = false
encoder = text
pipename = 'exabgp'
respawn = false
terminate = false
[exabgp.bgp]
openwait = 60
[exabgp.cache]
attributes = true
nexthops = true
[exabgp.daemon]
daemonize = true
drop = true
pid = ''
umask = '0137'
user = 'root'
[exabgp.log]
all = false
configuration = true
daemon = true
destination = '/var/log/exabgp.log'
enable = true
level = INFO
message = false
network = true
packets = false
parser = false
processes = true
reactor = true
rib = false
routes = false
short = false
timers = false
[exabgp.pdb]
enable = false
[exabgp.profile]
enable = false
file = ''
[exabgp.reactor]
speed = 1.0
daveqi@lvs21:~$ sudo exabgp -d -e /usr/local/etc/exabgp/exabgp.env /etc/exabgp/bgp.conf
21:51:59 | 1734 | welcome | Thank you for using ExaBGP
21:51:59 | 1734 | version | 4.0.10-a8462350
21:51:59 | 1734 | interpreter | 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
21:51:59 | 1734 | os | Linux lvs21 4.18.0-0.bpo.1-cloud-amd64 #1 SMP Debian 4.18.6-1~bpo9+1 (2018-09-13) x86_64
21:51:59 | 1734 | installation | /usr/local
21:51:59 | 1734 | cli control | named pipes for the cli are:
21:51:59 | 1734 | cli control | to send commands /usr/local/run/
exabgp.in21:51:59 | 1734 | cli control | to read responses /usr/local/run/exabgp.out
daveqi@lvs21:~$ sudo uname -a
Linux lvs21 4.18.0-0.bpo.1-cloud-amd64 #1 SMP Debian 4.18.6-1~bpo9+1 (2018-09-13) x86_64 GNU/Linux
daveqi@lvs21:~$ sudo ifconfig lo:0 160.43.100.100 netmask 255.255.255.255 broadcast 160.43.100.100
daveqi@lvs21:~$ sudo ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
inet 10.142.0.8 netmask 255.255.255.255 broadcast 10.142.0.8
inet6 fe80::4001:aff:fe8e:8 prefixlen 64 scopeid 0x20<link>
ether 42:01:0a:8e:00:08 txqueuelen 1000 (Ethernet)
RX packets 1995 bytes 11251413 (10.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1583 bytes 168402 (164.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 530 bytes 26500 (25.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 530 bytes 26500 (25.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo:0: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 160.43.100.100 netmask 255.255.255.255
loop txqueuelen 1000 (Local Loopback)
daveqi@lvs21:~$ sudo exabgpcli show neighbor configuration
neighbor 10.142.0.4 {
description "";
router-id 10.142.0.8;
host-name lvs21;
domain-name lvs21;
local-address 10.142.0.8;
local-as 65000;
peer-as 65000;
hold-time 6;
manual-eor false;
passive false;
group-updates true;
auto-flush true;
adj-rib-in true;
adj-rib-out true;
md5-base64 auto;
md5-ip "10.142.0.8";
capability {
asn4 enable;
route-refresh disable;
graceful-restart disable;
add-path disable;
multi-session disable;
operational disable;
aigp disable;
}
family {
ipv4 unicast;
}
add-path {
}
api {
processes [ nlb-service ];
}
}
daveqi@lvs21:~$ sudo exabgpcli show neighbor extensive
Neighbor 10.142.0.4
Session Local
local 10.142.0.8
state ESTABLISHED
up for 0:01:03
Setup Local Remote
AS 65000 65000
ID 10.142.0.8 n/a
hold-time 6 6
Capability Local Remote
multi-session: disabled disabled
route-refresh: disabled disabled
asn4: enabled enabled
operational: disabled disabled
extended-message: enabled enabled
add-path: disabled disabled
graceful-restart: disabled disabled
Families Local Remote Add-Path
ipv4 unicast: enabled enabled disabled
Message Statistic Sent Received
notification: 0 0
update: 1 1
refresh: 0 0
total: 35 35
open: 1 1
keepalive: 33 33
----------------------------------------------------------------------------------
Neighbor2 (server1)
daveqi@server1:~$ sudo cat /etc/exabgp/bgp.conf
neighbor 10.142.0.8 {
description "test peer";
router-id 10.142.0.4;
local-address 10.142.0.4;
local-as 65000;
peer-as 65000;
hold-time 6;
group-updates;
family {
ipv4 unicast;
}
}
daveqi@server1:~$ sudo cat /usr/local/etc/exabgp/exabgp.env
[exabgp.api]
ack = true
chunk = 1
cli = true
compact = false
encoder = text
pipename = 'exabgp'
respawn = false
terminate = false
[exabgp.bgp]
openwait = 60
[exabgp.cache]
attributes = true
nexthops = true
[exabgp.daemon]
daemonize = true
drop = true
#pid = '/var/run/exabgp.pid'
pid = ''
umask = '0137'
user = 'root'
[exabgp.log]
all = false
configuration = true
daemon = true
destination = '/var/log/exabgp.log'
enable = true
level = INFO
message = false
network = true
packets = false
parser = false
processes = true
reactor = true
rib = false
routes = false
short = false
timers = false
[exabgp.pdb]
enable = false
[exabgp.profile]
enable = false
file = ''
[exabgp.reactor]
speed = 1.0
[exabgp.tcp]
acl = false
bind = '10.142.0.4'
delay = 0
once = false
port = 179
daveqi@server1:~$ sudo exabgp -d -e /usr/local/etc/exabgp/exabgp.env /etc/exabgp/bgp.conf
22:01:33 | 2060 | welcome | Thank you for using ExaBGP
22:01:33 | 2060 | version | 4.0.10-a8462350
22:01:33 | 2060 | interpreter | 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
22:01:33 | 2060 | os | Linux server1 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64
22:01:33 | 2060 | installation | /usr/local
22:01:33 | 2060 | cli control | named pipes for the cli are:
22:01:33 | 2060 | cli control | to send commands /usr/local/run/
exabgp.in22:01:33 | 2060 | cli control | to read responses /usr/local/run/exabgp.out
daveqi@server1:~$ sudo uname -a
Linux server1 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
daveqi@server1:~$ sudo ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
inet 10.142.0.4 netmask 255.255.255.255 broadcast 10.142.0.4
inet6 fe80::4001:aff:fe8e:4 prefixlen 64 scopeid 0x20<link>
ether 42:01:0a:8e:00:04 txqueuelen 1000 (Ethernet)
RX packets 2064 bytes 11275030 (10.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1660 bytes 205214 (200.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
daveqi@server1:~$ sudo exabgpcli show neighbor configuration
neighbor 10.142.0.8 {
description "test peer";
router-id 10.142.0.4;
host-name server1;
domain-name server1;
local-address 10.142.0.4;
local-as 65000;
peer-as 65000;
hold-time 6;
manual-eor false;
passive false;
group-updates true;
auto-flush true;
adj-rib-in true;
adj-rib-out true;
md5-base64 auto;
md5-ip "10.142.0.4";
capability {
asn4 enable;
route-refresh disable;
graceful-restart disable;
add-path disable;
multi-session disable;
operational disable;
aigp disable;
}
family {
ipv4 unicast;
}
add-path {
}
}
daveqi@server1:~$ sudo exabgpcli show neighbor extensive
Neighbor 10.142.0.8
Session Local
local 10.142.0.4
state ESTABLISHED
up for 0:07:13
Setup Local Remote
AS 65000 65000
ID 10.142.0.4 n/a
hold-time 6 6
Capability Local Remote
multi-session: disabled disabled
route-refresh: disabled disabled
asn4: enabled enabled
operational: disabled disabled
extended-message: enabled enabled
add-path: disabled disabled
graceful-restart: disabled disabled
Families Local Remote Add-Path
ipv4 unicast: enabled enabled disabled
Message Statistic Sent Received
notification: 0 0
update: 1 1
refresh: 0 0
total: 219 219
open: 1 1
keepalive: 217 217
# check the log to see bgp update from neighbor
daveqi@server1:~$ sudo view /var/log/exabgp.log
.......
Mon, 03 Dec 2018 22:14:13 2060 incoming-2 << message of type UPDATE
Mon, 03 Dec 2018 22:14:13 2060 parser parsing UPDATE ( 37) 0000 001C 4001 0100 4002 0040 0304 0A8E 0008 8004 0400 0000 6440 0504 0000 0064 20A0 2B64 64
Mon, 03 Dec 2018 22:14:13 2060 parser withdrawn NLRI none
Mon, 03 Dec 2018 22:14:13 2060 parser attribute origin flag 0x40 type 0x01 len 0x01 payload 00
Mon, 03 Dec 2018 22:14:13 2060 parser attribute as-path flag 0x40 type 0x02 len 0x00
Mon, 03 Dec 2018 22:14:13 2060 parser attribute next-hop flag 0x40 type 0x03 len 0x04 payload 0A8E 0008
Mon, 03 Dec 2018 22:14:13 2060 parser attribute med flag 0x80 type 0x04 len 0x04 payload 0000 0064
Mon, 03 Dec 2018 22:14:13 2060 parser attribute local-preference flag 0x40 type 0x05 len 0x04 payload 0000 0064
Mon, 03 Dec 2018 22:14:13 2060 parser NLRI ipv4 unicast without path-information payload 20A0 2B64 64
Mon, 03 Dec 2018 22:14:13 2060 parser announced NLRI
160.43.100.100/32 next-hop 10.142.0.8
Mon, 03 Dec 2018 22:14:13 2060 peer-1 << UPDATE #2
Mon, 03 Dec 2018 22:14:13 2060 peer-1 UPDATE #2 nlri ( 5)
160.43.100.100/32 next-hop 10.142.0.8
# but it is not in routing table
daveqi@server1:~$ sudo ip route show
default via 10.142.0.1 dev eth0
10.142.0.1 dev eth0 scope link
daveqi@lvs21:~$ sudo exabgp -d -e /usr/local/etc/exabgp/exabgp.env /etc/exabgp/bgp.conf
21:51:59 | 1734 | welcome | Thank you for using ExaBGP
21:51:59 | 1734 | version | 4.0.10-a8462350
21:51:59 | 1734 | interpreter | 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516]
21:51:59 | 1734 | os | Linux lvs21 4.18.0-0.bpo.1-cloud-amd64 #1 SMP Debian 4.18.6-1~bpo9+1 (2018-09-13) x86_64
21:51:59 | 1734 | installation | /usr/local
21:51:59 | 1734 | cli control | named pipes for the cli are:
21:51:59 | 1734 | cli control | to send commands /usr/local/run/exabgp.in
21:51:59 | 1734 | cli control | to read responses /usr/local/run/exabgp.out