Beiträge von Das Urmel

    Since netplan works fine with the parameters, I think the problem is within OMV because it doesn't support them.

    The "fix" or enhancement should be straight forward:

    1. add property macaddress to class vlan
    2. enhance UI to display optional field macaddress in vlan definition
    3. verify code to write property to yaml if set

    Btw. I tried the "fail-over-mac-policy" parameter, but with no success.


    Regarding the question: An interface can only be used if you either use it as an "single" interface or you make it part of some bigger interface (like a bond). You can't do both at the same time.


    So, I will try to create an official feature request.

    ok, let's go into detail. deep :)


    dmesg gives the NIC information:


    [ 0.912096] r8169 0000:22:00.0 eth0: RTL8168h/8111h, 00:d8:61:aa:ea:d5, XID 541, IRQ 84


    [ 1.069988] igb 0000:26:00.0: Intel(R) Gigabit Ethernet Network Connection

    [ 1.069990] igb 0000:26:00.0: eth0: (PCIe:2.5Gb/s:Width x1) 80:61:5f:5a:61:1a

    [ 1.070073] igb 0000:26:00.0: eth0: PBA No: E43709-006

    [ 1.258037] igb 0000:26:00.1: Intel(R) Gigabit Ethernet Network Connection

    [ 1.258038] igb 0000:26:00.1: eth1: (PCIe:2.5Gb/s:Width x1) 80:61:5f:5a:61:1b

    [ 1.258120] igb 0000:26:00.1: eth1: PBA No: E43709-006



    After defining 1st NIC: OMV is in management net, mac is correct.

    2nd (dual port) NIC unused with correct macs (output of "ip a"):


    2: enp34s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 00:d8:61:aa:ea:d5 brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.50/24 brd 192.168.1.255 scope global enp34s0

    valid_lft forever preferred_lft forever

    3: enp38s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000

    link/ether 80:61:5f:5a:61:1a brd ff:ff:ff:ff:ff:ff

    4: enp38s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000

    link/ether 80:61:5f:5a:61:1b brd ff:ff:ff:ff:ff:ff



    After defining a LACP (802.3ad) bond of 2nd NIC the original macs are replaced:


    2: enp34s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 00:d8:61:aa:ea:d5 brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.50/24 brd 192.168.1.255 scope global enp34s0

    valid_lft forever preferred_lft forever

    3: enp38s0f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    4: enp38s0f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff



    So far so good.


    After adding 2 vlans to the bond... you can see they all share the same mac (the one of the bond):


    3: enp38s0f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    4: enp38s0f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    8: bond0.42@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    inet 192.168.42.20/24 brd 192.168.42.255 scope global dynamic bond0.42

    valid_lft 7186sec preferred_lft 7186sec

    9: bond0.44@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    inet 192.168.44.116/24 brd 192.168.44.255 scope global dynamic bond0.44

    valid_lft 43189sec preferred_lft 43189sec


    My dhcp server now correctly complains ("Static lease for MAC address (4A:64:B9:0D:D0:16) already defined!") when I try to define a second IP address in the 2nd network.



    Solution:

    I need a different (virtual) mac in the vlan definition, and netplan (not surprisingly) is supporting that.

    So I defined the entries manually (sorry, copy&paste looses the indention):


    /etc/netplan/50-openmediavault-bond0.42.yaml

    network:

    vlans:

    bond0.42:

    dhcp4: true

    dhcp6: false

    link-local: []

    id: 42

    link: bond0

    macaddress: 4a:64:b9:0d:d0:18


    /etc/netplan/50-openmediavault-bond0.44.yaml

    network:

    vlans:

    bond0.44:

    dhcp4: true

    dhcp6: false

    link-local: []

    id: 44

    link: bond0

    macaddress: 4a:64:b9:0d:d0:1a



    After "netplan apply" and performing a reboot everything looks the way I want and need:


    3: enp38s0f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    4: enp38s0f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    5: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:16 brd ff:ff:ff:ff:ff:ff

    6: bond0.44@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:1a brd ff:ff:ff:ff:ff:ff

    inet 192.168.44.120/24 brd 192.168.44.255 scope global dynamic bond0.44

    valid_lft 43187sec preferred_lft 43187sec

    7: bond0.42@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 4a:64:b9:0d:d0:18 brd ff:ff:ff:ff:ff:ff

    inet 192.168.42.185/24 brd 192.168.42.255 scope global dynamic bond0.42

    valid_lft 7187sec preferred_lft 7187sec



    But this works only as long as the next network configuration is applied by OMV.

    Then the "macaddress" entries are removed from the yamls and after reboot the mac's are gone.

    Hello to everyone (since this is my 1st post here)!


    I have a problem using dhcp in vlans defined on the same nic. Only the 1st one get's an ip. My dhcp server denies the following requests, saying that this nic already got one.


    The problem seems to be a missing (optional) field in the definition of a vlan allowing you to set a specific (virtual) mac address. Netplan supports this.

    Are there any plans to support this? Any hints for a workaround?


    Tnx, Thorsten