The content of the invention
In view of the foregoing deficiencies of prior art, it is an object of the invention to provide a kind of network system and the network operations
Method, for solving the problems, such as that the configuration of ospf in the prior art and management are complicated for operation, efficiency is low.
In order to achieve the above objects and other related objects, the present invention provides a kind of network system, is wrapped in the network system
A controller and at least an interchanger are included, corresponding flow table is prestored in each interchanger, the flow table includes packet header
And perform action;Each interchanger sends the essential information message of itself, the essential information report to the controller
Text includes the MAC Address, port information, link-state information of interchanger itself;The controller according to a shortest route algorithm,
It obtains the network topology structure of the network system, and is sent according to all interchangers in the network system of reception
Link-state information generation Link State Database, and according to the Link State Database generate a Weighted Directed Graph, and
According to the Weighted Directed Graph, respectively using each interchanger as root node, corresponding minimum spanning tree is generated respectively;And
When an interchanger receive one have purpose IP address data message when, judge the data message whether with it is corresponding
The flow table of the interchanger matches, and when for it is no when, the data message is sent to the controller, to make the control
Purpose IP address of the device in the data message inquires about corresponding minimum spanning tree, to obtain forward-path, by the number
It is forwarded accordingly according to message.
In the specific embodiment of the present invention, when judging flow table phase of the data message with the corresponding interchanger
During matching, the data message is forwarded to according to the execution of flow table action.
In the specific embodiment of the present invention, the controller generates a cum rights according to the Link State Database to be had
Xiang Tu, and according to the Weighted Directed Graph, respectively using each interchanger as root node, generation respectively is exchanged with each described
The corresponding minimum spanning tree of machine.
In the specific embodiment of the present invention, the interchanger is software defined network interchanger, and the controller is
Software defined network controller.
In the specific embodiment of the present invention, each software defined network interchanger and the software defined network
Controller is communicated by OpenFlow passages.
In the specific embodiment of the present invention, the essential information message is privately owned experimenter's message.
In the specific embodiment of the present invention, the packet header of the flow table includes purpose IP address, when the data message
In purpose IP address it is identical with the purpose IP address that the packet header of the flow table includes when, the data message and the flow table phase
Matching;When the purpose IP address that the packet header of the purpose IP address in the data message and the flow table includes differs, institute
Data message is stated to mismatch with the flow table.
In the specific embodiment of the present invention, the controller is sent out according to the shortest route algorithm and a link layer
Existing agreement obtains the network topology structure of the network system.
In the specific embodiment of the present invention, the controller safeguards the state set of each interchanger.
In the present invention a specific embodiment in, the state set include init state, stress state, interaction mode,
And completion status.
Being pre-defined in the specific embodiment of the present invention, in the controller has a link overhead formula, the control
Device processed generates the Weighted Directed Graph according to the Link State Database and the link overhead formula.
In order to achieve the above objects and other related objects, the present invention also provides a kind of network operation method, run on as above
In any one of them network system, it the described method comprises the following steps:Each interchanger is sent certainly to the controller
The essential information message of body, the essential information message include MAC Address, port information, the link state letter of interchanger itself
Breath;The controller obtains the network topology structure of the network system according to a shortest route algorithm, and according to the institute of reception
State the link-state information generation Link State Database that all interchangers in network system are sent;The controller root
A Weighted Directed Graph is generated according to the Link State Database, and according to the Weighted Directed Graph, respectively with each exchange
Machine is root node, generates corresponding minimum spanning tree respectively;When an interchanger receives a data message, described in judgement
Whether data message matches with the flow table, and when for it is no when, the data message is sent to the controller, wherein institute
Data message is stated with corresponding purpose IP address;Purpose IP address inquiry phase of the controller in the data message
To obtain forward-path, the data message is forwarded accordingly for the minimum spanning tree answered.
As described above, the network system and network operation method of the present invention, make each interchanger to the controller
The essential information message of itself is sent, makes the controller according to a shortest route algorithm, obtains the network of the network system
Topological structure, and link is generated according to the link-state information that all interchangers in the network system of reception are sent
Slip condition database;The controller generates a Weighted Directed Graph according to the Link State Database, and is had according to the cum rights
Xiang Tu generates corresponding minimum spanning tree;When an interchanger receives a data message, the data message is judged
Whether match with the flow table, if so, being forwarded to according to the execution of flow table action to the data message;If
It is no, then the data message is sent to the controller, wherein the data message has corresponding purpose IP address;It is described
Purpose IP address of the controller in the data message inquires about corresponding minimum spanning tree, to obtain forward-path, by institute
Data message is stated to be forwarded accordingly.The configuration of all interchangers of the present invention is all concentrated on the controller, can simplify net
The configuration and management of network improve the efficiency of the network operation.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.It should be noted that in the case where there is no conflict, following embodiment and implementation
Feature in example can be mutually combined.
It should be noted that the diagram provided in following embodiment only illustrates the basic structure of the present invention in a schematic way
Think, component count, shape and size when only display is with related component in the present invention rather than according to actual implementation in illustrating then
It draws, kenel, quantity and the ratio of each component can be a kind of random change during actual implementation, and its assembly layout kenel
It is likely more complexity.
OSPF (Open Shortest Path First) agreement is " Open Shortest Path First Protocol ".It is a kind of base
Dynamic routing protocol inside the autonomous system of link state, it is by link exchange status information between three-tier switch come group
Into a Link State Database, this database shortest-path first algorithm generation routing table is then based on.Traditional
OSPF is an Interior Gateway Protocol, in single autonomous system decision-making route.It is the routing association based on link state
View.Link state refers to the parameter of router interface or link.Ospf router is not to inform which other routers can reach
A little networks and distance are network link status that are how many, but informing it, these connected networks of interface and use these interfaces
Expense.Each router has the link state of its own to be known as local link condition.These local link conditions are in OSPF
It is propagated in routed domain until all ospf routers have complete and equivalent Link State Database.Once each road
All receive all link states by device, each router can construct one tree using its own is root and branching representation is to net
Shortest or network minimal the routing of all-network in network system.Traditional ospf protocol is distributed, and configuration is relatively multiple
It is miscellaneous.Since the complexity of network area division and network attribute is, it is necessary to which network analysis person has higher network knowledge level ability
Configuration and management ospf network.OSPF needs interaction many kinds LSA messages, more complicated and occupy resource.For these shortcomings,
The present invention proposes a kind of network system, and the network system includes a controller and at least an interchanger, each friendship
Corresponding flow table is prestored in changing planes, the flow table includes packet header and performs action;Each interchanger is to the control
Device sends the essential information message of itself, and the essential information message includes MAC Address, port information, the chain of interchanger itself
Line state information;The controller obtains the network topology structure of the network system according to a shortest route algorithm, and according to
The link-state information generation Link State Database that all interchangers in the network system received are sent, and root
A Weighted Directed Graph is generated according to the Link State Database, and according to the Weighted Directed Graph, respectively with each exchange
Machine is root node, generates corresponding minimum spanning tree respectively;And there is purpose IP address when an interchanger receives one
During data message, judge whether the data message matches with the flow table of the corresponding interchanger, if so, according to described
The execution action of flow table is forwarded to the data message;If it is not, the data message is then sent to the controller, with
Purpose IP address of the controller in the data message is made to inquire about corresponding minimum spanning tree, to obtain forwarding road
Footpath is forwarded the data message accordingly.
Specifically, referring to Fig. 1, it is shown as the module diagram of inventive network system in one embodiment.Institute
Stating network system 1 includes a controller 11 and an at least interchanger 12, wherein, the controller 11 is SDN (Software
Defined Network, software defined network) controller, the interchanger 12 is SDN (Software Defined
Network, software defined network) interchanger, and, SDN controllers 11 are led to SDN switch 12 by OpenFlow passages
Letter.
Corresponding flow table is prestored in each interchanger 12, the flow table includes packet header and performs action;It is described
There is purpose IP address, each interchanger 12 sends the essential information message of itself to the controller, described in packet header
Essential information message includes the MAC Address, port information, link-state information of interchanger itself, and the essential information message can
Think privately owned experimenter (Experimenter) message.For example, the privately owned extension from SDN switch to controller
The form of Experimenter messages is as shown in table 1.Experimenter values need to organize to apply to ONF for 255.
Experimenter type values are shown to be for 1 from SDN switch direction to controller.The maximum support 128 of port numbers reported
A, link overhead is as shown in table 1, wherein, Linktype:1- ethernet link 2-PON links.
Table 1
The controller 11 is preferably according to obtaining a shortest route algorithm and a Link Layer Discovery Protocol (LLDP)
The network topology structure of network system 1.Shortest route (Shotest Routing) algorithm is that one kind is easily understood and is widely used
Technology.Its basic thought is:Establish a subnet figure, one router of each node on behalf in figure, every camber line generation
One communication line (link) of table, the weight of the digitized representation circuit on arc.In order to be selected between the given router of a pair
A routed path is selected, routing algorithm need to only find this to the shortest path between node in figure.For path length
There are many method, a kind of method is computer installation point quantity for measurement, in addition can also calculate distance, channel width, average traffic,
Communication overhead, queue length, propagation delay etc..
The link state that the controller 11 is sent also according to all interchangers in the network system 1 of reception
Information generates Link State Database, and generates a Weighted Directed Graph according to the Link State Database, for clearly marking
Know the path of signal transmission and the link overhead of respective paths between each interchanger 12.Preferably, it is pre- in the controller 11
First definition has a link overhead formula, and the controller is given birth to according to the Link State Database and the link overhead formula
Into the Weighted Directed Graph.The link overhead formula be " link overhead=200Gbps/ link rates ", link rate and chain
The corresponding data form that road expense is formed according to the formula is as shown in table 1.In a specific embodiment, the network system
1 includes interchanger S0, S1, S2 and S3, and the Weighted Directed Graph is refering to shown in Fig. 2.Wherein, the link between S0 and S1
Expense is link overhead of the link overhead between 200, S1 and S2 between 20, S0 and S2 between 20000, S2 and S3
Link overhead is 2000.
Link rate |
Link overhead |
10M |
20000 |
100M |
2000 |
1G |
200 |
10G |
20 |
Table 1
And the controller 11, respectively using each interchanger as root node, is given birth to respectively according to the Weighted Directed Graph
Into corresponding minimum spanning tree;Such as using the interchanger S0 as root node, minimum spanning tree as shown in Figure 3 is generated, with institute
S1 is stated as root node, generates minimum spanning tree as shown in Figure 4.
And when an interchanger 12 receives the data message that one has purpose IP address, judge the datagram
Whether text matches with the flow table of the corresponding interchanger 12, if so, preferably according to the execution of flow table action pair
The data message is forwarded to;If it is not, the data message is then sent to the controller 11, to make the controller 11
Purpose IP address in the data message inquires about corresponding minimum spanning tree, to obtain forward-path, by the data
Message is forwarded accordingly.Wherein, the packet header of the flow table includes purpose IP address, the destination IP in the data message
When address is identical with the purpose IP address that the packet header of the flow table includes, the data message matches with the flow table;Work as institute
When the purpose IP address that stating the packet header of purpose IP address in data message and the flow table includes differs, the data message
It is mismatched with the flow table.
In the specific embodiment of the present invention, the controller 11 safeguards the state set of each interchanger 12.Its
In, the state set includes init state (Init), stress state (Loading), interaction mode (Exchange) and complete
Into state (Full).Relation between the state refers to Fig. 5, wherein, when the interchanger in Init states receives this friendship
During the link state changed planes, Loading states are converted into, and when the interchanger in Full states detects this exchange chain
When line state changes, Loading states are converted into, and when the interchanger in Loading states interacts link shape
During the operation of state, Exchange states are converted into, and when the interchanger in Exchange states completes all link states
During interaction, Full states are converted into, Fig. 5 clearly shows institute's condition that is stateful, and being converted between each state of each interchanger.
In the concrete application of the present invention, the process flow schematic diagram of the controller 11 is specially referring particularly to Fig. 6:
MAC Address, port and the link-state information of interchanger are extracted from Experimenter messages, judges setting in controller
SDN and link state shortest route algorithm switch whether open, if close, end operation;If opening, perform following
Operation:
According to LLDP agreement calculating network topological structures;
Link State Database is generated according to the link state of the whole network;
Weighted Directed Graph is generated according to Link State Database;
Controller generates minimum spanning tree by root node of each forward node;
When there is the message for not matching flow table, it is inquired about into minimum spanning tree according to the purpose IP address of message, is turned
Path is sent out to be forwarded to, and issues flow table.
In the concrete application of the present invention, the process flow schematic diagram of the interchanger 12 is referring particularly to Fig. 7, processing procedure
It is relatively easy, be specially:Whether the message for judging to receive matches with Liu's table.If so, it is forwarded to according to flow table.If it is not, message
Controller will be sent to.
And Fig. 8 is further regarded to, the application schematic diagram of the network system of the present invention is shown as, the interchanger includes S0
~S3.Wherein, the flow of Host B is sent to from Host A according to present networks system, can be carried out by the path of S1-S0-S2-S3
Forwarding;When the link of S0 to S2 to be replaced with to the link of 10M, the flow that Host A are sent to Host B will be by the road of S1-S3
Footpath (i.e. shortest path) is forwarded to.
In order to achieve the above objects and other related objects, the present invention also provides a kind of network operation method, referring to Fig. 9,
It is shown as the flow diagram of the network operation method in one embodiment.The method runs on as shown in Figure 1
In network system 1, and the description of the technical solution on the network system 1 can be applied in the present embodiment.The method
Comprise the following steps:
S11:Each interchanger sends the essential information message of itself, the essential information message to the controller
MAC Address, port information including interchanger itself, link-state information.
S12:The controller obtains the network topology structure of the network system, and root according to a shortest route algorithm
The link-state information sent according to all interchangers in the network system of reception generates Link State Database.
S13:The controller generates a Weighted Directed Graph according to the Link State Database, and is had according to the cum rights
Xiang Tu respectively using each interchanger as root node, generates corresponding minimum spanning tree respectively.
S14:When an interchanger receives a data message, judge the data message whether with the flow table phase
Matching, if so, preferably performing step S15;If it is not, then perform step S16.
S15:The data message is forwarded to according to the execution of flow table action.
S16:The data message is sent to the controller, wherein the data message is with corresponding destination IP
Location;Purpose IP address of the controller in the data message inquires about corresponding minimum spanning tree, to obtain forwarding road
Footpath is forwarded the data message accordingly.
In conclusion the network system and network operation method of the present invention, make each interchanger to the controller
The essential information message of itself is sent, makes the controller according to a shortest route algorithm, obtains the network of the network system
Topological structure, and link is generated according to the link-state information that all interchangers in the network system of reception are sent
Slip condition database;The controller generates a Weighted Directed Graph according to the Link State Database, and is had according to the cum rights
Xiang Tu generates corresponding minimum spanning tree;When an interchanger receives a data message, judge that the data message is
It is no to match with the flow table, if so, being forwarded to according to the execution of flow table action to the data message;If it is not,
The data message is then sent to the controller, wherein the data message has corresponding purpose IP address;The control
Purpose IP address of the device processed in the data message inquires about corresponding minimum spanning tree, to obtain forward-path, by described in
Data message is forwarded accordingly.The configuration of all interchangers of the present invention is all concentrated on the controller, can simplify network
Configuration and management, improve the efficiency of the network operation.So the present invention effectively overcome various shortcoming of the prior art and
Has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
Know the personage of this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause
This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as
Into all equivalent modifications or change, should by the present invention claim be covered.