I have read a lot about the pref-src (preferred source) field under IP -> Routes.
But what are reasons I shoud set it? I still dont know?
My only thinkable use-case was which IP should NAT -> SNAT -> Masquerading use (in a multi-WAN-IP scenario)? But this does exactly NOT use the pref-src.
The MT-Wiki says:
Which of the local IP addresses to use for locally originated packets that are sent via this route. Value of this property has no effect on forwarded packets. If value of this property is set to IP address that is not local address of this router then the route will be inactive. If pref-src value is not set, then for locally originated packets that are sent using this route router will choose one of local addresses attached to the output interface that match destination prefix of the route (an example).
Is this only for things in output-chain? Waht does "locally originated" mean? Locally in the LAN? Locally in the Router?
Whats with SNAT? Is this considerated "locally originated"? Its both, forwarded but locally manipulated...
For V7 an even more confusing statement is added:
Why is it not used anymore? Why was it used under V6 (even here we can leave this field blank).The preferred source is not used anymore for connected routes. FIB chooses the source address based on the out-interface. This allows making setups that in ROS v6 and older were considered invalid.