{"id":624,"date":"2020-11-23T19:32:50","date_gmt":"2020-11-23T19:32:50","guid":{"rendered":"https:\/\/dft.wiki\/?p=624"},"modified":"2021-03-26T18:37:05","modified_gmt":"2021-03-26T18:37:05","slug":"load-balancing-and-failover-on-pfsense","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=624","title":{"rendered":"Load Balancing and Failover on pfSense"},"content":{"rendered":"<p>For the load balancing and\/or failover is necessary a minimum of 3 interfaces, one for LAN and two for WAN.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1622\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-05-36.png\" alt=\"\" width=\"725\" height=\"138\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-05-36.png 725w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-05-36-300x57.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/p>\n<p>On <strong>Interfaces &gt; Interfaces Assignments<\/strong> all the interfaces must be added:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1623\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-03-02.png\" alt=\"\" width=\"737\" height=\"363\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-03-02.png 737w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-03-02-300x148.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/p>\n<p>It is also necessary to do basic configuration and give a meaningful name to it:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1624\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-02-13.png\" alt=\"\" width=\"739\" height=\"418\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-02-13.png 739w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-02-13-300x170.png 300w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><\/p>\n<p>You will note that the monitored IP is the same as the Gateway for each interface, which means if the link between the pfSense and the gateway is broken it will failover to the other interface.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1626\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-14-26.png\" alt=\"\" width=\"730\" height=\"366\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-14-26.png 730w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-14-26-300x150.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/p>\n<p>But there is a situation when the ISP routers are accessible but there is no internet on the WAN interface of that router, for that case another host on the internet can be ser, for example, 8.8.8.8 and 8.8.4.4. But leave it for now.<\/p>\n<p>Go to <strong>System &gt; Routing &gt; Gateway Group<\/strong> and &#8220;+ Add&#8221; both gateways together.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1625\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-21-03.png\" alt=\"\" width=\"728\" height=\"635\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-21-03.png 728w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-21-03-300x262.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<ul>\n<li>Give a meaning full name and description are good practices but the most important is to define the priority and the trigger level.<\/li>\n<li>Assign the same priority will make the load balance functionality.<\/li>\n<li>If one of the WAN is metered and should only be used as a backup route, assign another priority.<\/li>\n<li>Packet loss and high latency will monitor the packages flowing through the interface and will detach temporarily the interface from the group if not working normally.<\/li>\n<\/ul>\n<p>Not necessary to say that all the changes must be applied&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1627\" src=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-27-11.png\" alt=\"\" width=\"730\" height=\"357\" srcset=\"https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-27-11.png 730w, https:\/\/dft.wiki\/wp-content\/uploads\/sites\/15\/2020\/11\/Screenshot-from-2021-03-26-14-27-11-300x147.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/p>\n<p>Done!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the load balancing and\/or failover is necessary a minimum of 3 interfaces, one for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-624","post","type-post","status-publish","format-standard","hentry","category-pfsense"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=624"}],"version-history":[{"count":2,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/624\/revisions"}],"predecessor-version":[{"id":1628,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/624\/revisions\/1628"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}