<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mar 22, 2017 6:27 PM, "Lars Kruse" <<a href="mailto:lists@sumpfralle.de">lists@sumpfralle.de</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
<br>
Am Wed, 22 Mar 2017 07:51:23 +0100<br>
schrieb Guus Sliepen <<a href="mailto:guus@tinc-vpn.org">guus@tinc-vpn.org</a>>:<br>
<br>
> [..]<br>
<div class="quoted-text">> 1. Use different weights for the otherwise identical Subnets, and ensure<br>
>    you pass that along to the route up/down commands so the kernel can also<br>
>    distinguish them.<br>
<br>
</div>in linux the following command within "subnet-up" accomplishes that behaviour:<br>
<br>
 ip route add "$SUBNET" dev "$INTERFACE" metric "$WEIGHT"<br>
<br>
<br>
Cheers,<br>
Lars<br>
<br>______________________________<wbr>_________________<br>
tinc mailing list<br>
<a href="mailto:tinc@tinc-vpn.org">tinc@tinc-vpn.org</a><br>
<a href="https://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc" rel="noreferrer" target="_blank">https://www.tinc-vpn.org/cgi-<wbr>bin/mailman/listinfo/tinc</a><br>
<br></blockquote></div>I would use replace rather than add</div></div><div class="gmail_extra" dir="auto"><br></div><div class="gmail_extra" dir="auto"><span style="font-family:sans-serif;font-size:14px"> ip route replace "$SUBNET" dev "$INTERFACE" metric "$WEIGHT"</span><br></div><div class="gmail_extra" dir="auto"><span style="font-family:sans-serif;font-size:14px"><br></span></div><div class="gmail_extra" dir="auto"><font face="sans-serif"><span style="font-size:14px">Achieves the same goal and avoids exists error.</span></font></div></div>