Connecting to Existing Networks and VLANs
Learn to connect containerized apps to external systems and physical networks.
The ability to connect containerized apps to external systems and physical networks is important. A common example is partially containerized apps where the parts running in containers need to be able to communicate with the parts not running in containers.
MACVLAN
The built-in MACVLAN
driver (transparent
if you’re using Windows containers) was created with this in mind. It gives every container its own IP and MAC address on the external physical network, making each one look, smell, and feel like a physical server or VM. This is shown in the figure below.
On the positive side, MACVLAN
performance is good as it doesn’t require port mappings or additional bridges. However, you need to run your host NICs in promiscuous mode, which isn’t allowed on many corporate networks and public clouds. So, MACVLAN
will work on your data center networks if your network team allows promiscuous mode, but it probably won’t work on your public cloud.