2nd physical NIC, network and MACVLAN Question.

  • Currently I have 2 physical interfaces configured in OMV:


    1. enp1s0f0 - 192.168.1.25/24 GW: 192.168.1.1
    2. enp3s0f0 - 192.168.4.2/24 GW: 192.168.4.1


    I can ping both IPs and both GWs sourcing from 192.168.1.0/24 network.


    My issue is I created a MACVLAN in Docker for both the .1 and .4 network. The .1 MACVLAN works just fine however when I assign any container to .4 MACVLAN I can't communicate with the container on the .4 MACVLAN.


    The .4 MACVLAN is configured as follows:


    192.168.4.2/24 GW: 192.168.4.1
    Interface: enp3s0f0


    Container is assigned .4 MACVLAN with an IP of 192.168.4.3.


    IP Route:
    default via 192.168.4.1 dev enp3s0f0 proto static
    default via 192.168.1.1 dev enp1s0f0 proto static
    default via 192.168.1.1 dev enp1s0f0 proto dhcp metric 100
    172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
    172.18.0.0/16 dev br-964b0b53880c proto kernel scope link src 172.18.0.1 linkdown
    172.19.0.0/16 dev docker_gwbridge proto kernel scope link src 172.19.0.1
    172.20.0.0/16 dev br-9c082571355b proto kernel scope link src 172.20.0.1 linkdown
    172.21.0.0/16 dev br-f60823117701 proto kernel scope link src 172.21.0.1 linkdown
    172.22.0.0/16 dev br-34de0811e6f4 proto kernel scope link src 172.22.0.1 linkdown
    172.23.0.0/16 dev br-b2bf044c0577 proto kernel scope link src 172.23.0.1 linkdown
    172.24.0.0/16 dev br-78ef2ff541c7 proto kernel scope link src 172.24.0.1 linkdown
    172.25.0.0/16 dev br-37cdf41da664 proto kernel scope link src 172.25.0.1 linkdown
    192.168.1.0/24 dev enp1s0f0 proto kernel scope link src 192.168.1.25
    192.168.1.0/24 dev enp1s0f0 proto kernel scope link src 192.168.1.83 metric 100
    192.168.1.0/24 dev enp1s0f0 proto kernel scope link src 192.168.1.25 metric 100
    192.168.4.0/24 dev enp3s0f0 proto kernel scope link src 192.168.4.2
    192.168.4.0/24 dev mac0 proto kernel scope link src 192.168.4.2
    192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown


    Any idea what I am missing here?


    Thanks

  • Thanks for the reply and I missed a step earlier when I created the routing table. last question OMV echoes back not to edit /etc/networks, rather /etc/systemd/network for the last piece to make the routing tables static on a reboot.


    Below are the interfaces:


    10-openmediavault-enp1s0f0.link
    -rw-r--r-- 1 root root 184 Nov 10 19:41 10-openmediavault-enp1s0f0.network
    -rw-r--r-- 1 root root 123 Nov 10 19:41 10-openmediavault-enp3s0f0.link
    -rw-r--r-- 1 root root 160 Nov 10 19:41 10-openmediavault-enp3s0f0.network
    -rw-r--r-- 1 root root 45 Nov 2 23:12 openmediavault-enp1s0f0.link
    -rw-r--r-- 1 root root 191 Nov 2 23:12 openmediavault-enp1s0f0.network
    root@openmediavault:/etc/systemd/network#


    I assume I would need to edit enp3s0f0.network and add the additional:


    iface enp3s0f0 inet static
    address 192.168.4.2
    netmask 255.255.255.0
    post-up ip route add 192.168.4.0/24 dev enp3s0f0 src 192.168.4.2 table rt2
    post-up ip route add default via 192.168.4.1 dev enp3s0f0 table rt2
    post-up ip rule add from 192.168.4.2/32 table rt2
    post-up ip rule add to 192.168.4.2/32 table rt2


    Thanks

Jetzt mitmachen!

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