A kind of SDN route generation, matching process and system
Technical field
The present invention relates to a kind of communication technical field, and RIP (Routing Information are based on more particularly to one kind
Protocol, routing information protocol) SDN (Software Defined Network, software defined network) route generation,
The method and system of matching.
Background technology
At present, traditional RIP agreements are not based on SDN, and it is a kind of distributed road based on distance vector
By selection agreement.It is to run the RIP messages for needing interaction by distributed AC servo system on the router, so as to allow all routes
Route of the device study to whole.All-router study could be allowed to entirely because interaction routing iinformation needs to take a long time
The route in portion, so convergence is slow.Also, because rip routing information protocol using distance vector determines optimal path, and
Hop count (hop count) is the key criteria of Route Selection.Hop count refer to a message from this node into destination node by way of
Transfer number, it can not correctly show the expense of link, so optimal path can not be selected accurately.
In addition, the hop count that traditional rip routing protocol could support up is 15, hop count 16 represents unreachable, therefore, RIP roads
Mininet is only applicable to by agreement.
SDN software defined networks are a kind of new networks emerging in recent years.In SDN frameworks, control plane is with turning
Send out plane to be separated, be responsible for the router-level topology of whole network by unified SDN controllers.
At present, SDN controllers using fixed shortest path first (such as:Using fixed dijkstra's algorithm or adopt
With fixed bellman-ford algorithms), different application environments or business scenario can not be adapted to, such as:Dijkstra's algorithm
For small scale network, or in the case that route jumping figure is less in a network, computational efficiency is high.But for large scale network, or
In the case where route jumping figure is more, computational efficiency is but not so good as parallel bellman-ford algorithms, so causes in some fields
Under scape, router-level topology efficiency is low, causes connection to establish speed slow.
Also, in SDN controller routing management functions, standard is not formed also.Each manufacturer has oneself privately owned
Routing algorithm, such as:Based on IPv4 system-wide by state algorithm.Using based on IPv4 system-wide by state algorithm, although user
Type of service configuration routing policy end to end can be based on, still, can not dynamic sensing network topology and Link State change
Change, be not suitable for the deployment of catenet.
The content of the invention
In view of the above the shortcomings that prior art, it is an object of the invention to provide a kind of generation of the route of SDN, matching
Method and system, be not suitable for large-scale network for solving the route selection algorithm in the prior art under SDN frameworks
Problem, also, also solve the problem of traditional RIP protocol convergences are slower.
In order to achieve the above objects and other related objects, the present invention provides a kind of SDN route table generating method, described
SDN includes SDN controllers and SDN switch;The route table generating method of the SDN includes:The SDN controllers timing acquisition
The link-state information and network topology structure of the SDN;The SDN controllers unifiedly calculate routing iinformation, generate each institute
State the flow table, one-level IP indexes routing table and two level IP index routing tables of SDN switch;The SDN controllers are to each described
SDN switch issues the corresponding flow table, the one-level IP indexes routing table and the two level IP index routing tables.
Alternatively, the SDN controllers timing obtains the link-state information by sending and receiving LLDP packets
With the network topology structure.
Alternatively, the LLDP packets include Interface status TLV and Link State TLV;The Interface status TLV is represented
The information of specified interface;The Link State TLV represents the speed of given link.
Alternatively, the SDN controllers unified calculation route, flow table, the one-level IP ropes of each SDN switch are generated
Draw routing table and two level IP index routing tables further comprise:Obtain the initial flow table item of each SDN switch and initial
Route table items;The one-level IP indexes routing table includes the initial route table item;According to each SDN switch just
Beginning flow table item and the initial route table item, synchronous SDN route, and obtained most preferably by RIP agreements and routing cost
Path, so as to obtain routing iinformation;, will destination network segment write-in corresponding to each SDN switch according to the routing iinformation
The corresponding flow table;By corresponding purpose IP address, mask, interface name or interface IP address, gateway and the routing cost
The corresponding two level IP index routing tables of write-in.
Alternatively, the routing cost is multiplied by single link expense equal to hop count;Wherein, the single link expense and chain
The speed on road is related.
Alternatively, in the two level IP index routing tables, when the routing cost of a plurality of route is the same, then more
Bar route be equal-cost route, and is provided in the equal-cost route of the two level IP index routing tables realizing that routing overhead is balanced
Second index field.
Alternatively, the one-level IP indexes routing table also includes the first index field, first index field with it is corresponding
The two level IP index routing tables second index field it is related.
The invention also discloses a kind of SDN routing matching method, including:Looked into according to the purpose IP address of message and mask
Look for flow table;According to the flow stream searching one-level IP index routing tables;According to the flow table and one-level index routing table lookup
Two level IP index routing tables, obtain corresponding interface and gateway.
Alternatively, when searching the two level IP index routing tables, if there is it is a plurality of route be equal-cost route when, then
The first index word of the one-level IP index routing tables is written back to according to the second index field of the two level IP index routing tables
Duan Zhong, to realize routing overhead equilibrium.
The invention also discloses a kind of generation of the route of SDN and matching system, the SDN includes SDN controllers and SDN is handed over
Change planes, the route generation of the SDN and matching system include:Acquisition module, the Link State for SDN described in timing acquisition are believed
Breath and network topology structure;Generation module, for unifiedly calculating routing iinformation, generate each flow table of the SDN switch, one
Level IP indexes routing table and two level IP index routing tables;Module is issued, for being issued accordingly to SDN switch each described
Flow table, one-level IP indexes routing table and two level IP index routing tables;Flow stream searching module, for the purpose IP address according to message
Flow table is searched with mask;IP index routing table lookup modules, for according to flow stream searching one-level IP indexes routing table and two level rope
Draw routing table, so as to obtain corresponding interface and gateway.
As described above, a kind of SDN of present invention route generation, the method and system of matching, have following Advantageous
Effect:
1) present invention, which all concentrates on the generation of route on SDN controllers, completes, and SDN controllers have grasped the road of the whole network
By information, network topology and link-state information, in the case of without interaction protocol message, realize and each SDN is exchanged
The router-level topology of machine, solve the problems, such as that RIP protocol convergences are slow.
2) present invention uses routing cost to instead of key criteria of the hop count as Route Selection, is gravely to improve, solution
Determine the problem of can not accurately selecting optimal path and the problem of hop count limits, therefore the present invention is more suitable for the portion of catenet
Administration.
3) present invention is extended to LLDP agreements, and Interface status TLV and Link State are added in LLDP messages
TLV;Allow SDN controllers to be created that complete network topology view, obtain the link-state information of whole network.
4) SDN controllers of the invention are to gather network topology using regularly sending and receiving by the way of LLDP packets
And Link State, this is moved that is, SDN controllers can in real time monitor and update network topology structure and Link State
State detects the change of network topology, reduces the maintenance cost of network.
Brief description of the drawings
Fig. 1 is shown as a kind of structural representation of SDN.
Fig. 2 is shown as a kind of schematic flow sheet of SDN route generating method disclosed in the embodiment of the present invention.
The structure that Fig. 3 is shown as LLDP packets in a kind of SDN route generating method disclosed in the embodiment of the present invention is shown
It is intended to.
Fig. 4 is shown as the Link State of SDN controllers in a kind of SDN route generating method disclosed in the embodiment of the present invention
Acquisition process schematic diagram.
Fig. 5 and Fig. 6 is shown as one-level IP indexes in a kind of SDN route generating method disclosed in the embodiment of the present invention and route
The schematic diagram of table and two level IP index routing tables.
Fig. 7 is shown as a kind of schematic flow sheet of SDN routing matching method disclosed in the embodiment of the present invention.
Fig. 8 and Fig. 9 is shown as flow table in a kind of SDN routing matching method disclosed in the embodiment of the present invention, one-level IP
Index the matching schematic diagram of routing table and two level IP index routing tables.
Figure 10 is shown as route generation and the structural representation of matching system of a kind of SDN disclosed in the embodiment of the present invention.
Component label instructions
S10~S30 steps
100 SDN route generation and matching system
110 acquisition modules
120 generation modules
130 issue module
140 flow stream searching modules
150 P index routing table lookup modules
210 SDN controllers
220 SDN switches
Embodiment
Illustrate embodiments of the present invention below by way of specific instantiation, 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 specific realities different in addition
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 not conflicting, following examples and implementation
Feature in example can be mutually combined.
It should be noted that the diagram provided in following examples only illustrates the basic structure of the present invention in a schematic way
Think, only show the component relevant with the present invention in schema then rather than according to component count, shape and the size during actual implement
Draw, kenel, quantity and the ratio of each component can be a kind of random change during its actual implementation, and its assembly layout kenel
It is likely more complexity.
Embodiment 1
Present embodiment discloses a kind of SDN route generating method, and it is under SDN frameworks, and association is route to traditional RIP
View is improved:1) hop count and link overhead are considered into the yardstick as Route Selection, therefore can more accurately selected
Select optimal path.2) algorithm of route generation, which is all concentrated on SDN controllers, runs, and calculates and is issued to after completing each
SDN switch, without RIP message interactions.3) SDN controllers could be aware that the network network topological sum Link State of the whole network, one
Denier due to link extremely it is caused failure route, routing table can be updated at once, in the absence of restrain it is slower the problem of.Also, jump
Number 16 no longer represents unreachable, and link overhead 65535 represents unreachable, so the routing algorithm after improving, can be applicable large-scale
Network.
As shown in figure 1, SDN switch (S1, S2, S3 and S4) upload link information (such as:Link State, link overhead
Deng) give SDN controllers.Flow table and routing table content in SDN switch are uniformly issued by SDN controllers.SDN controllers are obtaining
After obtaining full mesh topology and all routing iinformations, route messages are calculated for each interchanger, are then handed down to SDN switch.
The SDN of the present embodiment route generating method, it is specific as shown in Fig. 2 including:
Step S10, SDN controller timing acquisition SDN link-state information and network topology structure.
In the present embodiment, in order to monitor in real time and update network topology structure and link-state information, SDN controls
Device processed is that timing (according to the update cycle) is obtained to the link-state information and network topology structure of SDN, also,
Its update cycle can modify according to practical application, and default setting is 10 seconds.
SDN controllers are before starting to calculate route, it is necessary to by LLDP (Link Layer Discovery
Protocol, Link Layer Discovery Protocol) agreement goes to obtain link-state information and whole network topological structure.
LLDP agreements are a kind of link discovery modes of standard, its can by the unique ability of local device, management address,
The information such as device identification, interface identifier are organized into different TLV (Type/Length/Value, type/length/value), and encapsulate
It is distributed to the neighbours direct-connected with oneself in LLDP packets, neighbours are received it after these information with standard mib
The form of (Management Information Base, management information bank) saves, for NMS inquiry and
Judge the communication conditions of link.
And in the present embodiment, what SDN controllers needed to obtain is link-state information and network topology structure, therefore, sheet
Embodiment is extended LLDP packets, adds Interface status TLV and Link State TLV, and its structure is as shown in Figure 3.
It is UP or Down that Interface status TLV, which specifies this interface,;The speed of Link State TLV given links, the bigger link overhead of speed
It is smaller.In the present embodiment, link overhead=400000/n, wherein, n is link rate, unit M.When link rate is
10G, i.e. n are 10000M, then, link overhead 40.The maximum link speed supported at present is 100G.
SDN controllers obtain network topology and link-state information according to the TLV fields of feedback.As shown in figure 4, SDN is controlled
Device processed is exchanged by a Packet_out message to all connected SDN first when performing link discovery process
Machine sends LLDP packets, and LLDP packets are sent to all of the port by the information order SDN switch.Once SDN switch
Packet_out message is received, it will be set LLDP packets by what its all port was sent to that other are attached thereto
It is standby.If its neighbor switch is an OpenFlow interchanger, then the interchanger will perform corresponding flow stream searching operation.
Because not having special flow table item in SDN switch to be used to handle LLDP message, it will be disappeared by a Packet_in
LLDP packets are sent to controller by breath., can be to LLDP packets and SDN controllers are after Packet_in message is received
Analyzed and chained record and link-state information between two interchangers, example are created in the link discovery table of its preservation
Such as:Speed and port status information of link etc..Other SDN switches also will all use side same as described above in network
Formula sends Packet_in message to SDN controllers, therefore SDN controllers will can be created that complete network topology view.
Step S20, SDN controller unifiedly calculate routing iinformation, generate flow table, the one-level IP indexes of each SDN switch
Routing table and two level IP index routing tables.
Obtain the initial flow table item and initial route table item of each SDN switch.Wherein, initial flow table item and initial route
List item is all the direct routing of user configuration.As shown in figure 5, S1, S2 and S3 are SDN switches, wherein, S1 all initial roads
As shown in the form in left side in list item such as figure, including two destination network segments of 10.1.0.0 and 10.2.0.0, and its mask is
255.0.0.0。
Also, the initial route table items of SDN switch form its one-level IP index routing tables.
According to the initial flow table item of each SDN switch and initial route table item, synchronous SDN route, and pass through RIP agreements
Optimal path is obtained with routing cost, so as to obtain routing iinformation:
SDN controllers after full mesh topology structure is obtained, by using distance vector method neighboring router it
Between synchronization routing table, and carry out vector heap and add.Also, SDN controllers are chosen from the source information being collected into up to destination address
Optimal path, so as to obtain routing iinformation.
In the present embodiment, the selection of Optimization route is to be based on RIP agreements, is determined using routing cost.Wherein, road
By expense single link overhead is multiplied by equal to hop count.
Also, a SDN switch is directed to, when the link overhead for a plurality of route table items occur is identical, that is, judges link
Expense identical route is equal-cost route, and a SDN switch could support up the load balancing of 16 equal-cost routes.
According to routing iinformation, destination network segment corresponding to each SDN switch is write into corresponding flow table, while increase by one
Act " OFPAT_LOOKUP_IP_RT ", show to need to search two level IP indexes route according to destination network segment when matching and routeing
Table;Corresponding purpose IP address, mask, interface name or interface IP address, gateway and routing cost are write into corresponding two level IP
Index in routing table.
In SDN shown in Fig. 5, SDN switch S1 includes two two level IP index routing tables, and such as two of right side in figure
Individual form.One is for the two level IP index routing tables that destination network segment is 10.1.0.0, represents the SDN switch S1 mesh to be arrived
Network segment 10.1.0.0 need to be by interface E0, and it with destination network segment 10.1.0.0 is direct-connected that S1, which is, so its routing cost
For 0 (hop count 0, so routing cost is also for 0).One is to be directed to destination network segment 10.2.0.0, represents that SDN switch S1 will
The destination network segment 10.2.0.0 arrived need to be by interface E1, and it with destination network segment 10.2.0.0 is direct-connected, routing cost that S1, which is,
For 0
Likewise, in the SDN shown in Fig. 6, which show SDN routers S5 one-level IP indexes routing table and two
Level IP index routing tables.And as can be seen that it is logical from the two level IP index routing tables that S5 destination network segment is 10.1.1.1
The routing cost for crossing E0 interfaces and E1 interfaces is (fast plus 10M for the link overhead of 100M speed by the routing cost of E0 interfaces
The link overhead of rate, it is 44000;The chain of 100M speed is added for the link overhead of 10M speed by the routing cost of E1 interfaces
Road expense, also 44000) to be just as, therefore the route by interface E0 and the route by interface E1 be equal-cost route,
In order to realize routing overhead equilibrium, increase by the first index field in one-level IP index routing tables, in two level IP index routing tables
Increase by the second index field, the second index field by interface E0 route is 2, passes through the second index of interface E1 route
Field is 1.
Step S30, SDN controller issues corresponding flow table, one-level IP indexes routing table and two level to each SDN switch
IP index routing tables.
Embodiment 2
Present embodiment discloses a kind of SDN routing matching method, as shown in fig. 7, comprises:
Flow table is searched according to the purpose IP address of message and mask;
According to flow stream searching one-level IP index routing tables;
According to flow table and one-level index routing table lookup two level IP index routing tables, corresponding interface and gateway are obtained, from
And complete the matched routings of message.
Also, when searching two level IP index routing tables, if there is equal-cost route, then route according to two level IP indexes
Second index field of table is written back in the first index field of one-level IP index routing tables, to realize routing overhead equilibrium.
As shown in figure 8, when the purpose IP address of message is 10.2.0.1, when mask is 255.255.0.0, first according to mesh
IP and mask search flow table, then execution action OFPAT_LOOKUP_IP_RT, from the first rope of one-level IP index routing tables
Draw field and destination network segment searches two level IP index routing tables:It was found from from one-level IP index routing tables, destination network segment
10.2.0.0 corresponding first index field is 1;Therefore corresponding to, the Optimization route searched in two level IP index routing tables is
Pass through interface E1 and gateway 10.3.0.1 route.If other equal-cost routes are not present in two level IP index routing tables, that
Message can select the route by interface E1 and gateway 10.3.0.1 to be transmitted.
Further, if other equal-cost routes be present in two level IP index routing tables, i.e. pass through interface E1 and gateway
10.3.0.1 route and the route by interface E2 and gateway 10.6.0.1, the routing cost of the two routes is all 44000,
Therefore the two routes are equal-cost routes, so, it is necessary to will after obtaining by interface E1 and gateway 10.3.0.1 route
It is written back in two level IP index routing tables by the second index field corresponding to interface E1 and gateway 10.3.0.1 route table items
In first index field corresponding to one-level IP index routing tables.So when second purpose IP address of appearance is 10.2.0.1, covered
When code is 255.255.0.0 message, as shown in figure 9, it is also to search flow table according to purpose IP and mask, action is then performed
OFPAT_LOOKUP_IP_RT, two level IP indexes road is searched from the first index field and destination network segment of one-level IP index routing tables
By table.Now, the first index field corresponding to destination network segment 10.2.0.0 is changed into 2 in one-level IP indexes routing table, then this time
The Optimization route gone out by two level IP index routing table lookups is then changed into the route by interface E2 and gateway 10.6.0.1, and
The second index field write-back corresponding to interface E2 and gateway 10.6.0.1 route table items will be passed through in two level IP index routing tables
Into the first index field corresponding to one-level IP index routing tables.And so on, it is achieved thereby that the load balancing of route.
The step of various methods divide above, be intended merely to describe it is clear, can be merged into when realizing a step or
Some steps are split, are decomposed into multiple steps, as long as including identical logical relation, all protection domain in this patent
It is interior;To either adding inessential modification in algorithm in flow or introducing inessential design, but its algorithm is not changed
Core design with flow is all in the protection domain of the patent.
Embodiment 3
Present embodiment discloses a kind of generation of the route of SDN and matching system 100, wherein, SDN includes SDN controllers 210
With SDN switch 220, as shown in Figure 10, including acquisition module 110, generation module 120, module 130, flow stream searching mould are issued
Block 140 and IP index routing table lookups module 150.Wherein, acquisition module 110, generation module 120, issue module 130 be application
Among SDN controllers 210, flow stream searching module 140 and IP index routing table lookups module 150 are applied in SDN switch
Among 220.
Acquisition module 110 is used for timing acquisition SDN link-state information and network topology structure.Wherein, renewal time
Can be according to being actually needed sets itself.Also, acquisition module 110 is obtained by way of send and receive LLDP packets
Take link-state information and network topology structure.
Generation module 120 is used to unifiedly calculate routing iinformation, generates flow table, the one-level IP indexes road of each SDN switch
By table and two level IP index routing tables.Generation module 120 obtains the initial flow table item of each SDN switch and initial route first
List item, then according to the initial flow table item and initial route table item of each SDN switch, synchronous SDN route, and pass through RIP
Agreement and routing cost obtain optimal path, so as to obtain routing iinformation;Finally by destination network segment corresponding to each SDN switch
Corresponding flow table is write, corresponding purpose IP address, mask, interface name or interface IP address, gateway and routing cost are write
In corresponding two level IP index routing tables.
Module 130 is issued to be used to issue corresponding flow table, one-level IP indexes routing table and two level to each SDN switch
IP index routing tables.
Flow stream searching module 140 is used to search flow table according to the purpose IP address and mask of message.
The flow table that IP index routing table lookups module 150 is used to be found out according to flow stream searching module 140 further searches for
Corresponding one-level IP indexes routing table and secondary index routing table, so as to obtain corresponding interface and gateway.
In addition, in order to protrude the innovative part of the present invention, will not be proposed by the invention with solution in the present embodiment
The less close module of technical problem relation introduces, but this is not intended that in the present embodiment and other modules are not present.
Also, it is seen that the present embodiment is the system embodiment corresponding with first embodiment or second embodiment,
The present embodiment can work in coordination implementation with first embodiment or second embodiment.Carried in first embodiment or second embodiment
The relevant technical details arrived are still effective in the present embodiment, in order to reduce repetition, repeat no more here.Correspondingly, this implementation
The relevant technical details mentioned in example are also applicable in first embodiment or second embodiment.
In summary, a kind of SDN of the invention route generation, the method and system of matching, the generation of route is whole
Concentrate on SDN controllers and complete so that SDN controllers have grasped the routing iinformation, network topology and Link State letter of the whole network
Breath, in the case of without interaction protocol message, realizes the router-level topology to each SDN switch, solves RIP agreements receipts
Hold back the problem of slow.Also, the present invention uses routing cost to instead of key criteria of the hop count as Route Selection, is great
Ground improves, and solves the problems, such as the problem of can not accurately selecting optimal path and hop count to limit, therefore the present invention is more suitable for greatly
The deployment of type network.The present invention is also extended to LLDP agreements, and Interface status TLV and link are added in LLDP messages
State TLV;Allow SDN controllers to be created that complete network topology view, obtain the link-state information of whole network.
The SDN controllers of the present invention are using regularly sending and receiving by the way of LLDP packets to gather network topology and link shape
State, this is that is, SDN controllers can monitor and update network topology structure and Link State, dynamic detection net in real time
The change of network topology, reduce the maintenance cost of network.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, not for the limitation 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.