You are not logged in.
hi
i have a working setup with a hurrican electric tunnel.
i got a single IP on my tunnel endpoint and a delegated /48 subnet
if i set a ip on my internal lan from this /48 range i can it ping
from extern; so this works to
but new connections from the host will always use my tunnel-endpoint
ip as source address. i would like to change the from a dynamic (slaac)
ip from mit /48 range. how can this set up with systemd-networkd?
thanks
Offline
Linux implements RFC 3484, "Default Address Selection for Internet Protocol version 6 (IPv6). Briefly, the algorithm involves building a candidate list of potential source addresses, then following these rules in order:
Prefer same address. (i.e. destination is local machine)
Prefer appropriate scope. (i.e. smallest scope shared with the destination)
Avoid deprecated addresses.
Prefer home addresses.
Prefer outgoing interface. (i.e. prefer an address on the interface we're sending out of)
Prefer matching label.
Prefer public addresses.
Use longest matching prefix.
....
Influencing the algorithmThe solution is to mark unwanted source addresses as "deprecated", causing them to fail rule 3.
The method to implement this under Linux is to set preferred_lft to 0, thus causing the address to be marked as deprecated.
# ip -6 addr change 2001::db8::1/128 dev eth0 preferred_lft 0
I'm not sure how to get systemd-networkd to do this for you, but hopefully this gives you a starting point.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Another alternative is to set the preferred source address for your routes.
Offline