{"id":1444,"date":"2023-07-18T17:33:52","date_gmt":"2023-07-18T16:33:52","guid":{"rendered":"https:\/\/www.labtinker.net\/?p=1444"},"modified":"2023-07-18T17:33:52","modified_gmt":"2023-07-18T16:33:52","slug":"bfg-bgp-and-bfd","status":"publish","type":"post","link":"https:\/\/labtinker.net\/?p=1444","title":{"rendered":"BFG, BGP and BFD"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you were a Big Friendly Giant and wanted fast BGP convergence,you might well investigate BFD. (OK, now I have justified my alliteration we can move on)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the previous post, we had a resilient BGP topology  which I will remind us of here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"986\" height=\"349\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/image-6.png\" alt=\"\" class=\"wp-image-1445\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-6.png 986w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-6-300x106.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-6-768x272.png 768w\" sizes=\"auto, (max-width: 986px) 100vw, 986px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When the FG1 Fortigate was shutdown it took BGP between two and three minutes to re-route traffic through FG2. Popular wisdom suggests the answer to our dilemma is BFD (bidrectional forward detection). This is a separate protocol altogether, not just a BGP option, and it can be used with OSPF or static routes:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/docs.fortinet.com\/document\/fortigate\/7.4.0\/administration-guide\/771813\/bfd\">https:\/\/docs.fortinet.com\/document\/fortigate\/7.4.0\/administration-guide\/771813\/bfd<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the Fortigate, it can be enabled in system settings, per VDOM, on the interface and on the BGP neighbor. I found it necessary to enable it on the interfaces and on the BGP neighbor config (on all firewalls), examples of which are shown below:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(There are many settings that can be chosen in conjunction with BFD and that will probably need to be aligned if setting up with different vendors. This is beyond the scope of this post)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"111\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/bfd-interface.png\" alt=\"\" class=\"wp-image-1446\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/bfd-interface.png 447w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/bfd-interface-300x74.png 300w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"263\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/bfd-bgp.png\" alt=\"\" class=\"wp-image-1447\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/bfd-bgp.png 567w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/bfd-bgp-300x139.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The improvement was quite startling. When I shutdown the FG1 firewall (the red link lights indicate FG1 is down):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"396\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/image-1024x396.png\" alt=\"\" class=\"wp-image-1448\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-1024x396.png 1024w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-300x116.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-768x297.png 768w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image.png 1088w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">  &#8230;the convergence instead of taking minutes was short enough that only ping response was missed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"449\" height=\"195\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/image-1.png\" alt=\"\" class=\"wp-image-1449\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-1.png 449w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-1-300x130.png 300w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When I turned FG1 back on the transition back wasn&#8217;t quite so smooth &#8211; probably 30 seconds (I was timing but got distracted !!)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"441\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/image-2.png\" alt=\"\" class=\"wp-image-1450\" srcset=\"https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-2.png 795w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-2-300x166.png 300w, https:\/\/labtinker.net\/wp-content\/uploads\/2023\/07\/image-2-768x426.png 768w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Presumably, the interface\/ BGP relationship between FG1 and FG3 recovers before the BGP relationship between R1 and FG1 has been re-established (there was no BFD defined between them ).  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I simulated a slightly less catastrophic failure by shutting down the port1 interface on FG1 that faced FG3 , waiting ten seconds and then re-enabling it. In this instance, I saw the missed ping initially but no subsequent dropped traffic and I confirmed the BGP path had re-established through FG1. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The configurations are identifical to the previous post save for the BFD settings as discussed above. No changes on R1: <\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-b558d95f-b489-4d3b-b216-c954fa797289\" href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/FG1_7-0_0304_202307180911.conf_.txt\">FG1_7-0_0304_202307180911.conf_<\/a><a href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/FG1_7-0_0304_202307180911.conf_.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-b558d95f-b489-4d3b-b216-c954fa797289\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-13e76dc9-4521-4903-9e97-40c9e2b3dd7f\" href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/FG2_7-0_0304_202307180911.conf_.txt\">FG2_7-0_0304_202307180911.conf_<\/a><a href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/FG2_7-0_0304_202307180911.conf_.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-13e76dc9-4521-4903-9e97-40c9e2b3dd7f\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-548322cd-9d11-46ec-8baa-af5efbb7019b\" href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/FG3_7-0_0304_202307180912.conf_.txt\">FG3_7-0_0304_202307180912.conf_<\/a><a href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/FG3_7-0_0304_202307180912.conf_.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-548322cd-9d11-46ec-8baa-af5efbb7019b\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-cc7f366b-3835-43e3-a302-c0db004a57b7\" href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/FG4_7-0_0304_202307180912.conf_.txt\">FG4_7-0_0304_202307180912.conf_<\/a><a href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2023\/07\/FG4_7-0_0304_202307180912.conf_.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-cc7f366b-3835-43e3-a302-c0db004a57b7\">Download<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you were a Big Friendly Giant and wanted fast BGP convergence,you might well investigate BFD. (OK, now I have justified my alliteration we can move on) In the previous post, we had a resilient BGP topology which I will remind us of here: When the FG1 Fortigate was shutdown it took BGP between two [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9],"tags":[],"class_list":["post-1444","post","type-post","status-publish","format-standard","hentry","category-firewalls","category-networking"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/posts\/1444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/labtinker.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1444"}],"version-history":[{"count":0,"href":"https:\/\/labtinker.net\/index.php?rest_route=\/wp\/v2\/posts\/1444\/revisions"}],"wp:attachment":[{"href":"https:\/\/labtinker.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labtinker.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labtinker.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}