2.7. Managing node network interfaces¶
2.7.1. vinfra node iface list¶
List node network interfaces:
usage: vinfra node iface list [--long] [-a | --node <node>]
--long
- Enable access and listing of all fields of objects.
-a, --all
- List all network interfaces on all nodes
--node <node>
- Node ID or hostname to list network interfaces on (default:
node001.vstoragedomain
)
Example:
This command shows network interfaces of the node with the ID 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
.
# vinfra node iface list --node 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
+------+--------------------------------------+--------------------+-------+---------+
| name | node_id | ipv4 | state | network |
+------+--------------------------------------+--------------------+-------+---------+
| eth0 | 4f96acf5-3bc8-4094-bcb6-4d1953be7b55 | - 10.94.29.218/16 | up | Public |
| eth1 | 4f96acf5-3bc8-4094-bcb6-4d1953be7b55 | - 10.37.130.101/24 | up | Private |
+------+--------------------------------------+--------------------+-------+---------+
2.7.2. vinfra node iface show¶
Show details of a network interface:
usage: vinfra node iface show [--node <node>] <iface>
--node <node>
- Node ID or hostname (default:
node001.vstoragedomain
) <iface>
- Network interface name
Example:
# vinfra node iface show eth0 --node 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| contained_in | |
| dhcp4 | 10.94.29.218 |
| dhcp4_enabled | True |
| dhcp6 | fe80::21c:42ff:fe2a:4fdf |
| dhcp6_enabled | True |
| dns4 | - 127.0.0.1 |
| dns6 | [] |
| duplex | |
| gw4 | 10.94.0.1 |
| gw6 | |
| ignore_auto_dns_v4 | False |
| ignore_auto_dns_v6 | False |
| ignore_auto_routes_v4 | False |
| ignore_auto_routes_v6 | False |
| ipv4 | - 10.94.29.218/16 |
| ipv6 | - fe80::21c:42ff:fe2a:4fdf/64 |
| mac_addr | 00:1c:42:2a:4f:df |
| mtu | 1500 |
| multicast | True |
| name | eth0 |
| node_id | 4f96acf5-3bc8-4094-bcb6-4d1953be7b55 |
| plugged | True |
| roles_set | 237e58dd-6c10-49c1-be7f-7ddf7de2efd1 |
| rx_bytes | 1844502614 |
| rx_dropped | 0 |
| rx_errors | 0 |
| rx_overruns | 0 |
| rx_packets | 11543284 |
| speeds | current: null |
| | max: null |
| state | up |
| tx_bytes | 28477979 |
| tx_dropped | 0 |
| tx_errors | 0 |
| tx_overruns | 0 |
| tx_packets | 107649 |
| type | iface |
+-----------------------+--------------------------------------+
This command shows the details of the network interface eth0
located on the node with the ID 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
.
2.7.3. vinfra node iface up¶
Bring a network interface up:
usage: vinfra node iface up [--node <node>] <iface>
--node <node>
- Node ID or hostname (default:
node001.vstoragedomain
) <iface>
- Network interface name
Example:
# vinfra node iface up eth2 --node 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| contained_in | |
| dhcp4 | 10.37.130.138 |
| dhcp4_enabled | True |
| dhcp6 | fe80::21c:42ff:fef8:5b90 |
| dhcp6_enabled | True |
| dns4 | - 127.0.0.1 |
| dns6 | [] |
| duplex | |
| gw4 | 10.94.0.1 |
| gw6 | |
| ignore_auto_dns_v4 | False |
| ignore_auto_dns_v6 | False |
| ignore_auto_routes_v4 | False |
| ignore_auto_routes_v6 | False |
| ipv4 | - 10.37.130.138/24 |
| ipv6 | - fe80::21c:42ff:fef8:5b90/64 |
| mac_addr | 00:1c:42:f8:5b:90 |
| mtu | 1500 |
| multicast | True |
| name | eth2 |
| node_id | 4f96acf5-3bc8-4094-bcb6-4d1953be7b55 |
| plugged | True |
| roles_set | |
| rx_bytes | 97632 |
| rx_dropped | 0 |
| rx_errors | 0 |
| rx_overruns | 0 |
| rx_packets | 1258 |
| speeds | current: null |
| | max: null |
| state | up |
| tx_bytes | 1116 |
| tx_dropped | 0 |
| tx_errors | 0 |
| tx_overruns | 0 |
| tx_packets | 8 |
| type | iface |
+-----------------------+--------------------------------------+
This command brings up the network interface eth2
located on the node with the ID 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
.
2.7.4. vinfra node iface down¶
Bring a network interface down:
usage: vinfra node iface down [--node <node>] <iface>
--node <node>
- Node ID or hostname
<iface>
- Network interface name
Example:
# vinfra node iface down eth2 --node 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| contained_in | |
| dhcp4 | |
| dhcp4_enabled | True |
| dhcp6 | |
| dhcp6_enabled | True |
| dns4 | - 127.0.0.1 |
| dns6 | [] |
| duplex | |
| gw4 | 10.94.0.1 |
| gw6 | |
| ignore_auto_dns_v4 | False |
| ignore_auto_dns_v6 | False |
| ignore_auto_routes_v4 | False |
| ignore_auto_routes_v6 | False |
| ipv4 | [] |
| ipv6 | [] |
| mac_addr | 00:1c:42:f8:5b:90 |
| mtu | 1500 |
| multicast | True |
| name | eth2 |
| node_id | 4f96acf5-3bc8-4094-bcb6-4d1953be7b55 |
| plugged | False |
| roles_set | |
| rx_bytes | 97984 |
| rx_dropped | 0 |
| rx_errors | 0 |
| rx_overruns | 0 |
| rx_packets | 1264 |
| speeds | current: null |
| | max: null |
| state | down |
| tx_bytes | 1116 |
| tx_dropped | 0 |
| tx_errors | 0 |
| tx_overruns | 0 |
| tx_packets | 8 |
| type | iface |
+-----------------------+--------------------------------------+
This command brings down the network interface eth2
located on the node with the ID 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
.
2.7.5. vinfra node iface set¶
Modify network interface parameters (overwrite the omitted options with the default values for the interface):
usage: vinfra node iface set [--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]
[--network <network> | --no-network]
[--connected-mode | --datagram-mode] [--node <node>] <iface>
--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
--no-network
- Remove a network from the interface
--connected-mode
- Enable connected mode (InfiniBand interfaces only)
--datagram-mode
- Enable datagram mode (InfiniBand interfaces only)
--node <node>
- Node ID or hostname (default:
node001.vstoragedomain
) <iface>
- Network interface name
Example:
# vinfra node iface set eth2 --network Private \
--node 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
+---------+--------------------------------------+
| Field | Value |
+---------+--------------------------------------+
| task_id | 8a378098-6760-4fe9-ac20-1f18a8ed9d2e |
+---------+--------------------------------------+
This command creates a task to assign the network interface eth2
located on the node with the ID 4f96acf5-3bc8-4094-bcb6-4d1953be7b55
to the network Private
.
Task outcome:
# vinfra task show 8a378098-6760-4fe9-ac20-1f18a8ed9d2e
+---------+---------------------------------------------------------------+
| Field | Value |
+---------+---------------------------------------------------------------+
| args | - 4f96acf5-3bc8-4094-bcb6-4d1953be7b55 |
| | - eth2 |
| kwargs | roles_set: 6095a997-e5f1-493d-a750-41ddf277153b |
| name | backend.presentation.network.tasks.NetworkInterfaceChangeTask |
| result | contained_in: null |
| | dhcp4: null |
| | dhcp4_enabled: false |
| | dhcp6: null |
| | dhcp6_enabled: false |
| | duplex: null |
| | gw4: null |
| | gw6: null |
| | ignore_auto_routes_v4: true |
| | ignore_auto_routes_v6: true |
| | ipv4: |
| | - 10.37.130.103/24 |
| | ipv6: |
| | - fe80::21c:42ff:fe75:7c4d/64 |
| | mac_addr: 00:1c:42:75:7c:4d |
| | mtu: 1500 |
| | multicast: true |
| | name: eth2 |
| | node_id: 4f96acf5-3bc8-4094-bcb6-4d1953be7b55 |
| | plugged: true |
| | roles_set: 6095a997-e5f1-493d-a750-41ddf277153b |
| | rx_bytes: 38156 |
| | rx_dropped: 0 |
| | rx_errors: 0 |
| | rx_overruns: 0 |
| | rx_packets: 225 |
| | speeds: |
| | current: null |
| | max: null |
| | state: up |
| | tx_bytes: 13087 |
| | tx_dropped: 0 |
| | tx_errors: 0 |
| | tx_overruns: 0 |
| | tx_packets: 145 |
| | type: iface |
| state | success |
| task_id | 8a378098-6760-4fe9-ac20-1f18a8ed9d2e |
+---------+---------------------------------------------------------------+
2.7.6. 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] [--network <network>]
[--auto-routes-v4 | --ignore-auto-routes-v4]
[--auto-routes-v6 | --ignore-auto-routes-v6]
[--bonding-opts <bonding_opts>] [--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, e.g.,
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.NetworkInterfaceCreateBondingTask |
| 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 |
+---------+----------------------------------------------------------------------+
2.7.7. vinfra node iface create-vlan¶
Create a VLAN:
usage: vinfra node iface create-vlan [--ipv4 <ipv4>] [--ipv6 <ipv6>] [--gw4 <gw4>]
[--gw6 <gw6>] [--mtu <mtu>] [--dhcp4 | --no-dhcp4]
[--dhcp6 | --no-dhcp6] [--network <network>]
[--auto-routes-v4 | --ignore-auto-routes-v4]
[--auto-routes-v6 | --ignore-auto-routes-v6]
[--node <node>] --iface <iface> --tag <tag>
--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
--node <node>
- Node ID or hostname (default:
node001.vstoragedomain
) --iface <iface>
- Interface name
--tag <tag>
- VLAN tag number
Example:
# vinfra node iface create-vlan --iface eth2 --tag 100 --dhcp4 \
--node fd1e46de-6e17-4571-bf6b-1ac34ec1c225
+---------+--------------------------------------+
| Field | Value |
+---------+--------------------------------------+
| task_id | 0b978acd-367b-47ad-8572-4f4e6ffb8877 |
+---------+--------------------------------------+
This command creates a task to create a VLAN with the tag 100
on the network interface eth2
on the node with the ID fd1e46de-6e17-4571-bf6b-1ac34ec1c225
.
Task outcome:
# vinfra task show 0b978acd-367b-47ad-8572-4f4e6ffb8877
+---------+-------------------------------------------------------------------+
| Field | Value |
+---------+-------------------------------------------------------------------+
| args | - fd1e46de-6e17-4571-bf6b-1ac34ec1c225 |
| kwargs | iface: eth2 |
| | tag: 100 |
| name | backend.presentation.network.tasks.NetworkInterfaceCreateVlanTask |
| result | built_on: eth2 |
| | dhcp4: null |
| | dhcp4_enabled: false |
| | dhcp6: null |
| | dhcp6_enabled: false |
| | duplex: null |
| | gw4: null |
| | gw6: null |
| | ignore_auto_routes_v4: true |
| | ignore_auto_routes_v6: true |
| | ipv4: [] |
| | ipv6: |
| | - fe80::21c:42ff:fe81:27d0/64 |
| | mac_addr: 00:1c:42:81:27:d0 |
| | mtu: 1500 |
| | multicast: true |
| | name: eth2.100 |
| | node_id: fd1e46de-6e17-4571-bf6b-1ac34ec1c225 |
| | plugged: true |
| | roles_set: '' |
| | rx_bytes: 0 |
| | rx_dropped: 0 |
| | rx_errors: 0 |
| | rx_overruns: 0 |
| | rx_packets: 0 |
| | speeds: |
| | current: null |
| | max: null |
| | state: up |
| | tag: 100 |
| | tx_bytes: 738 |
| | tx_dropped: 0 |
| | tx_errors: 0 |
| | tx_overruns: 0 |
| | tx_packets: 7 |
| | type: vlan |
| state | success |
| task_id | 0b978acd-367b-47ad-8572-4f4e6ffb8877 |
+---------+-------------------------------------------------------------------+
2.7.8. vinfra node iface delete¶
Delete a network interface:
usage: vinfra node iface delete [--node <node>] <iface>
--node <node>
- Node ID or hostname (default:
node001.vstoragedomain
) <iface>
- Network interface name
Example:
# vinfra node iface delete --node fd1e46de-6e17-4571-bf6b-1ac34ec1c225 eth2.100
+---------+--------------------------------------+
| Field | Value |
+---------+--------------------------------------+
| task_id | 16503616-6c1c-48f9-999a-9d87b617d9ee |
+---------+--------------------------------------+
This command creates a task to delete a VLAN interface eth1.100
from the node with the ID fd1e46de-6e17-4571-bf6b-1ac34ec1c225
.
Task outcome:
# vinfra task show 16503616-6c1c-48f9-999a-9d87b617d9ee
+---------+---------------------------------------------------------------+
| Field | Value |
+---------+---------------------------------------------------------------+
| details | |
| name | backend.presentation.network.tasks.NetworkInterfaceRemoveTask |
| result | |
| state | success |
| task_id | 16503616-6c1c-48f9-999a-9d87b617d9ee |
+---------+---------------------------------------------------------------+