network

package
v0.0.0-...-75424bb Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 3 Imported by: 0

README

Configure in bridge mode: connection between host and container:

  1. Create a veth pair
  2. Create a bridge device in the host
  3. One side of the veth pair is attached to the bridge and one to the container ns
  4. Route traffic from container through veth

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBridge

func NewBridge(name string)

NewBridge creates a new bridge device in the host machine

func NewVethPair

func NewVethPair(name string)

NewVethPair creates a veth interface pair for establishing connection between the host and the container through the bridge device:

  • veth1 is attached to the bridge
  • veth2 is attached to the container's namespace

Types

This section is empty.

Jump to

Keyboard shortcuts

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