load balance with only one interface

Hello guys!

I need to work with load balance in my router but i need to do it only using one physical network interface.

All rules about LB i see use one interface for lan and every wan interface use as “exclusive” physical interface, any way to create a rule using one only interface to work as lan and wan at same time?

Thank you.

Is there a reason you have your lan and wan on one interface. That’s generally a horrible idea.

Sent from my SCH-I545 using Tapatalk

I know it! But in my cause i need all in one interface.

You can use VLANs and a smart switch to “extend” one RB port for many smart switch ports.

with vlans the load balance not works =/

I’m not sure but this should work :

/ip firewall nat add action=src-nat chain=srcnat src-address=192.168.88.3 to-addresses=192.168.88.1
/ip firewall nat add action=src-nat chain=srcnat src-address=192.168.88.3 to-addresses=192.168.88.2

/ip route add distance=1 gateway=192.168.88.1
/ip route add distance=1 gateway=192.168.88.2

Multiple subnets can exist on one interface, so yes you can load balance with multiple subnets coming into one interface. You just need to narrow down the necessary rules to be based on IP addresses instead of the more generic interface.

As for VLANs, you have to think about them approproiately, each VLAN in a MikroTik is it’s own routed interface, much like a physical interface. All traffic that leaves that interface is tagged for that VLAN, so a device that recieves that traffic needs to be able to understand those tags. Hence why a smart switch was mentioned.

The local and wans interface can work only in one interface? Tell me a example of this configuration based on ip and not interface.

I’m assuming you have two different providers with their own subnet that they are forwarding to you plugged into a switch, and then plugged into the MirkroTik. You can have both of these subnets assigned to the WAN interface of the MikroTik with the appropriate default routes. If both are doing DHCP, you are kind of out of luck without using VLANs so you can have two DHCP clients running on one physical interface (but two virtual interfaces).

For narrowing down based on IP instead of interface, it basically means that when you are crafting a firewall rule, you are slecting attributes about packets to narrow down what is being looked for so it matches what you desire. Where appropriate, use an IP range instead of an interface to narrow down a rule in those cases.

You have to split traffic on level2 so vlans are really necessary in your case. If you have ros installed on pc with just one physical ethernet, better to add other ethernets to it or go with smart switch. Depends on the processing power and traffic you need but maybe it will be cheaper for you to use some cheap router from mikrotik with enough ports.

Can u provide me a example of this way configuration?

Thanks.

With x86 mikrotik i use one ethernet for many interfaces in mikrotik. But with ROUTERBOARD every physical ethernet can be virtualized one time only.

Yes it is absolutely possible
Mikrotik<=VLANS=>Cisco
but one condition
with 1G Ether will get 500MBPS