OcNOS-SP : System Management Guide : System Management Configuration Guide : NetConf Call Home Configuration : Validation
Validation
(config)#do show running-config netconf-callhome
!
netconf callhome
feature netconf callhome enable
management-port enp0s3
reconnect enable
retry-max-attempts 10
retry-interval 20
callhome server test-ch-server 192.168.56.1
!
(config)#
(config)#do show users
Current user : (*). Lock acquired by user : (#).
CLI user : [C]. Netconf users : [N].
Location : Applicable to CLI users.
Session : Applicable to NETCONF users.
 
Line User Idle Location/Session PID TYPE Role
 
(#)(*) 130 vty 0 [C]root 0d00h00m pts/0 2730 Local network-admin
 
(config)#
Start the Call Home Server
After you start the call home server, the show users command displays a NetConf user.
2022 May 18 15:32:55.989 : OcNOS : CML : INFO : [CML_5]: Client [netconf (192.168.56.1)] established connection with CML server
 
(config)#do show users
Current user : (*). Lock acquired by user : (#).
CLI user : [C]. Netconf users : [N].
Location : Applicable to CLI users.
Session : Applicable to NETCONF users.
 
Line User Idle Location/Session PID TYPE Role
 
(#)(*) 130 vty 0 [C]root 0d00h00m pts/0 2730 Local network-admin
NA [N]root 0d00h00m 192.168.56.1 2118 Local network-admin
 
(config)#
NetConf sget Output
While the NetConf client is running, the sget command returns the session-specific data:
sget /netconf-state/sessions
 
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
<sessions>
<session>
<session-id>1</session-id>
<transport
xmlns:ncm="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">ncm:netconf-ssh</transport>
<username>root</username>
<source-host>192.168.56.1</source-host>
<login-time>2022-05-18T15:32:55Z</login-time>
<in-rpcs>0</in-rpcs>
<in-bad-rpcs>0</in-bad-rpcs>
<out-rpc-errors>0</out-rpc-errors>
<out-notifications>0</out-notifications>
</session>
</sessions>
</netconf-state>
</data>
</rpc-reply>
Stop the Call Home Server
After you stop the call home server, the show users command no longer displays a NetConf user.
2022 May 18 15:33:20.028 : OcNOS : CML : NOTIF : [CML_4]: Client [netconf (192.168.56.1)] has closed connection with CML server
 
(config)#
(config)#do show users
Current user : (*). Lock acquired by user : (#).
CLI user : [C]. Netconf users : [N].
Location : Applicable to CLI users.
Session : Applicable to NETCONF users.
 
Line User Idle Location/Session PID TYPE Role
 
(#)(*) 130 vty 0 [C]root 0d00h00m pts/0 2730 Local network-admin
 
(config)#
 
Last modified date: 10/19/2023