Interface LinkSetGroupOptionsInternal

Link set group options.

Hierarchy

Properties

address?: string

Change the station address of the interface.

addrgenmode?: AddrGenMode

Set the IPv6 address generation mode.

alias?: string

Give the device a symbolic name for easy reference.

allmulticast?: OnOffToggle

Change the ALLMULTI flag on the device. When enabled, instructs network driver to retrieve all multicast packets from the network to the kernel for further processing.

Change the NOARP flag on the device.

broadcast?: string

Change the link layer broadcast address or the peer address when the interface is POINTOPOINT.

down?: true

Change the state of the device to DOWN.

dynamic?: OnOffToggle

Change the DYNAMIC flag on the device. Indicates that address can change when interface goes down (currently NOT used by the Linux).

group?: number

GROUP has a dual role: If both group and dev are present, then move the device to the specified group. If only a group is specified, then the command operates on all devices in that group.

link-netnsid?: number

Set peer netnsid for a cross-netns interface.

master?: string

Set master device of the device (enslave device).

mtu?: number

Change the MTU of the device.

multicast?: OnOffToggle

Change the MULTICAST flag on the device.

name?: string

Change the name of the device. This operation is not recommended if the device is running or has some addresses already configured.

netns?: string | number

Move the device to the network namespace associated with name NETNSNAME or process PID.

Some devices are not allowed to change network namespace: loopback, bridge, wireless. These are network namespace local devices. In such case ip tool will return "Invalid argument" error. It is possible to find out if device is local to a single network namespace by checking netns-local flag in the output of the ethtool:

ethtool -k DEVICE

To change network namespace for wireless devices the iw tool can be used. But it allows to change network namespace only for physical devices and by process PID.

nomaster?: true

Unset master device of the device (release device).

promisc?: OnOffToggle

Change the PROMISC flag on the device. When enabled, activates promiscuous operation of the network device.

protodown?: OnOffToggle

Change the PROTODOWN state on the device. Indicates that a protocol error has been detected on the port. Switch drivers can react to this error by doing a phys down on the switch port.

protodown_reason?: {
    enable: OnOffToggle;
    name: number;
}

Set PROTODOWN reasons on the device. protodown reason bit names can be enumerated under /etc/iproute2/protodown_reasons.d/.

Possible reasons bits 0-31.

Type declaration

trailers?: OnOffToggle

Change the NOTRAILERS flag on the device, NOT used by the Linux and exists for BSD compatibility.

txqueuelen?: number

Change the transmit queue length of the device.

type?: {
    bareudp: undefined | AddLinkBareudpTypeArgs;
    bond: undefined | true;
    bond_slave: undefined | SetLinkBondSlaveTypeArgs;
    bridge: undefined | AddLinkBridgeTypeArgs;
    bridge_slave: undefined | SetLinkBridgeSlaveTypeArgs;
    can: undefined | AddLinkCanTypeArgs;
    dummy: undefined | true;
    erspan: undefined | AddLinkErspanIp6erspanTypeArgs;
    geneve: undefined | AddLinkGeneveTypeArgs;
    gre: undefined | AddLinkGreGretapTypeArgs;
    gretap: undefined | AddLinkGreGretapTypeArgs;
    hsr: undefined | AddLinkHsrTypeArgs;
    ifb: undefined | true;
    ip6erspan: undefined | AddLinkErspanIp6erspanTypeArgs;
    ip6gre: undefined | AddLinkIp6GreIp6gretapTypeArgs;
    ip6gretap: undefined | AddLinkIp6GreIp6gretapTypeArgs;
    ip6tnl: undefined | true;
    ipip: undefined | AddLinkIpipSitTypeArgs;
    ipoib: undefined | AddLinkIpoibTypeArgs;
    ipvlan: undefined | true;
    ipvtap: undefined | true;
    lowpan: undefined | true;
    macsec: undefined | AddLinkMacsecTypeArgs & SetLinkMacvlanMacvtapTypeArgs;
    macvlan: undefined | AddLinkMacvlanMacvtapTypeArgs;
    macvtap: undefined | AddLinkMacvlanMacvtapTypeArgs;
    netdevsim: undefined | true;
    nlmon: undefined | true;
    rmnet: undefined | AddLinkRmnetTypeArgs;
    sit: undefined | AddLinkIpipSitTypeArgs;
    vcan: undefined | true;
    veth: undefined | AddLinkVethVxcanTypeArgs;
    vlan: undefined | AddLinkVlanTypeArgs;
    vrf: undefined | AddLinkVrfTypeArgs;
    vti: undefined | true;
    vxcan: undefined | AddLinkVethVxcanTypeArgs;
    vxlan: undefined | AddLinkVxlanTypeArgs;
    xfrm: undefined | AddLinkXfrmTypeArgs;
}

