Community discussions

MikroTik App
 
User avatar
laithusa
just joined
Topic Author
Posts: 19
Joined: Wed Dec 02, 2020 9:20 am

How to connect the ether to a running ISP automatically?

Tue Dec 08, 2020 5:09 pm

Hi guys .
How is it going ? .reffering to the image down .I would like to perform a plan which servise me to bridge the running ISP 1 OR ISP2 to ether 1 that connected to my pc.
I will explain my plan /
if ISP1 is not running (off or no internet) →E1 that connected with my pc has been bridged automatically with E3(ISP2)
if ISP2 is not running ( no intrenet) → E1=E2(ISP1..internet ON )
if ISP1 + ISP2 are both have internet →E1 = E2 OR E3
if ISP1 + ISP2 are both have no internet → routerboard make alarm sound

I hope u understand my scenario
need your help please .
Image
Last edited by laithusa on Tue Dec 08, 2020 7:09 pm, edited 1 time in total.
 
User avatar
satman1w
Member Candidate
Member Candidate
Posts: 274
Joined: Mon Oct 02, 2006 11:47 am

Re: How to connect the ether to a running ISP automatically?

Tue Dec 08, 2020 5:27 pm

Google "Mikrotik Multiple ISP routing" and you will find a number of solutions... except, I dont think that any of them will bridge your private network to ISP (that is not ussual way to do it) but rather route your private subnet to different ISP.

regards
 
User avatar
laithusa
just joined
Topic Author
Posts: 19
Joined: Wed Dec 02, 2020 9:20 am

Re: How to connect the ether to a running ISP automatically?

Thu Dec 10, 2020 10:16 am

Google "Mikrotik Multiple ISP routing" and you will find a number of solutions... except, I dont think that any of them will bridge your private network to ISP (that is not ussual way to do it) but rather route your private subnet to different ISP.

regards
thank you very much ..You mean that my plan actually is not correct .Unless if I do something else like routing and rerouting my private subnet from ISP1→ISP2 and reversally.
 
User avatar
satman1w
Member Candidate
Member Candidate
Posts: 274
Joined: Mon Oct 02, 2006 11:47 am

Re: How to connect the ether to a running ISP automatically?

Fri Dec 11, 2020 9:27 pm

You should put all your hardware in private subnet, configure two ISPs and script a simple failover for them (you will find a lot of examples how to do it)
In this case, your machines will always have the same addressess (local subnet) and will not even know that you have changed ISP.
Not to mention that you will have a NAT which is by design a sort of basic (primitive) firewall.. and so on...
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: How to connect the ether to a running ISP automatically?

Fri Dec 11, 2020 9:39 pm

The simplest script for failover I know, (for outgoing connections only) is just setting a different route distance for the default route for both ISP. If you get an IP address by DHCP from the ISP or from the modem, you can set the default route distance in the DHCP client of the interface.

The advanced (and much better way) of doing it is here: viewtopic.php?f=23&t=157048 (It even does load balancing)
 
User avatar
laithusa
just joined
Topic Author
Posts: 19
Joined: Wed Dec 02, 2020 9:20 am

Re: How to connect the ether to a running ISP automatically?

Sun Dec 13, 2020 8:39 am

You should put all your hardware in private subnet, configure two ISPs and script a simple failover for them (you will find a lot of examples how to do it)
In this case, your machines will always have the same addressess (local subnet) and will not even know that you have changed ISP.
Not to mention that you will have a NAT which is by design a sort of basic (primitive) firewall.. and so on...
Good idea .Yeah this is the main goal.
 
User avatar
laithusa
just joined
Topic Author
Posts: 19
Joined: Wed Dec 02, 2020 9:20 am

Re: How to connect the ether to a running ISP automatically?

Sun Dec 13, 2020 8:46 am

The simplest script for failover I know, (for outgoing connections only) is just setting a different route distance for the default route for both ISP. If you get an IP address by DHCP from the ISP or from the modem, you can set the default route distance in the DHCP client of the interface.

