Dear All,
I have two ISP in my firm and I have 5 public IP in one ISP and 20 public IP in secord ISP.
I want to do this one number ISP when down my secord ISP live my one number 5 public IP. and same when my Secord ISP down then my one number ISP live my 20 public IP.
Example :
One number ISP gateway is : 10.0.0.1/28
Secord number ISP Gateway is : 20.0.0.1/29
When my 10.0.0.1 gateway failed then all traffic gone thru 20.0.0.1 gateway.
When my 20.0.0.1 gateway failed then all traffic gone thru 10.0.0.1 gateway.
This is example all public ip is different from example.
Thks in adv.
Unfortunately, you’re going to have to use NAT and load balancing / failover routing with floating static routes.
This is because you can’t advertise anything smaller than a /24 onto the public BGP table. Even if your ISPs do accept longer prefix length than 24, it can only be internal for them, so you could not use the 5 public addresses from provider 1 to route across provider2.
Your request its not on BGP juts need add ping check on gateway on IP route.
/ip route
add check-gateway=ping distance=1 gateway=1.1.1.1
add check-gateway=ping distance=2 gateway=2.2.2.2
when ping down on 1.1.1.1 will automatic route into 2nd distance and you can add 3rd 4th etc.
also if you can add in netwatch ping to public DNS like 8.8.4.4 and route it on ISP1 , when netwatch down will run script1 ,and when its up will run script2
in scripts you can add what you want from command to do.
Regards
Your solution does give failover protection, and it is what the OP must do in his situation.
However, OP asked whether it was possible to use the 5 public IP addresses from isp1 when failed over onto isp2.
The answer to this is - no, because moving the same public IP between carriers requires BGP, but BGP requires /24 and a public ASN.
For public ip sure need BGP and Routed IP over ASN
but if he want to use the 20 Public as a private IP when internet down , internal access to internet , just add the IP route commands and make sure on IP firewall tracking putted on AUTO , and on NAT add action=masquerade on out-interface=ISP2 only.
but no way to work with BGP with 20 Public IP minimum RIPE and ARIN rule its /23 subnet