networkl2bridge

package
v3.0.0-rc73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func NewNetworker() network.Networker

Types

type T

type T struct {
	network.T
	// contains filtered or unexported fields
}

func New

func New() *T

func (*T) BackendDevName

func (t *T) BackendDevName() string

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

func (t *T) IsLayer2() bool

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

func (t *T) PortDevNames() []string

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

func (t *T) Report(st *netstatus.Status)

Report adds to the status of the setup the ports it enslaved, and the nodes its vxlan sends to, with their failures.

func (*T) Setup

func (t *T) Setup() error

func (*T) Teardown

func (t *T) Teardown() error

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

func (t *T) VXLAN() (int, net.IP, []net.IP)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL