Module network

Container networking support.

require("module/network")

network:AddIP{ipv4='10.0.0.1', ipv6='fd00::1', nat=true}

Functions

AddIP (address) Add IP Address to container.
AddPrefix (prefix) Route Prefix to container.
AddNameserver (nameserver) Specify Nameserver to use in container.
AddInterface (interface) Add an interface to the container.
interface:AddIP (address) Add IP Address to interface
interface:AddPrefix (prefix) Route Prefix to interface

Tables

address Contains an IP Address.
prefix Contains an IP Prefix.
interface Contains a network interface.


Functions

AddIP (address) line 18
Add IP Address to container.

Parameters:

  • address

See also:

AddPrefix (prefix) line 31
Route Prefix to container.

Parameters:

  • prefix

See also:

AddNameserver (nameserver) line 39
Specify Nameserver to use in container. Call multiple times to configure multiple servers.

Parameters:

  • nameserver string Nameserver IP Address.
AddInterface (interface) line 58
Add an interface to the container.

Parameters:

  • interface

Returns:

    interface

See also:

Usage:

    local NIC = network:AddInterface{type='ethernet', name='net0'}
    IC:AddIP{ipv4='10.0.0.1', ipv6='fc00::1', nat=true}
    IC:AddPrefix{ipv4='10.0.0.0/24', ipv6='fc00::/64'}
interface:AddIP (address) line 62
Add IP Address to interface

Parameters:

  • address table {ipv4='10.0.0.1', ipv6='fd00::1', nat=false, proxyarp='eth0'}
interface:AddPrefix (prefix) line 68
Route Prefix to interface

Parameters:

  • prefix table {ipv4='10.0.0.0/8', ipv6='fd00::/16'}

Tables

address line 15
Contains an IP Address.

Fields:

  • ipv4 string IPv4 Address.
  • ipv6 string IPv6 Address.
  • nat boolean Enable NAT for these IP Addresses. (optional)
  • proxyarp string ProxyARP/ProxyNDP on the specified interface on the host. (optional)
prefix line 28
Contains an IP Prefix.

Fields:

  • ipv4 string IPv4 Prefix to route.
  • ipv6 string IPv6 Prefix to route.
interface line 51
Contains a network interface.

Fields:

  • type string Type of interface - ethernet/tinc.
  • name string Name of interface in guest.
  • default_route boolean Configure default route in container. (optional)
  • tincpath string For tinc networks, the path to the tinc directory on the host. (optional)
generated by LDoc 1.4.6 Last updated 2019-03-17 07:43:26