CN112732226A - SDN (software defined network) programming method and device and readable computer storage medium - Google Patents

SDN (software defined network) programming method and device and readable computer storage medium Download PDF

Info

Publication number
CN112732226A
CN112732226A CN202011589082.XA CN202011589082A CN112732226A CN 112732226 A CN112732226 A CN 112732226A CN 202011589082 A CN202011589082 A CN 202011589082A CN 112732226 A CN112732226 A CN 112732226A
Authority
CN
China
Prior art keywords
function module
network function
network
slot position
sdn
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011589082.XA
Other languages
Chinese (zh)
Inventor
潘恒
李振宇
武庆华
钟植任
刁祖龙
孟旭颖
孙远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Network Communication and Security Zijinshan Laboratory
Original Assignee
Network Communication and Security Zijinshan Laboratory
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Network Communication and Security Zijinshan Laboratory filed Critical Network Communication and Security Zijinshan Laboratory
Priority to CN202011589082.XA priority Critical patent/CN112732226A/en
Publication of CN112732226A publication Critical patent/CN112732226A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for programming an SDN network and a readable computer storage medium, wherein the SDN network programming method comprises the following steps: determining the fine granularity of the network function module; determining whether the first network function module and the second network function module accord with a connection relation, if so, connecting the first network function module and the second network function module; the output slot position of the first network function module records the input slot position and the object pointer of the second network function module; the input slot position of the second network function module records the output slot position and the object pointer of the first network function module; the SDN network programming method is completed by abstracting network application into a plurality of module combination modes, the combination modes between modules are specified through a built-in lookup table of the modules, and therefore the next module for processing a data packet is flexibly selected by dynamically modifying the content of the lookup table, so that online updating of the network application is supported, and interruption of service flow is avoided.

Description

