Community discussions

MikroTik App
 
tnegdaniel
just joined
Topic Author
Posts: 4
Joined: Tue Mar 17, 2015 2:45 am

How to distribute 3 links of internet in the same LAN?

Tue Mar 17, 2015 3:00 am

Hello,

I'm beginner in the utilization of Mikrotik, and I need a help. Let's to my problem:

I have 3 links of internet (all dynamic), and i would like distribute according to example:

My network: 10.0.0.0/24

WAN LINK1 (4mb) - 10.0.0.100 to 10.0.0.120
WAN LINK2 (20mb) - 10.0.0.121 to 10.0.0.140
WAN LINK3 (30mb) - 10.0.0.141 to 10.0.0.200

I have a RB2011UiAS-RM. Could anyone help me?
 
seb4itik
just joined
Posts: 12
Joined: Mon Mar 16, 2015 10:26 am

Re: How to distribute 3 links of internet in the same LAN?

Tue Mar 17, 2015 7:12 pm

Hi,

You can try this:
/ip firewall mangle
add chain=prerouting src-address=10.0.0.100-10.0.0.120 action=mark-routing new-routing-mark=Route_LINK1
add chain=prerouting src-address=10.0.0.121-10.0.0.140 action=mark-routing new-routing-mark=Route_LINK2
add chain=prerouting src-address=10.0.0.141-10.0.0.200 action=mark-routing new-routing-mark=Route_LINK3

/ip route
add gateway=LINK1 routing-mark=Route_LINK1
add gateway=LINK2 routing-mark=Route_LINK2
add gateway=LINK3 routing-mark=Route_LINK3

/ip firewall nat
add chain=srcnat action=masquerade out-interface=LINK1
add chain=srcnat action=masquerade out-interface=LINK2
add chain=srcnat action=masquerade out-interface=LINK3
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: How to distribute 3 links of internet in the same LAN?

Tue Mar 17, 2015 7:23 pm

Why not use the bandwidth of all three connections for everyone?

http://mum.mikrotik.com/presentations/US12/tomas.pdf
 
tnegdaniel
just joined
Topic Author
Posts: 4
Joined: Tue Mar 17, 2015 2:45 am

Re: How to distribute 3 links of internet in the same LAN?

Tue Mar 17, 2015 7:44 pm

Hi,

You can try this:
/ip firewall mangle
add chain=prerouting src-address=10.0.0.100-10.0.0.120 action=mark-routing new-routing-mark=Route_LINK1
add chain=prerouting src-address=10.0.0.121-10.0.0.140 action=mark-routing new-routing-mark=Route_LINK2
add chain=prerouting src-address=10.0.0.141-10.0.0.200 action=mark-routing new-routing-mark=Route_LINK3

/ip route
add gateway=LINK1 routing-mark=Route_LINK1
add gateway=LINK2 routing-mark=Route_LINK2
add gateway=LINK3 routing-mark=Route_LINK3

/ip firewall nat
add chain=srcnat action=masquerade out-interface=LINK1
add chain=srcnat action=masquerade out-interface=LINK2
add chain=srcnat action=masquerade out-interface=LINK3
My friend...

Link1 OK! Maybe because it's PPPOE client.. i don't know.
Link2 and Link3 is DHCP client. They don't worked.

In the 3 links, I disabled the route default. It's correct?
 
tnegdaniel
just joined
Topic Author
Posts: 4
Joined: Tue Mar 17, 2015 2:45 am

Re: How to distribute 3 links of internet in the same LAN?

Wed Mar 18, 2015 2:11 am

Why not use the bandwidth of all three connections for everyone?

http://mum.mikrotik.com/presentations/US12/tomas.pdf
Zerobyte, it's possible too. I have 3 links, and i don't know what i do.

I just like to leave a unique link to acess points, to share the internet with clientes. I'm thinking in start up the hotspot, but i'm beginner, then i need time to undestand the mikrotik.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: How to distribute 3 links of internet in the same LAN?

Wed Mar 18, 2015 4:01 pm

Load balancing 3 connections for 3 different networks, each having its own policy, is not a trivial task.
Mikrotik is a powerful routing platform with many controls and functions. It's not the easiest router to learn with if you don't already know networking concepts and don't read howtos / watch howto videos on youtube.

Starting with a complicated design on a powerful platform can be daunting.

For learning Mikrotik, try to understand each component seperately, and understand how they all work together to achieve the behavior you want.

Ethernet interfaces configuration has to do with speed/duplex/switch membership, but IP addresses are assigned from the IP menu. (Many routers group configurations by interface, but Mikrotik groups by functionality)
What part do IP routes play?
How does NAT work?
What is the behavior of chains in the firewall filters?

I recommend studying the new packet flow diagram
http://wiki.mikrotik.com/wiki/Manual:Packet_Flow_v6
This shows an overview of how each component of RouterOS is used.

Also understand what's going on "on the wire" with Internet protocol - things like DNS, ping, arp, MAC address, port numbers, etc - Don't just know the words - understand what they mean and what they do, and you'll be able to understand Mikrotik pretty easily.
 
seb4itik
just joined
Posts: 12
Joined: Mon Mar 16, 2015 10:26 am

Re: How to distribute 3 links of internet in the same LAN?

Wed Mar 18, 2015 5:09 pm

Hi,
Link1 OK! Maybe because it's PPPOE client.. i don't know.
Link2 and Link3 is DHCP client. They don't worked.

In the 3 links, I disabled the route default. It's correct?
I think it’s better to keep a default route in your global table to one of your links in order to route LAN IP that are not within the range 100-200 and also for the Mikrotik router itself.

Can you paste here the configuration of your router ?