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:
Precaution
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-dd417f1aUse the command line to set the following parameters of an 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.
|
--nics <target_nics> |
Required. The names of all network ports to be associated with the OVS bridge, e.g., eth0 or "eth0 eth1".
|
--bond_mode <bonding_mode> |
Required. Specifies the bonding mode of the virtual distributed switch (VDS) associated with the OVS bridge.
|
--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
|
--bond_name <bonding_name> |
Required. The bond name corresponding to the OVS bridge must be unique.
|
--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 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.
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
| Parameter | Description |
|---|---|
--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.
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.
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>
| Parameter | Description |
|---|---|
--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.
check bond nic complete: all nic connection perfect! is displayed, the connectivity of all network ports in the bond is normal.['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.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.
|
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.
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
default VM network does not have QoS configured.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>
| Parameter | Description |
|---|---|
<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
migrate default vm network to vds_new success! is displayed.