Introduction to Network APIs and Protocols – Automation

By | 06/12/2021

Application programming interfaces (APIs) are simply interfaces for software systems to talk to one another. An API has a set of requirements that describe how applications can communicate between themselves. For years, users have been communicating with applications through user interfaces (UIs) by viewing information and requesting data from the application. APIs come into play when a software system wants to communicate with another software system. However, we as users can also use APIs to talk to applications—just in a more software-like way instead of in a traditional UI way. Protocols are used to transport information between the systems using NETCONF and RESTCONF. We explore these protocols in more detail in the coming sections.

Network APIs and Protocol Concepts

APIs can help application developers enable features that end up helping end users. For example, a mobile application such as Yelp pulls location data from Google Maps via API calls to provide lists of locations of restaurants for Yelp’s end users. Again, this is an example of a software system that wants to communicate with another software system. As another example, network management systems (NMSs) communicate via Simple Network Management Protocol (SNMP) to request and receive information from SNMP-enabled devices.

Simple Object Access Protocol (SOAP) is a mature standard from Microsoft that is used to build web services on the Internet. SOAP uses HTTP to transport messages using XML syntax.

Representational State Transfer (REST) is an API framework for simple web services that also uses HTTP methods such as GET, POST, PUT, and DELETE. REST is popular due to its performance, reliability, simplicity, and scalability.

The Network Configuration (NETCONF) protocol, which was standardized in 2006, leverages SSH- and XML-based encoding. NETCONF defines the transport and communication protocol and uses YANG for data.

The RESTCONF protocol provides a REST-like API for a network. RESTCONF, which was standardized in 2017, supports both XML and JSON representations and uses YANG for data.

Google Remote Procedure Call (gRPC) provides a general (open-source) framework. It is a functional subset of NETCONF and uses JSON representation. gRPC also supports unstructured data using the CLI and offers high performance.

Evolution of Programmability

We began managing networks over 25 years ago when network deployments first started to occur. Most of the time, networks were deployed using the command line, but there were fewer devices to deploy and manage. As networks grew, they became more complex, but the command-line interface (CLI) was still the norm with only minor automation. The automation at this time was mainly using regular expressions and expect scripting or something similar to interact with the CLI. Simple Network Management Protocol (SNMP) began to emerge in the late 1980s for monitoring networks and basic network device modifications. Vendors created their own Management Information Bases (MIBs) to monitor device-specific information.

Simple Network Management Protocol:

  • SNMP has been the de facto way to monitor networks for at least the last 20 years.
  • SNMP’s strength was its simplicity when networks were smaller.
  • V1 and V2 were basic and lacked encryption security.
  • SNMP did not use real-time communication.
  • MIBs were read-only.
  • SNMP lacked libraries for other programming languages.

As next-generation programmatic interfaces were developed, a few key attributes began to emerge:

  • Need to support different types of transports, such as HTTP, SSH, and TLS
  • Need to be flexible and support different encoding formats such as XML and JSON
  • Need to be efficient and use tooling to consume APIs, including programming libraries
  • Need for extensible and open APIs, such as REST, RESTCONF, NETCONF, and gRPC

Back in 2003, RFC 3535 was published to provide an overview of a workshop held by the Internet Architecture Board (IAB) on network management. The goal was to continue the dialogue started between network operators and protocol developers. One of the notable recommendations from the network operators and developers was that the IETF should focus resources on the standardization of configuration management mechanisms.

Next, in 2006, NETCONF was defined in RFC 4741, and again in 2011, it was further defined in RFC 6241. The NETCONF protocol provides mechanisms to install, change, and delete network device configurations.

Leave a Reply

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