{"id":54,"date":"2024-12-17T13:25:13","date_gmt":"2024-12-17T13:25:13","guid":{"rendered":"https:\/\/anderlini.com\/?p=54"},"modified":"2024-12-17T13:30:45","modified_gmt":"2024-12-17T13:30:45","slug":"mikrotik-dual-wan-backup-su-connessione-lte","status":"publish","type":"post","link":"https:\/\/anderlini.com\/?p=54","title":{"rendered":"Mikrotik: dual wan backup su connessione Lte"},"content":{"rendered":"\n<p>Progettino\/Laboratorio su router mikrotik con ros 6.4x per eseguire failover su un una porta wan collegata in dhcp con un router lte.<\/p>\n\n\n\n<p>Nulla di particolare ma in questo caso specifico la wan2 del mikrotik si collega in dhcp ad un router lte zyxel con sim Wind\/Tre. Non ho capito il perch\u00e8 ma alla porta lan del router zyxel viene assegnato un ip dinamico del tipo 10.185.xx.yy\/28 e quindi il dhcp client configurato sulla porta ethernet del mikrotik ottiene sempre un ip diverso. Per cui non \u00e8 possibile fare il solito giochino di non mettere la default route sul dhcp-client ed aggiungere poi una route manuale del tipo 0.0.0.0\/0 con distanza 2.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"607\" height=\"518\" src=\"https:\/\/anderlini.com\/wp-content\/uploads\/2024\/12\/image.png\" alt=\"\" class=\"wp-image-55\" srcset=\"https:\/\/anderlini.com\/wp-content\/uploads\/2024\/12\/image.png 607w, https:\/\/anderlini.com\/wp-content\/uploads\/2024\/12\/image-300x256.png 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/figure>\n\n\n\n<p>l&#8217;Ether1 \u00e8 in PPPoE mentre Ether2 \u00e8 in dhcp client disabilitato di base.<br><\/p>\n\n\n\n<p>Le configurazioni salienti ed interessanti sono queste:<\/p>\n\n\n\n<p><strong>\/ip route<br>add check-gateway=ping distance=1 gateway=1.0.0.1<br>add check-gateway=ping distance=1 dst-address=1.0.0.1\/32 gateway=100.0.0.1 \\<br>scope=10<\/strong><\/p>\n\n\n\n<p>dove 100.0.0.1 \u00e8 gateway della pppoe<\/p>\n\n\n\n<p><strong>\/ip dhcp-client add interface=ether2<\/strong> <\/p>\n\n\n\n<p>dhcp-client verso il router lte<\/p>\n\n\n\n<p><strong>\/tool netwatch<br>add down-script=&#8221;\/ip dhcp-client enable [find interface=ether2];&#8221; host=\\<br>1.0.0.1 interval=4s up-script=\\ &#8220;\/ip dhcp-client disable [find interface=ether2];&#8221;<\/strong><\/p>\n\n\n\n<p>NetWatch per abilitare o meno il client dhcp quando internet sulla linea principale non \u00e8 raggiungibile<\/p>\n\n\n\n<p><strong>\/ip firewall filter<br>add action=drop chain=output dst-address=1.0.0.1 out-interface=ether2 \\<br>protocol=icmp<\/strong><\/p>\n\n\n\n<p>Regola di firewall per bloccare il ping verso 1.0.0.1 sulla porta di backup. in caso contrario la linea farebbe flick-flock<\/p>\n\n\n\n<p>Qui trovi il progetto <a href=\"https:\/\/anderlini.com\/wp-content\/uploads\/2024\/12\/FailOverLte.zip\" data-type=\"link\" data-id=\"https:\/\/anderlini.com\/wp-content\/uploads\/2024\/12\/FailOverLte.zip\">gns3<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Progettino\/Laboratorio su router mikrotik con ros 6.4x per eseguire failover su un una porta wan collegata in dhcp con un router lte. Nulla di particolare ma in questo caso specifico la wan2 del mikrotik si collega in dhcp ad un router lte zyxel con sim Wind\/Tre. Non ho capito il perch\u00e8 ma alla porta lan [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-networking"],"_links":{"self":[{"href":"https:\/\/anderlini.com\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anderlini.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anderlini.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anderlini.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anderlini.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":2,"href":"https:\/\/anderlini.com\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/anderlini.com\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/anderlini.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anderlini.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anderlini.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}