2

I have an intermittent problem with networking on a new VPS running Ubuntu 20.04. Roughly one out of 10 times, the network fails to start after reboot.

When this happens, the server appears to start normally, but I am unable to connect via ssh or http. Also, in the mail logs, I get errors like: "Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again". So I assume the problem is that the network isn't starting properly.

There are errors to do with networking in the syslog, and these are reported every time the network starts. However, most of the time, there isn't any problem with the network, so I'm not sure if they're related.

The server uses netplan / networkd. Here is the output of the /etc/netplan/01-eth0.yaml :

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      dhcp6: no
      addresses:
        - 66.175.209.4/24                         # Your Linode's public IPv4 address.
        - "2600:3c03::f03c:92ff:fe7c:62b6/128"    # Primary IPv6 address.
        - "2600:3c03:e001:730::/64"               # Added by me for unique v6 IP
      gateway4: 66.175.209.1                      # Primary IPv4 gateway.
      gateway6: "fe80::1"                         # Primary IPv6 gateway.
      nameservers:
        search: [members.linode.com]              # Search domain.
        addresses: [66.228.42.5,"2600:3c03::7",96.126.106.5,50.116.53.5]    # DNS Server IP addresses.

Here is the output of networkctl status - Note the errors on the last two lines:

●          State: routable                                     
         Address: 66.175.209.4 on eth0                         
                  2600:3c03::f03c:92ff:fe7c:62b6 on eth0       
                  2600:3c03:e001:730:: on eth0                 
                  fe80::f03c:92ff:fe7c:62b6 on eth0            
         Gateway: 66.175.209.1 (ICANN, IANA Department) on eth0
                  fe80::1 (Cisco Systems, Inc) on eth0         
             DNS: 66.228.42.5                                  
                  96.126.106.5                                 
                  50.116.53.5                                  
                  2600:3c03::7                                 
  Search Domains: members.linode.com                           

Sep 11 03:59:01 eagle systemd-networkd[439]: Enumeration completed
Sep 11 03:59:01 eagle systemd-networkd[439]: eth0: IPv6 successfully enabled
Sep 11 03:59:01 eagle systemd-networkd[439]: eth0: Link UP
Sep 11 03:59:01 eagle systemd-networkd[439]: eth0: Gained carrier
Sep 11 03:59:01 eagle systemd[1]: Started Network Service.
Sep 11 03:59:01 eagle systemd[1]: Starting Wait for Network to be Configured...
Sep 11 03:59:03 eagle systemd-networkd[439]: eth0: Gained IPv6LL
Sep 11 03:59:03 eagle systemd[1]: Finished Wait for Network to be Configured.
Sep 11 03:59:04 eagle systemd-networkd[439]: eth0: Could not set NDisc route or address: Invalid argument
Sep 11 03:59:04 eagle systemd-networkd[439]: eth0: Failed

Here is the output of networkctl:

  1 lo   loopback carrier     unmanaged
  2 eth0 ether    routable    failed   

2 links listed.

Here is the output of ip addr :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether f2:3c:92:7c:62:b6 brd ff:ff:ff:ff:ff:ff
    inet 66.175.209.4/24 brd 66.175.209.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2600:3c03:e001:730::/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 2600:3c03::f03c:92ff:fe7c:62b6/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::f03c:92ff:fe7c:62b6/64 scope link 
       valid_lft forever preferred_lft forever

