Community discussions

MUM Europe 2020
 
tiaan
just joined
Topic Author
Posts: 2
Joined: Mon Sep 11, 2006 11:32 am

Interface Routing

Mon Sep 11, 2006 4:34 pm

Hello,

Can I create a route and specify the interface as the gateway in RouterOS?

eg. ip route add dst-address=10.0.0.0/24 gateway=ether1

Thanks
Tiaan
 
cmit
Forum Guru
Forum Guru
Posts: 1552
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Mon Sep 11, 2006 5:23 pm

No.

I have requested this several times, too ;-)

Best regards,
Christian Meis
 
changeip
Forum Guru
Forum Guru
Posts: 3804
Joined: Fri May 28, 2004 5:22 pm

Mon Sep 11, 2006 6:40 pm

I wish this was there too - i lost that feature when we threw out the ciscos.

Sam
 
cmit
Forum Guru
Forum Guru
Posts: 1552
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Mon Sep 11, 2006 6:42 pm

Especially as this would allow load-balancing over multiple ADSL uplinks which all have the same default gateway (ip address)...

Best regards,
Christian Meis
 
changeip
Forum Guru
Forum Guru
Posts: 3804
Joined: Fri May 28, 2004 5:22 pm

Mon Sep 11, 2006 6:47 pm

exactly the reason I wished it was there...
 
cmit
Forum Guru
Forum Guru
Posts: 1552
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Mon Sep 11, 2006 9:44 pm

:-D

But I think MikroTik did not realize the need for this until now.
The answer to my requests (explaining the need for that) was always "no" (as I could do it with policy routing or the like - which is not true if you have the same gateway ip address on multiple uplinks).

Perhaps some more guys jumping onboard this request could help?

It shouldn't be too hard to implement - it's there in every standard linux distribution...

Best regards,
Christian Meis
 
User avatar
tneumann
Member
Member
Posts: 394
Joined: Sat Apr 16, 2005 6:38 pm
Location: Germany

Re: Interface Routing

Mon Sep 11, 2006 9:51 pm

ip route add dst-address=10.0.0.0/24 gateway=ether1
Note that this is a particularly bad example for the requested feature, giving an ethernet interface as the gateway. If this feature is implemented at all then it should be implemented for point-to-point interfaces only.

Why is using this with ethernet (or any broadcast / shared-media interface type for that matter) a bad idea? Well, if no next-hop IP address is given but only an interface (like in the example), then there is no way a MAC address can be resolved (using ARP), because without a next-hop IP address, for what IP address would you ARP for? So the only possible way to transfer the packet is to send it out of the interface with a MAC layer broadcast destination address (MAC FF:FF:FF:FF:FF:FF). This will make every packet a broadcast and flood all your switch ports with every packet, as far as ethernet is concerned.

The only situation I would ever find this acceptable is when the physical topology is strictly point-to-point, e.g. a crossover cable between two ethernet devices and nothing else.

On point-to-point interfaces it's a nice feature, though.

--Tom
 
cmit
Forum Guru
Forum Guru
Posts: 1552
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Mon Sep 11, 2006 9:54 pm

Hello Tom,

of course that's true (and I have discussed this topic so much I just forgot to add this)!

My application scenario would be for PPP links, which are point-to-point of course.
Using interface based routing to force traffic out a normal ethernet interface could create interesting effects on your network, yes ;-) ...

Best regards,
Christian Meis
 
tiaan
just joined
Topic Author
Posts: 2
Joined: Mon Sep 11, 2006 11:32 am

Wed Sep 13, 2006 1:17 pm

Hallo,

I'll explain the reason why I asked the question, maybe someone can give me another solution.

I've got 3 connections on my router; satellite, 3G and wireless. I need to use the cheapest path available to send data to a server on the internet, no other connections will be made from within the network. The data also have priorities, i.e. some data will only be send when the router enters a wireless cloud, etc. I will monitor the state of the interface from within the application to make these decisions.

The problem is that the interfaces gets dynamic IPs. My plan was to create static routes with different metrics and then specify the interface as the gateway.

Thanks
Tiaan
 
changeip
Forum Guru
Forum Guru
Posts: 3804
Joined: Fri May 28, 2004 5:22 pm

Wed Sep 13, 2006 5:07 pm

I would still like to see interface routing...

however, you can use dynamic routing filter (dynamic-in) to somewhat get around this ... as you learn the DHCP default gateway you can change the distance of it on the fly ... the problem is that you can't decipher which DHCP client to mangle to what. It would be nice to have a routing filter that would also include interface or something.
 
User avatar
tneumann
Member
Member
Posts: 394
Joined: Sat Apr 16, 2005 6:38 pm
Location: Germany

Thu Sep 14, 2006 6:48 pm

It would be nice to have a routing filter that would also include interface or something.
Yeah, or a parameter under /ip dhcp-client to name a script that will be called after receiving a new client lease...


--Tom
 
User avatar
sten
Forum Veteran
Forum Veteran
Posts: 920
Joined: Tue Jun 01, 2004 12:10 pm

Thu Sep 14, 2006 11:03 pm

I've been seriously looking for interface routing since around v2.8.11. The other so called solutions have been outrageously inefficient, overly complicated with unacceptable short comings such as the ones cmit mentioned.
Move along. Nothing to see here.

Who is online

Users browsing this forum: pe1chl, seriosha, sjdurand and 143 guests