Change type-specific settings.

For a list of supported types and arguments refer to LinkAddOptions.type. In addition to that, it is possible to manipulate settings to slave devices type.

Type declaration

up?: true

Change the state of the device to UP.

vf?: number

Specify a Virtual Function device to be configured. The associated PF device must be specified using the dev parameter.

vf_args?: {
    mac?: string;
    max_tx_rate?: number;
    min_tx_rate?: number;
    node_guid?: number;
    port_guid?: number;
    query_rss?: OnOffToggle;
    rate?: number;
    spoofchk?: OnOffToggle;
    state?: EnableDisableAutoToggle;
    trust?: OnOffToggle;
    vlan_list?: {
        proto?: VlanProtocols;
        qos?: number;
        vlan: number;
    }[];
}

Type declaration

  • Optional mac?: string

    Change the station address for the specified VF. The vf parameter must be specified.

  • Optional max_tx_rate?: number

    Change the allowed maximum transmit bandwidth, in Mbps, for the specified VF. Setting this parameter to 0 disables rate limiting. vf parameter must be specified.

  • Optional min_tx_rate?: number

    Change the allowed minimum transmit bandwidth, in Mbps, for the specified VF. Minimum TXRATE should be always <= Maximum TXRATE. Setting this parameter to 0 disables rate limiting. vf parameter must be specified.

  • Optional node_guid?: number

    Configure node GUID for Infiniband VFs.

  • Optional port_guid?: number

    Configure port GUID for Infiniband VFs.

  • Optional query_rss?: OnOffToggle

    Toggle the ability of querying the RSS configuration of a specific VF. VF RSS information like RSS hash key may be considered sensitive on some devices where this information is shared between VF and PF and thus its querying may be prohibited by default.

  • Optional rate?: number

    Change the allowed transmit bandwidth, in Mbps, for the specified VF. Setting this parameter to 0 disables rate limiting. vf parameter must be specified. Please use new API max_tx_rate option instead.

  • Optional spoofchk?: OnOffToggle

    Turn packet spoof checking on or off for the specified VF.

  • Optional state?: EnableDisableAutoToggle

    Set the virtual link state as seen by the specified VF. Setting to auto means a reflection of the PF link state, enable lets the VF to communicate with other VFs on this host even if the PF link state is down, disable causes the HW to drop any packets sent by the VF.

  • Optional trust?: OnOffToggle

    Trust the specified VF user. This enables that VF user can set a specific feature which may impact security and/or performance. (e.g. VF multicast promiscuous mode)

  • Optional vlan_list?: {
        proto?: VlanProtocols;
        qos?: number;
        vlan: number;
    }[]
xdp?: {
    object: undefined | LinkSetXdpObjectOptions;
    off: undefined | LinkSetXdpOffOptions;
    pinned: undefined | LinkSetXdpPinnedOptions;
}

Set (or unset) a XDP ("eXpress Data Path") BPF program to run on every packet at driver level.

ip link output will indicate a xdp flag for the networking device. If the driver does not have native XDP support, the kernel will fall back to a slower, driver-independent "generic" XDP variant.

The ip link output will in that case indicate xdpgeneric instead of xdp only. If the driver does have native XDP support, but the program is loaded under xdpgeneric object | pinned then the kernel will use the generic XDP variant instead of the native one.

xdpdrv has the opposite effect of requestsing that the automatic fallback to the generic XDP variant be disabled and in case driver is not XDP-capable error should be returned. xdpdrv also disables hardware offloads.

xdpoffload in ip link output indicates that the program has been offloaded to hardware and can also be used to request the "offload" mode, much like xdpgeneric it forces program to be installed specifically in HW/FW of the apater.

Type declaration

xdpdrv?: {
    object: undefined | LinkSetXdpObjectOptions;
    off: undefined | LinkSetXdpOffOptions;
    pinned: undefined | LinkSetXdpPinnedOptions;
}

Type declaration

See

xdp

xdpgeneric?: {
    object: undefined | LinkSetXdpObjectOptions;
    off: undefined | LinkSetXdpOffOptions;
    pinned: undefined | LinkSetXdpPinnedOptions;
}

Type declaration

See

xdp

xdpoffload?: {
    object: undefined | LinkSetXdpObjectOptions;
    off: undefined | LinkSetXdpOffOptions;
    pinned: undefined | LinkSetXdpPinnedOptions;
}

Type declaration

See

xdp

Generated using TypeDoc