Community discussions

MikroTik App
 
IntLDaniel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Apr 04, 2019 7:21 pm

Change prefered source on dynamic routes?

Tue Jul 12, 2022 12:39 pm

I am on ROS 6.49.5 and I have 2 IP address on LAN interface. I can see a dynamic route created in IP/Routes with one of my IPs as pref. source address. I would like to strictly change that pref. source IP to exactly one of that two defined on the interface. So I put this in Routing/Filters:
/routing filter
add chain=dynamic-in comment="set pref source to 192.168.41.1" pref-src=\
    192.168.40.1 set-pref-src=192.168.41.1
"192.168.40.1" is a "matcher", so I expected whenever is found route with pref. source "192.168.40.1", then it should be changed to "192.168.41.1" (which is the second IP defined on the interface).

BUT is seems that my settings does not work, nothing happen with the route...I still can see the pref. source set to 192.168.40.1. The only way to change it is to disable/enable IP 192.168.40.1 on interface. Any idea what I am doing wrong?

Thanks!
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Change prefered source on dynamic routes?

Tue Jul 12, 2022 12:45 pm

Nothing, if you have more than one IP on the interface and if for the same "route" both IP can be used,
is choiced everytime the IP with the matematical lowest value, and is why 40 is preferred against 41.
If I'm not wrong, on new version of routeros, pref-src is removed.
 
IntLDaniel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Apr 04, 2019 7:21 pm

Re: Change prefered source on dynamic routes?

Tue Jul 12, 2022 12:57 pm

Thanks for reply. Quickly checked state in ROS 7.2.1 and second IP (in fact both) are indicated as ECMP (Equal Cost Multi-Path) in route list and without pref. source address (even though the column and option is still available in route details). In fact the bahaviour is the same - it uses the "last activated" IP on interface or "matematical lowest value" if is activated both together (on reboot).
 
IntLDaniel
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Thu Apr 04, 2019 7:21 pm

Re: Change prefered source on dynamic routes?

Mon Sep 26, 2022 10:40 pm

Finally this task has a pretty solution in other thread here viewtopic.php?f=2&t=189502&p=959082#p959082 .

Who is online

Users browsing this forum: CGGXANNX, sgiglio and 90 guests