Enabling and Configuring Network Configuration Protocol in a Managed Device
Enabling and Configuring Network Configuration Protocol
NETCONF is a protocol that can manage, configure and install new configuration to network device. Its operations are realized on top of an easy Remote Procedure Call (RPC) layer. NETCONF uses Extensible Markup Language (XML) based on data encoding for protocol messages. The protocol messages are exchanged on the top of a secure transport protocol. Cisco IOS XE Release 12.X and above.
Background Information
Data models provides an alternate and centralized feature to configure Cisco devices instead of using the Cisco Command Line Interface (CLI).
Yet Another Next Generation (YANG) is a standards based data modelling language used to create device configuration requests or the requests for operational data. It has a structured format similar to a computer program that is human readable. It was develop by IETF. It is used for configuration data, state data, RPCs (Operations), and event notifications. YANG node types are Container, Leaf and list.
NETCONF is a based and Extensible Markup Language (XML). XML is both human and machine readable. It was developed by IETF. It is replacement for SNMP, CLI and Scripts. It allows user to monitor the device. Uses remote procedure calls (RPCs) called Operations. Runs over SSH.
Configure the SSH username and password on the device for NETCONF communication access. NNMi requires only read-only access.
Related – OpenFlow vs NETCONF
In subsequent sections, we will run through some of key configuration scripting used in NETCONF like protocol configuration enabling YANG features etc.
Prerequisites for Network Configuration protocol (NETCONF) over SSHv2
NETCONF over SSHv2 requires a vty line for each session as specified in the netconf max-session command. To start working with NETCONF APIs requires privilege level 15.
Device#conf t
Device(config)#username name privilege level password password
Device(config)#aaa authentication login default local and aaa authorization exec default local
Device(config)#exit
Configuring NETCONF-YANG
Device#conf t
Device(config)#netconf-yang >>>>> Enables the NETCONF interface on your network device.
Device(config)#netconf-yang feature candidate-datastore >>>>> Enables candidate datastore.
Device(config)#exit
Monitoring and Maintaining Network Configuration protocol (NETCONF) Session
Device#show netconf {counters | session| schema} >>>>> Displays NETCONF information.
Device#debug netconf {all | error} >>>>> Enables debugging of NETCONF sessions.
Device#clear netconf {counters | sessions} >>>>> Clears NETCONF statistics counters and NETCONF sessions, and frees associated resources and locks.
Verifying the NETCONF Protocol Configuration
Device#show netconf-yang datastores >>>>> Displays information about NETCONF-YANG datastores.
Device#show netconf-yang sessions >>>>> Displays information about NETCONF-YANG sessions.
Device#show netconf-yang sessions detail >>>>> Displays detailed information about NETCONF-YANG sessions.
Device#show netconf-yang statistics >>>>> Displays information about NETCONF-YANG statistics.
Device#show platform software yang-management process >>>>> Displays the status of the software processes required to support NETCONF-YANG.