Using Netconf And Restconf Protocols - Cisco Catalyst 4500 Series Software Configuration Manual

Cisco ios xe release 3.9.xe and cisco ios release 15.2(5)ex
Hide thumbs Also See for Catalyst 4500 Series:
Table of Contents

Advertisement

Using NETCONF and RESTCONF Protocols

Using NETCONF and RESTCONF Protocols
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.
To use NETCONF and RESTCONF you must complete all the required tasks as per the
Programmability Components, page 6-4
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.
The following shows sample 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
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
6-14
Examples for NETCONF RPCs, page 6-14
Examples for RESTCONF RPCs, page 6-15
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<native xmlns="http://cisco.com/ns/yang/ned/ios"/>
</filter>
</get-config>
</rpc>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<native xmlns="http://cisco.com/ns/yang/ned/ios">
<interface>
<TenGigabitEthernet>
<name>4/1</name>
<description>to_distribution</description>
</TenGigabitEthernet>
</interface>
</native>
</config>
</edit-config>
</rpc>
section.
Chapter 6
Programmability
Configuring

Advertisement

Table of Contents
loading

Table of Contents