About Jim MacLeod

With 20 years of experience in network monitoring, management, and control, Jim MacLeod has seen that there are very few silver bullets—and it takes careful planning to load them properly. He has supported customer networks at enterprises, service providers, and data centers, in technical roles ranging from sales engineer to developer. Currently, he is Senior Product Manager at Fujitsu Network Communications, where he is responsible for Virtuora® NC, Fujitsu's SDN controller platform.

YANG: the Very Model of a Modern Network Manager

Network management is undergoing a change towards openness, driven by the competing desires to reduce vendor lock-in without increasing operational effort. Software Defined Networking (SDN) is maturing from programmatic interfaces into suites of applications, powered by network controllers developed through multivendor open-source efforts. One such controller is OpenDaylight, which brings a compelling feature to SDN: YANG models of devices and services.

YANG is a standard data definition language which was humorously named “Yet Another Next Generation,” in part because it grew out of efforts to create a next-generation SNMP syntax, which was later applied to the next-generation NETCONF network device configuration protocol. YANG provides the structure and information to describe the behavior, capabilities, and restrictions of devices in a manner that can be incorporated into an abstracted framework. OpenDaylight uses YANG models to present a unified user interface that hides the differences between devices from different vendors and allows them to work together without requiring an administrator to know the details of those devices.

The concept of using automation to reduce both the required level of device knowledge and the possibility of mistakes due to mistyping is not new. For many years customers have used EMS (Element Management Systems) and NMS (Network Management Systems) to create configuration templates and push bulk changes to devices. Most of these tools are vendor-specific, but they succeed at reducing the level of effort. Other organizations have also created home-grown tools using scripting languages like Perl to interface with device CLI via Expect. This technique takes both programming skill and device knowledge to develop the tools, but can result in solutions to specific problems at the cost of the script being specific to a single vendor, device model, and OS version. However, with the addition of YANG, there is the potential to create cross-vendor tools that solve the same problem with less effort. When used in OpenDaylight, YANG models also provide an additional feature: OpenDaylight creates a REST interface, called restconf, based on the YANG models it’s imported.  Since the restconf calls are based on the abstracted YANG model, it’s possible to separate the core logic from the details of device configuration, so a script can potentially work with multiple different devices. At the OpenDaylight Summit in July 2016, Brian Freeman of AT&T said that the use of YANG models “allows us to prototype apps in hours.” YANG clearly has potential to result in better tools faster.

That’s not to say that YANG is easy. YANG enables application user interfaces to be easy, but there’s a lot of detail that goes into a YANG model for a device, and for the services that that device can provide.  A useful YANG model should describe the hierarchical configuration options, the valid ranges, and the constraints.  Therefore, the source of device-specific YANG models will mostly be vendors.

The code example contains a constraint in a YANG model, taken from a presentation at IETF 71.

Notice that the leaf element “retry-timer” has a constraint comparing it to the leaf “access-timeout,” with an explanatory error message. Since the goal of YANG in Open Daylight is to describe the device’s behavior to a computer program to automate the configuration of that device, a model can’t rely on a trained administrator to know that certain options can’t be used with each other: the model must prevent the OpenDaylight application from telling a device to do something it can’t do.

While YANG as a language is well specified, further work is needed. True inter-vendor interoperability must extend beyond listing all of the configuration options for each device, and must involve creating high-level abstractions for service definitions. While much has been done to create standard YANG service models for the OpenFlow protocol in L2 Ethernet switching, SDN is still relatively new to the optical network. It will be exciting to see standards converge to deliver on the promise of true multivendor openness.