On my ubuntu server I configured multiple ipv6 addresses as following with netplan:
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- xx.xx.xx.xx/22
- xxxx:xxxx:xx:xx::/64
- xxxx:xxxx:xx:xx::1/64
- xxxx:xxxx:xx:xx::2/64
gateway4: xx.xx.xx.1
gateway6: fe80::1
match:
macaddress: ab:cd:ef:ab:cd:ef
nameservers:
addresses:
- 127.0.0.1
- ::1
- xx.xx.xx.xx
- xx:xx:xx::xxxx
For outgoing ipv6 connection the server always uses the address xxxx:xxxx:xx:xx::2/64
instead of xxxx:xxxx:xx:xx::/64
.
How can I permanently set xxxx:xxxx:xx:xx::/64
as default outgoing ip address?