<div dir="ltr">I've found a workaround for this issue.<div><br></div><div>Seems that crucial is line </div><div>"2018-08-24 14:07:38 <TRACE> bfd1: Session to 172.30.2.1 added"</div><div>I'm assuming what's happening here is that Bird selects another interface as source which doesn't have connectivity and never goes back to proper interface after it comes back up.</div><div><br></div><div>As a workaround I've used explicit BFD neighbor declaration with local IP specified:</div><div>"neighbor ip [dev "interface"] [local ip] [multihop switch]"</div><div>After adding this line to config BFD started working as expected.</div><div><br></div><div>Above behavior might be however problematic with higher number of peers.</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 24, 2018 at 2:45 PM Jakub Nowacki <<a href="mailto:jnowacki@greywizard.com">jnowacki@greywizard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I have multihop BGP peering with BFD setup on it. One of the peers is a switch that runs Linux. I've run into situation where after link flap on interface that switch connects to BFD protocol after successfully detecting that flap BFD session cannot reestablich because switch side stops sending BFD packets. I'm suspecting that this is due to switch behavior that removes IP address of link when it goes down (BGP and BFD are using interface ip address to connect). Bird is trying to bind to IP address that is no longer available and that causes the issue.</div><div><br></div><div>Logs below show following events</div><div>1. Correct BFD packet exchange</div><div>2. Link flaps at 14:07:38</div><div>3. Link is back up, starts receiving BFD packets from peer and state changes from Down to Init at 14:07:45. Note that no BFD packets are being generated, where they should be.</div><div>4. Removing 'bfd;' line and reconfiguring at 14:08:31</div><div>5. Adding 'bfd; line and reconfiguring at 14:08:47 which successfully restart BFD.</div><div><br></div><div><div>2018-08-24 14:07:37 <TRACE> bfd1: CTL received from 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:37 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <TRACE> bfd1: CTL received from 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <TRACE> bfd1: CTL received from 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <ERR> bfd1: Socket error: Invalid argument</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <ERR> bfd1: Socket error: Invalid argument</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <ERR> bfd1: Socket error: Invalid argument</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <ERR> bfd1: Socket error: Invalid argument</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:07:38 <ERR> bfd1: Socket error: Invalid argument</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Session to 172.30.2.1 expired</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Session to 172.30.2.1 changed state from Up to Down</div><div>2018-08-24 14:07:38 <TRACE> bgp_gw_rs_1: BFD session down</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Session to 172.30.2.1 removed</div><div>2018-08-24 14:07:38 <ERR> bfd1: Socket error: bind: Cannot assign requested address</div><div>2018-08-24 14:07:38 <TRACE> bfd1: Session to 172.30.2.1 added</div><div>2018-08-24 14:07:44 <TRACE> bfd1: CTL received from 172.30.2.1 [Down A]</div><div>2018-08-24 14:07:44 <TRACE> bfd1: Session to 172.30.2.1 changed state from Down to Init</div><div>2018-08-24 14:07:45 <TRACE> bfd1: CTL received from 172.30.2.1 [Down A]</div><div>2018-08-24 14:07:46 <TRACE> bfd1: CTL received from 172.30.2.1 [Down A]</div><div>2018-08-24 14:07:46 <TRACE> bfd1: CTL received from 172.30.2.1 [Down A]</div><div>2018-08-24 14:07:47 <TRACE> bfd1: CTL received from 172.30.2.1 [Down A]</div></div><div>...</div><div><div>2018-08-24 14:08:30 <TRACE> bfd1: CTL received from 172.30.2.1 [Down A]</div><div>2018-08-24 14:08:31 <TRACE> bfd1: CTL received from 172.30.2.1 [Down A]</div><div>2018-08-24 14:08:31 <TRACE> bfd1: Session to 172.30.2.1 removed</div><div>2018-08-24 14:08:31 <TRACE> bfd1: Reconfigured</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Session to 172.30.2.1 added</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Session to 172.30.2.1 reconfigured</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Reconfigured</div><div>2018-08-24 14:08:47 <TRACE> bfd1: CTL received from 172.30.2.1 [Down A]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Session to 172.30.2.1 changed state from Down to Init</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Init A]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: CTL received from 172.30.2.1 [Up PA]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Session to 172.30.2.1 changed state from Init to Up</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up FA]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up PA]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: CTL received from 172.30.2.1 [Up FA]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: CTL received from 172.30.2.1 [Up A]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: CTL received from 172.30.2.1 [Up A]</div><div>2018-08-24 14:08:47 <TRACE> bfd1: Sending CTL to 172.30.2.1 [Up A]</div></div><div><br></div><div><br></div><div>Kuba Nowacki</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span><br><div dir="ltr"><table style="border:none;border-collapse:collapse"><colgroup><col width="497"></colgroup><tbody><tr style="height:65pt"><td style="vertical-align:top;padding:5pt 5pt 5pt 5pt"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:Arial;color:rgb(102,102,102);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">Kuba Nowacki</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font color="#666666" face="Arial"><span style="font-size:10.6667px;white-space:pre-wrap">Senior NetOps</span></font></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:8pt;font-family:Arial;color:rgb(102,102,102);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">M: +(48) 605 508 118</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:8pt;font-family:Arial;color:rgb(102,102,102);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">E: <a href="mailto:jnowacki@greywizard.com" target="_blank">jnowacki@greywizard.com</a></span></p></td></tr></tbody></table></div><br><div dir="ltr" style="margin-left:0pt"><table style="border:none;border-collapse:collapse"><colgroup><col width="74"><col width="121"><col width="129"><col width="108"><col width="138"></colgroup><tbody><tr style="height:60pt"><td style="border-bottom:solid #d9d9d9 0.5pt;border-top:solid #d9d9d9 0.5pt;vertical-align:top;padding:5pt 5pt 5pt 5pt"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;font-family:Arial;color:rgb(102,102,102);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap"><img src="https://lh6.googleusercontent.com/5-5Uv_ufsOjm8PWhnFTiJusJ1jvoB56w4iR7HtjWklgLS0ZLiQj088iMCFKk8I23FxygNtcCJyQOEe9ySaExNFvAh-cLRC3BWKPMxhVfZMbXYfNWksBffXrb-DKtebPN9f9Yzeu7" width="55" height="69" style="border:none"></span></p></td><td style="border-bottom:solid #d9d9d9 0.5pt;border-top:solid #d9d9d9 0.5pt;vertical-align:top;padding:5pt 5pt 5pt 5pt"><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><img src="https://lh4.googleusercontent.com/FEIAXBCdcdoq8baGPSwXfgoEctIvuVuRV1pqhR503pFaiA9LKMcUEnSPMCHFOXiHUSPsCqC6II7PpISwv_O5MYN0U_gArA7XSNN_GdlbXmfkKan3kG-inS4igsaFAedCGNs5sxKG" width="107" height="36" style="border:none"></span></p></td><td style="border-bottom:solid #d9d9d9 0.5pt;border-top:solid #d9d9d9 0.5pt;vertical-align:top;padding:5pt 5pt 5pt 5pt"><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">GreyWizard Sp. z o.o.</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">ul. Palacza 113</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">60-273 Poznań, Poland</span></p></td><td style="border-bottom:solid #d9d9d9 0.5pt;border-top:solid #d9d9d9 0.5pt;vertical-align:top;padding:5pt 5pt 5pt 5pt"><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">NIP: 779-24-22-423 </span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Regon: 302744400</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">KRS: 0000512326</span></p><br></td><td style="border-bottom:solid #d9d9d9 0.5pt;border-top:solid #d9d9d9 0.5pt;vertical-align:top;padding:5pt 5pt 5pt 5pt"><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="http://greywizard.com" target="_blank">greywizard.com</a></span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><a href="mailto:support@greywizard.com" target="_blank">support@greywizard.com</a></span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;text-align:right"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">+48 22 201 33 13</span></p></td></tr></tbody></table></div><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Sąd Rejonowy w Poznaniu, VIII Wydział Gospodarczy Krajowego Rejestru Sądowego. Kapitał zakładowy 10000 PLN.</span></p><div><span style="font-size:8pt;font-family:Arial;color:rgb(210,215,220);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></div></span></div></div></div></div></div></div></div>