Editing network interfaces

Limitations

  • A network can only be assigned to one network interface per node.

Prerequisites

  • If you want to change the default MTU, it must be configured on the network hardware.

To edit a network interface

Admin panel

  1. On the Infrastructure > Nodes screen, click the name of the node, go to the Network interfaces tab, and then click the network interface.
  2. On the interface right pane, click Edit.
  3. In the Edit network interface window, select a network to assign the interface to, and then specify the network parameters:

    • Select Automatically (DHCP) to obtain the IP address, DNS, and routing settings from the DHCP server.
    • Select Automatically (DHCP address only) to obtain only the IP address from the DHCP server.
    • Select Manually, and then specify the IP address in CIDR notation by clicking Add.

    Dynamic IP address allocation will cause network issues as soon as the IP addresses of cluster nodes change. Configure static IP addresses from the start or as soon as possible.

  4. Specify a gateway. The provided gateway will become the node’s default.

  5. If you have set a custom maximum transmission unit (MTU) on the network hardware, enter the same value in the MTU field.

    Setting a custom MTU in the admin panel prior to configuring it on the network hardware will result in network failure on the node and require manual resetting. Setting an MTU that differs from the one configured on the network hardware may result in a network outage or poor performance.

  6. Click Save to apply your changes.

Command-line interface

Use the following command:

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] [--ifaces <ifaces>]
                      [--bond-type <bond-type>] [--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
--ifaces <ifaces>
A comma-separated list of network interface names, for example, iface1,iface2,...,ifaceN
--bond-type <bond-type>

Bond type (balance-rr, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb)

Bond type for an OVS interface (balance-tcp, active-backup)

--node <node>
Node ID or hostname (default: node001.vstoragedomain)
<iface>
Network interface name

Example 1. To assign the network MyNet to the network interface eth2 located on the node node002, run:

# vinfra node iface set eth2 --network MyNet --node node002

Example 2. To unassign a network from the network interface eth2 located on the node node002, run:

# vinfra node iface set eth2 --node node002 --no-network

Example 3. To enable IP address allocation via DCHP for the network interface eth2 located on the node node002, run:

# vinfra node iface set eth2 --node node002 --dhcp4

Example 4. To disable DHCP and set the IP address 192.168.30.20/24 for the network interface eth2 located on the node node002, run:

# vinfra node iface set eth2 --node node002 --no-dhcp4 --ipv4 192.168.30.20/24

Example 5. To change the bond type of the network bond bond0 located on the node node002 to balance-xor, run:

# vinfra node iface set bond0 --node node002 --bond-type balance-xor

The updated interface will be listed in the vinfra node iface list output:

# vinfra node iface list --node node002
+------+----------------+--------------------+-------+---------+
| name | node_id        | ipv4               | state | network |
+------+----------------+--------------------+-------+---------+
| eth0 | 4f96acf5-<...> | - 10.94.29.218/16  | up    | Public  |
| eth1 | 4f96acf5-<...> | - 10.37.130.101/24 | up    | Private |
| eth2 | 4f96acf5-<...> | - 192.168.30.20/24 | up    | MyNet   |
+------+----------------+--------------------+-------+---------+