SDN (software defined network) programming method and device and readable computer storage medium
Technical Field
The present invention relates to the field of software defined networking technologies, and in particular, to a method and an apparatus for programming an SDN network, and a readable computer storage medium.
Background
Networks have become the infrastructure of modern society. The traditional network solidifies the control logic in the distributed network devices, and is difficult in control management and devices are overstaffed. The Software Defined Network (SDN) adopts an open system architecture with a data plane and a control plane separated, and performs unified abstraction on underlying network equipment, and performs processing on data packets in a match + action pipeline form. The remote controller controls and manages the whole network through a uniform southbound programming interface (such as OpenFlow).
However, early SDN network applications were primarily developed and deployed on the basis of a power controller NOX/POX, which is relatively underlying a programming interface provided externally by the POX, and the programming process is similar to operating flow tables directly on the network device. Therefore, network developers often need to consider the control logic of the application and the operation on the flow table of the underlying device while developing the SDN network application, which undoubtedly brings great difficulty and challenge to the whole development process, and thus, the SDN network programming is not simple.
In order to reduce the complexity of SDN network programming, professors such as Jennifer Rexford of Princeton university propose an SDN combined programming method and a programming framework by utilizing a modular concept, the framework enables network functions with fine granularity and relatively independent functions to be independent into independent modules, and different 'combined operators' are defined to logically connect the network function modules in series, so that a network application with relatively more complex functions is constructed, and finally the network application can be compiled into a rule of match + action to be deployed to bottom network equipment. The so-called 'combined operator' describes the logical relationship between different functional modules, and is mainly a two-purpose operator, including three operators of parallel, serial and reloading. The parallel operator ensures that the two network function modules can process network data packets in parallel; the serial operator enables the network data packet to be processed by the previous network function module and then processed by the next module, so that the operation of the previous module on the data packet can directly influence the processing of the next module on the data packet; the reloading operator ensures that the next module can process the data packet when the data packet cannot be processed by the previous network function module, otherwise, the next module is directly skipped.
The SDN modular programming framework greatly reduces the difficulty of network programming and accelerates the innovation and deployment period of network application.
In the prior art, the logical relationship (directed edge) between the network function modules is already determined by the solidification of a configuration file before the network programming system framework is started, and cannot be changed in the operation process. That is, the shape of the data forwarding flow graph corresponding to the network application cannot be changed during the operation process. This, in turn, directly results in the inability of a single complex network application to be modified or upgraded online (i.e., dynamically changing the forwarding flow graph).
Disclosure of Invention
In order to solve the above problems, the present invention provides an SDN network programming method and apparatus that support online update of network applications and avoid interruption of service flows.
In order to achieve the above object, an aspect of the present invention provides an SDN network programming method, including:
determining the fine granularity of the network function module; wherein the network function module comprises at least one input slot position and at least one output slot position;
determining whether the first network function module and the second network function module accord with a connection relation, if so, connecting the first network function module and the second network function module, otherwise, refusing the connection; (ii) a
The output slot position of the first network function module records the input slot position and the object pointer of the second network function module;
and the input slot position of the second network function module records the output slot position and the object pointer of the first network function module.
Optionally, the determining the fine granularity of the network function module further includes:
instantiating a network interface as two functional modules;
instantiating a protocol of a protocol layer as one or more functional modules;
the supplemental functions are instantiated as one or more functional modules.
Optionally, the network interface includes a physical interface and a virtual interface.
Optionally, the number of the input slot and the output slot of the network function module is determined when the network function module is initialized.
Optionally, the output slot and the input slot are used to fill a network function module pointing to an opposite terminal and an opposite terminal port.
Optionally, before the first network function module is connected to the first network function module, the method further includes: and judging whether the input slot position and the output slot position corresponding to the first network function module and the first network function module are empty or not, and if one of the input slot position and the output slot position is not empty, refusing to connect.
Optionally, determining whether the first network function module and the second network function module conform to the connection relationship, further includes: and determining whether the next outlet is the second network function module or not according to the self-generated judgment logic of the first network function module or determining whether the next outlet is the second network function module through a routing table item issued by a control plane.
In another aspect, the present invention further provides an SDN network programming apparatus, including:
the first determining unit is used for determining the fine granularity of the network function module; wherein the network function module comprises at least one input slot position and at least one output slot position;
the second determining unit is used for determining whether the first network function module and the second network function module accord with the connection relation;
the first recording unit is used for recording the input slot position and the object pointer of the second network function module by the output slot position of the first network function module;
and the second recording unit is used for recording the output slot position and the object pointer of the first network function module by the input slot position of the second network function module.
In the SDN network programming device, optionally, the first determining unit includes:
the first instantiation module is used for instantiating the network interface into two functional modules;
a second instantiation module for instantiating a protocol of the protocol layer into one or more functional modules;
a third instantiation module for instantiating the supplemental function as one or more functional modules.
In the SDN network programming device, optionally, the network interface includes a physical interface and a virtual interface.
Compared with the prior art, the invention has the beneficial effects that: the SDN network application is abstracted into different functional modules which are combined in a certain series connection mode, and after the data packet is processed by a single functional module, the subsequent functional modules are selected according to the combination logic to continue processing the data packet. The invention selects the subsequent module of the data packet by a table look-up mode, namely, the subsequent functional module is selected according to the table look-up result, and the pointer of the module is called to continue the processing of the data packet. The table content in the module can be modified by the remote controller in real time through an open interface, so that online updating of network application is supported, and interruption of service flow is avoided.
Drawings
Figure 1 is a flow chart of a SDN network programming method of the present invention;
FIG. 2 is a functional block forwarding diagram of IPv 6;
FIG. 3 is a schematic view of a connector;
FIG. 4 is a global configuration of connectors;
figure 5 is a block diagram of an SDN network programming device in accordance with the present invention;
fig. 6 is a structural diagram of a first determination unit in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present embodiment provides an SDN network programming method, including the following steps:
s10: determining the fine granularity of the network function module; wherein the network function module comprises at least one input slot position and at least one output slot position;
as an independent operation and logic processing process, the division of the size of the network function module has a very obvious influence on the topology structure and the implementation mode of the whole forwarding directed graph. The larger the granularity division of the network function module, the more operations and logical processes are contained inside, and the poorer the flexibility and programmability are. The smaller the functional module, the less the performance of the system is affected.
The module division rule of this embodiment is as follows: each network Interface (physical or virtual) instantiates two network function modules, Interface-Input and Interface Output; two-layer, three-layer and four-layer related protocols, each of which instantiates one or more functional modules, such as Ethernet-Input, IPv4, IPv6, ARP, ICMP and ICMP 6; additional functions beyond the triple-layer forwarding standard are also instantiated as single or multiple functional modules, such as IOAM, NAT64, etc. A typical functional block forwarding diagram of IPv6 is shown in fig. 2. The forwarding system is provided with 3 dpdk-driven physical interfaces, each interface is provided with two functional modules and corresponding dpdk-input and dpdk-output, and the forwarding system realizes user-state network card reading and sending drive. The Dpdk-input is connected with the Ethernet-input and mainly completes the functions of MAC check, VLAN processing and the like. The Ethernet-input next hop is IP6-forward, which is a three-layer functional module for realizing the IP6 protocol, and the functions include unicast and multicast detection, route lookup, and updating two-layer and three-layer headers, and then the IP6-forward has three outlets respectively connected to the dpdk-output of each physical interface.
S20: determining whether the first network function module and the second network function module accord with a connection relation, if so, connecting the first network function module and the second network function module;
logically, a network function block may be defined as a logical processing block of a plurality of input/output ports. The connection of two network function modules is considered as a connection between an input and an output port. In principle, which input port is connected to which input port is not restricted, but this may occur in case of non-compliance with the processing logic. An instructive template is therefore needed to tell the operator what meaning each input/output port of the network function module represents and what the output/input ports of the opposite end can be connected to. The former is responsible for explanation by network function module developer, and the latter is based on existing network knowledge to make constraint declaration by template writer.
After a certain network function module executes all operations for the data packet, a path decision stage is entered, that is, it is determined who the next module is. The decision can be decided according to two aspects: the first aspect is the judgment logic of the network function module itself, and the network function module can judge which the next exit is according to the information of the data packet and the logic of itself, for example, according to the Type field of the two-layer header, the exit is directly determined. The second aspect is that the function module can perform a complete path decision behavior through an external auxiliary policy, that is, it needs to determine which exit of the network function module to use through a routing table item issued by the control plane.
S30: the output slot position of the first network function module records the input slot position and the object pointer of the second network function module;
s40: and the input slot position of the second network function module records the output slot position and the object pointer of the first network function module.
A certain type of interface of the network function module may be defined as a connector having a number of empty slots therein which may be filled with a pointing peer function module and a peer port. The number of slots of the connector is determined at initialization of the functional module. As shown in fig. 3, in the present embodiment, the connection operation flow of the first network function module and the second network function module is: the output of the first network function module selects a certain free Slot position, and records the object pointer of the back function module and the corresponding output Slot position, namely the < Next _ FB, In _ Slot > binary group. The input Slot of the second network function module records the < Prev _ FB, Out _ Slot > duplet of the first network function module. Therefore, before connection, it is necessary to determine whether the slots corresponding to the two connectors are empty, and if one of the slots is not empty, connection is rejected.
As shown in fig. 4, when the first network function module determines that the first network function module is connected to the second network function module, that is, the output port of the first network function module is determined, the first network function module finds the binary group corresponding to the second network function module and the ingress port from the corresponding output slot, calls the packet processing function of the second network function module, and the pointer pointing to the packet and the ingress port are both transmitted as parameters of the processing function.
As shown in fig. 5, the present embodiment further provides an SDN network programming apparatus, including:
a first determining unit 100, configured to determine a fine granularity of a network function module; wherein the network function module comprises at least one input slot position and at least one output slot position; the specific determination method is already described in detail in step S10 of the SDN network programming method, and therefore, is not described herein again.
A second determining unit 200, configured to determine whether the first network function module and the second network function module conform to a connection relationship; the specific determination method is already described in detail in step S20 of the SDN network programming method, and therefore, is not described herein again.
A first recording unit 300, configured to record an input slot and an object pointer of the second network function module in an output slot of the first network function module; the specific determination method is already described in detail in step S30 of the SDN network programming method, and therefore, is not described herein again.
A second recording unit 400, configured to record an output slot and an object pointer of the first network function module at an input slot of the second network function module; the specific recording method is already described in detail in step S40 of the SDN network programming method, and therefore, will not be described herein again.
In addition, as shown in fig. 6, the first determination unit 100 includes:
a first instantiation module 101, configured to instantiate a network interface into two functional modules;
a second instantiation module 102, configured to instantiate a protocol of the protocol layer into one or more functional modules;
a third instantiation module 103 for instantiating the supplemental function as one or more functional modules.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium may store a program, and when the program is executed, the program includes some or all of the steps of any one of the SDN network programming methods described in the above method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
An exemplary flow chart of a method for implementing a service chain according to an embodiment of the present invention is described above with reference to the accompanying drawings. It should be noted that the numerous details included in the above description are merely exemplary of the invention and are not limiting of the invention. In other embodiments of the invention, the method may have more, fewer, or different steps, and the order, inclusion, function, etc. of the steps may be different from that described and illustrated.

