Figure 10.4 Container networking with NAT mode
Transparent This is the most familiar mode to Hyper-V users, and it works in the
same way as regular VMs, using a VM switch to connect containers to the network
connected by the switch. In this mode, the Hyper-V switch is of type external in
order to enable connectivity beyond the container host. This is shown in Figure
10.5. The vNIC or vmNIC has raw traffic frames sent to the NIC via the switch, and
it can be assigned IP addresses via DHCP (Dynamic Host Configuration Protocol)
or statically. While Transparent is the most familiar mode to Hyper-V
administrators and works well for virtual machines, it is may cause problems for
containers because the life cycle of a VM is different from that of a container. VMs
are created and run for a long time before being deleted. When a vmNIC is
introduced to an external switch, it has its MAC address that is learned by the
upstream network switch ports in the infrastructure to enable traffic to be
forwarded as required, but these introductions with virtual machines are
infrequent and therefore not a problem. Containers may have short life cycles,
especially when using the microservices model, as containers are created, run a
task, and then are deleted. Constant creation of NICs with MAC address learning
will negatively impact the network infrastructure, as the CAM tables on the switch