Lesson Overview

Software-Defined Networking (SDN) separates application intent from the device-by-device implementation of that intent. In a controller-based architecture, applications communicate with a controller through northbound interfaces, while the controller communicates with routers, switches, wireless infrastructure, and security devices through southbound interfaces.


Learning Objectives

  • Explain the role of the application, controller, and infrastructure layers in an SDN architecture.
  • Differentiate northbound APIs from southbound interfaces and identify where each is used.
  • Describe REST API requests, HTTP methods, status codes, JSON, authentication, and CRUD operations.
  • Explain how NETCONF, RESTCONF, OpenFlow, and model-driven interfaces can be used southbound.
  • Explain the relationship between YANG data models, NETCONF, and RESTCONF.
  • Follow an end-to-end enterprise automation workflow from application intent to device configuration.
  • Recognize CCNA exam traps related to REST, JSON, YANG, NETCONF, RESTCONF, and controller-based networking.

EXAM FOCUS

For CCNA, the essential direction is: Application ↔ Controller = northbound. Controller ↔ network devices = southbound.


1. Why SDN Interfaces Are Needed

Traditional networks are commonly configured device by device using the CLI. As the number of routers, switches, firewalls, wireless controllers, and access points increases, manual configuration becomes slower, harder to maintain, and more prone to inconsistency.

Software-Defined Networking (SDN) introduces a controller that provides centralized visibility, policy, automation, and management. For the controller to communicate with both applications above it and network devices below it, standardized interfaces and APIs are required.

These interfaces are generally divided into:

InterfaceCommunication DirectionPurpose
Northbound APIsApplications ↔ SDN ControllerAllow applications, automation tools, dashboards, and business systems to request network information or services
Southbound Interfaces/APIsSDN Controller ↔ Network DevicesAllow the controller to configure, monitor, collect state, and manage routers, switches, firewalls, WLCs, and other devices


Why Interfaces Are Important

SDN interfaces provide a consistent way for different systems to exchange information and instructions without requiring every application to understand the CLI syntax of every network platform.

A controller-based architecture introduces a programmable abstraction layer. Applications communicate with the controller, and the controller translates the requested intent into actions on the infrastructure. This creates centralized visibility, consistent policy, and repeatable automation.

Pasted content image

Figure 1. Controller-based SDN architecture with northbound and southbound interfaces.


1.1 The Three Logical Layers

Layer

Typical Components

Primary Role

Application layer

Automation applications, monitoring, security, analytics, cloud orchestration

Express business or operational intent and consume network information.

Controller layer

Cisco Catalyst Center, SD-WAN controllers, other SDN controllers

Maintains topology and inventory, applies policy, exposes APIs, and translates intent.

Infrastructure layer

Routers, switches, firewalls, WLCs, APs, virtual network devices

Forwards traffic and applies configuration received through supported management interfaces.


2. Northbound APIs

A northbound interface sits logically above the controller. It allows applications, scripts, portals, and automation systems to request information from the controller or ask the controller to perform an action. The application does not have to log in separately to every device.

Pasted content image

Figure 2. An automation application uses a northbound REST API to interact with the controller.


2.1 Typical Northbound Functions

  • Retrieve device inventory, platform, serial number, software version, and reachability.
  • Retrieve site, topology, interface, wireless client, and health information.
  • Create or modify network policy and intent.
  • Provision devices and sites.
  • Trigger workflows such as software image distribution or configuration deployment.
  • Integrate the network controller with ITSM, monitoring, security, and cloud platforms.

KEY IDEA

Northbound APIs expose a higher-level, software-friendly view of the network. They are commonly REST-based and often exchange JSON over HTTPS.


3. REST APIs and HTTP Operations

REST stands for Representational State Transfer. A REST API exposes resources through URIs and uses HTTP methods to operate on those resources. The client sends a request; the server returns a response containing an HTTP status code and, when appropriate, structured data.

Pasted content image

Figure 3. REST API request/response sequence from an automation application to network state.


3.1 Core Parts of a REST Request

Component

Example

Purpose

Method

GET

Defines the operation requested.

URI

https://controller.example/api/v1/devices

Identifies the API resource.

Headers

Authorization: Bearer <token>

Carries authentication and metadata.

Content-Type

application/json

Tells the server the body data format.

Body

{"site":"Branch-01"}

Carries data for create/update operations.


3.2 HTTP Methods and CRUD

HTTP Method

CRUD Mapping

Typical Use

Example

GET

Read

Retrieve information

Get all network devices.

POST

Create

Create a resource or start an operation

Create a site or initiate a task.

PUT

Update

Replace an existing resource

Replace a complete policy object.

PATCH

Update

Modify selected fields

Change only a description or tag.

