A dummy interface is a virtual NIC for the server without a physical interface card.
Why could this be useful?
If you rent a root server you will typically get 1 physical NIC only (or pay more). As you only have one NIC, this will be on green role per design.
Let’s assume you plan to set up a VPN - LAN to LAN connection to a master server. To set it up you would like to have an internal IP range for your server on the green interface role and the physical NIC with the public IP should be bound to red role. This is a least the way I have done in the past and I know it’s working well.
So what do we need to make it working?
add a file for your dummy interface in /etc/sysconfig/network-scripts/ let’s call it ifcfg-dummy0
the kernel module dummy (which is need for dummy devices) is not loaded per default, so we need to add this during server start. Ceate a file dummy.conf inside /etc/modules-loaded.d. This file includes the word dummy only!
If you reboot the server now, you will see theh result with e.g. ifconfig and you are able to ping yourself:
You will recognize, that your new interafce dummy0 is still missing in WEB-GUI. Thanks to @jstammi I found the solution here: https://community.nethserver.org/t/virtual-network-interface-for-virtual-machines/7728
I had to patch my /usr/libexec/nethserver/nic-info file. After my next server reboot the NIC is present in the dashboard and I could set up the correct green and red roles under Network. The final result:
The MAC address for dummy0 will change on each reboot. See https://community.nethserver.org/t/virtual-network-interface-for-virtual-machines/7728 how to fix this, too. I have not tried this guidline yet and I’m not sure if I need it.
I have tried to use parameter HWADDR=… inside file ifcfg-dummy0 but this will end with an error and is not working.
So what do you think about it? Should it be implimented as an feature? Under WEB-GUI network you are able already to add a new logical interface. Could type dummy be included there?