Triple load balancing - same gateway - problem

Hello everybody,

I have problem with triple dynamic load balancing on my NAT machine. Actually, there is no problem with load balancing but with WAN addresses which are in the same subnet, for example:

  • WAN-1= 188.2…/22
  • WAN-2= 188.2…/22
  • WAN-3= 188.2…/22

Those addresses have the same gateway which get from provider automatically via dhcp-client ether interfaces. By today, I had two WANs with same gateway and that has been working perfectly until I’ve put third WAN interface and get IP automatically. In that moment, all internet traffic on the network went down totally.

I forgot to mention that WAN-3 interface represents EoIP tunnel to the location where is located one x86 based MikroTik router with ethernet card directly connected to provider’s cable modem. On this router, there is one ether card, EoIP tunnel to NAT machine, bridged interfaces and this works extremly reliable.

So, my question is: How to prevent internet traffic goes down on NAT machine when third interface gets IP address from the same subnet and gets same gateway as WAN-1 and WAN-2.

Thank you in advance,
Miroslav

If I understanded your config, your eoip to the third wan is made via those two wans already existed before and properly load balanced??

No, EoIP was made directly to the second destination in local network. Entire network is routed with OSPF routing protocol. First two WANs are working independently. Third WAN is EoIP.

How do you got ip addresses from the same network on different router interfaces? Do you use VRF or proxy-arp on those interfaces?

No, I’m getting addresses from provider automatically and I’m not using VRF nor proxy-arp.

Hmm, that’s odd for me. I haven’t tried that, but wiki documentation at http://wiki.mikrotik.com/wiki/Manual:IP/Address states:

Two IP addresses from the same network assigned to routers different interfaces are not valid unless VRF is used. For example, the combination of IP address 10.0.0.1/24 on the ether1 interface and IP address 10.0.0.132/24 on the ether2 interface is invalid, because both addresses belong to the same network 10.0.0.0/24. Use addresses from different networks on different interfaces, or enable proxy-arp on ether1 or ether2.

Hm, very interesting, I’ll try this but I thing I tried that once before but it didn’t work at all. I’ll notice you what’s happening. Thanks.

Not working at all with proxy-arp too when I include third interface. Same thing.

I think this should do it.

http://wiki.mikrotik.com/wiki/Manual:Load_balancing_multiple_same_subnet_links

Namely what you are looking for is:

/ip route
add gateway=10.1.101.1
add gateway=10.1.101.1%ether1 routing-mark=first
add gateway=10.1.101.1%ether2 routing-mark=other

Keep in mind that this MUST be done by the CLI. Once the routes are made, do not edit them with winbox.

First thing: This solution is not what I am using now and what i want on the network because I won’t use static load balancing by marking some packages but dynamic. I solved problem by including three RB750Gs on every WAN and everything works just perfectly.

Secong thing: I tried to solve problem on this way and all I want to say is that this is working with two WAN interfaces. In the moment I switch and apply those settings on thirs interface, all traffic on the network goes down, totally.

Thanks to everyone.