Error with static ip on rock64

    • Offizieller Beitrag

    Well at least it's working the way you wanted it to and your welcome :thumbup:


    On the other side, the first option of omv-firstaid gave the same error.

    If it's still giving the same error I would say it's a problem with the install and/or the SD card, I've only ever used Sandisk A1 cards and not had any issues.

  • I claimed the victory too early, something weird is happening.


    Running ip addr the system reply:


    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.27/24 brd 192.168.178.255 scope global eth0
    valid_lft forever preferred_lft forever
    inet 192.168.178.59/24 brd 192.168.178.255 scope global secondary eth0
    valid_lft forever preferred_lft forever


    Everything works on the secondary IP, too. It only takes few seconds more to go up (this explains why yesterday the system don't replied with this IP immediately).


    I have googled around to remove the secondary IP (the old DHCP IP), I got how to remove it but at reboot it come back and I don't know where to look... Any help would be appreciated! Thanks.



    If it's still giving the same error I would say it's a problem with the install and/or the SD card, I've only ever used Sandisk A1 cards and not had any issues.


    I agree with you, only good cards. For my system I choose a nice Samsung microSD EVO 32GB UHS-I from Amazon.

    • Offizieller Beitrag

    Any help would be appreciated! Thanks.

    TBH by this time I would be reinstalling particularly as the omv-firstaid doesn't work, updating, then change the network settings. But before that does your router run your DHCP?
    Routers for home use can be restrictive, they are capable of running DHCP and assigning ip addresses to the network, for the average home user that's OK. The problem then is if the home user assigns a static ip within the routers DHCP scope, the problem then is the DHCP server on your router does not know about it, as far as it's concerned the address is still available and it can issue that address. Likewise this can happen in reverse, a DHCP address has been issued but a user then applies that address (without realising) as static address to another machine.....in both cases it results in a conflict error.
    So to avoid that one should assign a static ip outside of the DHCP scope; as an example router address 192.168.1.254, DHCP settings 192.168.1.60 - 192.168.1.253. Therefore to assign a static ip to any computer on the network it must be before the start address of 192.168.1.60 to prevent conflict.


    The above may not be the issue, but it might, hence the error when attempting to apply a static ip address.


    The only other option I can think of is to disable DHCP on omv....I have no idea how the DHCP works, it's above my pay grade but I did find this but disabling DHCP should be a last option IMHO.

    • Offizieller Beitrag

    Just gone back over the thread, in your post 13 the output from /etc/network/interfaces is the same as mine albeit the name of the network interface.


    You then post the output of /etc/network/interfaces.d/eth0 that is interesting, because the content of my /etc/network/interfaces.d folder is blank, empty, nada ?( I am wondering if that is the problem.


    The content of /etc/network/interfaces it's source is expected to be from or rather called from /etc/network/interfaces.d/ as per your post 13. Your interface.d directory has content and points to eth0 as iface eth0 inet dhcp


    So because of the /etc/network/interfaces the line source-directory interfaces.d is the second line it's calling that first, what you could try is to edit that file and comment out that line with # so it be # source-directory interfaces.d that should prevent the call from that directory.


    Confused, sorry.


    So nano /etc/network/interfaces and comment out that second line as above. Rather than do the usual ifdown ifup commands, reboot and see if it behaves.

  • Well got the same device rockpro64 and ran into the same type of error cannot input a static address and OMV first-aid crash I am kind of lost lost with my new toy
    Also When I boot with a monitor connected got direct firmware load for rockchip/dptx.bin failed with error2
    Beside that the GUI is working normally but need help with the network static address


    My own network (DNS) is working I could do apt-get update no problem


    Update
    I inputsource-directory interfaces.d and it look like I got a static ID actually I can login to the DHCP address 192.168.2.71 and also to the static 192.168,2.170 kind of messy!

    • Offizieller Beitrag

    I can login to the DHCP address 192.168.2.71 and also to the static 192.168,2.170 kind of messy!

    That's because the dhcp is probably set in /etc/network/interfaces.d/eth0


    Have you tried ip addr flush dev eth0 followed by /etc/init.d/networking restart although it didn't resolve it for the OP.

  • That's because the dhcp is probably set in /etc/network/interfaces.d/eth0
    Have you tried ip addr flush dev eth0 followed by /etc/init.d/networking restart although it didn't resolve it for the OP.

    I guess i am in the same boat start from putty ip addr flush dev eth0 of course I lost the GUI restart with the monitor connected retype both instruction gave me error I type again /etc/init.d/networking restart in putty for copying the error also on the monitor connected the 3 inches left side all the writing is scrambled video problem not sure about it

  • Same error as the OP' what's the output of cat /etc/network/interfaces


    This is going to be a guess; cat /etc/network/interfaces.d/eth0

    I was trying on a new install 192.168.2.30 static since I changed my pool address at the routers but the interface shows DHCP in OMV

    • Offizieller Beitrag

    Ok now I see the problem;


    This line source-directory interfaces.d from /etc/network/interfaces is 'calling' the content of /etc/network/interfaces.d/eth0 which in your case is set to the above.


    So your OMV is calling the dhcp even though a static is set in /etc/network/interfaces, that's why you can get the GUI with either ip address....the command ip addr flush dev eth0 is supposed to remove all ip addresses for eth0, but for some reason it doesn't.


    I've checked my OMV install on my main box and this is the content of my /etc/network/interfaces


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


    # The loopback network interface
    auto lo
    iface lo inet loopback


    # enp2s0 network interface
    auto enp2s0
    allow-hotplug enp2s0
    iface enp2s0 inet static
    address 192.168.1.40
    gateway 192.168.1.254
    netmask 255.255.255.0
    dns-nameservers 1.1.1.1
    dns-search home
    iface enp2s0 inet6 manual
    pre-down ip -6 addr flush dev $IFACE


    It has the same reference as yours, the difference is my /etc/network/interfaces.d directory is empty so there is nothing to call!!


    This is the content of /etc/network/interfaces from my PI


    # The loopback network interface
    auto lo
    iface lo inet loopback


    # eth0 network interface
    auto eth0
    allow-hotplug eth0
    iface eth0 inet dhcp
    dns-search home
    iface eth0 inet6 manual
    pre-down ip -6 addr flush dev $IFACE


    The difference is it doesn't reference the /etc/network/interfaces.d directory.


    If you've read this and your having a wtf moment, join the club :)


    The obvious thing to suggest is comment out the line source-directory interfaces.d but at this stage I'm not sure if that's a good idea, but what you could is this;


    # Include additional interface stanzas.


    # The loopback network interface
    auto lo
    iface lo inet loopback


    # enp2s0 network interface
    auto enp2s0
    allow-hotplug enp2s0
    iface enp2s0 inet static
    address 192.168.1.40
    gateway 192.168.1.254
    netmask 255.255.255.0
    dns-nameservers 1.1.1.1
    dns-search home
    iface enp2s0 inet6 manual
    pre-down ip -6 addr flush dev $IFACE


    source-directory interfaces.d


    Put that line at the end so it doesn't 'call' /etc/network/interfaces.d until after the static ip is loaded at boot, you can check that by ip addr


    'If' that works then you could comment out source-directory interfaces.d. But before you do that make a backup of your boot device otherwise you'll be starting again.


    I have no idea why and the op have this issue, I also can't understand why the 2 conf files are different on my main omv and the pi.

  • I think I followed your instructions but no change my router says 2 clients are connected thought this devices #2 on the icon


    Edit I
    Still no change,after I even comment interfaces.d or maybe I misunderstood you


    #allow-hotplug eth0
    #iface eth0 inet dhcp
    After this I was able to have the GUI accepting my static address but I still have 2 addresses
    found this kind of drastic solution https://github.com/ayufan-rock64/linux-build/issues/217
    Actually I tried it not working for me

    • Offizieller Beitrag

    Apologies should have given you some examples editing the /etc/network/interfaces to look like this



    When you comment something out with # there should be a space between the # and the line you are commenting out. My main machine is W10 and I use WinSCP and for the editor I use Notepad ++


    That's a good find on github, removing the file eth0 from /etc/networking/interfaces.d has allowed your static ip to be used in omv.


    To remove the second ip which I assume is 192.168.2.248 you could try 2 things simply reboot and run ip addr again, if it's still there you could execute ip addr del 192.168.2.248/24 dev eth0 this should delete that address as it's listed as secondary global.

  • I think I followed your instructions

    I would start from scratch, do not fiddle around somewhere in the filesystem and simply assign a static DHCP lease on your router as already suggested to you in another thread.


    If you want to fiddle around on Linux boxes to configure stuff there you need at least some knowledge how it's done. Hint: editing /etc/network/interfaces (Debian's ifupdown mechanism) is something from the past. This for example is a good tutorial how to deal with stuff on Debian: https://linuxconfig.org/how-to…p-address-on-debian-linux


    With ayufan's OS images the config files are sourced from subdirectories as it's common today, when you work with the Armbian based ARM images you have to deal with network-manager and there simply call nmtui to switch between DHCP and static addressing.

    When you comment something out with # there should be a space between the # and the line you are commenting out

    Not even this.

    • Offizieller Beitrag

    If you want to fiddle around on Linux boxes to configure stuff there you need at least some knowledge how it's done.

    I'm trying to understand why you have commented on this as the original op started this on Sept 20th, but at no time did you apply some insight on how to resolve the problem, your link is very helpful and has helped me understand how the networking is set up.


    However, why is it then when a user applies a static ip address such as @Nefertiti it automatically adds that address to the /etc/network/interfaces and not to /etc/network/interfaces.d/eth0


    I have referenced my own system the /etc/network/interfaces.d is empty as my ip is referenced under /etc/network/interfaces, reading that very helpful link the heading Configure IP Address clearly points to using /etc/network/interfaces. But!! The preferred and recommended option is to define your network interfaces separately within /etc/network/interfaces.d/ directory.


    So to me using /etc/network/interfaces is fine as the /etc/network/interfaces.d is not mandatory.


    Why is it then that my /etc/network/interfaces on my Pi has no reference for /etc/network/interfaces.d?


    What does this mean? "and simply simply assign a static DHCP lease on your router"


    If your suggesting that adding a static ip address on the router and the router will assign that to said machine...that's gotta be a first.
    DHCP operates within a scope/range let's say 192.168.1.60 to 192.168.1.250 on a router, so a static ip address has to be outside of that range, so anything before .60, that ensures no network conflicts should you assign a static ip from within the range. If your router will allow you to add that static ip information to it that's fine as the router is then aware that there is a static ip address being used, but most ISP provided routers do not allow that.


    I'm using OMV's dnsmasq plugin with an ip scope of .50 to .80 my static ip addresses are assigned directly to the relevant machines, they are then added to the static entries (along with their mac address) to dnsmasq these are addresses prior to .50.

  • However, why is it then when a user applies a static ip address such as @Nefertiti it automatically adds that address to the /etc/network/interfaces and not to /etc/network/interfaces.d/eth0

    Because of OMV's way of handling this. @votdev decided to write directly to the interfaces file and I would assume the OMV x86 image also directly writes to this file when the installer sets the system up.


    The ARM images where OMV can be considered just an 'application running on top' use for various reasons (slightly) other approaches (like network-manager to deal with changing environments) and obviously there's a mismatch here at least with ayufan's Rock64 and RockPro64 images.


    All the other (Armbian based) ARM images ship with an empty /etc/network/interfaces file and once a user sets up an address via UI or omv-first-aid this file gets populated and network-manager from then on won't touch the interfaces defined there (so at least with the Armbian based images there should be no conflict).


    DHCP operates within a scope/range let's say 192.168.1.60 to 192.168.1.250 on a router, so a static ip address has to be outside of that range

    Why? You simply tell the router to always assign IP address X to MAC address Y as @Nefertiti showed several times. And X has to be within the DHCP server's assigned range. And even if you don't do this 99.99% of all DHCP servers will assign the same IP address to any 'server type device' all the time anyway since the server is always on and when the machine is down the usual downtimes are shorter than DHCP leases.


    BTW: one of my backgrounds is Apple networking and as such I never understood why people rely on addresses anyway. Addresses/numbers are for machines, names are for humans. If you access your NAS with smb://rockpro64 instead of smb://192.168.1.1 it doesn't matter whether the IP address changes between reboots or not. :)


    smb://rockpro64.local would even be better but I don't know whether ZeroConf ever arrived in Windows...

    • Offizieller Beitrag

    decided to write directly to the interfaces file

    Even VMware customization specs still do this.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


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


    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!

    • Offizieller Beitrag

    The ARM images where OMV can be considered just an 'application running on top' use for various reasons (slightly) other approaches (like network-manager to deal with changing environments) and obviously there's a mismatch here at least with ayufan's Rock64 and RockPro64 images.

    I'm slightly confused here with your reference to ayufun, I always assumed you created all the ARM images, if that's the case then your image references the use of /etc/network/interfaces.d


    Why? You simply tell the router to always assign IP address X to MAC address Y as @Nefertiti showed several times. And X has to be within the DHCP server's assigned range.

    Simply because not all routers can do this particularly those supplied by ISP's, mine for instance does not have that functionality, the DHCP assigns an address, then I can access the DHCP scope select the machine and check an option 'always use the same ip address' With @Nefertiti router it clearly states to use a static ip address outside the DHCP scope.


    I agree with your comment re addresses and names, I prefer to use names but sometimes for whatever reason they fail whereas the ip address is constant. What I like about OMV's dnsmasq plugin is that it lists the computers hostname, ip address, and mac address but my router is less forgiving you either have to change the host name or sometimes add it.


    ZeroConf used to work using Bonjour but thanks to MS and W10 it's f*****, but because there are some smart people out there, there is a solution

  • I'm slightly confused here with your reference to ayufun, I always assumed you created all the ARM images


    See https://forum.openmediavault.org/index.php/Thread/23508 please. There are tons of OMV images somewhere on the Internet, most of them performing poorly. Those from ayufan for Rock64 and Rock64Pro perform great and also contain all the stuff that's part of the Armbian based images (automatically UAS blacklisting problematic USB disks, the necessary kernel tweaks and performance optimizations, CLI monitoring and so on).


    Main differences:

    • The Armbian based images use network-manager as default mechanism (which is not a problem since NM doesn't touch interfaces if they're already handled by Debian's ifupdown mechanism regardless whether that happens in /etc/network/interfaces or /etc/network/interfaces.d)
    • The Armbian based images use zram more aggressively in the meantime so they can better cope with limited RAM resources


    So even if the recommended way to configure networking in Armbian is via nmtui (Network Manager's Terminal UI) it doesn't interfere with the way OMV chose to setup networking. With ayufan's use of /etc/network/interfaces.d it's obviously different.

Jetzt mitmachen!

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