Claims (11)

1. An SDN network programming method, comprising:
determining the fine granularity of the network function module; wherein the network function module comprises at least one input slot position and at least one output slot position;
determining whether the first network function module and the second network function module accord with a connection relation, if so, connecting the first network function module and the second network function module, otherwise, refusing the connection;
the output slot position of the first network function module records the input slot position and the object pointer of the second network function module;
and the input slot position of the second network function module records the output slot position and the object pointer of the first network function module.
2. The SDN network programming method of claim 1, wherein determining the fine granularity of the network function module further comprises:
instantiating a network interface as two functional modules;
instantiating a protocol of a protocol layer as one or more functional modules;
the supplemental functions are instantiated as one or more functional modules.
3. The SDN network programming method of claim 2, wherein: the network interface includes a physical interface and a virtual interface.
4. The SDN network programming method of claim 1, wherein: the number of input slots and output slots of the network function module is determined when the network function module is initialized.
5. The SDN network programming method of claim 1, wherein: and the output slot position and the input slot position are used for filling the network function module pointing to the opposite terminal and the opposite terminal port.
6. The SDN network programming method of claim 1, wherein before the first network function module connects with the first network function module, further comprising: and judging whether the input slot position and the output slot position corresponding to the first network function module and the first network function module are empty or not, and if one of the input slot position and the output slot position is not empty, refusing to connect.
7. The SDN network programming method of claim 1, wherein determining whether the first network function module and the second network function module conform to a connection relationship further comprises: and determining whether the next outlet is the second network function module or not according to the self-generated judgment logic of the first network function module or determining whether the next outlet is the second network function module through a routing table item issued by a control plane.
8. An SDN network programming apparatus, comprising:
the first determining unit is used for determining the fine granularity of the network function module; wherein the network function module comprises at least one input slot position and at least one output slot position;
the second determining unit is used for determining whether the first network function module and the second network function module accord with the connection relation;
the first recording unit is used for recording the input slot position and the object pointer of the second network function module by the output slot position of the first network function module;
and the second recording unit is used for recording the output slot position and the object pointer of the first network function module by the input slot position of the second network function module.
9. The SDN network programming device of claim 8, wherein the first determining unit comprises:
the first instantiation module is used for instantiating the network interface into two functional modules;
a second instantiation module for instantiating a protocol of the protocol layer into one or more functional modules;
a third instantiation module for instantiating the supplemental function as one or more functional modules.
10. The SDN network programming device of claim 9, wherein: the network interface includes a physical interface and a virtual interface.
11. A computer readable storage medium storing a computer program, the computer program when executed by a processor implementing the steps of a SDN network programming method according to any one of claims 1 to 7.
CN202011589082.XA 2020-12-29 2020-12-29 SDN (software defined network) programming method and device and readable computer storage medium Pending CN112732226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011589082.XA CN112732226A (en) 2020-12-29 2020-12-29 SDN (software defined network) programming method and device and readable computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011589082.XA CN112732226A (en) 2020-12-29 2020-12-29 SDN (software defined network) programming method and device and readable computer storage medium

Publications (1)

Publication Number Publication Date
CN112732226A true CN112732226A (en) 2021-04-30

Family

ID=75607092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011589082.XA Pending CN112732226A (en) 2020-12-29 2020-12-29 SDN (software defined network) programming method and device and readable computer storage medium

Country Status (1)

Country Link
CN (1) CN112732226A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104012052A (en) * 2011-11-10 2014-08-27 博科通讯系统有限公司 System And Method For Flow Management In Software-Defined Networks
US20140241357A1 (en) * 2013-02-25 2014-08-28 Brocade Communications Systems, Inc. Techniques for customizing forwarding decisions via a hardware lookup result
CN104967533A (en) * 2015-05-26 2015-10-07 国网智能电网研究院 Method and apparatus of adding IEC 61850 configuration interface to SDN controller
CN111130910A (en) * 2019-12-31 2020-05-08 上海上实龙创智慧能源科技股份有限公司 SDN controller applied to Internet of things platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104012052A (en) * 2011-11-10 2014-08-27 博科通讯系统有限公司 System And Method For Flow Management In Software-Defined Networks
US20140241357A1 (en) * 2013-02-25 2014-08-28 Brocade Communications Systems, Inc. Techniques for customizing forwarding decisions via a hardware lookup result
CN104967533A (en) * 2015-05-26 2015-10-07 国网智能电网研究院 Method and apparatus of adding IEC 61850 configuration interface to SDN controller
CN111130910A (en) * 2019-12-31 2020-05-08 上海上实龙创智慧能源科技股份有限公司 SDN controller applied to Internet of things platform

