Friday, October 15, 2021

BGP with BIRD on Ubuntu 18.04

Hi all

I've got a little lab running to sink my teeth into BGP and BIRD. The topology can be seen at: https://ibb.co/VpQhK87

The left and centre router exchange routing information quite happily, however, the right and centre routers are not happy. They've recognised themselves as neighbours, and the advertised route from right is added to the route table on centre, however, right will not receive routes from centre - show protocol all says the route was rejected.

When I show routes in BIRD on the centre router, it has added the route to right on the enp0s8 interface, rather than the interface where it forms the adjacency - enp0s9. Indeed, when I try to ping, it tries to send packets from enp0s8. I wonder if this might be the problem (or at least the beginning of them!) but I can't find a way to instruct routes to interfaces. Can anyone offer any guidance on this or shed some light on the issue?

The configuration files follow.

With thanks in advance for any pointers,
Moses

left bird.conf

router id 192.168.220.1;
protocol device {
scan time 10;
}
protocol kernel {
metric 64;
import none;
export all;
persist;
scan time 20;
}
protocol bgp {
import all;
export where proto = "static_bgp";
local as 3000;
neighbor 192.168.220.2 as 4000;
password "secret123";
}
protocol static static_bgp {
route 172.16.0.0:255.255.255.0 via 192.168.220.1;
}

centre bird.conf

router id 192.168.220.2;
protocol device {
scan time 10;
}
protocol kernel {
metric 64;
import none;
export all;
persist;
scan time 20;
}
protocol bgp left {
import all;
export where proto = "static_bgp";
local as 4000;
neighbor 192.168.220.1 as 3000;
password "secret123";
}
protocol bgp right {
import all;
export where proto = "static_bgp2";
local as 5000;
neighbor 192.168.220.6 as 5000;
password "secret123";
}
protocol static static_bgp {
route 172.16.1.0:255.255.255.0 via 192.168.220.2;
}
protocol static static_bgp {
route 172.16.1.0:255.255.255.0 via 192.168.220.5;
}

right bird.conf

router id 192.168.220.6;
protocol device {
scan time 10;
}
protocol kernel {
metric 64;
import none;
export all;
persist;
scan time 20;
}
protocol bgp {
import all;
export where proto = "static_bgp";
local as 5000;
neighbor 192.168.220.5 as 4000;
password "secret123";
}
protocol static static_bgp {
route 172.16.2.0:255.255.255.0 via 192.168.220.6;
}



No comments:

Post a Comment