1

I have following in my netplan file (only one in /etc/netplan folder)

network:
 ethernets:
    enp4s0f0:
        dhcp4: false
        dhcp6: false
    enp4s0f1:
        dhcp4: false
        dhcp6: true
    enp4s0f2:
        dhcp4: true
        dhcp6: true

and here is output of ip a

2: enp4s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 10:60:4b:9a:bd:7c brd ff:ff:ff:ff:ff:ff
    inet6 fe80::1260:4bff:fe9a:bd7c/64 scope link valid_lft forever preferred_lft forever
3: enp4s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 10:60:4b:9a:bd:7d brd ff:ff:ff:ff:ff:ff
    inet6 fe80::1260:4bff:fe9a:bd7d/64 scope link valid_lft forever preferred_lft forever
4: enp4s0f2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 10:60:4b:9a:bd:7e brd ff:ff:ff:ff:ff:ff inet 10.31.100.63/23 brd 10.31.101.255 scope global dynamic enp4s0f2 valid_lft 28767sec preferred_lft 28767sec
    inet6 fe80::1260:4bff:fe9a:bd7e/64 scope link valid_lft forever preferred_lft forever

This is output of sudo netplan --debug apply

DEBUG:Merged config:
network:
  ethernets:
    enp4s0f0:
      dhcp4: false
      dhcp6: false
    enp4s0f1:
      dhcp4: false
      dhcp6: true
    enp4s0f2:
      dhcp4: true
      dhcp6: true

As expected, only enp4s0f2gets IPv4 from DHCP server. Although enp4s0f0 has dhcp6: false, I do not see any difference comparing to other two NICs. It also has IPv6. Do I read something wrong or netplan does not do what I expect?

  • I don't see that any of your ethernet interfaces has other than a link-local IPv6 address; that is fe80::. Note that they are all "scope link" and not "scope global." Asking for an IPv6 address and getting one are two different issues. Are other devices on the same network getting valid IPv6 addresses; that is, not fe80::? – chili555 Jan 30 at 14:41
1

The ipv6 addresses shown there are link-local addresses, not DHCPv6 addresses. To disable link-local addresses, set link-local: [ ] instead of the default which is link-local: [ ipv6 ] as described in the netplan(5) manpage.

  • I added link-local: [ ] to enp4s0f0 and no differences in output of ip a. It has inet6 fe80::1260:4bff:fe9a:bd7c/64 scope link valid_lft forever preferred_lft forever same as it was before. – zdenko.s Jan 31 at 8:08
  • How did you apply the changes to the link-local: setting? It should be sufficient to run netplan apply, but there might be bugs in either netplan or in systemd-networkd (depending on version) that prevent this from taking effect; so you might have to try rebooting after making this change. – slangasek Feb 4 at 1:34
  • netplan --debug apply. I rebooted computer, no difference. inet6 fe80::1260:4bff:fe9a:bd7c/64 scope link still present. It does not make any problem but I was curious what is going on. – zdenko.s Feb 4 at 5:09
  • You may want to check whether this is fixed for you in the version of systemd currently in bionic-proposed, as I believe there have been some related changes. – slangasek Feb 6 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.