The peer-ip command sets the IP address and TCP port number of an NMS with which a device is to establish a NETCONF connection as well as the source IP address and network status (public/private) of the device.
The undo peer-ip command deletes the IP address and TCP port number of an NMS with which a device is to establish a NETCONF connection as well as the source IP address and network status (public/private) of the device.
By default, the IP address and TCP port number of an NMS with which a device is to establish a NETCONF connection as well as the source IP address and network status (public/private) of the device are not configured.
Parameter | Description | Value |
---|---|---|
ip-address |
Specifies the IP address of an NMS. |
IPv4 address: The value is in dotted decimal notation. IPv6 address: The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
port port-number |
Specifies the TCP port number of an NMS. |
The value is an integer ranging from 1 to 65535. |
local-address source-ip |
Specifies the source IP address of a device to be connected with an NMS. |
IPv4 address: The value is in dotted decimal notation. IPv6 address: The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
vpn-instance vpn-instance |
Specifies the VPN instance name of a NETCONF connection. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
public-net |
Establish a NETCONF connection on a public network. |
- |
Usage Scenario
If an NMS does not support automatic device discovery, it cannot manage devices in time. To address this problem, you can configure proactive NETCONF registration for a device to send a NETCONF connection request to the NMS when the device goes online so that the NMS can manage the device.
When configuring proactive NETCONF registration, you need to configure the IP address or hostName and TCP port number for the NMS with which the device is to establish a NETCONF connection using the peer-ip command in the NETCONF connection instance view.
Prerequisites
VPN configuration must be successful, to configure the vpn instance using this command.
Precautions
A device can establish NETCONF connections with only one NMS, and port-number must be the same as that used on the NMS to establish the NETCONF connection.
If you run the command without carrying the vpn-instance or public-net parameter, the network to which the NETCONF connection belongs is the same as the network configured using the set net-manager [ ipv6 ] vpn-instance vpn-instance-name command.
<HUAWEI> system-view [~HUAWEI] netconf [~HUAWEI-netconf] callhome root [*HUAWEI-netconf-callhome-root] endpoint huawei [*HUAWEI-netconf-callhome-root-endpoint-huawei] peer-ip 10.1.1.2 port 8032
<HUAWEI> system-view [~HUAWEI] netconf [~HUAWEI-netconf] callhome root [*HUAWEI-netconf-callhome-root] endpoint huawei [*HUAWEI-netconf-callhome-root-endpoint-huawei] peer-ip 2001::db8:1::1 port 8030 local-address 2001::db8:1::2 vpn-instance vpn1