Home Explore Blog Models CI



docker

4th chunk of `content/manuals/engine/network/drivers/ipvlan.md`
7b530649258f19553268ed0362505c2378903d9245b0696b0000000100000833
Architecturally, IPvlan L2 mode trunking is the same as Macvlan with regard to
gateways and L2 path isolation. There are nuances that can be advantageous for
CAM table pressure in ToR switches, one MAC per port and MAC exhaustion on a
host's parent NIC to name a few. The 802.1Q trunk scenario looks the same. Both
modes adhere to tagging standards and have seamless integration with the physical
network for underlay integration and hardware vendor plugin integrations.

Hosts on the same VLAN are typically on the same subnet and almost always are
grouped together based on their security policy. In most scenarios, a multi-tier
application is tiered into different subnets because the security profile of each
process requires some form of isolation. For example, hosting your credit card
processing on the same virtual network as the frontend webserver would be a
regulatory compliance issue, along with circumventing the long standing best
practice of layered defense in depth architectures. VLANs or the equivocal VNI
(Virtual Network Identifier) when using the Overlay driver, are the first step
in isolating tenant traffic.



The Linux sub-interface tagged with a VLAN can either already exist or will be
created when you call a `docker network create`. `docker network rm` will delete
the sub-interface. Parent interfaces such as `eth0` are not deleted, only
sub-interfaces with a netlink parent index > 0.

For the driver to add/delete the VLAN sub-interfaces the format needs to be
`interface_name.vlan_tag`. Other sub-interface naming can be used as the
specified parent, but the link will not be deleted automatically when
`docker network rm` is invoked.

The option to use either existing parent VLAN sub-interfaces or let Docker manage
them enables the user to either completely manage the Linux interfaces and
networking or let Docker create and delete the VLAN parent sub-interfaces
(netlink `ip link`) with no effort from the user.

For example: use `eth0.10` to denote a sub-interface of `eth0` tagged with the

Title: IPvlan L2 Mode Trunking, VLANs, and Network Isolation
Summary
IPvlan L2 mode trunking shares similarities with Macvlan regarding gateways and L2 path isolation but offers advantages such as reduced CAM table pressure. VLANs and VNIs are essential for isolating tenant traffic and security. The driver creates or deletes Linux sub-interfaces tagged with VLANs during `docker network create` and `docker network rm`. The format for VLAN sub-interfaces must be `interface_name.vlan_tag` for automatic deletion. Users can choose to manage VLAN sub-interfaces manually or let Docker handle their creation and deletion.