A NETCONF connection can be established between the client and the server using the well-known port 22 only after NETCONF is enabled on the server.
Known port 22: Before the SSH server can set up a NETCONF session with the client through this port, the snetconf server enable command must be run on the SSH server.
Known port 830: Only the protocol inbound ssh port 830 command needs to be run on the SSH server, but the snetconf server enable command does not need to be run.
The system view is displayed.
Both the snetconf server enable and protocol inbound ssh port 830 commands can enable the NETCONF function. If both commands are run, the client can use either port 22 or port 830 to set up a NETCONF connection with the server.
Enable the NETCONF service of SSH server on TCP port 22.
Run snetconf [ ipv4| ipv6] server enable
The NETCONF service of SSH server on TCP port 22 is enabled.
Enable the NETCONF service of SSH server on port 830.
Run netconf
The NETCONF user interface view is displayed.
Run protocol inbound ssh [ ipv4| ipv6] port 830
The NETCONF service of SSH server is enabled on port 830.
Run quit
Exit from the NETCONF user interface view.
After the NETCONF service of SSH server is disabled on TCP port 22 or 830, all clients connecting to port 22 or 830 through NETCONF are disconnected.
Run netconf
The NETCONF user interface view is displayed.
Run max-sessions count
The maximum number of NETCONF users that the NETCONF user interface supports is set.
To prevent unauthorized users from using NETCONF, set the maximum number of NETCONF users. After the maximum number of users who are using NETCONF is reached, subsequent users are not allowed to use NETCONF. This mechanism ensures network management security.
Run idle-timeout minutes [ seconds ]
The timeout period of an idle NETCONF connection is set.
If no timeout period is set for an idle NETCONF connection, the idle NETCONF connection cannot be released in time for other authorized users.
The configuration is committed.