Watch on Instagram

Network Bytes · Episode 105 · CCNA 6.3

"Northbound vs southbound APIs"

In controller-based networking, the controller sits in the middle. Apps above it, like dashboards and automation scripts, talk to it through a northbound API, usually REST. The controller talks to the switches and routers below it through southbound APIs such as NETCONF or OpenFlow, so one request can configure every device.

Posted · About a 1 minute watch, 4 minute read · Take the quiz

Why "north" and "south"?

The names come from a picture. In a controller-based network (software-defined networking, SDN), engineers draw the controller in the middle of the page. The applications that use the network, such as a monitoring dashboard, an automation script or a ticketing system, go above it, to the north. The network devices, the switches, routers and access points that actually forward traffic, go below it, to the south.

So "northbound" and "southbound" are not about geography. They just say which side of the controller an interface faces.

The northbound API: apps talk to the controller

The northbound API (or northbound interface, NBI) is how software above the controller asks it for things: "show me every device", "which links are down?", "add a guest VLAN". It is usually a REST API: the app sends an HTTP request, such as GET or POST, to a URL on the controller, and the data travels as JSON or XML. Cisco Catalyst Center (formerly DNA Center) calls its northbound REST API the Intent API, because the app says what it wants, not how to type it on each box.

The southbound API: the controller talks to the devices

The southbound API (or southbound interface, SBI) is how the controller reaches down to the network devices to read their state and push configuration. Common southbound protocols are:

  • NETCONF: a standard protocol for installing, changing and reading device configuration (RFC 6241), often with RESTCONF as a REST-style cousin.
  • OpenFlow: lets a controller program a switch's forwarding table directly.
  • OpFlex, or even plain CLI over SSH, used by some controllers.

The device never needs to know which app asked; it only talks to the controller.

One request, every device

Put the two halves together. An app sends one northbound request: "add a guest VLAN". The controller works out what every affected switch needs, then sends the settings south to each one. Instead of logging in to dozens of switches, you write one request, and the controller handles every device. That is the big promise of controller-based networking compared with traditional, box-by-box configuration (CCNA 6.3).

Try it yourself

Open the Cisco DevNet Sandbox catalogue (free with a Cisco account) and find a Catalyst Center sandbox (an always-on one, when listed). Using its login, look at the Intent API documentation and try the "get network devices" call from the browser-based API explorer or a tool like Postman. Notice that you are talking only to the controller, through its northbound REST API, yet you get back a list of switches and routers: the controller collected that information from the devices over its southbound side.

Good to know

  • CCNA 6.3 compares traditional networks with controller-based networking; 6.2 covers controller-based and software-defined architectures, including northbound and southbound APIs. EP63 covers the control and data planes, EP64 SDN, EP65 REST APIs.
  • The northbound interface (NBI) sits between the controller and the applications or administrators above it, and is usually a REST API using JSON or XML.
  • The southbound interface (SBI) sits between the controller and the network devices, using protocols such as OpenFlow, NETCONF, RESTCONF, OpFlex or even the CLI over SSH (RFC 7426).
  • "North" and "south" come from drawing the controller in the middle with apps above and devices below.
  • Real controllers may batch changes or use one session per device; the comment question assumes one southbound message per switch.

For CCNA learners

CCNA exam topics 6.2 and 6.3 ask you to describe controller-based networking. Know that the northbound API faces the apps (usually REST with JSON), the southbound API faces the devices (NETCONF, RESTCONF, OpenFlow, OpFlex, CLI over SSH), and that one request to the controller can change many devices.

Answer to the comment question

24 southbound messages. The app sends just one northbound request to the controller. The controller then sends one message to each switch: 3 sites × 8 switches = 24 switches, so 24 southbound messages. One request in on the north side, many messages out on the south side: that is why a controller saves so much work.

Test your knowledge

Quick quiz: "Northbound vs southbound APIs"

4 multiple-choice questions. Pick one answer for each, then check how you did.

1In controller-based networking, what does a northbound API connect?
2Which of these is a southbound protocol a controller can use to configure devices?
3What kind of API is a controller's northbound API usually?
4Why are they called "northbound" and "southbound"?

Sources

Video transcript

How does a network controller talk to your apps and your switches?

Picture the controller in the middle. Apps sit above it, to the north. Switches sit below, to the south.

Apps, like dashboards and automation scripts, talk to the controller through a northbound API, usually a REST API.

The controller talks to the switches and routers through southbound APIs, like NETCONF or OpenFlow.

Say an app asks: add a guest VLAN. The request goes north to the controller, which sends settings south to every switch.

So you write one request, and the controller handles every device.

An app sends one northbound request. The controller pushes it to three sites with eight switches each, one message per switch. How many southbound messages? Comment your answer below!

That's your byte.

More from Network Bytes

All Network Bytes lessons