I think the best way is to add a virtual dummy interface as we did in NS7.
Debian instructions
To add the dummy interface either create the file /etc/network/interfaces.d/dummy
or just use the file /etc/network/interfaces
to add the following:
auto dummy0
iface dummy0 inet static
address 192.168.1.10
netmask 255.255.255.0
pre-up ip link add dummy0 type dummy
post-down ip link delete dummy0
To setiü loading the dummy module at boot, execute following command:
echo dummy > /etc/modules-load.d/dummy.conf
To load the module now:
modprobe dummy
To restart the network:
systemctl restart networking
Check interfaces:
ip a
The new dummy interface should be there.
RHEL instructions
Instructions for RHEL Distros like Rocky and Alma about the creation of the virtual interface are in the old wiki.
EDIT:
I corrected the instructions and added
post-down ip link delete dummy0
to the dummy interface to correctly remove dummy0, else restarting the network won’t work.