how to use 2 ISP in mikrotik, and i want do some load balancing?
i had subscribe 2 line from IPS, each line speed is 20Mbps..
i want connect this 2 line from ISP to mikrotik router, and do some load balancing..
how can i do that?
i want port 1-1023 is using WAN 1, and 1024-65535 using WAN 2…
or
WAN 1 = Web suffering, email and etc..
WAN 2 = P2P, streaming, and etc…
how can i do that?
I`m using this on a ip base but port base should also be working
Ether1 = LAN
Ether4 = ISP1
Ether5 = ISP2
I`m not shure how i did it because my wiki is lost But i know some of the steps
IP → routing
Create a default route for ISP1 distance 1 and routingmark 2isp1
Create a default route for ISP2 distance 2 and routingmark 2isp2
IP → Firewall → Mangle (create mangle rules to sent traffic out as it came in)
chain=input
in.interface=eth4-ISP1
action = mark connection
New connection mark = ISP1_connection
Passthrough = enabled
chain=input
in.interface=eth5-ISP2
action = mark connection
New connection mark = ISP2_connection
Passthrough = enabled
chain=output
connection mark = ISP1_connection
action = mark routing
New routing mark = 2isp1
chain=output
connection mark = ISP2_connection
action = mark routing
New routing mark = 2isp2
Sending traffic from one host out by ISP2
chain=prerouting
SRC adress = 192.168.110.189
SRC adress != Not out ISP2 (to always force some ips out on isp1)
DST adress != Private IPS (to keep local traffic local example 192.168.x)
action = mark_connection
new connection mark = 2isp2
passthrough = Enabled
chain=srcnat
Src adress = 192.168.110.123
Out interface = eth5-ISP2
dst adress list =!NO-SRC-NAT (again to prevent some unwanted nat)
action = masquerade
To send out al other traffic
chain=srcnat
src adress = 192.168.110.0/24
Out interface = eth4-ISP2
dst adress list =!NO-SRC-NAT (again to prevent some unwanted nat)
action = masquerade
To Addresses = WAN IP
chain=srcnat
src adress = 192.168.110.0/24
Out interface = eth4-ISP1
dst adress list =!NO-SRC-NAT (again to prevent some unwanted nat)
action = src-nat
To Addresses = WAN IP
- I`m using src-nat on my ISP1 interface with static routed subnet
- I`m using masquerade on my ISP2 interface where the IP is dynamic
\
I think this is it