Community discussions

MikroTik App
 
akorzh
just joined
Topic Author
Posts: 6
Joined: Mon Feb 22, 2021 8:04 pm

dual WAN for newbies

Sat Feb 27, 2021 7:23 am

Hi
supernew to mikrotik - got a CCR1009-7G-S-S+-PC (used peplink balance one core before that, till i hit the 400mbps limitation)

setting up single WAN with NAT surprisingly required some time but i am past that and happy.
really love CLI over SSH (not a fan of Winbox especially given my main laptop is mac)

so want to set up dualWAN (and play with different ways of load balancing it PCC, firewall marking etc trying to understand what are the pros/cons and how can i configure it for my needs with weighted/priority outbound rules and not break any sensitive protocols like https,udp+voip,etc)

but as a first basic step want to test simple failover: use WAN1 and if it fails fallback to WAN2, but once WAN1 is back online switch to it

so couple of questions

1) is there a ping only method to check if connection is alive, i am used to dns query check - like it more

2) so lot of different instructions are rather simple but all have explicit gateway commands like

/ip route add gateway=192.168.1.1 check-gateway=ping
/ip route add gateway=192.168.2.1 distance=2

but both my connections are dynamic public IP:

WAN1: /ip dhcp-client add interface=ether1 disabled=no
WAN2: /interface pppoe-client add disabled=no interface=combo1 user=xxxxxxx password=xxxxxxx add-default-route=yes use-peer-dns=yes

so how should i proceed if i want to add those properties into dhcp WAN(check-gateway=ping) and distance=2 into pppoe obtained gateway
 
akorzh
just joined
Topic Author
Posts: 6
Joined: Mon Feb 22, 2021 8:04 pm

Re: dual WAN for newbies

Mon Mar 01, 2021 7:28 pm

ok i learned both has options to add distance, but not the check-gateway thing.
for dhcp lease it seems there is a script you can run after lease changes (where i can add gateway manually and do any other stuff)
but for pppoe establishing there is no script option - is there a way to have custom script run on interface created/destroyed?

Or given i still run check ping script to check both connection and adjust routing tables/kill connections on any change - i can also test if pppoe exists before trying to ping through it?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19321
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: dual WAN for newbies

Tue Mar 02, 2021 8:09 pm

Read through this topic lots of good learning...............
viewtopic.php?f=23&t=157048&p=840751&hi ... er#p840751
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: dual WAN for newbies

Thu Mar 04, 2021 8:33 am

Who is online

Users browsing this forum: No registered users and 34 guests