36 · Explaining Software-Defined Networking說明軟體定義網路

Software-Defined Network Layers軟體定義網路各層

This topic describes northbound and southbound application programming interfaces (APIs).

本主題說明北向與南向應用程式介面(API)。

The SDN architecture differs from the architecture of traditional networks. It comprises three stacked layers (from the bottom up):

SDN 架構與傳統網路的架構不同,由下而上共分三層:

  • Infrastructure layer:Contains network elements (any physical or virtual device that deals with traffic).基礎設施層:包含網路元件(任何處理流量的實體或虛擬裝置)。
  • Control layer:Represents the core layer of the SDN architecture. It contains SDN controllers, which provide centralized control of the devices in the data plane.控制層:代表 SDN 架構的核心層。它包含 SDN 控制器,對資料平面中的裝置提供集中控制。
  • Application layer:Contains the SDN applications, which communicate network requirements towards the controller.應用層:包含 SDN 應用程式,這些應用程式會將網路需求傳達給控制器。

The controller uses southbound APIs to control individual devices in the infrastructure layer. The controller uses northbound APIs to provide an abstracted network view to upstream applications in the application layer.

控制器透過南向 API 控制基礎設施層中的個別裝置;控制器透過北向 API 對應用層的上游應用程式提供抽象化的網路視圖。

Northbound and Southbound APIs

北向與南向 API

Traditionally, methods such as SNMP, Telnet, and SSH were among the only options to interact with a network device. However, over the last few years, networking vendors, including Cisco, have developed and made available APIs on their platforms in order for network operators to more easily manage network devices and gain flexibility in functionality.

傳統上,SNMP、Telnet、SSH 等方式幾乎是與網路裝置互動的唯一選擇。然而,近幾年來,包含 Cisco 在內的網路廠商已在其平台上開發並提供 API,讓網路操作人員能更輕鬆地管理網路裝置,並在功能上獲得更大的彈性。

The API is the mechanism by which an end user makes a request of a network device and the network device responds to the end user. This method provides increased functionality and scalability over traditional network management methods. In order to transmit information, APIs require a transport mechanism such as SSH, HTTP, and HTTPS, though there are other possible transport mechanisms as well.

API 是終端使用者向網路裝置提出請求、網路裝置對終端使用者做出回應的機制。相較於傳統網路管理方式,這種方式能提供更高的功能性與可擴充性。為了傳輸資訊,API 需要透過傳輸機制,例如 SSH、HTTP 與 HTTPS,當然也可能使用其他傳輸機制。

An SDN offers a centralized view of the network, giving an SDN controller the ability to act as the brain of the network. The control layer of the SDN is usually a software solution called the SDN controller. The SDN controller uses APIs to communicate with the application and infrastructure layers. An API is a set of functions and procedures that enable communication with a service. Using APIs, business applications can tell the SDN controller what they need from the network. Then the controller uses the APIs to pass instructions to network devices, such as routers, switches, and WLCs. However, those sets of APIs are very different. Communication with the infrastructure layer is defined with southbound APIs, while services are offered to the application layer using the northbound APIs.

SDN 提供網路的集中視圖,使 SDN 控制器能作為網路的「大腦」。SDN 的控制層通常是一套稱為 SDN 控制器的軟體解決方案。SDN 控制器透過 API 與應用層及基礎設施層溝通。API 是一組使通訊得以與服務進行的函式與程序。透過 API,商業應用程式可以告訴 SDN 控制器它們對網路的需求,接著控制器再透過 API 將指令傳遞給路由器、交換器、WLC 等網路裝置。然而,這兩組 API 有很大差異:與基礎設施層的通訊是以南向 API 定義,而提供給應用層的服務則使用北向 API。

Northbound APIs or northbound interfaces are responsible for the communication between the SDN controller and the services that run over the network. Northbound APIs enable your applications to manage and control the network. So, rather than adjusting and tweaking your network repeatedly to get a service or application running correctly, you can set up a framework that allows the application to demand the network setup that it needs. These applications range from network virtualization and dynamic virtual network provisioning to more granular firewall monitoring, user identity management, and access policy control. Currently REST API is predominately being used as a single northbound interface that you can use for communication between the controller and all applications.

北向 API(或稱北向介面)負責 SDN 控制器與網路上執行的服務之間的通訊。北向 API 讓應用程式能夠管理與控制網路。因此,您不必反覆調整網路設定以讓某項服務或應用程式正確運作,而是可以建立一套框架,讓應用程式自行要求它所需要的網路設定。這些應用程式涵蓋範圍很廣,從網路虛擬化、動態虛擬網路佈建,到更細緻的防火牆監控、使用者身分管理與存取政策控制皆有。目前,REST API 已成為控制器與所有應用程式之間通訊時,最常使用的單一北向介面。

