Using NETCONF and RESTCONF
NETCONF uses a simple RPC-based (Remote Procedure Call) mechanism to facilitate communication between a client and a server. The client can be a script or an application running as part of a network manager. The server is typically a network device (switch or router).
NETCONF uses Secure Shell Version 2(SSHv2) as the transport layer across network devices and RESTCONF uses HTTP.
NETCONF and RESTCONF also support capability discovery and model downloads. Supported models are discovered using the ietf-netconf-monitoring model. Revision dates for each model are shown in the capabilities response. Data models are available for optional download from a device using the get-schema rpc. You can use these YANG models to understand or export the data model.
To use NETCONF and RESTCONF you must complete all the required tasks as per the Configuring Programmability section. The following shows examples of the RPCs you can send and the kind of action that is performed.
Examples for NETCONF RPCs
Get the running-configuration of the switch by sending the following RPC:
Change the description of an interface by sending the following RPC
Remove the description from an interface by sending the following RPC
Examples for RESTCONF RPCs:
Get the TFTP source interface by sending the following RPC:
Configure the TFTP source interface by sending the following RPC:
Enter a HTTP delete request by sending the following RPC:
Note
For the HTTP delete request do not use: http://10.106.30.33:80/restconf/api/running/native/ip/tftp/source-interface/
Feedback