No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

S1720, S2700, S5700, and S6720 V200R011C10

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
NETCONF Configuration Commands

NETCONF Configuration Commands

Command Support

Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support NETCONF.

callhome

Function

The callhome command creates a callhome template and displays the callhome template view.

The undo callhome command deletes a callhome template.

By default, no callhome template exists on a switch.

Format

callhome callhome-name

undo callhome callhome-name

Parameters

Parameter Description Value
callhome-name

The name of a callhome template.

The value is a string of 1 to 31 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

Views

NETCONF view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the NMS needs to configure and manage a switch in NETCONF over SSH Callhome mode, the switch actively sets up a NETCONF connection with the NMS. Run the callhome command to create a callhome template.

Follow-up Procedure

Run the ip address (callhome template view) command to configure the NMS IP address and port number.

Precautions

Only one callhome template can be created on a switch. To create a new callhome template, delete the existing one by running the undo callhome callhome-name command. After this command is run, communication between the switch and NMS is interrupted.

Example

# Create the callhome template Huawei and display the callhome template view.

<HUAWEI> system-view
[HUAWEI] netconf
[HUAWEI-netconf] callhome Huawei
[HUAWEI-netconf-callhome-Huawei]

display linux network status

Function

The display linux network status command displays information of transport layer connections.

Format

display linux network status

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the display network status command to view which transport-layer ports are in use. However, this command does not display the transport-layer ports used in NETCONF connections set up between the switch and remote device. To view these ports, run the display linux network status command.

Example

# Display information of transport layer connections.

<HUAWEI> display linux network status
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 192.168.20.102:55800    192.168.10.7:55804      ESTABLISHED
tcp        0      0 192.168.20.103:55801    192.168.10.8:55805      ESTABLISHED
tcp        0      0 192.168.20.104:55803    192.168.10.9:55806      ESTABLISHED
Table 16-85  Description of the display linux network status command output

Item

Description

Active Internet connections (servers and established) Information of transport layer connections.
Proto Transport layer protocol:
  • tcp
  • udp
Recv-Q The count of bytes not copied by the user program connected to this socket.
Send-Q The count of bytes not acknowledged by the remote host.
Local Address IP address and TCP port used by the switch to set up a connection with the remote end.
Foreign Address IP address and TCP port used by the remote end to set up a connection with the switch.
State status of the connection:
  • ESTABLISHED: The socket has an established connection.
  • SYN_SENT: The socket is actively attempting to establish a connection.
  • SYN_RECV: A connection request has been received from the network.
  • FIN_WAIT1: The socket is closed, and the connection is shutting down.
  • FIN_WAIT2: Connection is closed, and the socket is waiting for a shutdown from the remote end.
  • TIME_WAIT: The socket is waiting after close to handle packets still in the network.
  • CLOSE_WAIT: The remote end has shut down, waiting for the socket to close.
  • LAST_ACK: The remote end has shut down, and the socket is closed. Waiting for acknowledgement.
  • LISTEN: The socket is listening for incoming connections.
  • CLOSING: Both sockets are shut down but we still don't have all our data sent.
  • CLOSED: The socket is not being used.

display netconf all

Function

The display netconf all command displays the NETCONF configuration on a switch.

Format

display netconf all

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

To view the NETCONF configuration on a switch, run this command.

Example

# View the NETCONF configuration on the switch.
<HUAWEI> display netconf all
Netconf status       : enable
Netconf src-ip       : 192.168.150.20
Netconf src-ipv6     : --
Netconf src-port     : 55555
Controller information:
No Mode     name                             IP               Port  Connected   
------------------------------------------------------------------------------  
1  callhome -                                -                -     N           
2  ssh      -                                10.134.27.157    55555 Y           
3  ssh      -                                -                -     N           
4  ssh      -                                -                -     N           
5  ssh      -                                -                -     N           
6  ssh      -                                -                -     N           
Table 16-86  Description of the display netconf all command output
Item Description
Netconf status Status of the NETCONF function:
  • enable: The function is enabled.
  • disable: The function is disabled.

To configure the NETCONF function, run the netconf command.

Netconf src-ip

IPv4 address of the switch.

To configure the IPv4 address of the switch, run the source ip command.

Netconf src-ipv6

IPv6 address of the switch.

To configure the IPv6 address of the switch, run the source ipv6-address command.

Netconf src-port
  • This parameter is the port number used by the switch in NETCONF over SSH Callhome mode.
  • This parameter is the port number used by the switch and NMS in NETCONF over SSH mode.

To configure the port number, run the source ip command.

Controller information Information about the connected NMS.
No Connection number.
Mode NETCONF mode:
  • callhome: NETCONF over SSH Callhome
  • ssh: NETCONF over SSH
name

Name of a callhome template. This parameter is not supported in NETCONF over SSH mode and a hyphen (-) is displayed.

To configure the name of a callhome template, run the callhome command.

IP

IP address of the NMS.

To configure the IP address of the NMS in NETCONF over SSH Callhome mode, run the ip address (callhome template view) command.

Port
  • This parameter is the port number used by the NMS in NETCONF over SSH Callhome mode. To configure the port number, run the ip address (callhome template view) command.
  • This parameter is the port number used by the switch and NMS in NETCONF over SSH mode. To configure the port number, run the source ip command.
Connected Whether the NMS has set up a NETCONF connection with the switch:
  • Y: The NMS has set up a NETCONF connection with the switch.
  • N: The NMS has not set up a NETCONF connection with the switch.

ip address (callhome template view)

Function

The ip address command configures the IP address and port number used by the NMS that communicates with a switch through NETCONF.

