If your router/firewall/internet gateway and your host machine supports VLANs (802.1ad).
Easiest option is to use the IPvlan driver from Docker
Another more thorough option is to create a separate VLANs on your router/firewall/internet gateway and configure your host machine with separate network interfaces for the two VLANs and then create a container and attach to the appropriate network interface.