Similar Documents

Publication Publication Date Title
US9942095B2 (en) Methods and apparatus for selecting a master virtual processor within a switch fabric element
US9942623B2 (en) Data center network architecture
US7246178B2 (en) Methods and systems for changing a topology of a network
US9204207B2 (en) Hierarchy of control in a data center network
US9413645B1 (en) Methods and apparatus for accessing route information in a distributed switch
EP2774329B1 (en) Data center network architecture
CN111654493B (en) Method, system, storage medium and electronic device for intercepting specified flow in Openstack
US9337931B2 (en) Control and provisioning in a data center network with at least one central controller
CN112291252B (en) Architecture and method for realizing symmetric flow guidance of north-south flow
US9008080B1 (en) Systems and methods for controlling switches to monitor network traffic
TW202031021A (en) Logical router comprising disaggregated network elements
AU2004305790A1 (en) Virtual network device
EP3787232A1 (en) Network configuration method, device, and system
CN114363021A (en) Network shooting range system, virtual network implementation method and device of network shooting range system
CN112732226A (en) SDN (software defined network) programming method and device and readable computer storage medium
CN115987778A (en) Container communication method based on Kubernetes cluster
CN110912823B (en) SDN and IPv6 reliable routing method oriented to heterogeneous wired and wireless converged network
Talhar et al. An adaptive approach for controller placement problem in software defined networks
CN112671583B (en) Topology pruning method and device for ring network and virtual switch
Starkova et al. Implementation of Advanced Routing Methods Based on the SDN Concept and OS Linux
CN116301896A (en) Method, device and storage medium for hot adding of network logic flow table
CN115622959A (en) Switch control method, device, equipment, storage medium and SDN (software defined network)
Shkarupylo et al. PART VI. SOFTWARE DEFINED NETWORKS AND IOT 20. SOFTWARE DEFINED NETWORKS BASICS
PASCUAL et al. ACTIVITY REPORT

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination