Before network diagnosis, you need to perform the following steps as the root user on the host to configure the IP address and subnet mask of the RoCE NIC and then configure the IP address of the network detection object. Otherwise, the diagnosis may fail.
The hccn_tool is required in this process. The cluster network tool hccn_tool is used for configuring the IP address and gateway, configuring the IP address of the network detection object, and querying the LLDP over a RoCE NIC. Before using this tool, ensure that the driver has been installed and the following requirements are met.
To configure TLS certificates on the host, ensure that the permission on the hccn_tool file is 555 and the permission on the /usr/local/Ascend/driver/tools directory (where the tool is installed) is 755.
For an IPv4 network, run the following command:
hccn_tool -i devid -ip -s address %s netmask %s
Example: hccn_tool -i 0 -ip -s address 192.168.2.10 netmask 255.255.255.0
For an IPv6 network, run the following command:
hccn_tool -i devid -ip -inet6 -s ipv6_address %s prefix_length %d
Example: hccn_tool -i 0 -ip -inet6 -s ipv6_address 20xx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx34 prefix_length 64
Return Value
Parameter Description
Parameter |
Description |
|---|---|
devid |
Device ID |
%s after address |
IP address of the RoCE NIC |
%s after netmask |
Subnet mask |
ip |
IP address |
inet6 |
IPv6 protocol |
prefix_length |
Prefix length of the IP address. The value ranges from 0 to 128. |
This function is used to detect the network status. When multiple servers are used for distributed training, you can set the IP address of the detection object to the gateway address in the network segment. The servers periodically check whether it communicates normally with the object to which the gateway address points. This ensures the detection of the network status at the server parameter plane.
For an IPv6 network, run the following command:
hccn_tool -i devid -netdetect -inet6 -s ipv6_address %s
Example: hccn_tool -i 0 -netdetect -inet6 -s ipv6_address 20xx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx34
For an IPv4 network, run the following command:
hccn_tool -i devid -netdetect -s address %s
Example: hccn_tool -i 0 -netdetect -s address 192.168.2.11
Return Value
Parameter Description
Parameter |
Description |
|---|---|
devid |
Device ID |
netdetect |
IP address of the network detection object |
inet6 |
IPv6 protocol |
s |
Setting flag |
address %s |
IP address |