API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary
    ACOS 6.3.0
  • Arcfra Cloud Operating System>
  • CLI command>
  • Managing networks

Managing NICs

Use the command line to view and modify the physical ports associated with the OVS bridge in the virtual distributed switch, as well as the bonding modes of these ports.

This command is mainly applicable in the following scenarios:

  • Replacing a NIC.
  • Changing the NIC associated with the OVS bridge on a host.
  • Modifying the bonding mode of the NIC associated with the OVS bridge.

Precaution

  • Replacing a NIC requires modifying the virtual OVS bridge information on the node host and synchronizing the changes to the database.
  • Replacing a NIC requires that no data recovery is in progress on the node. If data recovery is in progress, the time to complete it may vary depending on the workload. It is recommended to replace the NIC when the node is under low workload.

Obtaining the NIC bond name corresponding to the network bridge

Obtain the bond name corresponding to the OVS bridge on a running node.

Procedure

Run the following command on the node:

network-tool get-bond-name --ovsbr_name <ovsbr_name>

--ovsbr_name <ovsbr_name> The OVS bridge name for which to obtain the bond name.

Usage example

network-tool get-bond-name --ovsbr_name ovsbr-n5b9qlfm2

Output example

2022-05-18 12:44:33,892 [72353] [INFO] bond_name: bond-m-dd417f1a

Setting OVS bridge parameters

Use the command line to set the following parameters of an OVS bridge:

  • The OVS bridge name
  • The NIC associated with the OVS bridge
  • The bonding mode of the virtual distributed switch (VDS) associated with the OVS bridge

Procedure

Run the following command on the node where the OVS bridge resides:

network-tool change-bridge {argument list}

Parameter description

Parameter Description
--ovsbr_name <ovsbr_name_to_be_changed> Required. The OVS bridge name before updating.
--old_port_name <old_port_name> Required. The physical network port name or bond name associated with the OVS bridge before replacing the NIC.
  • If the OVS bridge is not associated with any network port: <old_port_name> is None.
  • If the OVS bridge is associated with a single physical network port: <old_port_name> is the name of the currently associated physical network port.
  • If the OVS bridge is associated with multiple physical network ports, use network-tool get-bond-name --ovsbr_name <ovsbr_name> to obtain the network port bond name corresponding to the OVS bridge, which is the bond_name value.
--nics <target_nics> Required. The names of all network ports to be associated with the OVS bridge, e.g., eth0 or "eth0 eth1".
  • If multiple network ports are to be associated, list their names separated by spaces and enclose them in double quotes (" ") if any name contains spaces. For example, "eth0 eth1".
  • Ensure that the network ports are not associated with other OVS bridges.
--bond_mode <bonding_mode> Required. Specifies the bonding mode of the virtual distributed switch (VDS) associated with the OVS bridge.
  • If the OVS bridge is associated with a single network port, bonding cannot be set; the value is None.
  • If the OVS bridge is associated with the storage network, VDS uses the OVS bonding mode, including:
    • active-backup (OVS bond)
    • balance-slb: This bond mode is not supported if RDMA is enabled for the storage network.
    • balance-tcp: Requires the peer switch to enable LACP dynamic link aggregation.
--rb_interval <rb_interval> Optional. The rebalance interval when the bonding mode is balance-slb. Required only for the balance-slb mode; for other bonding modes, this parameter --rb_interval <rb_interval> are not needed.

If the port bonding mode is balance-slb:

  • Disable rebalance: set <rb_interval> to 0.
  • Use the default rebalance interval of 60 seconds: either omit the --rb_interval <rb_interval> or set it to --rb_interval "".
  • Set a custom rebalance interval: set <rb_interval> to a positive integer.
--bond_name <bonding_name> Required. The bond name corresponding to the OVS bridge must be unique.
  • When converting between single network ports, obtain the bond name by running the network-tool get-bond-name --ovsbr_name <ovsbr_name> command.
  • When converting from a single network port or a Linux bond to an OVS bond, <bonding_name> cannot be bond0, bond1, or bond2.
  • When converting from a single network port or an OVS bond to a Linux bond, <bonding_name> is fixed: bond0 for the access network, bond1 for the management network, and bond2 for the storage network.
  • When converting from an OVS bond to a single network port, the bond name cannot be changed and must match the old_port_name.
  • When converting from one OVS bond to another, the bond name cannot be changed and must match old_port_name.
  • When converting from a Linux bond to a single network port, set <bonding_name> to None.
  • When converting from a Linux bond to an OVS bond, the OVS bridge uses the new bond name after conversion.
--active_slave <active_nic_name> Optional. Required only when the bonding mode is active-backup. Specifies the active NIC. If not specified, the system automatically selects one.
--mcast_snooping <current_mcast_snooping>

Required. Specify the value based on the current IGMP or MLD snooping configuration of the VDS associated with the OVS bridge. If IGMP or MLD snooping is currently enabled, set this parameter to enable. In other cases, set it to disable.

Note:

This parameter cannot be used to enable or disable IGMP or MLD snooping on the VDS. It only indicates the current IGMP or MLD snooping configuration of the VDS.

Usage example

Configure parameters for the OVS bridge named ovsbr-mgt. Update a single network port (eth0) to dual network ports (eth0 and eth1). The associated VDS uses the balance-slb bonding mode of OVS bonding, with a rebalance interval of 80 seconds. The new bond name corresponding to the OVS bridge is bond-mgt.

