[TriLUG] IPv6 addressing question

Aaron Schrab via TriLUG trilug at trilug.org
Wed Oct 10 17:29:26 EDT 2018


At 16:39 -0400 10 Oct 2018, Matt Flyer via TriLUG <trilug at trilug.org> wrote:
>I took a guess at the /etc/network/interfaces file for the IPv6 and
>came up with this:

>iface eth0 inet6 static
>  address 2600:3c03::f03c:91ff:fe69:a6aa::1/64
>  gateway fe80::1
>  up ip addr add 2600:3c03::f03c:91ff:fe69:a6aa::2/64 dev eth0 label eth0:1
>  down ip addr del 2600:3c03::f03c:91ff:fe69:a6aa::2/64 dev etho0 label eth0:1

I'm also on Linode, and I use the following in my 
/etc/network/interfaces:

	iface eth0 inet6 static
	  address 2600:3c02::f03c:91ff:feae:55b8
	  preferred-lifetime 0

	iface eth0 inet6 static
	  address 2600:3c02:e000:5::3

	iface eth0 inet6 static
	  address 2600:3c02:e000:5::2
	  preferred-lifetime 0

As you can see I use a separate `iface` stanza for each address rather 
than using up/down statements.

The first stanza is for the originally allocated IPv6 address. I set the 
preferred-lifetime to 0 for it so that the next address will be used for 
outgoing connections. I only leave this because the block allocation 
seems to be routed to it; when I removed it the other IPv6 addresses 
stopped being reachable as well.

The following stanzas each define an address from my allocated block.  
The first one is the one that will be used for outgoing connections.  
The last is only used for incoming connections.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: not available
URL: <http://www.trilug.org/pipermail/trilug/attachments/20181010/c7252ed5/attachment.pgp>


More information about the TriLUG mailing list