Friday, October 29, 2021

Simple Bird ibgp config doesn't work

Hi, I'm setting up Bird on two hosts. First one got correct routes but second one got unreachable routes.

Network scheme:

┌────────────┐ ┌────────────┐ │ First host ├──────┤Second host │ │ 10.20.30.2 │ │ 10.20.30.1 │ └──────┬─────┘ └──────┬─────┘ │ │ ┌──────┴─────┐ ┌──────┴─────┐ │ Network │ │ Network │ │192.168.88.0│ │10.111.150.0│ └────────────┘ └────────────┘ 

First host:

router id 10.20.30.2; protocol direct { interface "*"; } protocol kernel { scan time 1; import all; export all; } protocol device { scan time 1; } protocol bgp fast { export filter { if net ~ 10.20.30.0/24 then reject; if net ~ 172.0.0.0/8 then reject; accept; }; import all; local as 64001; neighbor 10.20.30.1 as 64001; } 

Second host:

router id 10.20.30.1; protocol direct { interface "*"; } protocol kernel { scan time 1; import all; export all; } protocol device { scan time 1; } template bgp tmpl { export filter { if net ~ 10.20.30.0/24 then reject; if net ~ 172.0.0.0/8 then reject; accept; }; import all; local as 64001; next hop self; multihop; rr client; } protocol bgp msk from tmpl { neighbor 10.20.30.2 as 64001; } 

First host routes:

unreachable 10.111.200.0/24 proto bird 

Second host routes:

192.168.88.0/24 via 10.20.30.2 dev homenet proto bird 192.168.122.0/24 via 10.20.30.2 dev homenet proto bird 

Logs from host 1:

2021-10-30 03:17:54 <TRACE> fast: Connecting to 10.20.30.1 from local address 0.0.0.0 2021-10-30 03:17:54 <TRACE> fast: Got OPEN(as=64001,hold=240,id=0a141e01) 2021-10-30 03:17:54 <TRACE> fast: Sending KEEPALIVE 2021-10-30 03:17:54 <TRACE> fast: Got KEEPALIVE 2021-10-30 03:17:54 <TRACE> fast: BGP session established 2021-10-30 03:17:54 <TRACE> fast: Connected to table master 2021-10-30 03:17:54 <TRACE> fast: State changed to feed 2021-10-30 03:17:54 <TRACE> fast < added 10.0.0.0/24 dev virbr1 2021-10-30 03:17:54 <TRACE> fast < added 192.168.122.0/24 dev virbr0 2021-10-30 03:17:54 <TRACE> fast < added 192.168.88.0/24 dev br0 2021-10-30 03:17:54 <TRACE> fast < filtered out 10.20.30.2/32 dev homenet 2021-10-30 03:17:54 <TRACE> fast < filtered out 172.19.0.0/16 dev br-0a68aa090a88 2021-10-30 03:17:54 <TRACE> fast < filtered out 172.17.0.0/16 dev docker0 2021-10-30 03:17:54 <TRACE> fast < filtered out 172.21.0.0/16 dev br-0c8390fd6e37 2021-10-30 03:17:54 <TRACE> fast: State changed to up 2021-10-30 03:17:54 <TRACE> fast: Sending UPDATE 2021-10-30 03:17:54 <TRACE> fast: Sending END-OF-RIB 2021-10-30 03:17:54 <TRACE> fast: Got UPDATE 2021-10-30 03:17:54 <TRACE> fast > added [best] 10.111.200.0/24 unreachable 2021-10-30 03:17:54 <TRACE> kernel1 < added 10.111.200.0/24 unreachable 2021-10-30 03:17:54 <TRACE> fast < rejected by protocol 10.111.200.0/24 unreachable 


No comments:

Post a Comment