DELETE

Delete

Remove a resource

Delete a resource from the controller.

GET https://controller.example.com/api/v1/network-device

Authorization: Bearer <token>

Accept: application/json

{

"devices": [

{"hostname": "SW1", "managementIp": "10.10.10.20", "status": "reachable"},

{"hostname": "R1", "managementIp": "10.10.10.1", "status": "reachable"}

]

}


4. JSON, XML, and Structured Data

APIs are easier to automate when information is returned as structured data rather than unstructured CLI text. JSON is very common with REST APIs. XML is strongly associated with NETCONF and is also supported by some RESTCONF implementations.


4.1 JSON Example

{

"hostname": "R1",

"interface": {

"name": "GigabitEthernet0/0",

"ipAddress": "10.10.10.1",

"adminStatus": "up",

"operStatus": "up"

}

}

JSON objects use curly braces. Arrays use square brackets. Data is represented as key-value pairs, which makes it easy for applications to process values such as interface state, IP addresses, device health, and inventory.


4.2 XML Example

<interface>

<name>GigabitEthernet0/0</name>

<ipAddress>10.10.10.1</ipAddress>

<adminStatus>up</adminStatus>

</interface>


5. HTTP Status Codes and Authentication

Code

Meaning

What It Usually Tells the Engineer

200

OK

Request completed successfully.

201

Created

A new resource was created.

204

No Content

Operation succeeded but no response body is needed.

400

Bad Request

Syntax, JSON, parameter, or validation problem.

401

Unauthorized

Authentication is missing, invalid, or expired.

403

Forbidden

Authenticated, but the account lacks permission.

404

Not Found

The URI, resource, or object ID cannot be found.

500

Internal Server Error

The controller or API service encountered an error.

Network APIs can expose sensitive information and configuration controls, so authentication and authorization are critical. Common mechanisms include usernames and passwords, API tokens, bearer tokens, OAuth, certificates, and role-based access control (RBAC).

TROUBLESH-OOTING

401 usually points to authentication. 403 means the identity is known but not allowed to perform the requested operation. 404 usually points to an incorrect or missing resource.


6. Southbound Interfaces

A southbound interface sits logically below the controller. It is used when the controller communicates with network infrastructure. Depending on the platform, the controller may retrieve operational state, push configuration, collect telemetry, or program forwarding behavior.

Pasted content image

Figure 6. Southbound interfaces connect the controller to routers, switches, firewalls, and other infrastructure.


6.1 Common Southbound Technologies

Technology

Typical Role

Key Point

NETCONF

Structured configuration and operational state

Commonly SSH on TCP 830; XML; YANG-modeled data.

RESTCONF

REST-style access to modeled configuration/state

Uses HTTP/HTTPS; supports JSON/XML depending on implementation; uses YANG models.

OpenFlow

Programs forwarding behavior in classic SDN designs

Controller can install flow entries on an OpenFlow-capable switch.

SSH / CLI

Traditional device management used by automation tools

Useful, but text parsing is less structured than model-driven APIs.

SNMP / Telemetry

Monitoring and operational visibility

Often used to collect state and performance data.


7. NETCONF

NETCONF is a network configuration protocol designed to install, manipulate, and retrieve configuration and operational data in a structured way. It commonly runs over SSH and is associated with TCP port 830.

  • Uses RPC-style operations rather than human-oriented CLI commands.
  • Commonly uses XML encoding.
  • Works with YANG-modeled data.
  • Can operate with configuration datastores such as running, candidate, and startup, depending on the device implementation.
  • Provides a structured method that is easier for automation software to validate and process.

<rpc>

<get-config>

<source><running/></source>

</get-config>

</rpc>

EXAM FOCUS

NETCONF is commonly associated with SSH, TCP port 830, XML, and YANG.


8. RESTCONF

RESTCONF provides REST-style access to configuration and operational data that is defined by YANG models. An automation client can use familiar HTTP methods while still working with standardized, model-driven network data.

Feature

NETCONF

RESTCONF

Interaction style

RPC-based

REST-style

Transport

Commonly SSH

HTTP/HTTPS

Common port

TCP 830

Typically HTTPS 443

Encoding

XML

JSON or XML depending on implementation

Data modeling

YANG

YANG

Typical use

Structured network configuration/state

Web-friendly model-driven configuration/state


9. YANG Data Models

YANG is a data modeling language. It defines how network information is organized, what fields exist, what data types are valid, and how configuration and operational state are structured. YANG is not a transport protocol.

Pasted content image

Figure 9. YANG defines the data model; NETCONF and RESTCONF provide ways to access modeled network data.


MEMORY AID

YANG = model. NETCONF = protocol. RESTCONF = protocol.


