Multiple IP adresses on a Rock64 OMV board

  • Hi all,


    I have recently upgraded to OMV5, had to go through hell for a week to get it running smooth again, but after all said and done, there´s still one issue to go. Although I set a fixed IP (192.168.0.75), the board still requests 3 other IPs from my router, and end up with four adresses, all with the same mac address. Still didn't bother too much, as long as I am sure of at least one of them. The latest problem is that this supposed fixed IP started not to show up anymore, and this happens randomly.


    Attached is an IPscan of my network now and the network config on OMV. It has 3 addresses, 76, 77 and 78. And the 75 is not there.


    Do you have any suggestions to solve that and end up with a single, fixed IP?


    Thanks,


    Paulo

  • I own a rock64( don't use it know) but I saw this problem two years ago.

    The issue is the image is built with a second dhcp client if i recall correctly instead of just having the default one which is isc-dhcp-client


    Check for another dhcp package with


    dpkg - l | grep dhcp

  • Well, so far ...

    "dpkg - l | grep dhcp" did not work. This is what I came up with:

    ip addr

    to show me all ip´s and interfaces, and that is what I got:

    You can see all 4 IP addresses on interface eth0. I don't know what are the other interfaces for and if they are actually needed, so I did not mess with them.

    So I tried to mannualy delete the extra IPs, with the following commands:

    Code
    ip addr del 192.168.0.78/24 dev eth0
    ip addr del 192.168.0.77/24 dev eth0
    ip addr del 192.168.0.76/24 dev eth0

    It worked for 78 and 77, but 76 still remains.

    Code
    ~# ip addr show eth0
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether f6:5c:7a:65:fb:42 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.75/24 brd 192.168.0.255 scope global eth0
    valid_lft forever preferred_lft forever
    inet 192.168.0.76/24 brd 192.168.0.255 scope global secondary noprefixroute eth0
    valid_lft forever preferred_lft forever

    But ... after a reboot, they are all back:

    Any ideas?


    Regards,

    Paulo

  • Sorry is dpkg -l | grep dhcp


    Commonly would see 2 ip assigned but three is really odd. Check for the dhcp package see if something is there.

    It worked now, this is the print:

    Code
    ~# dpkg -l | grep dhcp
    ii dhcpcd5 7.1.0-2
    armhf DHCPv4, IPv6RA and DHCPv6 client with IPv4LL support
    ii isc-dhcp-client 4.4.1-2
    armhf DHCP client for automatically obtaining an IP address
    ii isc-dhcp-common 4.4.1-2
    armhf common manpages relevant to all of the isc-dhcp packages

    I managed to let only two addresses, by editing /etc/dhcpcd.conf. The file now contains:

    Code
    interface eth0
    static ip_address=192.168.0.75
    static routers=192.168.0.1
    static domain_name_servers=192.168.0.1

    and, checking the IPs:

    Code
    ip addr show eth0
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether f6:5c:7a:65:fb:42 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.75/24 brd 192.168.0.255 scope global eth0
    valid_lft forever preferred_lft forever
    inet 192.168.0.78/24 brd 192.168.0.255 scope global secondary dynamic eth0
    valid_lft 154981sec preferred_lft 154981sec

    only 2 left. But I really need just one, so still need help.


    Thanks!

    Paulo

  • Just some updated info:


    I was able to delete the second IP repeating the command:


    ip addr del 192.168.0.78/24 dev eth0


    After that I stopped and disabled dhcp client (again):

    systemctl stop dhcpcd

    systemctl disable dhcpcd


    And finnaly my system had just one IP address!!! :)


    But it only lasted until the next reboot ... X/

  • I tried the command and inspected the boot log. I could find that the dynamic address starts before the static one, on the systemd-networkd service.


    I went there and found no files inside /etc/systemd/network/ , where interface config files should be according to documentation


    Then I took a look at file /etc/systemd/networkd.conf . It was almost all commented out, except for one line: [DHCP]. Tried to 1) comment that out too; 2)since it's a field, tried to insert DHCP=no; none of these worked


    I think I'll give up on this.

  • It does:

    Code
    root@rock64:/etc/netplan# ls -la
    total 28
    drwxr-xr-x 2 root root 4096 May 1 09:26 .
    drwxr-xr-x 108 root root 12288 May 28 15:50 ..
    -rw-r--r-- 1 root root 43 May 1 09:26 10-openmediavault-default.yaml
    -rw-r--r-- 1 root root 216 May 1 09:26 20-openmediavault-eth0.yaml
    -rw-r--r-- 1 root root 84 Jul 21 2018 eth0.yaml

    and opening eth0.yaml ...

    Code
    network:
    version: 2
    renderer: networkd
    ethernets:
    eth0:
    dhcp4: true

    Let´s try replacing that "true" for a "false" ...

    And the result:

    Code
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether f6:5c:7a:65:fb:42 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.75/24 brd 192.168.0.255 scope global eth0
    valid_lft forever preferred_lft forever

    IT WORKED !!!!


    SubZero, thank you very much for not giving up on me!


    This thread might be a guide for some people wtih the same problem, there are a lot according to my researches.


    Best Regards,

    Paulo

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!