Problems with gateway-interface

Good afternoon, I have a problem here. I have three links, and all receive the provider’s IP address via DHCP and I want to load-balance them. The gateway and the network are the same for all interfaces so decided to try set up /ip route add dst-address=0.0.0.0/0 gateway=ether1 . I did this for all the interfaces that receive IP address via DHCP, but not works. There is some issue in the gateway-interface as a broadcast interfaces (like ethernet)? In other providers I configured similar setup with point-to-point (pppoe) interfaces and worked perfectly.
Sorry the bad english. I`m from Brazil and used translator tool to write this post.
Thanks

unfortunately, you cannot just setup interface as gateway on non-p2p links: in this case router sends packets directly from the interface, not to the gateway. in ‘routing-test’ package you can set gateway interface together with gateway address, so It’s your solution, I believe

Thanks for reply.
I’m confused about how to set up gateway ip address together with gateway-interface in routing-test. You can give me an example how to do this job?
Here is installed Mikrotik 3.27 , with routing-test package instead of routing package.
Thanks

seems like you should use

/ip route add gateway=192.168.0.254%ether1,192.168.0.254%ether2

unfortunately, I didn’t find any docs on it

:[

Routing test package did not quite work on v3.28, so… :

That’s a huge bummer for almost all setups! We do need routing to work with only interface set! Because the IP addresses of the interface and of the gateway were dynamic for example…

But in this case RouterOS does not send the packets to the gateway IP address (because it does not know it) but rather broadcasts an arp request for the destination Internet IP address?! This leads to huge performance loss, because this arp process is slow + arp table gets very full. And the gateway must have arp set to proxy-arp (I think) for this to even work?

So, MikroTik developers, here is my (ours) feature/fix request: (And nobody cares what standards this will Not comply to, I personally give you permission to make it WORK for me, my customers and other RouterOS users!)

Here it is:

  • A way to setup routes that would automatically work when the IP address of the interface is dynamic and the gateway is dynamic (DHCP), very similar to what works very well when PPPoE, PPTP connections are used… This could mean to setup an interface instead of an IP address, only, RouterOS should somehow KNOW the current dynamically asigned gateway IP address for that interface, without any dynamic routes introduced by automatic DHCP Client interfereing with our load-balancing+fail-over + policy routing table! Lets say we have everything set up with interface names instead of gateway IP addersses. Insted of not knowing the ip address of the gateway, a smart technique could be implemented into RouterOS that sends the packets to the proper gateway IP address, because it has already learned it from DHCP/whatever and knows it ! RouterOS MUST NOT waste time in arp erquest and BS! This means that this MUST work when the IP addresses dynamically assigned by DHCP are THE SAME with the same gateways! For example a DHCP server could assign these to each of our uplink interfaces: ( GW A, IP B ) + ( GW A, IP C ) + ( GW A, IP D ) ( B, C, D are in the same subnet) AND the smarter feature that we Must have: ( GW A, IP B ) + ( GW A, IP B ) (same IP as on other interface!!!)

Maybe this can be architected as a way of setting up a sort of tunnel simulation interface - the Dynamic DHCP Client could be presented and could be managed as a PPPoE dynamic interface: Same principal. To avoid IP address “collision” - routing-test package should be brought to a stable version that can route with ip + interface setting…?

This must work in these situations:

  • When, for example, a cable is unplugged that carries the dynamic DHCP uplink - the routes must automatically go in Not Active state so that RouterOS knows and takes LIGHTNING FAST routing decisions and sends the new connections requests Not to the Not Active interfaces but to working interfaces instead! This currently works very very well when all Internet uplink connections are PPPoE, PPTP, etc THIS MUST WORK with COMBINED ECMP ROUTES !! So that not the entire ECMP Route gets invalidated but only the currently missing gateway(s).


    So, go ahead and DO THIS! Because every day me, the people who posted in this thread before me, and other RouterOS customers need to make load - balancing work when using for example two or more ADSL/3G/Cable/other modems, links of all kinds, that give the client the same NAT-ed ip address for example… or an IP address in the same subnet (like many ISPs do), or give the client the public IP address via DHCP but this address and gateway change from time to time, etc. etc.

So far a partial solution to this was to use xen/metarouter but that setup is very very very very unstable and eats up the CPU! And is inpractical in many ways, presents many new problems, so I find it Not usefull to use virtual routers for this, especially now when Xen does not work in latest RouterOS versions.