The <kill-session> operation forcibly closes a NETCONF session. Only an administrator is authorized to perform this operation.
After receiving a <kill-session> request, the NETCONF server stops all operations that are being performed for the session, releases all the locks and resources associated with the session, and terminates the session.
If the NETCONF server receives a <kill-session> request when performing the <commit> operation, it must restore the configuration to the status before the configuration is committed.
Close the NETCONF session with session-id 4:
RPC request:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <kill-session> <session-id>4</session-id> </kill-session> </rpc>
RPC reply:
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ok/> </rpc-reply>