network-tool change-bridge --ovsbr_name ovsbr-mgt --old_port_name eth0 --nics "eth0 eth1" --bond_mode balance-slb --rb_interval 80 --bond_name bond-mgt --mcast_snooping disable

If RDMA is enabled for the storage network, configure parameters for the OVS bridge that is originally named ovsbr-stor. Change the Linux bond 802.3ad mode to OVS bond balance-tcp mode (eth0 and eth1). The new bond name that corresponds to the OVS bridge is bond-storage.

network-tool change-bridge --ovsbr_name ovsbr-stor --old_port_name bond2 --nics "eth0 eth1" --bond_mode balance-tcp --bond_name bond-storage --mcast_snooping disable

Output note

If change bridge finish is displayed, the OVS bridge information has been updated successfully.

Synchronizing updated OVS bridge NIC information to the database

Synchronize the updated OVS bridge information to the database.

Procedure

Run the following command on the node where the OVS bridge resides:

network-tool sync-bridge {argument list}

Parameter description

ParameterDescription
--ovsbr_name <ovsbr_name_to_be_changed>Required. The name of the OVS bridge to be updated.
--bond_mode <bonding_mode>Required. The bonding mode of the virtual distributed switch (VDS) associated with the OVS bridge. Must be the same as the --bond_mode <bonding_mode> used when setting OVS bridge parameters.
--bond_name <bonding_name>Required. The bond name corresponding to the OVS bridge. Must be the same as the --bond_name <bonding_name> used when setting OVS bridge parameters.
--nics <uplink_nics>Optional. Format: --nics "eth0 eth1". Required if the network-tool change-bridge command is used to disassociate a faulty NIC from the OVS bridge. The value must match the --nics <target_nics> in the command.
--active_slave <active_nic_name>Optional. Required only when the bonding mode is active-backup. Specifies the active NIC. If not specified, the system automatically selects one.

Usage example

network-tool sync-bridge --ovsbr_name ovsbr-mgt --bond_mode balance-slb --bond_name bond-mgt --nics "eth0 eth1"

Output note

If sync successfully is displayed, the data has been successfully synchronized.

Precaution

After all nodes have completed OVS bridge information synchronization, if the last node that executed the network-tool sync-bridge command has a single network port while other nodes have multiple network ports, you need to select any node with multiple network ports and execute network-tool sync-bridge again.

Obtaining the physical network ports in a Linux bond

Procedure

Run the following command on the node where the OVS bridge resides to obtain information about the physical network ports contained in the Linux bond:

network-tool get-linux-bond-list

Output note

Output the physical network ports in a Linux bond.

Testing the connectivity of the OVS bonding network ports

Procedure

Run the following command on the node where the OVS bridge resides to test the connectivity of the physical network ports contained in the OVS bond.

Information:

  • This command can only test the connectivity of network ports bonded in the VDS of the management network and storage network.
  • During the test, the command performs ifdown/ifup operations on the bond network ports, which may cause a brief network interruption.

network-tool check-ovs-bond-nics --bond_mode <bond_mode>

ParameterDescription
--bond_mode <bond_mode>Required. Tests the connectivity of network ports in the specified bond type. Valid values: "active-backup" and "balance-slb".

Usage example

network-tool check-ovs-bond-nics --bond_mode "active-backup"

Output note

The output shows the connectivity test results of each network port in the bond to other nodes.

  • If check bond nic complete: all nic connection perfect! is displayed, the connectivity of all network ports in the bond is normal.
  • If ['eth2 can not ping xx.xx.xx.xx', 'eth2 can not ping xx.xx.xx.xx'] is displayed, the eth2 network port in the bond cannot reach the target nodes.

Changing the node management network IP

Procedure

Run the following command on a cluster node to change its management IP address:

network-tool change-manage-ip <ip> <netmask> <gateway> [--vlan_id <vlan_id>]

Parameter Description
ip The management network IP address.
netmask The subnet mask of the IP address.
gateway The gateway address.
--vlan_id <vlan_id> The VLAN ID of the management network.
  • If not specified, the VLAN ID of the management network will not be updated.
  • Specify --vlan_id 0 if the physical switch port has changed from Trunk to Access.

Output example

Displays the configuration process. If the output shows change management ip address success!, the management IP address of the node has been successfully modified.

Migrating the default VM network to another VDS

After cluster deployment is complete, a VM network named default is automatically created on the VDS where the management network resides. If you need to migrate the default VM network to another VDS, follow the instructions in this section. After migration, the MTU of the default VM network will be reset to 1500.

Prerequisite

  • The default VM network does not have QoS configured.
  • The default VM network is not associated with any virtual machines, VM snapshots, or VM templates that have virtual NICs configured.

Procedure

Run the following command on any cluster node to migrate the default VM network to another VDS:

network-tool migrate-default-network --vds_name <vds_name>

ParameterDescription
<vds_name>The name of the target VDS to which the default VM network will be migrated.

Usage example

network-tool migrate-default-vm --vds_name vds_new

Output note

  • If the migration fails, the corresponding failure reason is displayed.
  • If the migration succeeds, the message migrate default vm network to vds_new success! is displayed.