[sanity check] Duplicate routing tables

Hi,
it is 1am and I just wasted 2hr of my life figuring out mangle/route setup after I migrated config between two routers. It worked on old router, it did not work on new router. After a while I figured that while I copied the config, somehow, I ended up with duplicate routing tables (not rules, just tables) After I realised what is going on, I deleted duplicates and corrected mangle rules and everything worked out.

Imagine it this way:
Mangle rule matches some traffic and sends it to table “haproxy”. The “haproxy” table should contain a route with a specific interface. It is in fact there, but in a different “haproxy” table. There are two of them. with exactly same name. Mangle references the first one, Route references the second one.

Finally, my question: Is there ANY reason to ever allow two routing tables of the same name? IMHO no. In CLI it is impossible to distinct between them when writing commands. In GUI it is also impossible, but at least admin can see there is something wrong.

I am asking to see if I should report it to support, or if I should return to school because I am missing something totally obvious.

That does seem strange that you can make two with the same name. I’d say go ahead and send an email with a brief description of the confusion it caused for you and see what they say.

You are not missing anything. It’s a known issue, at least it was for me (with my Linux background). See previous discussion: Why does ROS allow the creation of a route table with the same name? - #6 by anserk

Your experience provides a new angle at this issue. It’s not clear if the mangle rule follows the same logic I described above.

Ideally, it should be fixed in RouterOS or at least show the actual internal ID. But until someone submits a request to MikroTik, it’s unlikely to change given this is native Linux kernel behaviour.

1 Like

This was exposed some time ago, it just never got fixed. Currently RouterOS allows creating two with the same name, but actually internally with different IDs.

Of course you shouldn’t be doing that. And of course Ros should not accept it.

Yep, a support request is in order.