Community discussions

MikroTik App
 
andryan
newbie
Topic Author
Posts: 36
Joined: Fri Nov 30, 2007 10:33 pm
Location: Jakarta, Indonesia
Contact:

Directly connected networks do not exist in non-main routing tables

Mon May 16, 2016 5:32 am

Hi,

Last week I made a support request to support@mikrotik.com but Emils (ticket number 2016051166000237) stopped responding after I shared my supout.rif file. So I thought I would share my issue here to see if others are having the same problem.

I found an issue with directly connected networks/interfaces on MikroTik RouterOS. Previously, IIRC, directly connected networks/interfaces are "inherited" to any routing table. However in recent RouterOS version (I am currently using v6.35.2), directly connected networks/interfaces cannot be reached by those hosts governed by routing rules to use non-main routing tables.

For example: if I have a network of 10.0.0.0/24 on ether1 with IP 10.0.0.1 assigned to it, 192.168.0.0/24 on ether2 with IP 192.168.0.1, I make a routing-mark (non-main routing table, let's call it WAN-A) in /ip route rule for one of the hosts, say 10.0.0.2, then this host 10.0.0.2 will not be able to reach 192.168.0.1 anymore as routing table WAN-A does not have 10.0.0.0/24 in the table. If I remove the rule, it would work normally. This non-auto inheritance "feature" is acceptable as long as there is a mechanism in place to let us manually "add" directly connected networks/interfaces to the routing table. However I don't think there is such thing yet so currently I am unable to reach directly connected networks/interfaces in non-main routing tables. :(

Does anyone encounter the same issue?


Cheers,
Andryan
 
pe1chl
Forum Guru
Forum Guru
Posts: 6677
Joined: Mon Jun 08, 2015 12:09 pm

Re: Directly connected networks do not exist in non-main routing tables

Mon May 16, 2016 12:30 pm

I don't think it is a new issue - I had problems with this from the moment I started using multiple routing tables.

However, then I read somewhere on the forum that it is possible to make a routing table entry for directly-connected
networks!
In the gateway field, where normally the IP address of the router appears, put the name of the interface.
Then it works! A bit boring to have to do this for every local network in every non-main table, but it solves the issue.
 
andryan
newbie
Topic Author
Posts: 36
Joined: Fri Nov 30, 2007 10:33 pm
Location: Jakarta, Indonesia
Contact:

Re: Directly connected networks do not exist in non-main routing tables

Mon May 16, 2016 3:26 pm

Thanks! That worked, but I think this is a workaround rather than a fix. Maris told me on a reply:
You do not need explicit addition of every connected network in non main routing
table. You just need to set up either routing rules or mangle rules so that they
exclude traffic where src and dst networks are the same subnet.
I am asking him to share the examples as I tried to achieve this with /ip route rule but did not work.
 
pe1chl
Forum Guru
Forum Guru
Posts: 6677
Joined: Mon Jun 08, 2015 12:09 pm

Re: Directly connected networks do not exist in non-main routing tables

Mon May 16, 2016 5:24 pm

It is true, with careful rules it is possible to get it working too (first put rules matching destination addresses
of local interfaces and force them to use the main table, then follow this by your rules that probably match
source addresses and select the other tables).

However, I consider that a workaround just as well. It too requires manual action.
Better would be when rules or routes in all tables could be auto-generated using an option in the address record.

I think it will all be handled differently in the mythical version 7.
(the routing of local interface addresses poses problems in certain usages of VRF as well, and I have seen that reply)
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: Directly connected networks do not exist in non-main routing tables

Mon May 16, 2016 6:11 pm

As long as there aren't VRFs involved, it should be pretty safe to make a blanket rule saying 192.168.0.0/16 --> force main routing table, instead of having to explicitly list each and every internal network if you're just using policy routing for load balancing internet connections.
When given a spoon,
you should not cling to your fork.
The soup will get cold.

Who is online

Users browsing this forum: AUsquirrel, Baidu [Spider], drbunsen, EdPa, Majestic-12 [Bot], radu990, sindy, stefki and 132 guests