networking/ipv6

Sometimes you want to listen on an IPv6 address (out of several), but don’t want it to be used by default for outgoing connections. One resolution is to be very careful about what order the addresses are added (it seems the most recent is default). Another is to change an IPv6 address to be “less prefereed” or “depcrecated” using the “preferred_lft” flag to the ip command:

sudo ip -6 addr change 2600:3c01:e000:001a::1205/64 dev eth0:0 preferred_lft 0

This can also be specified at ‘add’ time in /etc/network/interfaces. See here for more details, or check RFC 3484:

http://www.davidc.net/networking/ipv6-source-address-selection-linux