Add a configuration option to the overlay network to enable "L2 mode". (proposing --subnet=none)
Do not assign a subnet or default gateway to the network, or to container interfaces.
By default, do not assign an IP address (v4 or v6) to interfaces.
Ensure promiscuous mode is enabled on every interface.
~Forward all packets sent to one of this network's interfaces to every other interface.~
(This would work, but will cause performance loss in networks with more than two containers.)
Forward ARP/DHCP/broadcast packets sent to one of this network's interfaces to every other interface.
Beware switching loops! Broadcast packets must only reach each interface once.
Use virtual switches/linux bridges to proactively learn what IPs are available at which destinations. L2 services running in containers may forward packets from external IPs, the overlay network should handle these transparently.
Effectively, we want to use a virtual switch/linux bridge to learn the network topology, rather than trusting docker to know everything about the network topology.
Add capability to create Layer 2 overlay networks.
Related: https://github.com/docker/docker/issues/32531
Requirements for L2 networking:
--subnet=none
)Effectively, we want to use a virtual switch/linux bridge to learn the network topology, rather than trusting docker to know everything about the network topology.