<html><head></head><body>The kernel protocol import filter is missing the accept; statement after you selectively filter some prefices out. BIRD doesn't know whether you want to accept or reject these routes. It also shall warn you in log. Do you have any log line saying something about filter not rejecting nor accepting? <br>Maria<br><br><div class="gmail_quote">On December 10, 2019 10:09:06 PM GMT+01:00, wax xitau <waxitau@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Hi, <div><br></div><div>Prefixes sent over a eBGP session are getting rejected "by protocol" as can be seen in the logs below. </div><div>The prefixes are "added" and then get "rejected" by protocol. This means that they are visible using the "show route protocol <protocol>"  but not "show route all" (and therefore impossible to push them to the kernel routing table). </div><div><br></div><div><br></div><div>// logs</div><div><br></div>2019-12-10 21:15:00.774 <TRACE> pe1: BGP session established<br>2019-12-10 21:15:00.774 <TRACE> pe1: State changed to up<br>2019-12-10 21:15:00.774 <TRACE> pe1: Sending END-OF-RIB<br>2019-12-10 21:15:00.984 <TRACE> pe1: Got UPDATE<br>2019-12-10 21:15:00.984 <TRACE> pe1 > <b>added [best] <a href="http://10.2.34.0/24">10.2.34.0/24</a> unicast</b><br>2019-12-10 21:15:00.984 <TRACE> pe1 < <b>rejected by protocol <a href="http://10.2.34.0/24">10.2.34.0/24</a> unicast</b><br>2019-12-10 21:15:00.984 <TRACE> pe1: Got UPDATE<br>2019-12-10 21:15:00.984 <TRACE> pe1 > <b>added [best] <a href="http://10.1.12.0/24">10.1.12.0/24</a> unicast</b><br>2019-12-10 21:15:00.984 <TRACE> pe1 < <b>rejected by protocol <a href="http://10.1.12.0/24">10.1.12.0/24</a> unicast</b><br>2019-12-10 21:15:00.984 <TRACE> pe1: Got UPDATE<br><div>2019-12-10 21:15:00.984 <TRACE> pe1: Got END-OF-RIB </div><div><br></div><div>Tcp dump of the corresponding update message(s): </div><div><br></div><div>// tcpdump</div><div><br></div><div>21:18:59.652705 IP (tos 0xc0, ttl 1, id 7035, offset 0, flags [none], proto TCP (6), length 177)<br>    <b>192.168.254.1</b>.bgp > 192.168.254.0.41073: Flags [P.], cksum 0x4356 (correct), seq 83:208, ack 73, win 16384, options [nop,nop,TS val 2249949122 ecr 1355158152], length 125: BGP<br> Update Message (2), length: 51<br>          Origin (1), length: 1, Flags [T]: IGP<br>      0x0000:  00<br>          AS Path (2), length: 10, Flags [T]: 65001 65500<br>            0x0000:  0202 0000 fde9 0000 ffdc<br>    Next Hop (3), length: 4, Flags [T]: 192.168.254.1<br>          0x0000:  c0a8 fe01<br>   Updated routes:<br>            <a href="http://10.1.12.0/24">10.1.12.0/24</a><br>    Update Message (2), length: 51<br>          Origin (1), length: 1, Flags [T]: Incomplete<br>       0x0000:  02<br>          AS Path (2), length: 10, Flags [T]: 65001 65500<br>            0x0000:  0202 0000 fde9 0000 ffdc<br>    Next Hop (3), length: 4, Flags [T]: <b>192.168.254.1</b><br>       0x0000:  c0a8 fe01<br>   Updated routes:<br>            <a href="http://10.2.34.0/24">10.2.34.0/24</a><br>    Update Message (2), length: 23<br>          End-of-Rib Marker (empty NLRI)<br></div><div><br></div><div>The bgp session is over directly connected interfaces and the NLRI prefix next hops are therefore directly connected. </div><div><br></div><div>// Configuration: </div><div><br></div><div>protocol bgp pe1 {<br>        debug all;<br>        description "ebgp";<br>        hold time 90;<br>        local 192.168.254.0 as my_asn;<br>        neighbor 192.168.254.1 as peer_asn;<br>        direct;<br>        interpret communities off;<br>        ipv4 {<br>                table t_pe1;<br>                import all;<br>                export none;<br>                gateway direct;<br>        };<br>}<br></div><div><br></div><div>protocol device {<br>        scan time 10;<br>};<br><br>protocol direct {<br>        ipv4;<br>};<br><br>protocol kernel {<br>        scan time 10;<br>        learn;<br>        persist;<br>        ipv4 {<br>                import filter {<br>                        if net ~ [<a href="http://0.0.0.0/0">0.0.0.0/0</a>, <a href="http://192.168.255.0/24">192.168.255.0/24</a>] then reject;<br>                };<br>        };<br>}<br></div><div><br></div><div>// relevant show results</div><div><br></div><div>bird> <b>show route protocol pe1</b><br>Table t_pe1:<br><b><a href="http://10.2.34.0/24">10.2.34.0/24</a></b>         unicast [pe1 21:46:13.530] * (100) [AS65500?]<br>      via 192.168.254.1 on ens5<br><b><a href="http://10.1.12.0/24">10.1.12.0/24</a></b>         unicast [pe1 21:46:13.530] * (100) [AS65500i]<br>  via 192.168.254.1 on ens5<br>bird><br></div><div><br></div><div>bird> <b>show route all</b><br>Table master4:<br><a href="http://172.16.0.11/32">172.16.0.11/32</a>       unicast [rt_nh 20:25:25.379] * (200)<br>   via 192.168.254.1 on ens5<br>     Type: static univ<br><a href="http://192.168.254.2/31">192.168.254.2/31</a>     unicast [direct1 20:56:03.498] * (240)<br>  dev ens6<br>      Type: device univ<br><a href="http://192.168.254.0/31">192.168.254.0/31</a>     unicast [direct1 20:56:03.498] * (240)<br>  dev ens5<br>      Type: device univ<br><a href="http://192.168.255.0/24">192.168.255.0/24</a>     unicast [direct1 20:56:03.498] * (240)<br>  dev ens4<br>      Type: device univ<br><a href="http://172.16.0.33/32">172.16.0.33/32</a>       unicast [rt_nh 20:25:25.379] * (200)<br> via 192.168.254.3 on ens6<br>     Type: static univ<br></div><div><br></div><div>Thanks,</div><div><br></div><div><br></div><div><br></div></div>
</blockquote></div><br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>