< Home

NETCONF Interaction Process

Figure 1 shows the NETCONF interaction process between an NMS and a switch.

Figure 1 NETCONF interaction process
  1. The switch sets up an SSH connection with the NMS. For details about how a switch sets up an SSH connection with iMaster NCE-Campus, see Interaction Between Huawei Switches and iMaster NCE-Campus.
  2. The switch and NMS exchange their supported capabilities by sending hello packets.
  3. After setting up a NETCONF session with the switch, the NMS sends an RPC request to the switch for configuration management.
  4. The switch parses and handles the received RPC request, and sends an RPC reply to the NMS.
  5. After the preceding operations are complete, the NMS sends an RPC request to close the NETCONF session. This reduces resource consumption on the switch and NMS.
  6. The switch closes the NETCONF session, and sends an RPC reply to the NMS.
# A sample of a hello packet sent by the switch is as follows. base and writable-running are the capabilities supported by the switch. For details, see Capabilities and Operations Supported by NETCONF.
<?xml version="1.0" encoding="UTF-8"?> 
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
  <capabilities> 
    <capability>urn:ietf:params:netconf:base:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:candidate:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:validate:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:startup:1.0</capability> 
  </capabilities> 
  <session-id>1227</session-id> 
</hello> 
]]>]]>
# A sample of a hello packet sent by the NMS is as follows.
<?xml version="1.0" encoding="UTF-8"?> 
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
  <capabilities> 
    <capability>urn:ietf:params:netconf:base:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:candidate:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:validate:1.0</capability> 
    <capability>urn:ietf:params:netconf:capability:startup:1.0</capability> 
  </capabilities> 
</hello> 
]]>]]>
# A sample of a session close RPC request sent by the NMS is as follows.
<?xml version="1.0" encoding="UTF-8"?> 
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
  <close-session/> 
</rpc> 
]]>]]>
# A sample of a session close RPC reply sent by the switch is as follows.
<?xml version="1.0" encoding="UTF-8"?> 
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
  <ok/>  
</rpc-reply> 
]]>]]>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >