vinfra node iface create-bond
Create a network bonding:
usage: vinfra node iface create-bond [--ipv4 <ipv4>] [--ipv6 <ipv6>] [--gw4 <gw4>] [--gw6 <gw6>] [--mtu <mtu>] [--dhcp4 | --no-dhcp4] [--dhcp6 | --no-dhcp6] [--auto-routes-v4 | --ignore-auto-routes-v4] [--auto-routes-v6 | --ignore-auto-routes-v6] [--bonding-opts <bonding_opts>] [--network <network>] [--node <node>] --bond-type <bond-type> --ifaces <ifaces>
--ipv4 <ipv4>
- A comma-separated list of IPv4 addresses
--ipv6 <ipv6>
- A comma-separated list of IPv6 addresses
--gw4 <gw4>
- Gateway IPv4 address
--gw6 <gw6>
- Gateway IPv6 address
--mtu <mtu>
- MTU interface value
--dhcp4
- Enable DHCPv4
--no-dhcp4
- Disable DHCPv4
--dhcp6
- Enable DHCPv6
--no-dhcp6
- Disable DHCPv6
--auto-routes-v4
- Enable automatic IPv4 routes
--ignore-auto-routes-v4
- Ignore automatic IPv4 routes
--auto-routes-v6
- Enable automatic IPv6 routes
--ignore-auto-routes-v6
- Ignore automatic IPv6 routes
--network <network>
- Network ID or name
--bonding-opts <bonding_opts>
- Additional bonding options
--bond-type <bond-type>
- Bond type (
balance-rr
,active-backup
,balance-xor
,broadcast
,802.3ad
,balance-tlb
,balance-alb
) --node <node>
- Node ID or hostname (default:
node001.vstoragedomain
) --ifaces <ifaces>
- A comma-separated list of network interface names, for example,
iface1,iface2,…,iface<N>
Example:
# vinfra node iface create-bond --ifaces eth2,eth3 --bond-type balance-xor \ --dhcp4 --node fd1e46de-6e17-4571-bf6b-1ac34ec1c225 +---------+--------------------------------------+ | Field | Value | +---------+--------------------------------------+ | task_id | becf96ad-9e39-4bec-b82c-4e1219a196de | +---------+--------------------------------------+
This command creates a task to bond network interfaces eth2
and eth3
into bond0
of the type balance-xor
on the node with the ID fd1e46de-6e17-4571-bf6b-1ac34ec1c225
.
Task outcome:
# vinfra task show becf96ad-9e39-4bec-b82c-4e1219a196de +---------+------------------------------------------------------------------+ | Field | Value | +---------+------------------------------------------------------------------+ | args | - fd1e46de-6e17-4571-bf6b-1ac34ec1c225 | | kwargs | bond_type: balance-xor | | | ifaces: | | | - eth2 | | | - eth3 | | | registration_token: 3102ed1a | | name | backend.presentation.network.tasks.NetworkInterfaceCreateBonding | | result | bond_type: balance-xor | | | dhcp4: 10.37.130.117 | | | dhcp4_enabled: true | | | dhcp6: fe80::21c:42ff:fe81:27d0 | | | dhcp6_enabled: true | | | duplex: null | | | gw4: 10.94.0.1 | | | gw6: null | | | ignore_auto_routes_v4: false | | | ignore_auto_routes_v6: false | | | ipv4: | | | - 10.37.130.117/24 | | | ipv6: | | | - fe80::21c:42ff:fe81:27d0/64 | | | mac_addr: 00:1c:42:81:27:d0 | | | mtu: 1500 | | | multicast: true | | | name: bond0 | | | node_id: fd1e46de-6e17-4571-bf6b-1ac34ec1c225 | | | plugged: true | | | roles_set: '' | | | rx_bytes: 3048 | | | rx_dropped: 0 | | | rx_errors: 0 | | | rx_overruns: 0 | | | rx_packets: 22 | | | speeds: | | | current: null | | | max: null | | | state: up | | | tx_bytes: 1782 | | | tx_dropped: 0 | | | tx_errors: 0 | | | tx_overruns: 0 | | | tx_packets: 13 | | | type: bonding | | state | success | | task_id | becf96ad-9e39-4bec-b82c-4e1219a196de | +---------+------------------------------------------------------------------+