In my earlier blogs, I had covered basics of Netconf and Yang and how to use Netconf to configure Cisco devices. Recently, I came across this Python ncclient library that simplifies the configuration/monitoring of Networking devices that supports Netconf. Using ncclient library, we can programmatically configure and monitor devices using Netconf. I also found out that Cisco Openstack Neutron plugin uses ncclient library to program the Nexus switches.
I have used Cisco Nexus 3k switch and Cisco VIRL NXOS switch for the examples in this blog.
In my earlier blog on configuring Cisco Nexus devices using Netconf, I covered the following netconf requests.
- “get” request using filter to display configuration.
- “edit-config” request to change configuration.
- “exec-command” to execute raw CLI requests.
In this blog, I will cover the above same tests using Python ncclient library. Even though the examples below are tried from Python interactive shell, the same can be executed as a Python program as well.
First step is to import the ncclient library and create a connection:
Continue reading Netconf Python ncclient
This blog is part of my series on Devops for Networking. In this blog, I will cover how to configure and monitor Cisco NXOS devices using Netconf. In 1 of my earlier blogs, I have provided basics of Netconf and Yang.
I have used Nexus 3k switch for my experiments below.
Netconf has the following layers:
- Transport protocol is sshv2.
- rpc request section contains namespace related details.
- Operations section could be different operations like edit-config, get-config, commit, lock etc.
- Content section contains the actual device operation in XML format. The schema for the content can either be specified in XSD format or using Yang. Cisco NXOS devices support XSD format and I will use it in this blog.
Continue reading Cisco device configuration using Netconf
Devops is now a widely used term. I recently read few articles on Devops in relation to Network Automation and that prompted me to do some research on this topic. In this blog, I will cover what I think comprises the Devops Networking domain and in the next series of blogs, I will try to explore individual areas in more detail. Devops allows infrastructure to be treated as a code and it makes the infrastructure programmable. The term Devops refers to a merger between Development and Operations role and it encourages Developer to look at Operations angle and Network operator to look from Developer angle. As everyone knows, automating infrastructure deployment improves efficiency, removes operator error and allows us to scale. Server automation has been present for quite some time and Network Automation is still very much in infancy stage at this point. Following article from Ivan describes Devops as a lifestyle or mindset on how infrastructure is treated rather than as tools associated with Devops.
How is Network Automation different from Server automation?
Continue reading DevOps and Network Automation
Cisco’s acquisition of Tail-f prompted me to look deeper into what Tail-f does. That in-turn made me dig deeper into Netconf and Yang. Netconf is a device configuration and management protocol and Yang is a modeling language that’s used by Netconf. Yang modeling can also be used outside Netconf’s context. From looking at the history behind Netconf and Yang, I realized that Network management as a whole was a widely ignored topic for quite sometime. The current Network management techniques used by Operators seems to be very arcane and the recent SDN wave has triggered a renewed interest in simplifying Network management. In this blog, I will cover the following:
- Shortcomings of SNMP.
- Netconf and Yang overview with examples.
- Comparison with Ovsdb and Openflow.
- Opendaylight’s use of Yang model
- Tail-f NCS system’s use of Netconf and Yang.
Continue reading Netconf and Yang