I added debugging to systemd-networkd - here is the relevant output:

Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Link state is up-to-date
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: found matching network '/run/systemd/network/10-netplan-eth0.network'
Sep 18 05:12:07 eagle systemd-networkd[203638]: Setting '/proc/sys/net/ipv6/conf/eth0/disable_ipv6' to '0'
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: IPv6 successfully enabled
Sep 18 05:12:07 eagle systemd-networkd[203638]: Setting '/proc/sys/net/ipv6/conf/eth0/proxy_ndp' to '0'
Sep 18 05:12:07 eagle systemd-networkd[203638]: Setting '/proc/sys/net/ipv6/conf/eth0/use_tempaddr' to '0'
Sep 18 05:12:07 eagle systemd-networkd[203638]: Setting '/proc/sys/net/ipv6/conf/eth0/accept_ra' to '0'
Sep 18 05:12:07 eagle systemd-networkd[203638]: LLDP: Started LLDP client
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Started LLDP.
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Setting address genmode for link
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.188 path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=s error-name=n/a error-messa
ge=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Bus bus-api-network: changing state HELLO → RUNNING
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=signal sender=org.freedesktop.DBus.Local destination=n/a path=/org/freedesktop/DBus/Local interface=org.freedesktop.DBus.Local member=Connected cookie=429496
7295 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=signal sender=org.freedesktop.DBus destination=:1.188 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 s
ignature=s error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=signal sender=org.freedesktop.DBus destination=:1.188 path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=3 reply_cookie=0 s
ignature=s error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.188 path=n/a interface=n/a member=n/a cookie=4 reply_cookie=2 signature=u error-name=n/a error-messa
ge=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Successfully acquired requested service name.
Sep 18 05:12:07 eagle systemd-networkd[203638]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.188 path=n/a interface=n/a member=n/a cookie=5 reply_cookie=3 signature=n/a error-name=n/a error-mes
sage=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: Match type='signal',sender='org.freedesktop.login1',path='/org/freedesktop/login1',interface='org.freedesktop.login1.Manager',member='PrepareForSleep' successfully installed.
Sep 18 05:12:07 eagle systemd-networkd[203638]: lo: Link state is up-to-date
Sep 18 05:12:07 eagle systemd-networkd[203638]: lo: State changed: pending -> unmanaged
Sep 18 05:12:07 eagle systemd-networkd[203638]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_31 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=9 reply_
cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Setting address genmode done.
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Removing route: dst: n/a, src: n/a, gw: fe80::1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Discovering IPv6 routers
Sep 18 05:12:07 eagle systemd-networkd[203638]: NDISC: Started IPv6 Router Solicitation client
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: State changed: pending -> configuring
Sep 18 05:12:07 eagle systemd-networkd[203638]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=10 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Setting addresses
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Forgetting route: dst: n/a, src: n/a, gw: fe80::1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Remembering updated address: 66.175.209.4/24 (valid forever)
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Remembering updated address: 2600:3c03::f03c:92ff:fe7c:62b6/128 (valid forever)
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Remembering updated address: 2600:3c03:e001:730::/64 (valid forever)
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Addresses set
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Configuring route: dst: n/a, src: n/a, gw: fe80::1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Configuring route: dst: n/a, src: n/a, gw: 66.175.209.1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Setting routes
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Remembering route: dst: n/a, src: n/a, gw: fe80::1, prefsrc: n/a, scope: global, table: main, proto: static, type: unicast
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: Routes set
Sep 18 05:12:07 eagle systemd-networkd[203638]: eth0: State changed: configuring -> configured
Sep 18 05:12:07 eagle systemd-networkd[203638]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=11 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sep 18 05:12:08 eagle systemd-networkd[203638]: NDISC: Sent Router Solicitation, next solicitation in 4s
Sep 18 05:12:08 eagle systemd-networkd[203638]: NDISC: Received Router Advertisement: flags none preference medium lifetime 60 sec
Sep 18 05:12:08 eagle systemd-networkd[203638]: NDISC: Invoking callback for 'router' event.
Sep 18 05:12:08 eagle systemd-networkd[203638]: eth0: Configuring route: dst: n/a, src: n/a, gw: fe80::2c09:59ff:fe49:329f, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Sep 18 05:12:08 eagle systemd-networkd[203638]: rtnl: received route message without ifindex, ignoring
Sep 18 05:12:08 eagle systemd-networkd[203638]: eth0: Could not set NDisc route or address: Invalid argument
Sep 18 05:12:08 eagle systemd-networkd[203638]: eth0: Failed
Sep 18 05:12:08 eagle systemd-networkd[203638]: eth0: State changed: configured -> failed
Sep 18 05:12:08 eagle systemd-networkd[203638]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_32 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=12 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Sep 18 05:12:08 eagle systemd-networkd[203638]: NDISC: Stopping IPv6 Router Solicitation client
Sep 18 05:12:13 eagle systemd-networkd[203638]: rtnl: received non-static neighbor, ignoring.
Sep 18 05:12:14 eagle systemd-networkd[203638]: rtnl: received non-static neighbor, ignoring.
Sep 18 05:12:14 eagle systemd-networkd[203638]: rtnl: received non-static neighbor, ignoring.

The line right before it fails is: rtnl: received route message without ifindex, ignoring

Any idea what this means / how to fix it? I can't find any reference to the ipv6 address "fe80::2c09:59ff:fe49:329f". Is this related to the ipv6 gateway "fe80::1" ?

I have tried changing the .yaml file but so far, nothing has stopped the errors being reported. It's possible they are a red herring since the network usually comes up anyway.

When the network fails to start, I can connect to the server from an internal console. There is no difference to the above output when I am unable to connect.

If it's not a network problem, what else would explain this intermittent problem?

0

I fixed the errors by adding

accept-ra: no

to the netplan .yaml config file. This disables router advertisement, which appears to cause the above errors.

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.