Dummy interface on FedoraΒΆ

With NetworkManager

Create /etc/NetworkManager/dispatcher.d/99-virbr10 and make it executable. This script configures the dummy interface when the virtual bridge is brought up. Use the MAC address that you chose earlier for the virtual bridge.

#!/bin/sh
# See the "DISPATCHER SCRIPTS" section of `man NetworkManager`.
# Remember to make this file executable!
[ "$1" != "virbr10" ] && exit 0
case "$2" in
    "up")
        # Create the dummy interface.
        /sbin/ip link add virbr10-dummy address 52:54:00:7e:27:af type dummy
        # Attach the dummy interface to the bridge.
        /usr/sbin/brctl addif virbr10 virbr10-dummy
        ;;
esac

Without NetworkManager

Create /etc/sysconfig/virbr10-dummy. Use the MAC address that you chose earlier for the virtual bridge.

# echo "MACADDR=52:54:00:7e:27:af" > /etc/sysconfig/virbr10-dummy

Create /etc/systemd/system/dummy@.service with these contents:

# '%i' becomes 'virbr10' when running `systemctl start [email protected]`
# Remember to run `systemctl daemon-reload` after creating or editing this file.

[Unit]
Description=Dummy network interface for %i
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/sysconfig/%i-dummy
ExecStartPre=-/sbin/ip link add %i-dummy address ${MACADDR} type dummy
ExecStart=/usr/sbin/brctl addif %i %i-dummy

[Install]
WantedBy=multi-user.target

Enable and start the service.

# systemctl daemon-reload
# systemctl enable [email protected]
# systemctl start [email protected]