Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of network system and network operation method, inefficient problem complicated for the configuration and bookkeeping solving ospf in prior art.
For achieving the above object and other relevant objects, the invention provides a kind of network system, described network system comprises a controller and at least one switch, prestores corresponding stream table in each described switch, and described stream table comprises packet header and performs an action; Each described switch sends the essential information message of self to described controller, and described essential information message comprises MAC Address, port information, the link-state information of switch self; Described controller is according to a shortest route algorithm, obtain the network topology structure of described network system, and according to the link-state information link generation slip condition database that all described switch in the described network system received sends, and generate a Weighted Directed Graph according to described LSD, and according to described Weighted Directed Graph, respectively with each described switch for root node, generate corresponding minimum spanning tree respectively; And, when switch described in receive one there is the data message of object IP address time, judge whether described data message matches with the stream table of corresponding described switch, and when for time no, described data message is sent to described controller, to make described controller according to the corresponding minimum spanning tree of object IP address lookup in described data message, to obtain forward-path, described data message is forwarded accordingly.
In a specific embodiment of the present invention, when judging that the stream table of described data message and corresponding described switch matches, according to performing an action of showing of described stream described data message forwarded.
In a specific embodiment of the present invention, described controller generates a Weighted Directed Graph according to described LSD, and according to described Weighted Directed Graph, respectively with each described switch for root node, generate the minimum spanning tree corresponding to each described switch respectively.
In a specific embodiment of the present invention, described switch is software defined network switch, and described controller is software defined network controller.
In a specific embodiment of the present invention, each described software defined network switch is communicated by OpenFlow passage with described software defined network controller.
In a specific embodiment of the present invention, described essential information message is privately owned experimenter's message.
In a specific embodiment of the present invention, the packet header of described stream table comprises object IP address, and when the object IP address in described data message is identical with the object IP address that the packet header of described stream table comprises, described data message and described stream table match; When the object IP address comprised when the object IP address in described data message and the packet header of described stream table is not identical, described data message does not mate with described stream table.
In a specific embodiment of the present invention, described controller obtains the network topology structure of described network system according to described shortest route algorithm and a Link Layer Discovery Protocol.
In a specific embodiment of the present invention, the state set of each described switch safeguarded by described controller.
In a specific embodiment of the present invention, described state set comprises init state, stress state, interaction mode and completion status.
In a specific embodiment of the present invention, pre-defined in described controller have a link overhead formula, and described controller generates described Weighted Directed Graph according to described LSD and described link overhead formula.
For achieving the above object and other relevant objects, the present invention also provides a kind of network operation method, run in the network system as above described in any one, said method comprising the steps of: each described switch sends the essential information message of self to described controller, and described essential information message comprises MAC Address, port information, the link-state information of switch self; Described controller, according to a shortest route algorithm, obtains the network topology structure of described network system, and according to the link-state information link generation slip condition database that all described switch in the described network system received sends; Described controller generates a Weighted Directed Graph according to described LSD, and according to described Weighted Directed Graph, respectively with each described switch for root node, generate corresponding minimum spanning tree respectively; When described in one, switch receives a data message, judge whether described data message matches with described stream table, and when for time no, described data message is sent to described controller, wherein said data message has corresponding object IP address; Described data message, according to the corresponding minimum spanning tree of object IP address lookup in described data message, to obtain forward-path, forwards by described controller accordingly.
As mentioned above, network system of the present invention and network operation method, each described switch is made to send the essential information message of self to described controller, make described controller according to a shortest route algorithm, obtain the network topology structure of described network system, and according to the link-state information link generation slip condition database that all described switch in the described network system received sends; Described controller generates a Weighted Directed Graph according to described LSD, and according to described Weighted Directed Graph, generates corresponding minimum spanning tree; When switch receives a data message described in one, judge whether described data message matches with described stream table, if so, then according to performing an action of showing of described stream described data message forwarded; If not, then described data message is sent to described controller, wherein said data message has corresponding object IP address; Described data message, according to the corresponding minimum spanning tree of object IP address lookup in described data message, to obtain forward-path, forwards by described controller accordingly.The configuration of all switches of the present invention is all concentrated on the controller, can the configuration of simplified network and management, improves the efficiency of the network operation.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram provided in following examples only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in diagram but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
OSPF (OpenShortestPathFirst) agreement i.e. " OSPF ".It is a kind of dynamic routing protocol of the autonomous system inside based on Link State, and it forms a LSD by link exchange state information between three-tier switch, then generates routing table based on this database shortest-path first algorithm.Traditional OSPF is an Interior Gateway Protocol, for decision-making route in single autonomous system.It is the Routing Protocol based on Link State.Link State refers to the parameter of router interface or link.Ospf router is not inform which network other routers can arrive and distance is how many, but informs its network link status, the connected network of these interfaces and use the expense of these interfaces.Each router has the Link State of himself to be called local link condition.These local link condition are propagated until all ospf routers have complete and equivalent LSD in OSPF routed domain.Once each router receives all Link States, each router can construct one tree with it oneself route of the shortest or network minimal of all-network for root and in branching representation to network system.Traditional ospf protocol is distributed, configuration relative complex.Because network area divides and the complexity of network attribute, network analysis person is needed to have higher network knowledge level could configure and manage ospf network.OSPF needs mutual a variety of LSA message, and more complicated also takies resource.For these shortcomings, the present invention proposes a kind of network system, and described network system comprises a controller and at least one switch, prestores corresponding stream table in each described switch, and described stream table comprises packet header and performs an action; Each described switch sends the essential information message of self to described controller, and described essential information message comprises MAC Address, port information, the link-state information of switch self; Described controller is according to a shortest route algorithm, obtain the network topology structure of described network system, and according to the link-state information link generation slip condition database that all described switch in the described network system received sends, and generate a Weighted Directed Graph according to described LSD, and according to described Weighted Directed Graph, respectively with each described switch for root node, generate corresponding minimum spanning tree respectively; And, when switch described in receive one there is the data message of object IP address time, judge whether described data message matches with the stream table of corresponding described switch, if so, then according to performing an action of showing of described stream described data message forwarded; If not, then described data message is sent to described controller, to make described controller according to the corresponding minimum spanning tree of object IP address lookup in described data message, to obtain forward-path, described data message is forwarded accordingly.
Concrete, refer to Fig. 1, be shown as network system of the present invention module diagram in one embodiment.Described network system 1 comprises a controller 11 and at least one switch 12, wherein, described controller 11 is SDN (SoftwareDefinedNetwork, software defined network) controller, described switch 12 is SDN (SoftwareDefinedNetwork, software defined network) switch, and SDN controller 11 is communicated by OpenFlow passage with SDN switch 12.
Prestore corresponding stream table in each described switch 12, described stream table comprises packet header and performs an action; There is in described packet header object IP address, each described switch 12 sends the essential information message of self to described controller, described essential information message comprises MAC Address, port information, the link-state information of switch self, and described essential information message can be privately owned experimenter (Experimenter) message.Such as, the form of the privately owned expansion Experimenter message from SDN switch to controller is as shown in table 1.Experimenter value is that 255 needs are to the application of ONF tissue.Experimentertype value is 1 to be shown to be from SDN switch direction to controller.The maximum support of the port numbers reported 128, link overhead is as shown in table 1, wherein, Linktype: 1-ethernet link 2-PON link.
Table 1
Described controller 11 preferably obtains the network topology structure of described network system 1 according to a shortest route algorithm and a Link Layer Discovery Protocol (LLDP).Shortest route (ShotestRouting) algorithm is that one is easily understood and widely used technology.Its basic thought is: set up a subnet figure, and each node on behalf router in figure, every bar camber line represents a communication line (link), the weight of this circuit of digitized representation on arc.In order to select a routed path between a pair given router, routing algorithm only need find this to the shortest path between node in the drawings.Have multiple method for path measurement, a kind of method is computer installation point quantity, also can calculate distance, channel width, average traffic, communication overhead, queue length, propagation delay etc. in addition.
Described controller 11 is also according to the link-state information link generation slip condition database that all described switch in the described network system 1 received sends, and generate a Weighted Directed Graph according to described LSD, for clearly identifying the path of Signal transmissions and the link overhead of respective paths between each switch 12.Preferably, pre-defined in described controller 11 have a link overhead formula, and described controller generates described Weighted Directed Graph according to described LSD and described link overhead formula.Described link overhead formula is " link overhead=200Gbps/ link rate ", and the corresponding data form that link rate is formed according to described formula with link overhead is as shown in table 1.In a specific embodiment, described network system 1 comprises switch S0, S1, S2 and S3, and described Weighted Directed Graph is consulted shown in Fig. 2.Wherein, the link overhead that to be the link overhead between 20, S0 and S2 be between 200, S1 and S2 of the link overhead between S0 and S1 is the link overhead between 20000, S2 and S3 is 2000.
Link rate |
Link overhead |
10M |
20000 |
100M |
2000 |
1G |
200 |
10G |
20 |
Table 1
And, described controller 11 according to described Weighted Directed Graph, respectively with each described switch for root node, generate corresponding minimum spanning tree respectively; Such as with described switch S0 for root node, generate minimum spanning tree as shown in Figure 3, with described S1 for root node, generate minimum spanning tree as shown in Figure 4.
And, when switch described in one 12 receive one there is the data message of object IP address time, judge whether described data message matches with the stream table of corresponding described switch 12, if so, then preferably according to performing an action of showing of described stream described data message to be forwarded; If not, then described data message is sent to described controller 11, to make described controller 11 according to the corresponding minimum spanning tree of object IP address lookup in described data message, to obtain forward-path, described data message is forwarded accordingly.Wherein, the packet header of described stream table comprises object IP address, and when the object IP address in described data message is identical with the object IP address that the packet header of described stream table comprises, described data message and described stream table match; When the object IP address comprised when the object IP address in described data message and the packet header of described stream table is not identical, described data message does not mate with described stream table.
In a specific embodiment of the present invention, the state set of each described switch 12 safeguarded by described controller 11.Wherein, described state set comprises init state (Init), stress state (Loading), interaction mode (Exchange) and completion status (Full).Relation between described state consults Fig. 5, wherein, when the switch being in Init state receives the Link State of this switch, be converted into Loading state, and when the switch being in Full state detects that this switch-link state changes, be converted into Loading state, and when the switch being in Loading state carries out the operation of interactive link state, be converted into Exchange state, and when the switch being in Exchange state completes all Link States mutual, be converted into Full state, Fig. 5 clearly show all states of each switch, and the condition transformed between each state.
In embody rule of the present invention, the handling process schematic diagram of described controller 11 specifically consults Fig. 6, be specially: from Experimenter message, extract the MAC Address of switch, port and link-state information, judge in controller, whether the SDN of setting and the shortest route algorithm switch of Link State are opened, if close, then end operation; If open, then perform following operation:
According to LLDP agreement computing network topological structure;
According to the Link State link generation slip condition database of the whole network;
Weighted Directed Graph is generated according to LSD;
Controller with each forward node for root node generates minimum spanning tree;
When there being the message not mating stream table, by its object IP address lookup minimum spanning tree according to message, obtaining forward-path to forward, and issuing stream table.
In embody rule of the present invention, the handling process schematic diagram of described switch 12 specifically consults Fig. 7, and processing procedure is relatively simple, is specially: judge the message received is shown whether to mate with Liu.If so, forward according to stream table.If not, message will be sent to controller.
And consult Fig. 8 further, be shown as the application schematic diagram of network system of the present invention, described switch comprises S0 ~ S3.Wherein, mail to the flow of HostB from HostA according to present networks system, can forward through the path of S1-S0-S2-S3; When the link of S0 to S2 is replaced with the link of 10M, the path (i.e. shortest path) through S1-S3 forwards by the flow that HostA mails to HostB.
For achieving the above object and other relevant objects, the present invention also provides a kind of network operation method, refers to Fig. 9, is shown as described network operation method schematic flow sheet in one embodiment.Described method runs in network system 1 as shown in Figure 1, and all can be applicable in the present embodiment about the description of the technical scheme of described network system 1.Said method comprising the steps of:
S11: each described switch sends the essential information message of self to described controller, and described essential information message comprises MAC Address, port information, the link-state information of switch self.
S12: described controller, according to a shortest route algorithm, obtains the network topology structure of described network system, and according to the link-state information link generation slip condition database that all described switch in the described network system received sends.
S13: described controller generates a Weighted Directed Graph according to described LSD, and according to described Weighted Directed Graph, respectively with each described switch for root node, generate corresponding minimum spanning tree respectively.
S14: when switch receives a data message described in one, judges whether described data message matches with described stream table, if so, then preferably performs step S15; If not, then step S16 is performed.
S15: described data message forwarded according to performing an action of showing of described stream.
S16: described data message is sent to described controller, wherein said data message has corresponding object IP address; Described data message, according to the corresponding minimum spanning tree of object IP address lookup in described data message, to obtain forward-path, forwards by described controller accordingly.
In sum, network system of the present invention and network operation method, each described switch is made to send the essential information message of self to described controller, make described controller according to a shortest route algorithm, obtain the network topology structure of described network system, and according to the link-state information link generation slip condition database that all described switch in the described network system received sends; Described controller generates a Weighted Directed Graph according to described LSD, and according to described Weighted Directed Graph, generates corresponding minimum spanning tree; When switch receives a data message described in one, judge whether described data message matches with described stream table, if so, then according to performing an action of showing of described stream described data message forwarded; If not, then described data message is sent to described controller, wherein said data message has corresponding object IP address; Described data message, according to the corresponding minimum spanning tree of object IP address lookup in described data message, to obtain forward-path, forwards by described controller accordingly.The configuration of all switches of the present invention is all concentrated on the controller, can the configuration of simplified network and management, improves the efficiency of the network operation.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.