vethcfg(8)

#include "vethcfg.h"

NAME
vethcfg - manipulating veth (virtual ethernet) driver

SYNOPSIS
vethcfg add physical_if virtual_if
vethcfg del physical_if
vethcfg move physical_if virtual_if
vethcfg ver
vethcfg list
vethcfg showagg virtual_if
vethcfg showport physical_if
vethcfg setagg virtual_if var val
vethcfg setport physical_if var val
vethcfg -h | --help
vethcfg [-c config_file]

DESCRIPTION
vethcfg is used to set up, maintain the veth (virtual ethernet driver) in the Linux kernel. These operation can be divided into following categories:

physical interface manipulation
    adding, deleting, moving, configuring and showing physical interface.

virtual interface manipulation
    configuring and showing virtual interface.

version
    printing version information

COMMANDS

add This command adds a physical interface to pool and making it belong to a link aggregation group. It does not mean the port attaches an aggregator immediately. E.g. If loopback connection is detected at two ports which belong to same aggregation group, they are not aggregated.

del This command deletes a physical interface from pool. It is safe to delete the physical interface while virtual_if (veth interface) is up. Because real deletion is done after preparation of deletion is done (It takes fewer than 1 second).

move
    This command moves link aggregation group of physical interface. It does not mean the port attaches new aggregator immediately.

ver This command shows version information of vethcfg and veth driver. It is recommended to make vethcfg's major and minor version match veth driver's one at least.

list
    This command shows physical interfaces registered.

-h | --help
    Shows help.

-c config_file
    If no arguments specified, vethcfg uses DEFAULT_CONFIG_FILE by default for configuration. This option changes path of configuration file.

showagg virtual_if
    This command shows aggregator information.

showport physical_if
    This command shows port information.

setagg virtual_if var val
    This command set val to administrative variable var for virtual_if.

    distalgo specifies distributing algorithm used for given aggregator. tcpudp is for DA/SA hash and TCP/UDP port number based hash. This is default algorithm. dasa is for DA/SA hash only. rrobin is for (weighted) round robbing. This is not allowed by the IEEE 802.3ad standard.
     Take care of using this.

    key specifies aggregator's key value. 256*n (n: 1-255) is allowed as value. Aggregator key is assigned automatically while the aggregator is registered with system. Generally it is recommended to accept it.

setport physical_if var val
    This command set val to administrative variable var for physical_if.

    akey specifies port's key value. 256*n (n: 1-255) is allowed as value. Actor port key is assigned automatically while the port is added to a aggregator. Generally it is recommended to accept it.

    aps_xx xx is one of ac, to, ag, sy, co, di, de and ex. Each variable is flag of administrative actor port state and takes 1 (true) or 0 (false) as value. Initial value of flag is given while port is registered with system. Generally it is recommended to accept it. aps_ac is LACP ACTIVITY. aps_to is LACP TIMEOUT. aps_ag is AGGREGATION. aps_sy is SYNCHRONIZATION. aps_co is COLLECTING. aps_di is DISTRIBUTING. aps_de is DEFAULTED. aps_ex is EXPIRED.

    psyspri specifies administrative partner system priority. 0-65535 is allowed as value.

    pkey specifies administrative partner port key. 0-65535 is allowed as value.

    ppnum specifies administrative partner port num. 0-65535 is allowed as value.

    pppri specifies administrative partner port priority. 0-65535 is allowed as value.

    pps_xx xx is one of ac, to, ag, sy, co, di, de and ex. Each variable is flag of administrative partner port state and takes 1 (true) or 0 (false) as value. Initial value of flag is given while port is registered with system. Generally it is recommended to accept it. pps_ac is LACP ACTIVITY. pps_to is LACP TIMEOUT. pps_ag is AGGREGATION. pps_sy is SYNCHRONIZATION. pps_co is COLLECTING. pps_di is DISTRIBUTING. pps_de is DEFAULTED. pps_ex is EXPIRED.

PARAMETERS

physical_if
    Specify the physical interface name of ethernet device (E.g. ethX).

virtual_if
    Specify the logical interface name of veth device (vethX).

CONFIGURATION FILE
Configuration file can be used for storing confiuration command sets which are recalled by vethcfg later. Configuration file consists of comment or space lines and command lines. If beginning character of a line is '#' or ';' the line is ignored as comment line. Command line format is same as shell prompt command line format. E.g. "setagg veth0 distalgo dasa" makes aggregator "veth0"'s distributing algorithm DA/SA based hashing. vethcfg reads and executes lines from top to bottom in turn.

FILES

/proc/net/veth
    Link aggregation status of each physical interface.

DEFAULT_CONFIG_FILE
    Default configuration file.

AUTHOR
Yumo (Katsuyuki Yumoto) yumo@st.rim.or.jp