Using Commands; Using A Configuration File - Huawei IN200 User Manual

Ethernet nic
Table of Contents

Advertisement

Huawei IN200 NIC
User Guide

5.3.1 Using Commands

This section uses CentOS 7.4 as an example to describe how to configure bonding using
commands.
This method takes effect temporarily. After the network service is reset in the OS or the OS is
restarted, the configuration is lost.
Step 1 Log in to the server OS as the root user, right-click the OS desktop, and choose Open
Terminal from the shortcut menu.
Step 2 Run the following command to find the port in the up state:
ibdev2netdev
Step 3 Run the following commands in sequence to create bond0 (ports enp6s0 and enp7s0 are
examples):
modprobe -first-time bonding
echo X > /sys/class/net/bond0/bonding/mode #The X value can be 1, 2, or 4.
ifconfig bond0 up
ifenslave bond0 enp6s0 enp7s0
echo 100 > /sys/class/net/bond0/bonding/miimon #miimon: interval for checking the
network, in milliseconds
Step 4 Run the following command to create an IP address of bond0:
ifconfig bond0 IP #IP specifies the IP address of bond0.
----End

5.3.2 Using a Configuration File

This section uses CentOS 7.4 as an example to describe how to configure bonding using a
configuration file.
Step 1 Log in to the server OS as the root user, right-click the OS desktop, and choose Open
Terminal from the shortcut menu.
Step 2 Run the following command to find the port in the up state:
ibdev2netdev
Issue 06 (2019-07-27)
NOTE
l In the preceding command, X specifies the bonding mode.
l If mode is set to 1, the switch is configured properly. If mode is set to 2, the switch must be
configured with a trunk. If mode is set to 4, the trunk of the switch must be configured to the static
LACP mode. It is recommended that the rate be set to the same value as that of bonding.
l If mode is set to 4, you need to configure lacp_rate.
echo 1 > /sys/class/net/bond0/bonding/lacp_rate
Copyright © Huawei Technologies Co., Ltd.
5 Configuring RoCE Bonding
45

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents