CN109725918B - Configuration upgrading method and device, controller and storage medium - Google Patents
Configuration upgrading method and device, controller and storage medium Download PDFInfo
- Publication number
- CN109725918B CN109725918B CN201811498224.4A CN201811498224A CN109725918B CN 109725918 B CN109725918 B CN 109725918B CN 201811498224 A CN201811498224 A CN 201811498224A CN 109725918 B CN109725918 B CN 109725918B
- Authority
- CN
- China
- Prior art keywords
- configuration
- target
- path
- forwarding
- node
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000015654 memory Effects 0.000 claims description 29
- 238000004891 communication Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 22
- 230000008569 process Effects 0.000 description 17
- 230000006870 function Effects 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 238000010845 search algorithm Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses a configuration upgrading method, which comprises the following steps: obtaining an initial configuration and a target configuration of a forwarding configuration, wherein the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, and the target configuration represents a target forwarding path after the forwarding configuration is upgraded; generating an intermediate state target forwarding configuration based on the initial configuration and the target configuration; and upgrading to the target configuration based on the intermediate target forwarding configuration. The embodiment of the invention also discloses a configuration upgrading device, a controller and a storage medium.
Description
Technical Field
The invention relates to the technical field of computer network control, in particular to a configuration upgrading method and device, a controller and a storage medium.
Background
Software Defined Networking (SDN) is a novel Network innovation architecture proposed by Emulex, and its core technology OpenFlow separates the control plane and data plane of a Network device, thereby realizing flexible control of Network traffic and providing a good platform for innovation of a core Network and application. The SDN allows one or more forwarding nodes on the data plane to complete Functions of a part of middleware (Middle-Box), such as a Firewall (Firewall), an Access Control List (ACL), Deep Packet Inspection (DPI), and the like, and such Functions are also generally referred to as Network Function Virtualization (NFV), and the forwarding nodes that complete these Functions may be referred to as routing points (waypoints).
In an SDN network, it is a common situation that the forwarding configuration of a forwarding node needs to be upgraded. Currently, when forwarding configuration with a Waypoint needs to be upgraded, and the upgrade mode is based on Rule Replacement (Rule replace), there may be a case of no solution; on the other hand, when the upgrade method is a method based on Two-Phase Update (Two Phase Update), or a method in which both methods are mixed, a feasible solution can be obtained, but the upgrade process is complicated.
Disclosure of Invention
In view of this, embodiments of the present invention are expected to provide a configuration upgrade method and apparatus, a controller, and a storage medium, which can simplify the configuration upgrade process and improve the upgrade success rate.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a configuration upgrading method, which is applied to a software defined network SDN, and the method includes:
obtaining an initial configuration and a target configuration of a forwarding configuration, wherein the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, and the target configuration represents a target forwarding path after the forwarding configuration is upgraded;
generating an intermediate state target forwarding configuration based on the initial configuration and the target configuration;
and upgrading to the target configuration based on the intermediate target forwarding configuration.
In a second aspect, an embodiment of the present invention provides a configuration upgrade apparatus, which is applied in a software defined network SDN, and the apparatus includes:
an obtaining unit, configured to obtain an initial configuration and a target configuration of a forwarding configuration, where the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, and the target configuration represents a target forwarding path after the forwarding configuration is upgraded;
a generating unit, configured to generate an intermediate target forwarding configuration based on the initial configuration and the target configuration;
and the upgrading unit is used for upgrading the intermediate state target forwarding configuration into the target configuration.
In a third aspect, an embodiment of the present invention provides a controller, which is applied in a software defined network SDN, where the controller at least includes: a processor, a memory, a communication interface, and a bus for connecting the processor, the memory, and the communication interface; the processor is configured to execute a configuration upgrade program stored in the memory to implement the method as described in the first aspect above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a configuration upgrade program is stored, and the configuration upgrade program is applied in a software defined network SDN, and when executed by a processor, implements the method described in the first aspect.
The embodiment of the invention provides a configuration upgrading method and device, a controller and a storage medium, wherein the method comprises the following steps: obtaining an initial configuration and a target configuration of a forwarding configuration, wherein the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, and the target configuration represents a target forwarding path after the forwarding configuration is upgraded; generating an intermediate state target forwarding configuration based on the initial configuration and the target configuration; and upgrading to the target configuration based on the intermediate target forwarding configuration. That is to say, the forwarding configuration upgrading method provided in the embodiment of the present invention generates the intermediate state target forwarding configuration based on the initial configuration and the target configuration, and further generates the target configuration through the intermediate state target forwarding configuration, so that the configuration upgrading process is simplified, and the success rate of upgrading is ensured.
Drawings
FIG. 1 is a basic architecture diagram of a software defined network;
fig. 2 is a flowchart of a configuration upgrading method according to an embodiment of the present invention;
FIG. 3 is an exemplary path diagram for an initial configuration in an embodiment of the present invention;
FIG. 4 is an exemplary path diagram of a target configuration in an embodiment of the present invention;
FIG. 5 is a flowchart of an exemplary configuration upgrade method provided by an embodiment of the present invention;
FIG. 6 is a diagram of an exemplary initial configuration in an embodiment of the present invention;
FIG. 7 is an exemplary target configuration diagram in an embodiment of the present invention;
FIG. 8 is a diagram of an exemplary intermediate state target forwarding configuration in an embodiment of the present invention;
fig. 9 is a diagram of a configuration upgrading apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a controller according to an embodiment of the present invention.
Detailed Description
The software defined network is a novel network architecture with separated data control and programmable software, fig. 1 is a basic architecture diagram of the software defined network, and as shown in fig. 1, the SDN network architecture is divided into an application layer, a control layer and a data forwarding layer from top to bottom. If the SDN controller is regarded as a middleware, communication of the SDN controller has two directions, on one hand, the controller at the control layer in the SDN performs centralized control on network devices in the data forwarding layer to obtain a network topology structure, and receives data from the network devices to realize southbound communication. One example of southbound communication is a controller programming the forwarding table of a network device with OpenFlow. In another aspect, the controller receives a service Application request from the Application layer through an Application Programming Interface (API), i.e., a northbound Interface, to implement interaction with the Application layer.
The software defined network, as a new network architecture, has the greatest advantages of the separation of the control plane and the forwarding plane, centralized control, and the like. Due to the characteristic that the network rules change in real time, a network administrator can issue a configuration upgrading strategy through the controller according to the OpenFlow protocol, so that the equipment does not need to be operated one by one, and only the controller needs to be configured.
As described in the background section of the specification, in the existing configuration upgrading method, the situation of no solution often occurs in the upgrading mode based on rule replacement; based on a two-phase coexistence mode, a full amount of data packet header labels need to be introduced into the whole network, and meanwhile, huge consumption is caused to the forwarding table resources of the data plane; in addition, the configuration upgrading mode based on the mixture of the two modes is difficult to realize in the current diversified and multi-manufacturer networks because any forwarding node can perform data packet header label processing and all forwarding nodes are required to support various forwarding modes, so that the management is complex and pressure can be brought to the forwarding table resources.
Based on this, the embodiment of the present invention provides an improved scheme based on rule replacement, which improves the success rate of forwarding configuration upgrade without any data packet header processing burden on the data plane.
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.
Example one
An embodiment of the present invention provides a configuration upgrading method, which is applied to a software defined network SDN, and fig. 2 is a flowchart of the configuration upgrading method provided in the embodiment of the present invention, as shown in fig. 2, in the embodiment of the present invention, the configuration upgrading method may include the following steps:
s101, obtaining initial configuration and target configuration of forwarding configuration, wherein the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, and the target configuration represents a target forwarding path obtained after the forwarding configuration is upgraded.
In the embodiment of the invention, when the controller receives a configuration upgrading instruction sent by an application layer, the controller can obtain the initial configuration and the target configuration of the forwarding configuration. The initial configuration represents an initial forwarding path of forwarding configuration in the SDN, and the target configuration represents a target forwarding path after the forwarding configuration is upgraded.
It should be noted that, in the embodiment of the present invention, the controller has obtained the topology of the network in advance, that is, the controller has known the forwarding items of each network node in the network in advance, where the network node is a forwarding device, the forwarding item refers to port information of a matching destination forwarding node, and determines an entity of a next-hop forwarding device, and the forwarding items of all the network nodes form a forwarding path. The purpose of forwarding configuration upgrade is that the controller upgrades forwarding items on multiple forwarding devices, and finally, the forwarding items are upgraded to a target configuration.
In the embodiment of the invention, the initial configuration and the target configuration both comprise forwarding paths from the initial node (S node) to the target node (D node) through a specific intermediate node (waypoint node), but the forwarding paths in the two configurations are different. After the initial configuration and the target configuration are obtained, the forwarding configuration of the network can be upgraded based on the initial configuration, and finally the forwarding configuration is upgraded to the target configuration.
It should be noted that, in the embodiment of the present invention, the controller needs to ensure the correctness in the upgrading process as much as possible, where the correctness in the upgrading process means that when the configuration of the forwarding item is changed, each forwarding device in the network does not affect the correct forwarding of the network, that is, there is always a forwarding path starting from S, passing through waypoint, and ending at D, and there is no black hole or loop in the network.
Fig. 3 is an exemplary path diagram of an initial configuration in an embodiment of the present invention, and correspondingly, fig. 4 is an exemplary path diagram of a target configuration in an embodiment of the present invention. As shown in fig. 3 and 4, both the initial configuration and the target configuration start from the initial node S, pass through the intermediate node Firewall, and reach the target node D. The initial forwarding path of the initial configuration in fig. 3 is: s → A → Firewall → C → D, the target forwarding path of the target configuration in FIG. 4 is: s → C → Firewall → A → D. It should be noted that each node in the initial forwarding path and the target forwarding path represents a network device, C → D and so on have a directional edge, which represents a forwarding item of a port whose destination is D in the network device, that is, a forwarding item of a port whose destination is D in the network device, where the direction of the edge represents a next-hop target forwarded by the forwarding item, that is, the next-hop target of C is D. It should be noted that the port information of the next hop target in the forwarding entry may be based on the quintuple information, for example, based on an Internet Protocol Address (IP) of the next hop target in the quintuple information.
Further, in an embodiment of the present invention, after obtaining the initial configuration and the target configuration of the network node, the controller compares the nodes in the initial configuration and the target configuration, retains the overlapped nodes, and updates the initial configuration and/or the target configuration.
It should be noted that, in the embodiment of the present invention, by removing unnecessary nodes before configuration upgrade, the processing flow can be simplified.
Illustratively, if the forwarding path of the target configuration of the forwarding path for forwarding a certain packet is a → B → D, and the path of a → C → B → D exists in the network topology, the unnecessary node C can be deleted when upgrading based on the initial configuration, thereby simplifying the forwarding process.
S102, generating intermediate state target forwarding configuration based on the initial configuration and the target configuration.
In an embodiment of the present invention, after obtaining the initial configuration and the target configuration, the controller may generate an intermediate target forwarding configuration based on the initial configuration and the target configuration.
It should be noted that, in the embodiment of the present invention, the controller generates the intermediate target forwarding configuration in a target configuration guided by the target configuration, and based on the target configuration, the controller upgrades the forwarding item of the network node in the initial configuration and obtains the intermediate target forwarding configuration in combination with the target forwarding path, where the intermediate target forwarding configuration includes a part of the target configuration.
In the embodiment of the present invention, the controller generates the intermediate state target forwarding configuration based on the initial configuration and the target configuration in three ways: 1. the controller generates an intermediate state target forwarding configuration based on a path from an initial node to an intermediate node in the initial configuration and in combination with a target forwarding path; 2. the controller generates intermediate state target forwarding configuration based on the path from the intermediate node to the target node in the initial configuration and in combination with the target forwarding path; 3. the controller generates an intermediate state target forwarding configuration based on a path from the initial node to the target node in the initial configuration and in combination with the target forwarding path.
It can be understood that, in the embodiment of the present invention, the controller is not directly upgraded from the initial configuration to the target configuration, but introduces the intermediate state target forwarding configuration on the basis of the target configuration, so as to improve the success rate in the upgrading process. And the controller can upgrade the nodes in the initial forwarding path of the initial configuration from the initial nodes to the intermediate nodes respectively by taking the intermediate nodes as boundary lines, upgrade the nodes to the intermediate nodes in the initial forwarding path to intermediate state target forwarding configuration on the basis of target configuration, and upgrade the nodes to the target nodes in the initial forwarding path to intermediate state target forwarding configuration on the basis of target configuration. The success rate in the upgrading process is further improved by upgrading the initial forwarding path in a segmented manner and generating the intermediate target forwarding configuration on the basis of the target configuration.
Further, in the above mode 1, the controller generates an intermediate state target forwarding configuration based on a path from the initial node to the intermediate node in the initial configuration and in combination with the target forwarding path, including: the controller acquires a path from the initial node to the intermediate node; the controller upgrades the nodes in the path to generate a first path, wherein the first path does not have a loop and passes through the intermediate node; and the controller replaces the path from the initial node to the intermediate node in the target forwarding path with the first path to generate intermediate state target forwarding configuration.
It should be noted that, in the embodiment of the present invention, the controller acquires a path from the initial node to the intermediate node from the initial forwarding path of the initial forwarding configuration, and then updates the node in the path to acquire the first path, where the first path is acquired by using, for example, a depth-first search algorithm, and the like, and the first path satisfies that no loop exists and passes through the intermediate node. After the controller acquires the first path, the first path is replaced by the path from the initial node to the intermediate node in the target forwarding path, and then the intermediate state target forwarding configuration can be generated.
Further, in the above mode 2, the controller generates an intermediate state target forwarding configuration based on a path from the intermediate node to the target node in the initial configuration and in combination with the target forwarding path, including: the controller acquires a path from the intermediate node to the target node; the controller upgrades nodes except the target node in the path to generate a second path, wherein the second path does not have a loop and passes through an intermediate node; and the controller replaces the path from the intermediate node to the target node in the target forwarding path with the second path to generate intermediate state target forwarding configuration.
It should be noted that, in the embodiment of the present invention, the controller acquires a path from the intermediate node to the target node from the initial forwarding path of the initial forwarding configuration, and then updates the node in the path to acquire the second path, where the second path is acquired by using, for example, a depth-first search algorithm, and the like, and the second path satisfies that no loop exists and passes through the intermediate node. And after the controller acquires the second path, replacing the path from the intermediate node to the target node in the target forwarding path with the second path, and generating intermediate state target forwarding configuration.
Further, in the above manner 3, the controller generates an intermediate state target forwarding configuration based on a path from an initial node to a target node in the initial configuration and in combination with the target forwarding path, including: the controller acquires a path from the initial node to the target node; the controller upgrades the nodes except the target node in the path, and if the loop is not introduced, the loop passes through the intermediate node and comprises the path in the target forwarding path, the intermediate state target forwarding configuration is generated.
It should be noted that, in the embodiment of the present invention, the controller acquires a path from the initial forwarding path of the initial forwarding configuration to the target node, and since the target node is the end point, the controller needs to upgrade nodes other than the target node, and the controller may also adopt a method such as a depth-first search algorithm to acquire a path that satisfies that no loop exists and passes through the intermediate node and includes a directed edge in the target forwarding path, where the path is the intermediate state target forwarding configuration.
It should be noted that, in the three ways described above in the embodiments of the present invention, the process of generating the intermediate state target forwarding configuration by the controller based on the initial configuration and the target configuration has a core that, in the upgrading process, the intermediate state target forwarding configuration containing a part of the target configuration is introduced, so that the possibility of success of the upgrading is improved.
Further, in embodiments of the present invention, the controller may consider the weights of the combined paths when upgrading nodes in the initial forwarding path. The weight is the cost of the path, and the weight is lower when the cost is higher, and the weight is higher when the cost is lower. The controller can designate a weight selection mode of a path when the node is upgraded so as to upgrade each upgrading node according to a uniform rule.
And S103, upgrading to a target configuration based on the intermediate target forwarding configuration.
In an embodiment of the present invention, after the intermediate state target forwarding configuration is generated, the controller may upgrade to the target configuration based on the intermediate state target forwarding configuration.
It should be noted that, in the embodiment of the present invention, the controller may continue to upgrade the intermediate state target forwarding configuration to the target configuration by means of rule replacement based on the intermediate state target forwarding configuration.
Further, after the controller in the SDN network upgrades the forwarding configuration to the target configuration, the data forwarding layer may forward data according to the upgraded or target configuration, thereby completing the operation of the data plane.
It can be understood that, in the embodiment of the present invention, the controller is not directly upgraded from the initial configuration to the target configuration, but introduces the intermediate state target forwarding configuration on the basis of the target configuration, and upgrades the intermediate state target forwarding configuration to the target configuration, thereby improving the success rate in the upgrading process.
Example two
Based on the first embodiment, the scheme of the first embodiment is described by taking an example of generating an intermediate state target forwarding configuration by a path from an initial node to an intermediate node, and fig. 5 is a flowchart of an exemplary configuration upgrading method provided by the embodiment of the present invention, as shown in fig. 5, the configuration upgrading method includes the following steps:
s201, a controller acquires initial configuration and target configuration of a network; the initial configuration represents an initial forwarding path of forwarding configuration in the SDN, and the target configuration represents a target forwarding path after the forwarding configuration is upgraded.
In the embodiment of the invention, when the controller receives the configuration upgrading instruction sent by the application layer, the initial configuration and the target configuration of the network are obtained.
Fig. 6 is an exemplary initial configuration diagram in an embodiment of the present invention, and as shown in fig. 6, an initial forwarding path starts from an initial node s, sequentially passes through a node b, an intermediate node wp, and a node a, and finally reaches a destination node d. When the controller judges that the node a is disconnected with the target node d, the initial configuration needs to be upgraded to the target configuration, so that the upgraded configuration can also achieve the purpose of reaching the target node d from the initial node s through the intermediate node wp. Fig. 7 is an exemplary target configuration diagram in the embodiment of the present invention, and as shown in fig. 7, a target forwarding path passes through a node a, an intermediate node wp, and a node b in sequence from an initial node s, and finally reaches a destination node d.
It should be noted that, the controller knows the topology structure of the network, and when the controller upgrades the network, according to the topology structure of the network, the controller upgrades the initial configuration in a rule replacement-based manner in the prior art, and there are four upgrading manners in total, which are sequentially:
the method a: upgrading an initial node s
The updated forwarding link path is: initial node s → node a → target node d, however, the path does not pass through the intermediate node wp on the one hand, and is disconnected from node a to target node d on the other hand, so that the upgrade cannot be completed by upgrading node s.
Mode b: upgrade node b
The updated forwarding link path is: the initial node s → the node b → the target node d, it is obvious that the path does not pass through the intermediate node wp, and thus the correctness in the upgrading process cannot be ensured.
Mode c: upgrade intermediate node wp
The updated forwarding link path is: initial node s → node b → intermediate node wp → node s, it is obvious that the link forms a loop and thus cannot be upgraded correctly.
Mode d: upgrade node a
The updated forwarding link path is: initial node s → node b → intermediate node wp → node a → node s, it is obvious that the link after upgrade also forms a loop, and thus the upgrade is also not correct.
Therefore, when the rule replacement mode is directly upgraded from the initial configuration to the target configuration, the target configuration is not oriented, so that the success rate of upgrading is low.
However, in the embodiment of the present invention, the controller generates an available intermediate state target forwarding configuration in a target configuration guidance manner, so as to improve the success rate of configuration upgrade.
S202, the controller acquires a path from the initial node to the intermediate node.
In an embodiment of the invention, the controller obtains a path from the initial node to the intermediate node based on the initial configuration.
Illustratively, in fig. 6, the paths from the initial node to the intermediate node acquired by the controller are: initial node s → node b → intermediate node wp.
And S203, the controller upgrades the nodes in the path, and then the upgraded first path is obtained, wherein no loop exists in the first path and the first path can pass through the intermediate node.
In the embodiment of the invention, after the controller acquires the path from the initial node to the intermediate node, the node in the path can be upgraded, and when the judgment condition is met, the upgraded first path can be acquired.
In the embodiment of the invention, when the initial node s is upgraded, the controller searches a feasible connection path of the initial node s according to the network topology structure, and also considers the weight of the path, when the controller finds that the path from the initial node s to the intermediate node wp exists in the network topology, and the controller adopts the priority selection principle with low weight, when the weight of the path is low, and finally a loop cannot be introduced and can pass through the intermediate node, the s node is updated by the path. Specifically, the original path from the initial node s to the intermediate node wp is as follows: the initial node s → node b → intermediate node wp is updated to the initial node s → intermediate node wp, and the updated path can be referred to as a first path.
It should be noted that, in the embodiment of the present invention, the controller upgrades each node in the path from the initial node s to the intermediate node wp, completes the operation of all nodes capable of adding edges, and updates the forwarding entry of the node in the initial configuration to a new forwarding entry as long as a loop is not introduced and it is ensured that the path can finally pass through the intermediate node wp. The guarantee that the path can finally pass through the intermediate node wp means that the path cannot finally pass through the intermediate node wp because the existing network topology is not based on after the forwarding item of a certain node is updated; the loop is introduced, which means that the path forms a closed loop. In addition, each node in the path is upgraded, and the method for acquiring the feasible first path can be judged by adopting a depth-first search algorithm.
S204, the controller replaces the path from the initial node to the intermediate node in the target forwarding path with the first path to generate intermediate state target forwarding configuration.
In an embodiment of the present invention, after obtaining the upgraded first path, the controller may generate an intermediate target forwarding configuration according to the first path and the target forwarding path. Specifically, the controller replaces the first path with a path from the initial node to the intermediate node in the target forwarding path.
In the embodiment of the present invention, after determining that the first path from the initial node s to the intermediate node wp exists, the controller replaces the path from the initial node s to the intermediate node wp in the target forwarding path with the first path, that is, generates a new intermediate target forwarding configuration.
Exemplarily, based on fig. 6 and fig. 7, fig. 8 is an exemplary intermediate state target forwarding configuration diagram in the embodiment of the present invention, and as shown in fig. 8, the controller updates a path from an initial node s to an intermediate node wp: the initial node s → intermediate node wp, replacing part of the target forwarding path, i.e. generating a new intermediate state target forwarding configuration: initial node s → intermediate node wp → node b → target node d.
S205, the controller is upgraded to a target configuration based on the intermediate target forwarding configuration.
In an embodiment of the invention, the controller may further upgrade to the target configuration based on the intermediate state target forwarding configuration after generating the intermediate state target forwarding configuration.
It can be understood that, in the embodiment of the present invention, the controller generates the intermediate state target forwarding configuration by upgrading the node in the path from the initial node to the intermediate node and combining the target configuration, and the success rate in the upgrading process is improved by using the target configuration as a guided segment upgrading mechanism.
It should be noted that the process of generating the intermediate state target forwarding configuration by the controller based on the path from the intermediate node to the target node in the initial configuration in combination with the target configuration is similar to the method in the second embodiment. For example, taking the initial configuration shown in fig. 6 and the target configuration shown in fig. 7 as an example, the intermediate state target forwarding configuration generated based on the path from the intermediate node to the target node may be: initial node s → node a → intermediate node wp → target node d.
And further, the process of generating the intermediate state target forwarding configuration by the controller based on the path from the initial node to the target node in the initial configuration in combination with the target configuration substantially covers two modes of the path from the initial node to the intermediate node and the path from the intermediate node to the target node, except that the controller does not actively use the intermediate node as a distinguishing point. This global approach also ensures that the controller can search for a path that does not introduce loops, that can pass through intermediate nodes, and that contains a portion of the target configuration.
EXAMPLE III
Based on the same inventive concept of the first embodiment and the second embodiment, an embodiment of the present invention provides a configuration upgrading apparatus, fig. 9 is a diagram of the configuration upgrading apparatus provided in the embodiment of the present invention, as shown in fig. 9, in the embodiment of the present invention, a configuration upgrading apparatus 900 includes:
an obtaining unit 901, configured to obtain an initial configuration and a target configuration of a forwarding configuration, where the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, and the target configuration represents a target forwarding path after upgrading the forwarding configuration;
a generating unit 902, configured to generate an intermediate target forwarding configuration based on the initial configuration and the target configuration;
an upgrading unit 903, configured to upgrade to the target configuration based on the intermediate target forwarding configuration.
In other embodiments, the initial forwarding path and the target forwarding path each include an initial node and an intermediate node, and the generating unit 902 is configured to generate the intermediate state target forwarding configuration based on a path from the initial node to the intermediate node in the initial configuration and by combining the target forwarding path.
In other embodiments, the initial forwarding path and the target forwarding path each include an intermediate node and a target node, and the generating unit 902 is configured to generate the intermediate state target forwarding configuration based on a path from the intermediate node in the initial configuration to the target node and by combining the target forwarding path.
In other embodiments, the initial forwarding path and the target forwarding path each include an initial node and a target node, and the generating unit 902 is configured to generate the intermediate target forwarding configuration based on a path from the initial node to the target node in the initial configuration and by combining the target forwarding path.
In other embodiments, the generating unit 902 is configured to obtain a path from the initial node to the intermediate node;
upgrading the nodes in the path to generate a first path; wherein the first path has no loop and passes through the intermediate node;
and replacing the path from the initial node to an intermediate node in the target forwarding path with the first path to generate the intermediate state target forwarding configuration.
In other embodiments, the generating unit 902 is configured to obtain a path from the intermediate node to the target node;
upgrading the nodes in the path to generate a second path; wherein no loop exists in the second path and passes through the intermediate node;
and replacing the path from the intermediate node to the target node in the target forwarding path with the second path to generate the intermediate state target forwarding configuration.
In other embodiments, the generating unit 902 is configured to obtain a path from the initial node to the target node;
and upgrading nodes except the target node in the path, and if a loop is not introduced, the nodes pass through the intermediate node and include the path in the target forwarding path, generating the intermediate state target forwarding configuration.
In other embodiments, the generating unit 902 is further configured to compare nodes in the initial configuration and the target configuration, retain overlapping nodes, and update the initial configuration and/or the target configuration.
The description of the embodiment of the device of the invention is similar to that of the embodiment of the method in the first embodiment, and has similar beneficial effects with the embodiment of the method. For technical details not disclosed in the embodiments of the apparatus of the present invention, reference is made to the description of the embodiments of the method of the present invention.
Example four
Correspondingly, based on the same inventive concept of the first embodiment, fig. 10 is a schematic structural diagram of a controller according to the first embodiment of the present invention, and as shown in fig. 10, the controller according to the present invention may include a processor 01, a memory 02 storing executable instructions of the processor 01, a communication interface 03, and a bus 04 for connecting the processor 01, the memory 02, and the communication interface 03. The processor 01 is configured to execute a configuration upgrade control program stored in the memory, so as to implement the following steps:
obtaining an initial configuration and a target configuration of a forwarding configuration, wherein the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, and the target configuration represents a target forwarding path after the forwarding configuration is upgraded;
generating an intermediate state target forwarding configuration based on the initial configuration and the target configuration;
and upgrading to the target configuration based on the intermediate target forwarding configuration.
In an embodiment of the present invention, the Processor 01 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a ProgRAMmable Logic Device (PLD), a Field ProgRAMmable Gate Array (FPGA), a CPU, a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronic devices used to implement the processor functions described above may be other devices, and embodiments of the present invention are not limited in particular. The controller may further comprise a memory 02, which memory 02 may be connected to the processor 01, wherein the memory 02 is for storing configuration upgrading control program code, which program code comprises computer operating instructions, and the memory 02 may comprise a high speed RAM memory, and may further comprise a non-volatile memory, e.g. at least two disk memories.
In practical applications, the Memory 02 may be a volatile first Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile first Memory (non-volatile Memory), such as a Read-Only first Memory (ROM), a flash Memory (flash Memory), a Hard Disk Drive (HDD) or a Solid-State Drive (SSD); or a combination of first memories of the above kind and provides instructions and data to the processor 01.
In addition, each functional module in this embodiment 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 or a form of a software functional module.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
According to the controller provided by the embodiment of the invention, the controller generates the intermediate state target forwarding configuration based on the initial configuration and the target configuration, and further generates the target configuration through the intermediate state target forwarding configuration, so that the configuration upgrading process is simplified, and the upgrading success rate is ensured.
The embodiment of the invention provides a computer-readable storage medium, on which a configuration upgrading program is stored, and the configuration upgrading program is applied to a controller, and when the program is executed by a processor, the method in the first embodiment or the second embodiment is realized.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of implementations of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustration, flow or flows, and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.
Claims (11)
1. A configuration upgrading method is applied to a Software Defined Network (SDN), and comprises the following steps:
acquiring initial configuration and target configuration of forwarding configuration, wherein the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, the target configuration represents a target forwarding path after the forwarding configuration is upgraded, and the initial forwarding path and the target forwarding path respectively comprise an initial node, an intermediate node and a target node;
based on the target configuration, performing segmented upgrade on the initial forwarding path by taking the intermediate node as a boundary, and generating an intermediate state target forwarding configuration, wherein the intermediate state target forwarding configuration comprises at least one part of the target configuration;
and upgrading to the target configuration based on the intermediate target forwarding configuration.
2. The method of claim 1, wherein the step of performing a segment upgrade on the initial forwarding path based on the target configuration with the intermediate node as a boundary to generate an intermediate target forwarding configuration comprises:
and generating the intermediate state target forwarding configuration based on the path from the initial node to the intermediate node in the initial configuration and combining the target forwarding path.
3. The method of claim 1, wherein the step of performing a segment upgrade on the initial forwarding path based on the target configuration with the intermediate node as a boundary to generate an intermediate target forwarding configuration comprises:
and generating the intermediate state target forwarding configuration based on the path from the intermediate node to the target node in the initial configuration and combining the target forwarding path.
4. The method of claim 1, wherein the step of performing a segment upgrade on the initial forwarding path based on the target configuration with the intermediate node as a boundary to generate an intermediate target forwarding configuration comprises:
and generating the intermediate state target forwarding configuration based on the path from the initial node to the target node in the initial configuration and combining the target forwarding path.
5. The method of claim 2, wherein generating the intermediate target forwarding configuration based on the path from the initial node to the intermediate node in the initial configuration and in combination with the target forwarding path comprises:
acquiring a path from the initial node to the intermediate node;
upgrading the nodes in the path to generate a first path; wherein the first path has no loop and passes through the intermediate node;
and replacing the path from the initial node to an intermediate node in the target forwarding path with the first path to generate the intermediate state target forwarding configuration.
6. The method of claim 3, wherein the initial forwarding path and the target forwarding path further include an initial node, and wherein generating the intermediate target forwarding configuration based on a path from the intermediate node to the target node in the initial configuration and in conjunction with the target forwarding path comprises:
acquiring a path from the intermediate node to the target node;
upgrading the nodes in the path to generate a second path; wherein no loop exists in the second path and passes through the intermediate node;
and replacing the path from the intermediate node to the target node in the target forwarding path with the second path to generate the intermediate state target forwarding configuration.
7. The method of claim 4, wherein generating the intermediate target forwarding configuration based on the path from the initial node to the target node in the initial configuration and in combination with the target forwarding path comprises:
acquiring a path from the initial node to the target node;
and upgrading nodes except the target node in the path, and if a loop is not introduced, the nodes pass through the intermediate node and include the path in the target forwarding path, generating the intermediate state target forwarding configuration.
8. The method of claim 1, wherein the initial forwarding path and the target forwarding path are composed of different nodes, and wherein after obtaining the initial configuration and the target configuration of the forwarding configuration, before generating the intermediate target forwarding configuration based on the initial configuration and the target configuration, the method further comprises:
and comparing nodes in the initial configuration and the target configuration, keeping overlapped nodes, and updating the initial configuration and/or the target configuration.
9. A configuration upgrading device applied to a Software Defined Network (SDN), the device comprising:
an obtaining unit, configured to obtain an initial configuration and a target configuration of a forwarding configuration, where the initial configuration represents an initial forwarding path of the forwarding configuration in the SDN, the target configuration represents a target forwarding path after the forwarding configuration is upgraded, and each of the initial forwarding path and the target forwarding path includes an initial node, an intermediate node, and a target node;
a generating unit, configured to perform segment upgrade on the initial forwarding path by using the intermediate node as a boundary based on the target configuration, and generate an intermediate state target forwarding configuration, where the intermediate state target forwarding configuration includes at least a part of the target configuration;
and the upgrading unit is used for upgrading the intermediate state target forwarding configuration into the target configuration.
10. A controller, for use in a software defined network, SDN, the controller comprising at least: a processor, a memory, a communication interface, and a bus for connecting the processor, the memory, and the communication interface; the processor is configured to execute a configuration upgrade program stored in the memory to implement the method of any one of claims 1-8.
11. A computer-readable storage medium having stored thereon a configuration upgrade program for application in a software defined network, SDN, the configuration upgrade program, when executed by a processor, implementing the method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811498224.4A CN109725918B (en) | 2018-12-07 | 2018-12-07 | Configuration upgrading method and device, controller and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811498224.4A CN109725918B (en) | 2018-12-07 | 2018-12-07 | Configuration upgrading method and device, controller and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109725918A CN109725918A (en) | 2019-05-07 |
CN109725918B true CN109725918B (en) | 2022-03-22 |
Family
ID=66294888
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811498224.4A Active CN109725918B (en) | 2018-12-07 | 2018-12-07 | Configuration upgrading method and device, controller and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109725918B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103905318A (en) * | 2014-04-04 | 2014-07-02 | 华为技术有限公司 | Method, controller and forwarding node for sending and loading forwarding table items |
CN105515714A (en) * | 2015-11-19 | 2016-04-20 | 北京邮电大学 | Network upgrading perception protection method |
CN105933236A (en) * | 2016-07-07 | 2016-09-07 | 北京邮电大学 | Method and device for updating SDN (Software Defined Network) flow table |
CN106375231A (en) * | 2015-07-22 | 2017-02-01 | 华为技术有限公司 | Flow switching method, device and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10313180B2 (en) * | 2013-03-13 | 2019-06-04 | Dell Products L.P. | Systems and methods for managing switching devices in an information handling system |
-
2018
- 2018-12-07 CN CN201811498224.4A patent/CN109725918B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103905318A (en) * | 2014-04-04 | 2014-07-02 | 华为技术有限公司 | Method, controller and forwarding node for sending and loading forwarding table items |
CN106375231A (en) * | 2015-07-22 | 2017-02-01 | 华为技术有限公司 | Flow switching method, device and system |
CN105515714A (en) * | 2015-11-19 | 2016-04-20 | 北京邮电大学 | Network upgrading perception protection method |
CN105933236A (en) * | 2016-07-07 | 2016-09-07 | 北京邮电大学 | Method and device for updating SDN (Software Defined Network) flow table |
Non-Patent Citations (1)
Title |
---|
数据流特征感知的交换机流表智能更新方法;姜立立 等;《计算机应用》;20160731(第7期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN109725918A (en) | 2019-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10637686B2 (en) | Capability aware routing | |
US10742556B2 (en) | Tactical traffic engineering based on segment routing policies | |
US9438512B2 (en) | Stacking metadata contexts for service chains | |
US9590907B2 (en) | Service chaining in a cloud environment using software defined networking | |
CN109863725B (en) | Segment routing method based on maximum segment identifier depth and electronic equipment | |
JP5672558B2 (en) | Network system, network control apparatus, and control method | |
EP3210347B1 (en) | Pre-built match-action tables | |
US20150363423A1 (en) | Method and system for parallel data replication in a distributed file system | |
CN107113241B (en) | Route determining method, network configuration method and related device | |
CN110535772A (en) | Sending and receiving method, device and the network element of Segment routing traffic engineering strategy | |
Bennesby et al. | An inter-as routing component for software-defined networks | |
US9049148B1 (en) | Dynamic forwarding plane reconfiguration in a network device | |
EP3226492A1 (en) | Method, system, and apparatus for improving forwarding capabilities during route convergence | |
KR20190006066A (en) | Determination of route in communication network | |
Turull et al. | libNetVirt: the network virtualization library | |
US10419282B1 (en) | Self-configuring network devices | |
EP3993356A1 (en) | Interdomain path calculation based on an abstract topology | |
US20190182107A1 (en) | Priority based scheduling in network controller using graph theoretic method | |
CN109725918B (en) | Configuration upgrading method and device, controller and storage medium | |
EP2983333B1 (en) | A system and method for providing routes to physical residential gateways | |
US10778563B1 (en) | Brick identifier attribute for routing in multi-tier computer networks | |
Barakat et al. | Busoni: Policy composition and northbound interface for IPv6 segment routing networks | |
Chen et al. | The declarative and reusable path composition for semantic Web-driven SDN | |
US11489758B1 (en) | Path computation for unordered inclusion and regional revisit constraints | |
EP4413509A1 (en) | Isolation forest with ultra-low ram footprint for edge |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |