Community discussions

MikroTik App
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Redundancy for Fiber & Wireless Link with Same Single IP

Tue Jun 17, 2014 12:23 pm

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?)
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Tue Jun 17, 2014 1:14 pm

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
 
User avatar
semakka
Member Candidate
Member Candidate
Posts: 196
Joined: Mon Sep 11, 2006 10:59 am
Location: Moraira, Alicante, Spain
Contact:

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Tue Jun 17, 2014 1:52 pm

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
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Tue Jun 17, 2014 7:31 pm

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.
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Tue Jun 17, 2014 7:32 pm

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.
 
User avatar
semakka
Member Candidate
Member Candidate
Posts: 196
Joined: Mon Sep 11, 2006 10:59 am
Location: Moraira, Alicante, Spain
Contact:

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Tue Jun 17, 2014 7:34 pm

if they can't provide you with another /30 I suggest you change provider as soon as possible :)
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Thu Jun 19, 2014 6:36 am

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)
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Thu Jun 19, 2014 10:16 am

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.
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Thu Jun 19, 2014 11:13 am

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 ?
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: Redundancy for Fiber & Wireless Link with Same Single IP

Thu Jun 19, 2014 1:20 pm

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

Who is online

Users browsing this forum: burca, garyjduk, Mosmos and 35 guests