Documentation
¶
Overview ¶
Package networkl2bridge is the l2_bridge network driver: a bridge with no address, set up on every node, for the guests and containers of the node to share a layer 2 segment that om neither addresses nor routes, as one a gateway guest serves.
The bridge is alone on its node unless meshed with the bridges of the other nodes, one of two ways the keywords choose:
- ports: the nodes share a lan or a vlan, and each enslaves its port of it, optionally a vlan interface om creates on it;
- vxlan: the nodes share no segment, and each enslaves a vxlan device carrying the frames to the other nodes over their ip network.
The setup never assigns an address to the bridge or its ports, never enslaves a port holding one, and never removes a port it did not enslave, as the taps of the guests. A bridge it did not create is adopted as it is.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNetworker ¶
Types ¶
type T ¶
func (*T) BackendDevName ¶
BackendDevName returns the bridge, which the firewall accepts the frames forwarded through, and whose link coming up sets the network up again.
func (*T) IsLayer2 ¶
IsLayer2 says the network is a layer 2 segment om neither addresses nor routes: an ip.netns joining it is plugged into the bridge, and holds the address its configuration names, or none.
func (*T) PortDevNames ¶
PortDevNames returns the devices of this node the bridge enslaves, whose link coming up sets the network up again: a port missing at the setup is enslaved once it appears.
func (*T) Report ¶
Report adds to the status of the setup the ports it enslaved, and the nodes its vxlan sends to, with their failures.
func (*T) Teardown ¶
Teardown undoes the setup, the configuration of the network removed: the ports om enslaved are released, the vlan and vxlan devices it created deleted, and the bridge it created deleted once nothing else is enslaved to it. A bridge it adopted is left.
func (*T) VXLAN ¶
VXLAN returns the udp port of the vxlan of the network, the address of this node it receives on, and the addresses of the nodes it receives from, for the firewall to drop the vxlan of any other host: vxlan is neither authenticated nor encrypted. A port of 0 is no vxlan.
A vxlan the configuration asks for but that it cannot describe, an address of a node not resolving for example, is the port with no address: the firewall drops all of it. Its setup fails before the device, which the previous setup made and is left up, and the vxlan of any host would reach the bridge else.