OMV on Odroid HC2 Reverts to DHCP when Network Link Goes Down and Back Up

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • OMV on Odroid HC2 Reverts to DHCP when Network Link Goes Down and Back Up

      Hi Guys,
      I have just recently set up my first OMV server using an Odroid HC2.
      I've managed to get everything I need working fine with the exception of one issue I cannot figure out.
      I have configured the network interface with a static IP address on my local network.
      Network communication is fine with this setup, however, if the link goes down and then back up (network cable disconnected and reconnected), the device's network connection reverts to DHCP until it is rebooted.
      It no longer responds to the assigned static IP, however, it works just fine at this point if I access it using the DHCP-assigned IP.
      Checking the network settings through the web UI while it is in this state does not show anything out of the ordinary - the static IP config is still there.
      The only way I have been able to get it back onto the static IP is by rebooting the device. This is simply by selecting the "reboot" option in the OMV web UI.

      Anyone out there know what causes this to happen or know of a fix?
      I should mention I have worked in IT for many years but am very new to Linux.

      I have gotten as far as SSHing into the HC2 and pulling up the "interfaces" file.
      I will paste the content of that file here in case it helps:

      # Include additional interface stanzas.
      source-directory interfaces.d

      # The loopback network interface
      auto lo
      iface lo inet loopback

      # enx001e0632c018 network interface
      auto enx001e0632c018
      allow-hotplug enx001e0632c018
      iface enx001e0632c018 inet static
      address 192.168.11.23
      gateway 192.168.11.1
      netmask 255.255.255.0
      dns-nameservers 1.1.1.1 8.8.8.8
      pre-down ethtool -s $IFACE wol g
      iface enx001e0632c018 inet6 manual
      pre-down ip -6 addr flush dev $IFACE
    • Why do you disconnect the network cable? Stop doing that!

      I have my HC2s configured to use DHCP. And I have configured my DHCP-server to use static DHCP leases to each HC2. Along with handling host name lookup using dnsmasq. In other words I haven't touched the network settings on my HC2s, except for host name. I configured everything else using only the DHCP-server. And each HC2 gets the right IP, and all other network settings, from the DHCP-server after every reboot.

      My advice is that you stop disconnecting the network cable. And possibly also start using the DHCP-server to configure the network settings for the HC2.

      It is nice to use the DHCP-server like this, because then there can never be a static IP that clash with another IP in the network. It just isn't possible if every IP in the network is set by the DHCP-server. Also it allows you to use the name of the server instead of the IP when you access the server.

      There is little point using the DHCP-server like this unless you do it for all devices in your network. But then it is both convenient and safe.
      OMV 4: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4
    • If you didn't use the install script to install, you most likely have network-manager getting the dhcp address (Armbian default) and networkd trying to set the static IP (omv default when configured in the web interface). Since you have the network setup in the OMV web interface, it should be safe to remove the network-manager package - apt-get purge network-manager
      omv 5.2.5 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.2
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Hi Adoby,
      Thanks for your reply.
      My statement regarding disconnecting the network cable was simply an example for what causes the NIC to revert from static IP assignment to DHCP.
      I do not have any need to disconnect the network cable on the HC2, however, it will be in an environment where maintenance is sometimes done on the network equipment which requires powering the network switches off.
      When this maintenance is done, it will cause the network link on the HC2 to go down (same as disconnecting the network cable).
      Since the HC2 will not be rebooted each time the switches are powered off/restarted, I would need it to maintain its static IP operation between link losses so that communication to it continues to function as normal following a switch reboot.

      A DHCP reservation is an excellent workaround to this issue; I agree with you on this.
      However, once again, in the environment where I am using the HC2, I do not have the ability to use a DHCP reservation so I must be able to assign a static IP manually to the HC2.
      I am using an IP address which is outside of the DHCP scope so there will be no conflict.


      Hi ryecoaaron,
      Thanks a lot for your suggestion.
      Since I am very new to Linux, I was unaware of network-manager.
      From the behavior the device is exhibiting, your suggestion sounds like it could be likely to resolve the issue.
      I will give it a try and report back here :)
    • Hi @ryecoaaron
      I am happy to report that your solution appears to have worked.
      I removed network-manager from Armbian as you suggested.
      Now when I simulate a link loss/return by disconnecting/reconnecting the LAN cable, the manually-configured IP address remains operational!

      Again, thank you very much for your suggestion.
      I will continue to test the functionality of OMV on the HC2 from here and will let you know if I encounter any surprises as a result of the removal of network-manager.

      The post was edited 1 time, last by markollides: fixing typos ().

    • markollides wrote:

      will let you know if I encounter any surprises as a result of the removal of network-manager.
      The install script I wrote removes it and I have done a lot of testing with that. I don't think you will have a problem since you configured networking in the OMV web interface.
      omv 5.2.5 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.2
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!