<div dir="auto">Ave,<div dir="auto"><br></div><div dir="auto">I am not sure, if I totally understand what you're trying to achieve.</div><div dir="auto"><br></div><div dir="auto">Do you think bird is behaving different for a not bird endpoint like the Mikrotic?</div><div dir="auto"><br></div><div dir="auto">Independent of your problem a general approach for debugging bgp awkwardness. I love to use tcpdump and Wireshark to see what's going on, so you do not have to rely on debug output or built-in counters.</div><div dir="auto"><br></div><div dir="auto">Rgds, SJ</div><div dir="auto"><br></div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ave <ave@ave.zone> schrieb am Mo., 29. Juni 2020, 00:50:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
Hello,<br>
<div>
<p>I believe I stumbled upon a bug in BIRD 2.x while doing
something that can only be summed up as "testing things on
someone else's network with limited access provided to me".</p>
<p>When peering over IPv4 yet exporting a full table, I am
noticing that all exports, withdraw or update, are exported as
withdrawals.</p>
<p>Export side:</p>
<p><tt> Routes: 0 imported, 85839 exported, 0 preferred</tt><tt><br>
</tt><tt> Route change stats: received rejected
filtered ignored accepted</tt><tt><br>
</tt><tt> Import updates: 0
0 0 0 0</tt><tt><br>
</tt><tt> Import withdraws: 0 0
--- 0 0</tt><tt><br>
</tt><tt> Export updates: 85840
0 0 --- 85840</tt><tt><br>
</tt><tt> Export withdraws: 0 ---
--- --- 0</tt><br>
</p>
<p>Import side:</p>
<p><tt> Routes: 0 imported, 0 exported, 0 preferred<br>
Route change stats: received rejected filtered
ignored accepted</tt><tt><br>
</tt><tt> Import updates: 0
0 0 0 0</tt><tt><br>
</tt><tt> Import withdraws: 85823 0
--- 85823 0</tt><tt><br>
</tt><tt> Export updates: 0
0 0 --- 0</tt><tt><br>
</tt><tt> Export withdraws: 0 ---
--- --- 0</tt></p>
<p>I've also tested with an instance where there were both updates
and withdrawals exported, and as a result a sum of both were
displayed as imported withdrawals.</p>
<p>The configurations I've tested with are quite simple:</p>
<p>Full import config (seems to import "correctly", but as exports
seem to be faulty it all gets recorded as withdrawals):<br>
<tt><br>
</tt><tt>> log syslog all;</tt><tt><br>
</tt><tt>> router id 192.168.4.22;</tt><tt><br>
</tt><tt>> protocol device {</tt><tt><br>
</tt><tt>> scan time 5;</tt><tt><br>
</tt><tt>> }</tt><tt><br>
</tt><tt>></tt><tt><br>
</tt><tt>> protocol bgp bird1 {</tt><tt><br>
</tt><tt>> local 192.168.4.22 as 65529;</tt><tt><br>
</tt><tt>> neighbor 192.168.4.1 as </tt><tt><tt>65530</tt>;</tt><tt><br>
</tt><tt>> multihop;</tt><tt><br>
</tt><tt>></tt><tt><br>
</tt><tt>> ipv6 {</tt><tt><br>
</tt><tt>> import all;</tt><tt><br>
</tt><tt>> export none;</tt><tt><br>
</tt><tt>> };</tt><tt><br>
</tt><tt>> }</tt><br>
</p>
<p>Trimmed export config that doesn't export correctly:</p>
<p><tt>> protocol bgp bird2 {</tt><tt><br>
</tt><tt>> local 192.168.4.1 as </tt><tt><tt><tt>65530</tt></tt>;</tt><tt><br>
</tt><tt>> neighbor 192.168.4.22 as 65529;</tt><tt><br>
</tt><tt>> multihop;</tt><tt><br>
> <br>
</tt><tt>> ipv6 {</tt><tt><br>
</tt><tt>> import none;</tt><tt><br>
</tt><tt>> export all;</tt><tt><br>
</tt><tt>> };</tt><tt><br>
</tt><tt>> }</tt></p>
<p> </p>
<p>Things I've so far:<br>
</p>
<p>- Doing BGP4 over IPv4 (renaming "ipv6" blocks to "ipv4" in
configs). This had no issues, exports and imports were correct.<br>
- Doing BGP4 over IPv6 (doing same change as last point, plus
changing IPv4 addresses to IPv6 ones in configs). This had no
issues, exports and imports were correct.<br>
- Switching from IPv4 to IPv6 (changing IPv4 addresses to IPv6
ones in configs). This resulted in proper imports, hinting that
problem only happens on BGP6 over IPv4.<br>
- Exporting to a non-bird2 BGP daemon. Specifically, I exported
to a mikrotik router running <span id="m_2394662254037968474version">ROS v6.46.6</span>.
It also classified these as withdrawals ("Withdrawn Received
85 979", with empty "<span>Prefix Count</span>" and "<span>Updates
Received</span>").</p>
<p>Thanks and I hope I'm not just doing something wrong and
wasting your time as a result,<br>
Ave<br>
</p>
</div>
</div>
</blockquote></div>