Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #183213 > unrolled thread

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

Started byEike Lantzsch <zp6cge@gmx.net>
First post2017-07-05 20:10 +0200
Last post2017-07-06 03:40 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Stretch generates SLAAC IPv6 address even with /etc/network/interfaces set to manual static address Eike Lantzsch <zp6cge@gmx.net> - 2017-07-05 20:10 +0200
    Re: Stretch generates SLAAC IPv6 address even with  /etc/network/interfaces set to manual static address Ulf Volmer <u.volmer@u-v.de> - 2017-07-05 20:50 +0200
    Re: Stretch generates SLAAC IPv6 address even with  /etc/network/interfaces set to manual static address Christian Seiler <christian@iwakd.de> - 2017-07-05 21:00 +0200
    Re: Stretch generates SLAAC IPv6 address even with  /etc/network/interfaces set to manual static address Reco <recoverym4n@gmail.com> - 2017-07-05 21:20 +0200
      Re: Stretch generates SLAAC IPv6 address even with /etc/network/interfaces set to manual static address Eike Lantzsch <zp6cge@gmx.net> - 2017-07-06 03:40 +0200

#183213 — Stretch generates SLAAC IPv6 address even with /etc/network/interfaces set to manual static address

FromEike Lantzsch <zp6cge@gmx.net>
Date2017-07-05 20:10 +0200
SubjectStretch generates SLAAC IPv6 address even with /etc/network/interfaces set to manual static address
Message-ID<tZWUq-1gP-21@gated-at.bofh.it>
Hi to all!

I'm trying to teach myself to work with IPv6.

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 .
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?
What is it that I don't understand?
I don't have such problem with OpenBSD-clients - only with Debian Stretch.
Is it a bug, a misconfiguration or is it me misunderstanding  IPv6 address 
schemes?

excerpt of my /etc/network/interfaces:

# The primary network interface
auto enp3s0
allow-hotplug enp3s0
iface enp3s0 inet static
	address 192.168.12.21
	netmask 255.255.255.0
	network 192.168.12.0
	gateway 192.168.12.1
# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers nnn.nnn.nnn.nnn nnn.nnn.nnn.nnn 2001:470:20::2 74.82.42.42
	dns-search MYDOMAIN.co.py

# /48 network obtained from HE which allows subnets
iface enp3s0 inet6 static
	address 2001:470:7075:e2::21
	netmask 64
	gateway 2001:470:7075:e2::

Anyway I get ip addr:

2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
group default qlen 1000
    link/ether 78:24:af:37:6d:60 brd ff:ff:ff:ff:ff:ff
    inet 192.168.12.21/24 brd 192.168.12.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet6 2001:470:7075:e2:7a24:afff:fe37:6d60/64 scope global mngtmpaddr \ 
dynamic
       valid_lft 2591999sec preferred_lft 604799sec
    inet6 fe80::7a24:afff:fe37:6d60/64 scope link
       valid_lft forever preferred_lft forever

Ideally I'd like static private addresses to route through to the IN but 
static manual addresses used only in my internal network. But that will be an 
exercise for later.

What about "autoconf 0" in /etc/network/interfaces - would that help?
But according to man interfaces that is the default - or isn't it?

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

Thanks for your consideration.
Eike

-- 
Eike Lantzsch ZP6CGE
Zuviel Zucker ist ungesund. Daher:
Tragt den Zuckerberg ab!

[toc] | [next] | [standalone]


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

FromUlf Volmer <u.volmer@u-v.de>
Date2017-07-05 20:50 +0200
SubjectRe: Stretch generates SLAAC IPv6 address even with /etc/network/interfaces set to manual static address
Message-ID<tZXx7-1xL-3@gated-at.bofh.it>
In reply to#183213
On 05.07.2017 20:09, Eike Lantzsch wrote:
> Hi to all!
> 
> I'm trying to teach myself to work with IPv6.
> 
> 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 .

Try 'sysctl -w net.ipv6.conf.enp3s0.autoconf=0'. You should also able to
add this as pre-up to your /etc/network/interface.

best regards
Ulf

[toc] | [prev] | [next] | [standalone]


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

FromChristian Seiler <christian@iwakd.de>
Date2017-07-05 21:00 +0200
SubjectRe: Stretch generates SLAAC IPv6 address even with /etc/network/interfaces set to manual static address
Message-ID<tZXGO-1Dt-17@gated-at.bofh.it>
In reply to#183213
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

[toc] | [prev] | [next] | [standalone]


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

FromReco <recoverym4n@gmail.com>
Date2017-07-05 21:20 +0200
SubjectRe: Stretch generates SLAAC IPv6 address even with /etc/network/interfaces set to manual static address
Message-ID<tZY09-21z-5@gated-at.bofh.it>
In reply to#183213
	Hi.

On Wed, 05 Jul 2017 14:09:24 -0400
Eike Lantzsch <zp6cge@gmx.net> wrote:

> Hi to all!
> 
> I'm trying to teach myself to work with IPv6.
> 
> 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 .
> 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?
> What is it that I don't understand?

What about good old "ifdown enp3s0; ifup -v enp3s0"?

It should shed some light on what's happening.
A quick test in my current environment shows that stretch's ifupdown is
working as expected, i.e. 'inet6 static' stanza is honored and SLAAC
advertisements are ignored.

Reco

[toc] | [prev] | [next] | [standalone]


#183260

FromEike Lantzsch <zp6cge@gmx.net>
Date2017-07-06 03:40 +0200
Message-ID<u03VT-5RF-13@gated-at.bofh.it>
In reply to#183220
On Wednesday, 5 July 2017 22:14:22 -04 Reco wrote:
> 	Hi.
> 
> On Wed, 05 Jul 2017 14:09:24 -0400
> 
> Eike Lantzsch <zp6cge@gmx.net> wrote:
> > Hi to all!
> > 
> > I'm trying to teach myself to work with IPv6.
> > 
> > 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 .
> > 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?
> > What is it that I don't understand?
> 
> What about good old "ifdown enp3s0; ifup -v enp3s0"?
> 
> It should shed some light on what's happening.
> A quick test in my current environment shows that stretch's ifupdown is
> working as expected, i.e. 'inet6 static' stanza is honored and SLAAC
> advertisements are ignored.
> 
> Reco

Thanks to Ulf Vollmer, Christian Seiler and Reco.
I'm going to try your recommendations but I have to wait until weekend 'cause 
I'll be busy with other stuff in the next days. Will come back with results 
later.
Cheers
Eike

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web