"Activation of network connection failed" for wired connection, even though it works in interim (18.04)

9,186

IP addresses don't appear automagically: they need a DHCP server to work reliably under all circumstances.

The IPV6 protocol allows for SLAAC to assign a temporary IP address, but the real solution is to install a DHCP server on your machine and your colleague running Arch probably has one running.

As to your questions: 1 and 2 are interconnected "Link-Local only" forces SLAAC to be used and to bypass the DHCP server even if there would be one.

Share:
9,186

Related videos on Youtube

Xavier Shay
Author by

Xavier Shay

Updated on September 18, 2022

Comments

  • Xavier Shay
    Xavier Shay over 1 year

    I am connecting an external device via ethernet. In network manager, it shows the wired connection as "Connecting". I am able to ping and SSH to the remote device during this phase, the connection works fine.

    After a period of time (~30s?) I get a message "Activation of network connection failed" and the wired connection is disabled. I have to re-enable it (or unplug/plug in the cable) to continue working.

    Potentially relevant information:

    • I have a stable wifi connection to the internet, but the problem also repros when I disable it.
    • The remote device does not have internet connectivity.
    • The remote device is ipv6 only.
    • I'm running a Dell XPS13 and using a USB-C to ethernet adapter.
    • I have observed the behaviour on duplicates of all external hardware (cables, devices).
    • A co-worker is using archlinux and doesn't have this problem.

    Logs:

    # Excerpt from: journalctl -u NetworkManager
    Aug 17 17:59:47 yoshi NetworkManager[1043]: <info>  [1534553987.5996] device (enx00e04c00072b): Activation: starting connection 'Wired connection 1' (74876abf-ba83-38b1-813d-1fa271132731)
    Aug 17 17:59:47 yoshi NetworkManager[1043]: <info>  [1534553987.6002] device (enx00e04c00072b): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
    Aug 17 17:59:47 yoshi NetworkManager[1043]: <info>  [1534553987.6012] device (enx00e04c00072b): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
    Aug 17 17:59:47 yoshi NetworkManager[1043]: <info>  [1534553987.6026] device (enx00e04c00072b): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
    Aug 17 18:00:19 yoshi NetworkManager[1043]: <info>  [1534554019.5847] device (enx00e04c00072b): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
    Aug 17 18:00:19 yoshi NetworkManager[1043]: <warn>  [1534554019.5858] device (enx00e04c00072b): Activation: failed for connection 'Wired connection 1'
    Aug 17 18:00:19 yoshi NetworkManager[1043]: <info>  [1534554019.5870] device (enx00e04c00072b): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
    

    Questions:

    1. What is Ubuntu using to determine that this connection failed, given that ping/ssh work fine?
    2. How can I fix it?

    Update: I changed the settings for the connection so that IPv4 was disabled and IPv6 was Link-Local Only (from "Automatic"). This appears to have fixed the issue, but I don't really understand what I've done so an answer with more details (and confirmation that this is a legitimate fix) would be appreciated.

    • goo
      goo over 5 years
      Look at the logs. journalctl $(type -p NetworkManager) will help you with Step 1. Step 2 is 100% dependent on step 1.
    • Xavier Shay
      Xavier Shay over 5 years
      Thank you. Your exact command didn't work ("Invalid Argument") but led me to the right place. I have added logs to the question, it appears to be something to do with IP management?
    • Boris Hamanov
      Boris Hamanov over 5 years
      Please see my answer. Please remember to accept it if it was helpful. Thanks!
  • Xavier Shay
    Xavier Shay over 5 years
    But I have an IP address, otherwise I wouldn't be able to SSH into the other machine. I think what's going on is that NetworkManager doesn't consider a link-local IP to be "good enough" when establishing a connection in automatic mode. I believe SLAAC is what I have been using - "ping and SSH", the ping was to discover the remote IP address.
  • Fabby
    Fabby over 5 years
    So? Have you tried setting up a DHCP server? @XavierShay
  • Xavier Shay
    Xavier Shay over 5 years
    No, I don't need one since (per update) link-local works fine. I think the answer to my question is "link local IP address isn't the same as a real IP address, at least as far as the network manager is concerned, and that's literally the definition of what "automatic" is - looking for a non-linklocal IP"
  • Fabby
    Fabby over 5 years
    Sorry for being confusing. Edited.