Main / Brctl
For example, imagine two different emulator applications running on one machine, referred to as 'lcem' and 'pcu'. Instructions for setting up a virtual Eth interface on Linux to use as a device stand-in: https://linuxconfig.org/configuring-virtual-network-interfaces-in-linux Can create an interface and give it an address of 12:23:34:45:56:67 and then must create a virtual bridge to connect the two interfaces per: https://www.baeldung.com/linux/bridging-network-interfaces#:~:text=To%20bridge%20two%20or%20more,shown%20in%20the%20examples%20later. Since the bridge came up with MAC address matching the first, then it binds the socket to the bridge interface. The lcem app in this instance would bind to its own virtual interface with the correct MAC address. Set of commands to configure virtual link (requires install of bridge-utils with apt): sudo modprobe dummy sudo ip link add lcemvirt type dummy sudo ip link add pcuvirt type dummy sudo ifconfig lcemvirt hw ether AE:80:7A:5E:80:02 sudo ifconfig pcuvirt hw ether 12:23:34:45:56:67 sudo brctl addbr vbr0 sudo brctl addif vbr0 pcuvirt sudo brctl addif vbr0 lcemvirt sudo ifconfig vbr0 up sudo ifconfig lcemvirt up sudo ifconfig pcuvirt up ifconfig |