Page 1 of 1
Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Tue Jun 17, 2014 12:23 pm
by cicserver
I have main fiber link with one public IP address. Yesterday the ISP have provided me wireless backup link, it uses the same IP/GW , just the transmission medium is different that is Wireless.
I want to put both cables in mikrotik RB and if Fiber goes down it should automatically use the wireless link. How this is possible ?
(In the past I had two isp links, so it was easy because they both were using different ips and I added the netwatch script to change distance, but how to do it with single IP and same gateway?)
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Tue Jun 17, 2014 1:14 pm
by Caci99
I am afraid this would require some scripting.
The way I am thinking about it, is assign the IP to the two interfaces, but leave the backup interface disabled like:
/ip address
add address=1.1.1.1/24 interface=wlan1
add address=1.1.1.1/24 interface=sfp1
/interfaces
set wlan1 disabled=yes
Then, if the primary interface goes down, disable that and enable the backup interface through scripting
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Tue Jun 17, 2014 1:52 pm
by semakka
I would ask for a different subnet for the second link and use two default routes with cost 1 and cost 2.
If they set you up with a wireless backup to your existing fiber one, I bet the both terminate in the same router, assigning a different subnet to a second interface won't be that painfull.
cheers
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Tue Jun 17, 2014 7:31 pm
by cicserver
I am afraid this would require some scripting.
The way I am thinking about it, is assign the IP to the two interfaces, but leave the backup interface disabled like:
/ip address
add address=1.1.1.1/24 interface=wlan1
add address=1.1.1.1/24 interface=sfp1
/interfaces
set wlan1 disabled=yes
Then, if the primary interface goes down, disable that and enable the backup interface through scripting
This is what I thought at first moment, but once the primary fiber interface is disabled via script, how it will be able to detect / switch back to Primary Fiber Link when its restored ? I want automation like if fiber is down , then it should switch to Wifi, (but since WiFi isn't good in signals in my area) so I surely want to auto switch back to fiber when its restored.
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Tue Jun 17, 2014 7:32 pm
by cicserver
I would ask for a different subnet for the second link and use two default routes with cost 1 and cost 2.If they set you up with a wireless backup to your existing fiber one, I bet the both terminate in the same router, assigning a different subnet to a second interface won't be that painfull.cheers
the ISP said they are short in ip's at a moment so they cannot provide me another ip.
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Tue Jun 17, 2014 7:34 pm
by semakka
if they can't provide you with another /30 I suggest you change provider as soon as possible
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Thu Jun 19, 2014 6:36 am
by cicserver
Ok as a workaround I have made a script which check ISP gateway and internet host, if it found no response, it disables the fiber interface, and enable the wireless lin interface which have same ip configured as fiber link. It then sends me an alert email so that I get aware of link down, and when fiber restores, I manually disable enable the link in reverse.
But still looking for a way to sort this on auto basis. (with singel public ip as at a moment I cannot get another ip for wifi link)
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Thu Jun 19, 2014 10:16 am
by Caci99
What if you disable the address on fiber interface, instead of disabling the interface itself, and then test the link by arp ping? You should note first the mac address of the gateway. Just guessing.
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Thu Jun 19, 2014 11:13 am
by cicserver
If I disable the interface or ip address on fiber link, then how come script will know the main fiber link is up and it should switch back ?
Re: Redundancy for Fiber & Wireless Link with Same Single IP
Posted: Thu Jun 19, 2014 1:20 pm
by Caci99
If I disable the interface or ip address on fiber link, then how come script will know the main fiber link is up and it should switch back ?
I haven't tested it, but i guess if you disable the ip address, not the interface itself, you can execute a mac ping:
/ping 00:01:02:03:04:05 interface=sfp1 arp-ping=yes