Community discussions

MikroTik App
 
shawnp
just joined
Topic Author
Posts: 1
Joined: Thu Mar 03, 2011 5:41 am

rb450g dual wan failover without load balancing

Mon Oct 03, 2011 5:34 am

Newbie here,

rb450g
wan1 = 192.168.1.11 static
wan2 = 192.168.2.11 static
lan = 192.168.3.11 static

I was needing some help with setting up a dual wan failover without load balancing. I was able to get the basic setup to work, but it keeps dropping out randomly. Sometimes it lets me ping to (google or whereever) sometimes it doesn't. If someone can look at my setup and point me the correct direction I would appreciate it.

I am testing at my home using a switch and 2 other routers to simulate the other isp's

/ ip address
add address=192.168.0.2/24 network=192.168.0.0 broadcast=192.168.0.255 interface=lan
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=wan2
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=wan1

/ ip firewall nat
add chain=srcnat out-interface=wan1 action=masquerade
add chain=srcnat out-interface=wan2 action=masquerade

/ ip route
add dst-address=8.8.8.8 gateway=192.168.1.1,192.168.2.1 check-gateway=ping
add dst-address=8.8.4.4 gateway=192.168.1.1,192.168.2.1 check-gateway=ping

/ ip firewall mangle
add chain=input in-interface=wan2 action=mark-connection new-connection-mark=ether1-gateway_conn
add chain=input in-interface=wan1 action=mark-connection new-connection-mark=ether2-local_conn
add chain=output connection-mark=ether1-gateway_conn action=mark-routing new-routing-mark=to_wla1
add chain=output connection-mark=ether1-gateway_conn action=mark-routing new-routing-mark=to_wla2

/ ip route
add dst-address=8.8.8.8 gateway=192.168.1.1 routing-mark=to_wla1
add dst-address=8.8.4.4 gateway=192.168.1.2 routing-mark=to_wla2

/ip route add gateway=192.168.1.1 check-gateway=ping
/ip route add gateway=192.168.2.1 distance=2
 
leonset
Member Candidate
Member Candidate
Posts: 256
Joined: Wed Apr 01, 2009 9:09 pm

Re: rb450g dual wan failover without load balancing

Mon Oct 03, 2011 11:34 am

Hello,

You should try this way of doing such failover:

http://wiki.mikrotik.com/wiki/Advanced_ ... _Scripting

I've used it sometimes and does a nice job ;)
 
rgrocery
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Thu Oct 02, 2014 6:38 am

Re: rb450g dual wan failover without load balancing

Fri Dec 19, 2014 11:33 pm

Hey Shawnp did you get your setup to work? I am looking at something similiar
Newbie here,

rb450g
wan1 = 192.168.1.11 static
wan2 = 192.168.2.11 static
lan = 192.168.3.11 static

I was needing some help with setting up a dual wan failover without load balancing. I was able to get the basic setup to work, but it keeps dropping out randomly. Sometimes it lets me ping to (google or whereever) sometimes it doesn't. If someone can look at my setup and point me the correct direction I would appreciate it.

I am testing at my home using a switch and 2 other routers to simulate the other isp's

/ ip address
add address=192.168.0.2/24 network=192.168.0.0 broadcast=192.168.0.255 interface=lan
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=wan2
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=wan1

/ ip firewall nat
add chain=srcnat out-interface=wan1 action=masquerade
add chain=srcnat out-interface=wan2 action=masquerade

/ ip route
add dst-address=8.8.8.8 gateway=192.168.1.1,192.168.2.1 check-gateway=ping
add dst-address=8.8.4.4 gateway=192.168.1.1,192.168.2.1 check-gateway=ping

/ ip firewall mangle
add chain=input in-interface=wan2 action=mark-connection new-connection-mark=ether1-gateway_conn
add chain=input in-interface=wan1 action=mark-connection new-connection-mark=ether2-local_conn
add chain=output connection-mark=ether1-gateway_conn action=mark-routing new-routing-mark=to_wla1
add chain=output connection-mark=ether1-gateway_conn action=mark-routing new-routing-mark=to_wla2

/ ip route
add dst-address=8.8.8.8 gateway=192.168.1.1 routing-mark=to_wla1
add dst-address=8.8.4.4 gateway=192.168.1.2 routing-mark=to_wla2

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

Who is online

Users browsing this forum: nanobahr and 23 guests