netplan accept-ra disables slaac

Bug #1807569 reported by Martin Pels
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Netplan
Confirmed
Undecided
Unassigned
netplan.io (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello,

The netplan flag configuration "accept-ra" does not only enable or disable the use of router advertisements, but also stateless configuration of addresses. This makes it impossible to configure a host with only a static IPv6 address, but with a gateway received through RA's (equivalent to sysctl autoconf=0 and accept_ra=1).

Revision history for this message
Šádek (ksadek36) wrote :

I have the same problem here. We depend on RAs for gateway configuration as router belongs to our provider, but we utilize specific OUTBOUND IPv6 for our services.

Revision history for this message
Ryan Harper (raharper) wrote :

Thanks for filing the bug.

Can you provide the netplan you used?

Also, if possible, could you run:

mkdir /etc/systemd/system/systemd-networkd.service.d/
echo -e "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug" > /etc/systemd/system/systemd-networkd.service.d/10-debug.conf

Reboot and then provide the output from the journal like so?

journalctl -b 0 -o short-monotonic -u systemd-networkd.service

And tar up whatever is in /run/systemd/network/* ?

Lastly, if you do not specify accept_ra at all, does this affect the results?

Thanks!

Changed in netplan:
status: New → Incomplete
Changed in netplan.io (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Pels (martin-rodecker) wrote : Re: [Bug 1807569] Re: netplan accept-ra disables slaac
  • run_systemd_network Edit (153 bytes, text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="run_systemd_network")
  • netplandebug.log Edit (10.6 KiB, text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="netplandebug.log")

Hi Ryan,

On 26/08/19 21:17, Ryan Harper wrote:
> Thanks for filing the bug.
>
> Can you provide the netplan you used?

netplan.io 0.97-0ubuntu1~18.04.1

> Also, if possible, could you run:
>
> mkdir /etc/systemd/system/systemd-networkd.service.d/
> echo -e "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug" > /etc/systemd/system/systemd-networkd.service.d/10-debug.conf
>
>
> Reboot and then provide the output from the journal like so?
>
> journalctl -b 0 -o short-monotonic -u systemd-networkd.service

See attached (netplandebug.log)

> And tar up whatever is in /run/systemd/network/* ?

See attached (run_systemd_network)

> Lastly, if you do not specify accept_ra at all, does this affect the results?

This gives the same result als specifying accept_ra=true. Stateless
autoconfig addresses are added as well as gateways received through
RA's. With accept_ra=false neither autoconfig addresses or RA gateways
are added.

The only difference is that with accept_ra=true the file in
/run/systemd/network/ shows 'IPv6AcceptRA=yes', whereas if accept_ra is
not specified this line is not shown.

I hope this helps.

Kind regards,
Martin

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for netplan because there has been no activity for 60 days.]

Changed in netplan:
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for netplan.io (Ubuntu) because there has been no activity for 60 days.]

Changed in netplan.io (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Tom Hetmer (totocz) wrote :

Can we get this reopened (and solved)?

Let's have this config

# This is the network config written by 'subiquity'
network:
  ethernets:
    eno1:
      dhcp4: false
      dhcp6: false
      addresses:
        - 2a09:e201:0:2:921b:eff:feae:82e5/64

What happens now is the system gets the static IPv6 AND autoconf.

    inet6 2a09:e201::921b:eff:feae:82e5/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 2591614sec preferred_lft 604414sec
    inet6 2a09:e201:0:2:921b:eff:feae:82e5/64 scope global
       valid_lft forever preferred_lft forever

I know it's a bug on the network, but there should be a way to do autoconf=0 accept_ra=1.
systemd-networks is kinda weird and I didn't manage to configure it properly with

[IPv6AcceptRA]
UseAutonomousPrefix=no
UseOnLinkPrefix=no

It does nothing.
I don't want accept-ra: false because I'd like to keep using RA acquired gateway.

In Alpine it's as easy as

auto eth1
iface eth1 inet static
  address 2a09:e201:0:2:216:3eff:fe0d:10a6
  netmask 64

net.ipv6.conf.eth1.autoconf=0
net.ipv6.conf.eth1.use_tempaddr=0

There's something weird with netplan + networkd.

Changed in netplan:
status: Expired → Confirmed
Changed in netplan.io (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Tom Hetmer (totocz) wrote :

After testing on Arch (no netplan)

[IPv6AcceptRA]
UseAutonomousPrefix=no
UseOnLinkPrefix=no

in /etc/systemd/network/eth1.network will get applied.
Anywhere else it won't.

So it's up to netplan to add this config option so it can be generated into /run/systemd/network files.

Revision history for this message
XSpielinbox (xspielinbox) wrote :

I can still reproduce this issue with the newest Version of Netplan in Ubuntu 22.04 as well as Ubuntu 22.10.

If 'accept-ra: false' is set the systemd-networkd config contains 'IPv6AcceptRA=no'.
If 'accept-ra' is unset, the systemd-networkd config does not contain any 'IPv6AcceptRA' statement.
That is the only change I could find between these two options.

Independent of the config in systmed-networkd/Netplan 'sysctl net.ipv6.conf.<iface>.accept_ra' always returns 0. Also see LP#1862481 for that.

Also independent of the config in systmed-networkd/Netplan 'sysctl net.ipv6.conf.<iface>.autoconf' always returns 1. It is very unclear to me how setting 'accept-ra: false' in Netplan disables SLAAC, that is working when 'accept-ra' is unset or 'accept.ra: true' is set.

I agree, that this should not be the case. Additionally, I strongly suggest, that there is be a separate option to disable SLAAC, as I am currently unaware of any other method to disable SLAAC wouldn't it be for this very strange side effect of 'accept-ra'.

Revision history for this message
Lukas Märdian (slyon) wrote :

seems to be related to bug #1858503

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.