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

    • Offizieller Beitrag

    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.

    • Offizieller Beitrag

    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 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    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.

    • Offizieller Beitrag

    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 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!