The undo ip address command deletes the IP address and port number used by the NMS that communicates with a switch through NETCONF.

By default, no IP address and port number used by the NMS that communicates with a switch through NETCONF is configured on a switch.

Format

ip address ip-address port port-number

undo ip address

Parameters

Parameter Description Value
ip-address

The NMS IP address.

The value is in dotted decimal notation.

port port-number

The NMS port number.

The value is an integer that ranges from 0 to 65535.

Views

Callhome template view

Default Level

3: Management level

Usage Guidelines

If the NMS needs to configure and manage a switch in NETCONF over SSH Callhome mode, the switch actively sets up a NETCONF connection with the NMS. Run the ip address command to configure the IP address and port number used by the NMS.

Example

# Set the IP address and port number used by the NMS that communicates with the switch through NETCONF to 10.1.2.1 and 830, respectively.

<HUAWEI> system-view
[HUAWEI] netconf
[HUAWEI-netconf] callhome Huawei
[HUAWEI-netconf-callhome-Huawei] ip address 10.1.2.1 port 830

netconf

Function

The netconf command enables the NETCONF function and displays the NETCONF view.

The undo netconf command disables NETCONF.

By default, NETCONF is disabled on a switch.

Format

netconf

undo netconf

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the NMS needs to configure and manage a switch using NETCONF, run the netconf command on the switch to enable the NETCONF function.

Precautions

After the undo netconf command is run, all NETCONF configurations on the switch are deleted and the communication between the switch and NMS is interrupted.

Before running the netconf command to enable the NETCONF function, ensure that port 830 and ports 55552 to 55807 are not in use. Otherwise, NETCONF cannot be enabled.

Example

# Enable NETCONF and display the NETCONF view.

<HUAWEI> system-view
[HUAWEI] netconf
[HUAWEI-netconf]

reset cloud-mng db-configuration

Function

The reset cloud-mng db-configuration command clears the database configuration.

Format

reset cloud-mng db-configuration

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

To stop providing network services, run the reset cloud-mng db-configuration command to clear all the database configuration.

After the reset cloud-mng db-configuration command is executed, the system asks whether you want to restart the switch. If you enter Y, the switch restarts and clears all thedatabase configuration. Confirm your action.

Example

# Clear the database configuration.

<HUAWEI> system-view
[HUAWEI] reset cloud-mng db-configuration
Warning: This operation will clear the database configuration and saved configuration file and restart the device. Continue? [Y/N]:

source ip

Function

The source ip command configures the IP address and port number used by the switch to communicate with the NMS using NETCONF.

The undo source ip command deletes the IP address and port number used by the switch to communicate with the NMS using NETCONF.

By default, the IP address and port number used by a switch to communicate with the NMS using NETCONF are not configured.

Format

source ip ip-address [ port port-number ]

undo source ip

Parameters

Parameter Description Value
ip-address

Specifies the IP address of a switch.

The value must be an existing IP address of a switch.

port port-number
  • This parameter is the port number used by the switch in NETCONF over SSH Callhome mode.
  • This parameter is the port number used by the switch and NMS in NETCONF over SSH mode.

The value is 830 or an integer in the range 55552 to 55807. The default value is 830.

Views

NETCONF view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the NMS needs to configure and manage a switch using NETCONF, run the source ip command to configure the IP address and port number used by the switch to communicate with the NMS in NETCONF over SSH or NETCONF over SSH Callhome mode.

Precautions

When you run the source ipv6-address command to configure or change the port number for IPv6 communication between the switch and NMS, the port number for IPv4 communication between the two systems will be changed accordingly.

Changing the IPv4 address or port number will cause communication interruption between the switch and NMS.

Example

# Set the IP address and port number used by the switch to communicate with the NMS using NETCONF to 10.1.1.1 and 55555, respectively.

<HUAWEI> system-view
[HUAWEI] netconf
[HUAWEI-netconf] source ip 10.1.1.1 port 55555
Warning: Changing the port number will tear down the SSH connection with the original port. Continue? [Y/N]:y

source ipv6-address

Function

The source ipv6-address command configures the IPv6 address and port number used by a switch to communicate with the NMS using NETCONF.

The undo source ipv6-address command deletes the IPv6 address and port number used by a switch to communicate with the NMS using NETCONF.

By default, the IPv6 address and port number used by a switch to communicate with the NMS using NETCONF are not configured.

Format

source ipv6-address ipv6-address [ port port-number ]

undo source ipv6-address

Parameters

Parameter Description Value
ipv6-address

Specifies the IPv6 address of a switch.

The value must be an existing IPv6 address of a switch.

port port-number

Specifies the port number used by the switch and NMS.

The value is 830 or an integer in the range 55552 to 55807. The default value is 830.

Views

NETCONF view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the NMS needs to configure and manage a switch using an IPv6 address in NETCONF over SSH mode, run the source ipv6-address command to configure the IPv6 address and port number of the switch.

Precautions

When you run the source ip command to configure or change the port number for IPv4 communication between the switch and NMS, the port number for IPv6 communication between the two systems will be changed accordingly.

Changing the IPv6 address or port number will cause communication interruption between the switch and NMS.

Example

# Set the IPv6 address and port number for the switch to communicate with the NMS using NETCONF to FC00::1 and 55555, respectively.

<HUAWEI> system-view
[HUAWEI] netconf
[HUAWEI-netconf] source ipv6-address FC00::1 port 55555
Warning: Changing the port number will tear down the SSH connection with the original port. Continue? [Y/N]:y
Translation
Download
Updated: 2019-04-18

Document ID: EDOC1000178165

Views: 42173

Downloads: 1103

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next