The advanced (and much better way) of doing it is here: viewtopic.php?f=23&t=157048 (It even does load balancing)
thanks .But this is not the accurate issue .You can get an ip address from any router or modem but without internet service !!(ping 8.8.8.8= time out ) because the ISP that connected with the router or modem have a proplem with internet service (no internet service)..
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: How to connect the ether to a running ISP automatically?

Sun Dec 13, 2020 3:55 pm

Just for your information. I use a subset of that advanced load balancing setup (as I need no load balancing, only failover and only outgoing connections)
The explanation is in that advanced load balancing setup without scripting. Scope plays an important role, to be able to ping-check a remote server (.e.g. 8.8.8.8) and to enable/disable the corresponding route to the local gateway, based on that remote ping result. No so easy to understand at first sight! It's about recursive routing.

In my setup:
Route distances 10 and above are only there to still try to connect , even if 8.8.8.8 and 8.8.4.4 would be down, but the rest of internet is up. = fallback
Route distances above 20 are DHCP set routes (when the local gateways are replaced with devices with other addresses) = fallback of the fallback
The distance 2 and 3 define which gateway is preferred. I prefer 4G now, as I have multiple 4G connections on a load balancer, and the satellite has a 700 ms roundtrip delay.

192.168.90.1 and 192.168.95.1 are the LAN side addresses of the modem/gateway towards 4G and the satellite modem.. "90.1" is a satellite connection, "95.1" is a set of 4G SXT kits.
/ip route
add check-gateway=ping comment="dynamische default route" distance=2 gateway=8.8.4.4
add check-gateway=ping distance=3 gateway=8.8.8.8
add comment="fallback dynamische default route" distance=10 gateway=192.168.90.1
add distance=11 gateway=192.168.95.1
add comment="check 4G recursive for default route (BGP scope = target scope)" distance=1 dst-address=8.8.4.4/32 gateway=192.168.95.1 scope=10
add comment="check SkyDSL recursive for default route (BGP scope = target scope)" distance=1 dst-address=8.8.8.8/32 gateway=192.168.90.1 scope=10
.
.
Klembord-1.jpg
You do not have the required permissions to view the files attached to this post.
 
User avatar
laithusa
just joined
Topic Author
Posts: 19
Joined: Wed Dec 02, 2020 9:20 am

Re: How to connect the ether to a running ISP automatically?

Sun Dec 13, 2020 5:17 pm


In my setup:
Route distances 10 and above are only there to still try to connect , even if 8.8.8.8 and 8.8.4.4 would be down, but the rest of internet is up. = fallback
Route distances above 20 are DHCP set routes (when the local gateways are replaced with devices with other addresses) = fallback of the fallback
The distance 2 and 3 define which gateway is preferred. I prefer 4G now, as I have multiple 4G connections on a load balancer, and the satellite has a 700 ms roundtrip delay.
192.168.90.1 and 192.168.95.1 are the LAN side addresses of the modem/gateway towards 4G and the satellite modem.. "90.1" is a satellite connection, "95.1" is a set of 4G SXT kits.
Perfect idea .thanks
 
arifbudiw
just joined
Posts: 4
Joined: Tue Nov 24, 2020 5:38 am

Re: How to connect the ether to a running ISP automatically?

Mon Dec 14, 2020 1:17 pm

Hi guys .
How is it going ? .reffering to the image down .I would like to perform a plan which servise me to bridge the running ISP 1 OR ISP2 to ether 1 that connected to my pc.
I will explain my plan /
if ISP1 is not running (off or no internet) →E1 that connected with my pc has been bridged automatically with E3(ISP2)
if ISP2 is not running ( no intrenet) → E1=E2(ISP1..internet ON )
if ISP1 + ISP2 are both have internet →E1 = E2 OR E3
if ISP1 + ISP2 are both have no internet → routerboard make alarm sound

I hope u understand my scenario
need your help please .
Image

Who is online

Users browsing this forum: No registered users and 19 guests