If you generate a MACVLAN and assign a unique address to your container, it will become a standalone device on your network.
It can also communicate with other devices on the network without any problems.
But be careful: It can no longer communicate with the Docker Host, because the host network and possible MACVLANS or other Docker networks are decoupled.
For this you have to set up a loopback an tell your host machine how to cummincate with your macvlan containers.
This is a confoguration example for docker macvlan with host connection how I did it:
docker network create -d macvlan -o parent=eno1 \
--subnet 192.168.178.0/24 \
--gateway 192.168.178.1 \
--ip-range 192.168.178.192/27 \
--aux-address 'host=192.168.178.223' \
mynet
ip link add mynet-shim link eno1 type macvlan mode bridge
ip addr add 192.168.178.223/32 dev mynet-shim
ip link set mynet-shim up
ip route add 192.168.178.192/27 dev mynet-shim
The first command generates a Docker MACVLAN with the reserved IP address 192.168.178.223, so that it is not used by Docker when creating containers.
The second command generates a MACVLAN interface named mynet-shim on the Docker host
The third and fourth commands assign the host MACVLAN interface the previously reserved IP address and start it
The fifth command tells the host how to use that interface when communicating with the containers