NETCONF Operation Steps

netconf-layers

NETCONF Operations

NETCONF Operation has three common steps. These steps are:

  • Session Establishment
  • Operation Request and Reply
  • Session Close

Firstly, the Session is Established with the

<hello>

messages. Both NETCONF Client and NETCONF Server send

<hello>

message for the negotiation about their capabilities, supported models, versions etc.

After Session Establishment, Operation Request and Reply messages are sent. These messages are for specific operations. Here, the message used for Operation Request is send with

<rpc>

message and the Operation Reply is sent with

<rpc-reply>

message. In other words, NETCONF Client sends its requests to the NETCONF Server with

<rpc>

message. And Server replies with

<rpc-reply>

message.

Lastly, session is closed with

<close-sesion>

message. Client sends this message and the server replies back with

<ok>

message.

NETCONF Messages

We have talk about NETCONF Operation Steps and we saw the messages that are sent between NETCONF Client and NETCONF Server. Now, let’s check a little deeply and see the content of these messages.

First of all, let’s start with Hello messages. As you know, Hello messages establishes NETCONF session. These messages includes the capabilities of the sending device.


<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <capabilities>
   <capability>
     urn:ietf:params:netconf:base:1.1
   </capability>
   <capability>
     https://ipcisco.com/folder1/xyz
   </capability>
 </capabilities>
 <session-id>1</session-id>
</hello>

Now, let’s check Operational RPC Messages. There are two RPC Messages used in NETCONF. All these operations are done within these main messages. These RPC Messages are:

  • rpc
  • rpc-reply

Now, let’s look at these messages content. These messages are XML based as we have mentined before.

rpc

As RPC message, for example, we can check the below message:


<rpc message-id="123"
      xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
      xmlns:ex="https://ipcisco.com"
      ex:user-id="ipcisco">
  <get/>
</rpc>

rpc-reply

As RPC Reply message, for example, we can check the below message:


<rpc-reply message-id="123"
      xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
      xmlns:ex="https://ipcisco.com"
      ex:user-id=" ipcisco ">
    <data>
      <!-- contents -->
    </data>
</rpc-reply>

NETCONF Operation Commands

The configuration modification is done via XML messages in NETCONF. Some of these XML messages are given below:


<get>			To get Running Configuration and the State Info
<get-config>		To get all or a part of a configuration from a Configuration Data Store
<edit-config>		To load all or a part of a Configuration to a Configuration Data Store
<copy-config>		To replace all Configuration Data Store with another
<delete-config>	        To delete a Configuration Data Store
<commit>		To copy Candidate Data Store to Running Data Store
<cancel-commit>   	To cancel confirmed commit
<discard-chances>	To clear changes
<lock> 		        To lock the configuration Data Store System
<unlock>		To release the previously unlock configuration Data Store System
<close-sessions>	To terminate NETCONF session gracefully
<kill-sessions> 	To terminate NETCONF session forcedly

Lesson tags: sdn, netconf
Back to: SDN Course > Netconf

Leave a Reply

Your email address will not be published. Required fields are marked *