10. End-to-End Enterprise Example: Branch Provisioning

The topology below shows how the concepts work together in a realistic enterprise environment. An automation application at the data center requests a new branch configuration through the controller. The controller identifies the correct branch devices and applies the required settings using supported southbound mechanisms.

Pasted content image

Figure 10. Enterprise branch provisioning topology with controller, WAN edge, L3 switching, access switching, wireless, and user VLANs.


10.1 Example Requirement

A new branch requires three VLANs:

VLAN

Name

Purpose

10

USERS

Employee workstations

20

VOICE

IP phones

30

GUEST

Guest wireless clients


10.2 Step-by-Step Flow

  1. The engineer or orchestration system enters the desired branch policy in an automation application.
  2. The application sends a northbound REST API request to the controller.
  3. The controller authenticates the request and checks which devices belong to the branch site.
  4. The controller translates the high-level request into device-specific actions.
  5. The controller communicates southbound with the branch router and switches using supported model-driven or device-management interfaces.
  6. The L3 switch creates the required VLAN interfaces or policies; access switches receive the required VLAN assignments; wireless policy maps guest traffic to VLAN 30.
  7. Devices return operational state or task results to the controller.
  8. The controller updates its inventory/state database and returns a success or failure response to the application.

{

"site": "Branch-01",

"vlans": [

{"id": 10, "name": "USERS"},

{"id": 20, "name": "VOICE"},

{"id": 30, "name": "GUEST"}

]

}


11. Traditional CLI vs API-Based Management

Traditional CLI

API / Controller-Based Management

Human-oriented interaction

Software-oriented interaction

Often configured device by device

Centralized or orchestrated workflows

Output is usually text

Structured JSON/XML data is common

Parsing can depend on CLI formatting

Data models provide predictable structure

Excellent for troubleshooting and direct validation

Excellent for repeatable automation at scale

Platform commands may differ

Controller/API can provide abstraction across many devices

API-based management does not eliminate the CLI. Network engineers still use CLI for detailed troubleshooting, validation, emergency changes, and platform-specific diagnostics. SDN interfaces add programmability and scale; they do not remove foundational networking skills.


12. OpenFlow Concept

OpenFlow is associated with classic SDN designs in which a centralized controller can program forwarding entries on compatible switches. A flow entry can match packet fields and specify an action, such as forwarding traffic out a particular port. CCNA candidates should understand the concept rather than memorize detailed OpenFlow implementation syntax.

MATCH: Destination network = 10.20.20.0/24

ACTION: Forward out port 3


13. Abstraction and Intent-Based Networking

A major controller benefit is abstraction. An application can request a desired outcome without knowing every command for every device. The controller can translate that intent into platform-specific configuration and policy.

EXAMPLE INTENT

“Guest users may access the Internet but must not access internal corporate resources.” The controller can translate this policy into the required network and security configuration.


14. Practical API Troubleshooting

Symptom

Likely Area to Check

Examples

401 Unauthorized

Authentication

Incorrect username/password, expired token, missing Authorization header.

403 Forbidden

Authorization / RBAC

Account can log in but lacks the required permission.

404 Not Found

URI or resource

Wrong API version, endpoint, object ID, or path.

400 Bad Request

Request body / parameters

Malformed JSON, missing required field, invalid data type.

500 Server Error

Controller/API service

Server-side processing failure or controller issue.

Timeout

Network / service reachability

DNS, routing, firewall, TLS, controller load, or unavailable service.


15. Simple Python REST API Example

The following example shows the basic pattern of a Python application making a GET request. The exact URL and authentication mechanism depend on the controller implementation.

import requests

 

url = "https://controller.example.com/api/v1/devices"

headers = {

"Authorization": "Bearer <TOKEN>",

"Accept": "application/json"

}

 

response = requests.get(url, headers=headers, timeout=30)

print(response.status_code)

print(response.json())

requests.get() sends the HTTP GET request.

The Authorization header carries an access token.

response.status_code shows the HTTP result.

response.json() converts the JSON response into Python data structures.

 

16. Final Summary

SDN interfaces create a structured communication path between applications, controllers, and infrastructure. Northbound APIs allow software to consume controller services and express intent. Southbound interfaces allow the controller to retrieve state and apply configuration to network devices. REST, JSON, HTTP methods, status codes, NETCONF, RESTCONF, and YANG form the core programmable networking concepts that CCNA candidates should understand.


Quick knowledge check

1. Which interface connects an application to an SDN controller?

Answer: Northbound

2. Which interface connects a controller to routers and switches?

Answer: Southbound

3. Which HTTP status code commonly indicates an authentication failure?

Answer: 401

4. Which technology provides REST-style access to YANG-modeled data?

Answer: RESTCONF