SDN controller architectures have evolved to include a southbound abstraction layer. This abstraction layer abstracts the network away to have one single place where you start writing the applications to and allows application policies to be translated from an application through the APIs, using whichever southbound protocol is supported and available on the controller and infrastructure device. This new approach allows for the inclusion of both new protocols and southbound controller protocols and APIs, including (but not limited to) the following:

SDN 控制器架構已演進出南向抽象層。這個抽象層將網路加以抽象化,讓您能有單一起點來撰寫應用程式,並允許應用政策透過 API,使用控制器與基礎設施裝置上任何支援且可用的南向協定轉譯而成。這種新方法能納入新的協定與南向控制器協定及 API,包括但不限於以下項目:

  • OpenFlow: An industry-standard API, which the Open Networking Foundation (ONF) defines. OpenFlow allows direct access to and manipulation of the forwarding plane of network devices such as switches and routers, both physical and virtual (hypervisor-based). The actual configuration of the devices is by the use of Network Configuration Protocol (NETCONF).OpenFlow:由開放網路基金會(ONF)定義的產業標準 API。OpenFlow 允許直接存取並操控網路裝置(如交換器與路由器,不論實體或虛擬〔基於 Hypervisor〕)的轉送平面。裝置的實際設定則透過網路設定協定(NETCONF)進行。
  • NETCONF:An IETF standardized network management protocol. It provides mechanisms to install, manipulate, and delete the configuration of network devices via Remote Procedure Call (RPC) mechanisms. The messages are encoded by using XML. Not all devices support NETCONF—the ones that do support it advertise their capabilities via the API.NETCONF:由 IETF 標準化的網路管理協定,透過遠端程序呼叫(RPC)機制提供安裝、操作與刪除網路裝置設定的方式,訊息以 XML 編碼。並非所有裝置都支援 NETCONF——支援的裝置會透過 API 通告其能力。
  • RESTCONF: In the simplest terms, RESTCONF adds a REST API to NETCONF.RESTCONF:簡單來說,RESTCONF 是在 NETCONF 上加入了 REST API。
  • OpFlex:An open-standard protocol that provides a distributed control system that is based on a declarative policy information model. The big difference between OpFlex and OpenFlow lies with their respective SDN models. OpenFlow uses an imperative SDN model, where a centralized controller sends detailed and complex instructions to the control plane of the network elements to implement a new application policy. In contrast, OpFlex uses a declarative SDN model. The controller, which, in this case, is called by its marketing name, Cisco Application Policy Infrastructure Controller (APIC), sends a more abstract policy to the network elements. The controller trusts the network elements to implement the required changes using their own control planes.OpFlex:一種開放標準協定,提供以宣告式政策資訊模型為基礎的分散式控制系統。OpFlex 與 OpenFlow 的主要差異在於各自的 SDN 模型:OpenFlow 採用命令式 SDN 模型,由集中控制器將詳細且複雜的指令傳送給網路元件的控制平面,以實作新的應用政策;相對地,OpFlex 採用宣告式 SDN 模型。此情況下的控制器以其行銷名稱「Cisco 應用政策基礎設施控制器(APIC)」稱之,會將較抽象的政策傳送給網路元件,並信任這些元件會以自身的控制平面實作所需的變更。
  • REST: The software architectural style of the world wide web. REST APIs allow controllers to monitor and manage infrastructure through the HTTP and HTTPS protocols, with the same HTTP verbs (GET, POST, PUT, DELETE, and so on) that web browsers use to retrieve webpages.REST:全球資訊網所採用的軟體架構風格。REST API 讓控制器能透過 HTTP 與 HTTPS 協定監控並管理基礎設施,使用的 HTTP 動詞(GET、POST、PUT、DELETE 等)與網頁瀏覽器擷取網頁時所用的相同。
  • SNMP: SNMP is used to communicate management information between the network management stations and the agents in the network elements.SNMP:SNMP 用於在網路管理站與網路元件中的代理程式之間傳遞管理資訊。
  • Vendor-specific protocols:Many vendors use their own proprietary solutions, which provide REST API to a device, for example, Cisco uses NX-API for the Cisco Nexus family of data center switches.廠商專屬協定:許多廠商使用自家專屬解決方案,為裝置提供 REST API,例如 Cisco 針對 Cisco Nexus 系列資料中心交換器使用 NX-API。
Which of the following protocols is predominantly used as a single northbound interface for communication between the SDN controller and all applications?下列哪一種協定被廣泛用作 SDN 控制器與所有應用程式之間通訊的單一北向介面?