ipvlan

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ipvlan provides Docker “ipvlan”-driver specific network configuration options. Please see also the Docker ipvlan driver documentation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithFlag

func WithFlag(flag IPVLANFlag) net.Opt

WithFlag sets the IPVLAN (mode) flag; when unset, it defaults to “bridge” (BridgeFlag).

See also: Docker's IPvlan network driver options.

func WithMode

func WithMode(mode IPVLANMode) net.Opt

WithMode sets the IPVLAN mode. If left unset, it defaults to “l2” L2Mode. All slave “ipvlan” network interfaces will operate in the same mode.

  • L2Mode – the parent network interfaces bridges L2 traffic between the “slaves”, ARP can be used. However, different IP subnets on the same parent network interface cannot ping each other. An external host only sees the single external-facing MAC address of the parent.
  • L3Mode – only IP-layer connectivity between “slaves”, where the parent network interface acts as an IP router for unicast traffic. Different IP subnets on the same parent network interface can reach each other using IP unicast traffic.
  • L3sMode – like L3Mode, but with packet filtering supported.

See also:

func WithParent

func WithParent(ifname string) net.Opt

WithParent sets the name of the “parent” interface (and optional VLAN) to attach the IPVLAN “slave” interfaces to. In Linux parlance, the “parent” interface is commonly referred to as the “master”.

See also: Docker's IPvlan network driver options.

Types

type IPVLANFlag

type IPVLANFlag string
const (
	BridgeFlag  IPVLANFlag = "bridge"
	VEPAFlag    IPVLANFlag = "vepa"
	PrivateFlag IPVLANFlag = "private"
)

type IPVLANMode

type IPVLANMode string
const (
	L2Mode  IPVLANMode = "l2"
	L3Mode  IPVLANMode = "l3"
	L3sMode IPVLANMode = "l3s"
)

Jump to

Keyboard shortcuts

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