[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Stretch generates SLAAC IPv6 address even with /etc/network/interfaces set to manual static address



On 07/05/2017 08:09 PM, Eike Lantzsch wrote:
> On a Stretch client I'd like to have manually set static IPv6 addresses.
> But what I get are SLAAC addresses with $prefix + MAC-derived according to the 
> IEEE-Tutorial EUI-64 .

First of all: you can turn off the automatic addresses by configuring
the interface to not accept router advertisements. Just set the
accept_ra flag to 0:

iface enp3s0 inet6 static
    [other options]
    accept_ra 0

(See man 5 interfaces for details.)

That doesn't help you with the problem you have, but once that's fixed
tihs is obviously what you'd want as a setting.

> I can cope with a SLAAC address AND an additional manual static address on the 
> same interface - no problem - but what is going on here? Why is the manual 
> address in the file "/etc/network/interfaces" ignored?

They shouldn't be the case.

> excerpt of my /etc/network/interfaces:
> [...]
> iface enp3s0 inet6 static
> 	address 2001:470:7075:e2::21
> 	netmask 64
> 	gateway 2001:470:7075:e2::

That looks fine.

> Anyway I get ip addr:

What did you do after changing /etc/network/interfaces? Did you
reboot?

> Or would
> iface enp3s0 inet6 static
> 	address 2001:470:7075:e2::21/64
> 	gateway 2001:470:7075:e2::
> be any better?

That should be equivalent and make no difference.

So I just tested the precise IPv6 configuration of yours (albeit without
a router on the network that sends advertisements, and a different IPv4
configuration so I could still access it) in a Stretch VM and it worked
just fine after a reboot (or at least after a restart of the networking
init script). Worked in the sense that the address and default route
got assigned, not that it worked in the sense of connectivity here.

To debug this further:

 - try a clean reboot
 - if it still doesn't work, if you're running systemd, try (as root):
      journalctl -u networking
 - try the command ifup enp3s0 and see if that works temporarily
   (ifup enp3s0 is what should happen at boot automatically)

Regards,
Christian


Reply to: