Prefixes are injected with patched gobgp
. Systemd service template for gobgpd
processes:
martin@bgp-feed:~$ cat /etc/systemd/system/[email protected]
[Unit]
Description=GoBGP Routing Daemon - instance %i
After=network.target syslog.service
ConditionPathExists=/usr/local/etc/gobgpd-%i.conf
[Service]
Type=notify
ExecStartPre=/usr/local/sbin/gobgpd --api-hosts=127.0.0.1:505%i --config-file=/usr/local/etc/gobgpd-%i.conf --dry-run
ExecStart=/usr/local/sbin/gobgpd --api-hosts=127.0.0.1:505%i --config-file=/usr/local/etc/gobgpd-%i.conf --sdnotify --disable-stdlog --syslog yes $GOBGPD_OPTIONS
ExecReload=/usr/local/sbin/gobgpd --api-hosts=127.0.0.1:505%i --graceful-restart
DynamicUser=yes
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
martin@bgp-feed:~$
gobgpd
configuration file example:
martin@bgp-feed:~$ cat /usr/local/etc/gobgpd-1.conf
[global.config]
as = 6667
router-id = "127.0.0.55"
port = 8055
[[neighbors]]
[neighbors.config]
neighbor-address = "127.0.0.1"
peer-as = 6667
[neighbors.transport.config]
passive-mode = true
local-address = "127.0.0.1"
remote-port = 8010
[[neighbors]]
[neighbors.config]
neighbor-address = "::1"
peer-as = 6667
[neighbors.transport.config]
passive-mode = true
local-address = "::1"
remote-port = 8010
martin@bgp-feed:~$
iBGP and eBGP configuration snippets from BIRD's conf file:
protocol bgp elisa_ibgp_v6 {
neighbor ::1 port 8055 as 6667 internal;
local ::1 port 8010 as 6667;
allow local as;
ipv6 {
table elisa_rib_v6;
import all;
export none;
};
};
protocol bgp gtt_ibgp_v4 {
neighbor 127.0.0.1 port 8065 as 3257 internal;
local 127.0.0.1 port 8010 as 3257;
allow local as;
ipv4 {
table gtt_rib_v4;
import all;
export none;
};
};
protocol bgp elisa_ebgp_v4 {
description "Elisa v4";
router id 192.175.45.10;
local 95.129.199.8 as 2586;
neighbor 95.129.199.9 as acme_asn;
# Ensures that own AS number is not inserted to the AS path,
# MED attribute is kept.
rs client;
ipv4 {
table elisa_rib_v4;
import where bgp_in(2586);
export filter {
bgp_path.delete(bgp_path.first);
bgp_path.prepend(2586);
accept;
};
};
};
protocol bgp gtt_ebgp_v6 {
description "GTT v6";
router id 213.200.87.225;
local 2001:668:0:3:ffff:1:0:2a as 3257;
neighbor 2001:668:0:3:ffff:1:0:2b as acme_asn;
rs client;
ipv6 {
table gtt_rib_v6;
import where bgp_in(3257);
export all;
};
};
gobgpd
andBIRD
setup: