CN104038446A - Link discovery method and device - Google Patents

Link discovery method and device Download PDF

Info

Publication number
CN104038446A
CN104038446A CN201410250846.0A CN201410250846A CN104038446A CN 104038446 A CN104038446 A CN 104038446A CN 201410250846 A CN201410250846 A CN 201410250846A CN 104038446 A CN104038446 A CN 104038446A
Authority
CN
China
Prior art keywords
switch
probe messages
port
sign
message
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.)
Granted
Application number
CN201410250846.0A
Other languages
Chinese (zh)
Other versions
CN104038446B (en
Inventor
李岩
于德雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410250846.0A priority Critical patent/CN104038446B/en
Publication of CN104038446A publication Critical patent/CN104038446A/en
Application granted granted Critical
Publication of CN104038446B publication Critical patent/CN104038446B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a link discovery method and device. The method comprises the following steps of transmitting a first sending request message to a first switch, wherein the first sending request message packages a first detecting massage, the first detecting message records the identity of the first switch and does not contain the information of the port of the first switch where the first detecting message is transmitted, and the first switch has the capacities of unpacking the first detecting massage from the first sending request message and broadcasting the first detecting message to all the ports; receiving a first receiving informing message transmitted by a second switch, wherein the second switch is a switch receiving the first detecting message broadcast by the first switch, and the first receiving informing message packages the first detecting message; according to the identity of the first switch, which is packaged in the first detecting message, and the first receiving informing message received by the second switch, determining a link existing between the first switch and the second switch.

Description

Link discovery method and device
Technical field
The application relates to the communications field, particularly relates to link discovery method and device.
Background technology
Software defined network (Software Defined Network, SDN) be a kind of new network framework, the IP route of searching adopting with legacy network is compared, SDN/OpenFlow can realize the flexible control of network traffics, for the innovation of core network and application provides good platform, it is the direction of network architecture development from now on.
As shown in Figure 1, SDN generally includes controller 110 and switch 120 two parts.Controller 110 is connected with each switch 120 in network respectively, and between the switch 120 in network, topology connects.When initial networking, controller 110 does not also know what kind of the topological connection relation between switch 120 is, but the topological connection relation between switch 120 is very important, subsequent control device 110, when calculating flow forwarding path, must calculate according to the topological connection relation between switch 120.
Prior art provides the topological relation discover method under a kind of SDN framework, and controller 110 is unique probe messages of each port configuration of each switch 120.In unique probe messages of constructing, encapsulated the sign of corresponding switch 120 and the sign of corresponding port simultaneously, think that the probe messages that certain designated port of certain switch 120 is constructed can only send by this designated port of this switch 120.
Probe messages of first port configuration that the controller 110 of take is below switch 2 describes as example.
Controller 110 is probe messages of first port configuration of switch 2, the sign of switch 2 and the sign (Node2 of designated port (first port) in described probe messages, have been recorded simultaneously, Port1), this probe messages can only send by first port of switch 2.After the structural exploration EM end of message, controller 110 is encapsulated into the probe messages of having constructed to send request in message, then, will send request message correspondence and send in switch 2 and go.Wherein, send request the PACK_OUT message that message can be Openflow protocol definition.Switch 2 out, then sends by designated port (first port) probe messages decapsulation from send request message by probe messages.Because first port of switch 2 is to be connected with certain port of switch 3, so the probe messages that first port of switch 2 sends will be received by switch 3.Switch 3 receives after the probe messages that first port of switch 2 sends, and the probe messages receiving is encapsulated into packet receiving notice message, and then notifies message to report to controller 110 packet receiving.Wherein, packet receiving request message can be the PACK_IN message of Openflow protocol definition.Controller 110 receives after the packet receiving notice message that switch 3 sends, and decapsulation packet receiving notice message to be to obtain probe messages, and knows from probe messages, and this probe messages is that first port by switch 2 sends.Controller 110 is that first port by switch 2 sends according to probe messages and probe messages receives from switch 3, determines between first port of switch 2 and switch 3 and has link.
When each port of each switch 120 sends after probe messages, controller 110 just can be known all links between switch 120, thereby obtains the topological relation between switch 120.
But under prior art, controller 110 need to be constructed a unique probe messages for each port of each switch 120, and respectively these probe messages is sent to corresponding switch 120.When the port of switch 120 is many, for example, when switch 120 is frame type equipment, may there is a hundreds of port in switch 120, at this moment, controller 110 need to be constructed respectively a probe messages for each port of this switch 120, and then this hundreds of part probe messages is sent to this switch 120, can cause the significant wastage of controller 110 and switch 120 resources.
Summary of the invention
The technical problem that the application mainly solves is to provide link discovery method and device, can reduce the consumption of the resource of controller and switch.
For solving the problems of the technologies described above, the application provides a kind of link discovery method on the one hand, comprise the steps: that to the first switch, sending first sends request message, wherein, described first sends request and in message, has encapsulated the first probe messages, sign and described the first probe messages that described the first probe messages has been recorded described the first switch do not comprise from the information of which port repeat of described the first switch, described the first switch has described the first probe messages is sent request message to decapsulation out and ability from described the first probe messages to all of the port that broadcast from described first, receive the first packet receiving notice message that the second switch sends, wherein, described the second switch is the switch that receives described first probe messages of described the first switch broadcast, and described the first packet receiving notice message has encapsulated described the first probe messages, according to the sign of the first switch encapsulating in described the first probe messages and receive described the first packet receiving notice message from described the second switch and determine between described the first switch and described the second switch and have link.
In conjunction with first aspect, in the possible execution mode of the first of first aspect, described the first packet receiving notice message has also encapsulated the sign of receiving port, wherein, described receiving port is the port that described the second switch receives the described probe messages that described the first switch broadcasts, described according to the sign of the first switch encapsulating in described probe messages and receive described the first packet receiving notice message from described the second switch and determine between described the first switch and described the second switch and exist the step of link to be specially: according to the sign of the first switch encapsulating described probe messages, from described the second switch receive described the first packet receiving notice message and described the first packet receiving notice message of receiving from described the second switch the sign of the described receiving port that encapsulates, determine between described the first switch and the receiving port of described the second switch and have link.
In conjunction with the possible execution mode of the first of first aspect, in the possible execution mode of the second of the application's first aspect, the quantity of the sign of the described receiving port encapsulating described the first packet receiving notice message receiving from described the second switch according to controller is determined the quantity of the link between described the first switch and described the second switch;
To described the first switch, send second and send request message, wherein, described second sends request and in message, has encapsulated the second probe messages, described the second probe messages has been recorded the sign of described the first switch and the sign that described the second probe messages has been recorded designated port, and described the first switch has described the second probe messages is sent request to decapsulation message out and outwards forwards the ability of described the second probe messages by described designated port from described second;
Receive the second packet receiving notice message that described the second switch sends, wherein, described the second packet receiving notice message has encapsulated received described the second probe messages and the sign that receives the receiving port of described the second probe messages;
According to the sign of the described designated port in the sign of described the first switch in described the second probe messages, described the second probe messages, from described the second switch receive described the second packet receiving notice message and described the second packet receiving notice message of receiving from described the second switch the sign of the receiving port that encapsulates, determine between the described designated port of described the first switch and the receiving port of described the second switch and have link.
For solving the problems of the technologies described above, the application's second aspect provides a kind of probe messages sending method, it is characterized in that, what described method comprised the steps: that switch receives that controller sends first sends request message, wherein, described first sends request in message and has encapsulated the first probe messages, and sign and described the first probe messages that described the first probe messages has been recorded described switch do not comprise from the information of which port repeat of described switch; By described first, send request message and carry out decapsulation, to obtain described the first probe messages; All of the port by described switch is outwards broadcasted described the first probe messages.
In conjunction with second aspect, in the possible execution mode of the first of second aspect, what described method also comprised the steps: that switch receives that controller sends second sends request message, wherein, described second sends request in message and has encapsulated the second probe messages, and described the second probe messages has been recorded the sign of described switch and the sign that described the second probe messages has been recorded designated port; By described second, send request message and carry out decapsulation, to obtain described the second probe messages; Designated port by described switch outwards forwards described the second probe messages.
For solving the problems of the technologies described above, the application's third aspect provides a kind of link discovery device, comprise sending module, receiver module and judge module, described sending module sends request message for sending first to the first switch, wherein, described first sends request and in message, has encapsulated the first probe messages, sign and described the first probe messages that described the first probe messages has been recorded described the first switch do not comprise from the information of which port repeat of described the first switch, described the first switch has described the first probe messages is sent request message to decapsulation out and ability from described the first probe messages to all of the port that broadcast from described first, the first packet receiving notice message that described receiver module sends for receiving the second switch, wherein, described the second switch is the switch that receives described first probe messages of described the first switch broadcast, and described the first packet receiving notice message has encapsulated described the first probe messages, described judge module is for the sign of the first switch of encapsulating according to described probe messages and from described the second switch, receive described the first packet receiving notice message and determine between described the first switch and described the second switch and have link.
In conjunction with the third aspect, in the possible execution mode of the first of the third aspect, the first packet receiving notice message that described the second switch that described receiver module receives sends has also encapsulated the sign of receiving port, wherein, described receiving port is the port that described the second switch receives the described probe messages that described the first switch broadcasts, described judge module is also for the sign of the first switch of encapsulating according to described probe messages, from described the second switch receive described the first packet receiving notice message and described the first packet receiving notice message of receiving from described the second switch the sign of the described receiving port that encapsulates, determine between described the first switch and the receiving port of described the second switch and have link.
In conjunction with the possible execution mode of the first of the third aspect, in the possible execution mode of the second of the application's third aspect, the quantity of the sign of the described receiving port that described judge module also encapsulates for described the first packet receiving notice message receiving from described the second switch according to controller is determined the quantity of the link between described the first switch and described the second switch; Described sending module also sends request message for sending second to described the first switch, wherein, described second sends request and in message, has encapsulated the second probe messages, described the second probe messages has been recorded the sign of described the first switch and the sign that described the second probe messages has been recorded designated port, and described the first switch has described the second probe messages is sent request to decapsulation message out and outwards forwards the ability of described the second probe messages by described designated port from described second; The second packet receiving notice message that described receiver module also sends for receiving described the second switch, wherein, described the second packet receiving notice message has encapsulated received described the second probe messages and the sign that receives the receiving port of described the second probe messages; Described judge module also for according to the sign of the described designated port in the sign of described first switch of described the second probe messages, described the second probe messages, from described the second switch receive described the second packet receiving notice message and described the second packet receiving notice message of receiving from described the second switch the sign of the receiving port that encapsulates, determine between the described designated port of described the first switch and the receiving port of described the second switch and have link.
For solving the problems of the technologies described above, the application's fourth aspect provides a kind of probe messages dispensing device, comprise: receiver module, decapsulation module and sending module, described receiver module first sends request message for what receive that controller sends, wherein, described first sends request in message and has encapsulated the first probe messages, and sign and described the first probe messages that described the first probe messages has been recorded described switch do not comprise from the information of which port repeat of described switch; Described decapsulation module is carried out decapsulation for sending request message by described first, to obtain described the first probe messages;
Described sending module is outwards broadcasted described the first probe messages for all of the port by described switch.
In conjunction with fourth aspect, in the possible execution mode of the first of fourth aspect, described receiver module also second sends request message for what receive that controller sends, wherein, described second sends request in message and has encapsulated the second probe messages, and described the second probe messages has been recorded the sign of described switch and the sign that described the second probe messages has been recorded designated port; Described decapsulation module is also carried out decapsulation for sending request message by described second, to obtain described the second probe messages; Described sending module also outwards forwards described the second probe messages for the designated port by described switch.
For solving the problems of the technologies described above, the application the 5th aspect provides a kind of link discovery method, comprise the steps: to send request message to the first switch, wherein, described sending request encapsulated probe messages template in message, described probe messages template has been recorded the sign of described the first switch, described the first switch has described probe messages template is sent request to decapsulation message out and the sign that sends the transmit port of described probe messages template is filled up in described probe messages template, the ability then sending from described; Receive the packet receiving notice message that the second switch sends, wherein, described the second switch is the switch that receives the described probe messages template that described the first switch sends by described transmit port, fills in the sign that probe messages template after transmit port sign and described the second switch receive the receiving port of described probe messages template described in described packet receiving notice message has encapsulated; According to the described transmit port of the sign of the first switch encapsulating in described probe messages, described the first switch, from described the second switch, receive sign that described packet receiving notice message and described the second switch receive the receiving port of described probe messages template and determine between the described transmit port of described the first switch and the described receiving port of described the second switch and have link.
For solving the problems of the technologies described above, the application the 6th aspect provides a kind of probe messages template sending method, described method comprises the steps: that switch receives the message that sends request that controller sends, wherein, described sending request in message encapsulated probe messages template, and described probe messages template has been recorded the sign of described switch; Described probe messages template is carried out to decapsulation from the described message that sends request, to obtain described probe messages template; The sign that sends the transmit port of described probe messages template is filled up in described probe messages template, and described probe messages template is outwards forwarded by described transmit port.
For solving the problems of the technologies described above, the application the 7th aspect provides a kind of link discovery device, comprise sending module, receiver module and judge module, described sending module is for sending request message to the first switch, wherein, described sending request encapsulated probe messages template in message, described probe messages template has been recorded the sign of described the first switch, described the first switch has described probe messages template is sent request to decapsulation message out and the sign that sends the transmit port of described probe messages template is filled up in described probe messages template from described, then the ability sending, the packet receiving notice message that described receiver module sends for receiving the second switch, wherein, described the second switch is the switch that receives the described probe messages template that described the first switch sends by described transmit port, fills in the sign that probe messages template after transmit port sign and described the second switch receive the receiving port of described probe messages template described in described packet receiving notice message has encapsulated, described judge module for the sign of the first switch that encapsulates according to described probe messages, the described transmit port of described the first switch, receive from described the second switch sign that described packet receiving notice message and described the second switch receive the receiving port of described probe messages template and determine between the described transmit port of described the first switch and the described receiving port of described the second switch and have link.
For solving the problems of the technologies described above, the application's eight aspect provides a kind of probe messages template dispensing device, comprise receiver module, decapsulation module and sending module, described receiver module is for receiving the message that sends request that controller sends, wherein, described sending request in message encapsulated probe messages template, and described probe messages template has been recorded the sign of described switch; Described decapsulation module is for carrying out decapsulation by described probe messages template from the described message that sends request, to obtain described probe messages template; Described sending module is used for the sign that sends the transmit port of described probe messages template to be filled up to described probe messages template, and described probe messages template is outwards forwarded by described transmit port.
In such scheme, in the probe messages that controller sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, the first switch receives after probe messages, then probe messages is broadcasted by all of the port.The second switch that receives the probe messages that the first switch broadcasts sends probe messages again to controller.Making controller and to receive probe messages from the second switch according to the sign of the first switch encapsulating in probe messages determines between the first switch and the second switch and has link.Due to, in the probe messages that controller sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of the first switch is many again, controller is also only required to be a probe messages of the first switch fabric and sends a probe messages to the first switch, has greatly reduced the waste of the resource of controller and switch.
Accompanying drawing explanation
Fig. 1 is the structural representation of prior art software defined network one execution mode;
Fig. 2 is the structural representation of the application's link discovery system one execution mode;
Fig. 3 is the structural representation of another execution mode of the application's link discovery system;
Fig. 4 is the flow chart of the application's link discovery method one execution mode;
Fig. 5 is the flow chart of another execution mode of the application's link discovery method;
Fig. 6 is the flow chart of the application's probe messages sending method one execution mode;
Fig. 7 is the flow chart of another execution mode of the application's probe messages sending method;
Fig. 8 is the structural representation of the application's link discovery device one execution mode;
Fig. 9 is the structural representation of the application's controller one execution mode;
Figure 10 is the structural representation of the application's probe messages dispensing device one execution mode;
Figure 11 is the structural representation of the application's switch one execution mode;
Figure 12 is the application's link discovery system structural representation of an execution mode again;
Figure 13 is the flow chart of the another execution mode of the application's link discovery method;
Figure 14 is the flow chart of an execution mode of the application's probe messages template sending method;
Figure 15 is the structural representation of another execution mode of the application's link discovery device;
Figure 16 is the structural representation of another execution mode of the application's controller;
Figure 17 is the structural representation of the application's probe messages dispensing device one execution mode;
Figure 18 is the structural representation of another execution mode of the application's switch.
Embodiment
In below describing, in order to illustrate rather than in order limiting, to have proposed the detail such as particular system structure, interface, technology, to thoroughly understand the application.Yet, not it will be clear to one skilled in the art that in there is no other execution mode of these details and can realize the application yet.In other situation, omit the detailed description to well-known device, circuit and method, in order to avoid unnecessary details hinders the application's description.
Consult Fig. 2, Fig. 2 is the structural representation of system one execution mode of the application's link discovery.The link discovery system of present embodiment comprises controller 210 and switch 220.Controller 210 is connected with each switch 220 in network respectively, and between the switch 220 in network, topology connects.When initial networking, controller 210 does not also know what kind of the topological connection relation between switch 220 is, for the topological connection relation that controller 210 is found between switch 220, the controller 210 of present embodiment is probe messages of each switch 220 structure, in the probe messages of constructing, encapsulated in the sign of corresponding switch 220 and probe messages and do not comprised switch 220 from the information of which port repeat, then controller 210 is encapsulated in probe messages to send request in message, and to switch corresponding to the sign of the switch with encapsulating in probe messages, send this and send request message.Switch 220 receives and sends request after message, carries out decapsulation, and outwards broadcast this probe messages by all ports to sending request message.The switch 220 being connected with the switch 220 of broadcast probe message receives after the probe messages of broadcast, the probe messages receiving and the port that receives this probe messages are encapsulated in packet receiving notice message, and send packet receivings notice messages to controller 210.Like this, controller 210 just can be found the switch 220 of broadcast probe message and receive the link between the switch 220 of probe messages of broadcast.
The controller 210 of take below describes as probe messages of switch 2 structures as example.
Controller 210 is first probe messages of switch 2 structure, has encapsulated in the sign Node2 of corresponding switch 2 and probe messages and do not comprise switch 2 from the information of which this probe messages of port repeat in first probe messages of constructing.After constructing the first probe messages, controller 210 is encapsulated into first by first probe messages of having constructed and sends request in message, then, by first send request message correspondence send to have sign Node2 switch 2 in go.
Switch 2 receives first and sends request after message, sends request message carry out decapsulation to first, obtains probe messages, then by all ports, this probe messages is broadcasted away.As shown in Figure 2, the port one of switch 2 is connected with the port one of switch 3, and the port 2 of switch 2 is connected with the port 3 of switch 4, and the port 3 of switch 2 is connected with the port 2 of switch 1.So after switch 2 these probe messages of broadcast, the port 3 of the port one of switch 3, switch 4, the port 2 of switch 1 can receive this probe messages.
Switch 1, switch 3 and switch 4 are filled up to the first packet receiving notice message by the first probe messages receiving and the port-mark that receives probe messages respectively, and this packet receiving notice message is reported to controller 210.For example, switch 1 is encapsulated into the first packet receiving notice message by the first probe messages receiving and port-mark Port2, and this first packet receiving notice message is reported to controller 210; Switch 3 is encapsulated into the first packet receiving notice message by the first probe messages receiving and port-mark Port1, and this first packet receiving notice message is reported to controller 210; Switch 4 is encapsulated into the first packet receiving notice message by the first probe messages receiving and port-mark Port3, and this first packet receiving notice message is reported to controller 210.
Controller 210 receives after the first packet receiving notice message that switch 1 sends, the first packet receiving notice message that decapsulation switch 1 sends, to obtain the first probe messages and to send the port-mark Port2 that the switch 1 of message is notified in the first packet receiving, is then determined between switch 2 and the port 2 of switch 1 and is had link according to the port-mark Port2 of the sign Node2 of the switch 2 of recording in the first probe messages and switch 1.
Controller 210 receives after the first packet receiving notice message that switch 3 sends, the first packet receiving notice message that decapsulation switch 3 sends, to obtain the first probe messages and to send the port-mark Port1 that the switch 3 of message is notified in the first packet receiving, is then determined between switch 2 and the port one of switch 3 and is had link according to the port-mark Port1 of the sign Node2 of the switch 2 of recording in the first probe messages and switch 3.
Controller 210 receives after the first packet receiving notice message that switch 4 sends, the first packet receiving notice message that decapsulation switch 4 sends, to obtain the first probe messages and to send the port-mark Port3 that the switch 4 of message is notified in the first packet receiving, is then determined between switch 2 and the port 3 of switch 4 and is had link according to the sign Node2 of the switch 2 of recording in probe messages and from the port-mark Port3 message of switch 4.
If only there is a link between two switches 220,, when each switch 220 sends after probe messages, controller 210 just can be known all links between switch 220, thereby obtains the topological relation between switch 220.
If there is a more than link between two switches 220, as shown in Figure 3, the port one of switch 2 is connected with the port one of switch 3, and the port 4 of switch 2 is connected with the port 3 of switch 3, between switch 2 and switch 3, has two links.
Adopt above-mentioned method, the sign Node2 of the first packet receiving notice message that controller 210 can only send from the port one of switch 3 and the port 3 of switch 3 and the encapsulation of the first packet receiving notice message determines to have between the switch 2 of sign Node2 and switch 3 and has two links, wherein, between the port one of switch 2 and switch 3, there is a link, between the port 3 of switch 2 and switch 3, there is a link, but can not determine between which port of switch 2 and the port one of switch 3 and have link, can not determine between which port of switch 2 and the port 3 of switch 3 and have link.
In order to determine between which port of switch 2 and which port of the port one of switch 3 and switch 2 and the port 3 of switch 3, there is link.Controller 210 is second probe messages of each port configuration of switch 2, and wherein, the second probe messages has been recorded the sign of switch 2 and the sign that the second probe messages has been recorded designated port.Second probe messages of for example, constructing for the port one of switch 2 has been recorded the sign Node2 of switch 2 and the sign Port1 that the second probe messages has been recorded port one; For the second probe messages that the port 4 of switch 2 is constructed has been recorded the sign Node2 of switch 2 and the sign Port4 that the second probe messages has been recorded port 4.
Controller 210 is packaged into second by the second probe messages and sends request in message.Controller 210 sends second to the switch 2 with sign Node2 and sends request message.Switch 2 receives to be had switch 2 sign Node2 and specifies from second of the port-mark Port1 of port one sends request
, decapsulation second sends request message, obtains the second probe messages, and then, switch 2 sends the second probe messages by the port one of appointment in the second probe messages.
The second probe messages that the port one of the port one desampler 2 of the switch 3 being connected with the port one of switch 2 forwards.Switch 3 is encapsulated into the second packet receiving notice message by the second probe messages receiving and port-mark Port1, and this second packet receiving notice message is reported to controller 210.
Controller 210 receives the second packet receiving notice message that switch 3 sends, the second packet receiving notice message is handed in decapsulation, obtain the second probe messages and send the port-mark Port1 that the switch 3 of message is notified in the second packet receiving, then according to the port-mark Port1 of the designated port sign Port1 of the sign Node2 of the switch 2 of recording in the second probe messages, switch 2 and switch 3, determine between the port one of switch 2 and the port one of switch 3 and have link.
When the port 4 of controller 210 to switch 2 sends after the second probe messages, similarly, controller 210 just can be known between the port 4 of switch 2 and the port 3 of switch 3 and has a link.When controller, to other, all switches of a more than link that exist send after the second probe messages, can obtain all topological relations between switch 220.
Consult Fig. 4, Fig. 4 is the flow chart of the application's link discovery method one execution mode.Present embodiment comprises the steps:
401: to the first switch, send first and send request message, wherein, first sends request and in message, has encapsulated the first probe messages, sign and the first probe messages that the first probe messages has been recorded the first switch do not comprise from the information of which port repeat of the first switch, and the first switch has the first probe messages is sent request message to decapsulation out and ability from the first probe messages to all of the port that broadcast from first.
When subscriber equipment utilizes while carrying out data communication between SDN and server, the controller in SDN need to calculate subscriber equipment to the suitable forward-path between server, and controller is to calculate forward-path by the topological structure between switch.Due to when initially setting up SDN, controller does not also know what kind of the topological connection relation between switch is, therefore, after setting up SDN, switch need to be determined the topological relation between the switch in SDN.
Concrete, controller is first probe messages of the first switch fabric, has encapsulated in the sign of corresponding switch and probe messages and do not comprise switch from the information of which port repeat in first probe messages of constructing.Then, controller is encapsulated in first by the first probe messages and sends request in message, and to the first switch corresponding to the sign of the switch with encapsulating in the first probe messages, send this and first send request message, so that the first switch obtains the first probe messages after sending request message decapsulation by first, and broadcast the first probe messages to all ports of the first switch.
402: receive the first packet receiving notice message that the second switch sends, wherein, the second switch is the switch that receives the first probe messages of the first switch broadcast, and the first packet receiving notice message has encapsulated the first probe messages.
The second switch being connected with the first switch ports themselves receives after the first probe messages, can send the first packet receiving notice message that is packaged with the first probe messages to controller.Correspondingly, controller receives the first packet receiving notice message.
403: according to the sign of the first switch encapsulating in the first probe messages and receive the first packet receiving notice message from the second switch and determine between the first switch and the second switch and have link.
Controller receives after the first packet receiving notice message that the second switch sends, decapsulation the first packet receiving notice message to be to obtain the first probe messages, and the first switch of then determining broadcast the first probe messages according to the sign of the first switch of recording in the first probe messages and the first packet receiving notice message is notified between the second switch of message and had link with receiving the first probe messages and send the first packet receiving.
When controller is that switches all in SDN generates and sends probe messages, and only there is a link between every two switches, utilize the method for present embodiment just can get the topology contact between the switch in whole SDN.
Be different from prior art, in the probe messages that present embodiment middle controller sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, the first switch receives after probe messages, then probe messages is broadcasted by all of the port.The second switch that receives the probe messages that the first switch broadcasts sends probe messages again to controller.Making controller and to receive probe messages from the second switch according to the sign of the first switch encapsulating in probe messages determines between the first switch and the second switch and has link.Due to, in the probe messages that controller sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of the first switch is many again, controller is also only required to be a probe messages of the first switch fabric and sends a probe messages to the first switch, has greatly reduced the waste of the resource of controller and switch.
Consult Fig. 5, Fig. 5 is the flow chart of another execution mode of the application's link discovery method.Link discovery method in present embodiment comprises the steps:
501: to the first switch, send first and send request message, wherein, first sends request and in message, has encapsulated the first probe messages, sign and the first probe messages that the first probe messages has been recorded the first switch do not comprise from the information of which port repeat of the first switch, and the first switch has the first probe messages is sent request message to decapsulation out and ability from the first probe messages to all of the port that broadcast from first.
When subscriber equipment utilizes while carrying out data communication between SDN and server, the controller in SDN need to calculate subscriber equipment to the suitable forward-path between server, and controller is to calculate forward-path by the topological structure between switch.Due to when initially setting up SDN, controller does not also know what kind of the topological connection relation between switch is, therefore, after setting up SDN, controller need to be determined the topological relation between the switch in SDN.
Concrete, controller is first probe messages of the first switch fabric, has encapsulated in the sign of corresponding switch and probe messages and do not comprise switch from the information of which port repeat in first probe messages of constructing.Then, controller is encapsulated in first by the first probe messages and sends request in message, and to the first switch corresponding to the sign of the switch with encapsulating in the first probe messages, send this and first send request message, so that the first switch obtains the first probe messages after sending request message decapsulation by first, and broadcast the first probe messages to all ports of the first switch.
502: receive the first packet receiving notice message that the second switch sends, in described the first packet receiving notice message, encapsulated the first probe messages, the first probe messages has been recorded the sign of the first switch, the first packet receiving notice message has also encapsulated the sign of receiving port, wherein, receiving port is the port that the second switch receives the probe messages that the first switch broadcasts.
In order to make controller, can determine the first switch of broadcast the first probe messages specifically with which port that receives the second switch of the first probe messages of broadcasting is connected, the second switch being connected with the first switch receives after the first probe messages, can be packaged with the first probe messages to controller report and notify message with the first packet receiving that the receiving port that receives the first probe messages of the first switch broadcast identifies.Correspondingly, controller receives the first packet receiving notice message.
503: according to the sign of the first switch encapsulating in probe messages, from the second switch receive the first packet receiving notice message and the first packet receiving notice message of receiving from the second switch the sign of the receiving port that encapsulates, determine between the first switch and the receiving port of the second switch and have link.
Controller receives after the first packet receiving notice message that the second switch sends, the first packet receiving notice message that decapsulation the second switch sends is to obtain the port-mark of the first probe messages and the receiving port of the second switch of transmission the first packet receiving notice message, then the first switch of determining broadcast the first probe messages according to the port-mark of the receiving port of the sign of the first switch of recording in the first probe messages and the second switch is notified between the receiving port of message the second switch and is had link with receiving the first probe messages and send the first packet receiving.
504: the quantity of the sign of the receiving port encapsulating the first packet receiving notice message receiving from the second switch according to controller is determined the quantity of the link between the first switch and the second switch.
In SDN, there is a more than situation that link is connected between adjacent two switches, the first switch is connected with a plurality of ports of the second switch, in this case, controller, in order to determine the topological relation between switch, is first determined the quantity of link between the first switch and the second switch.In the present embodiment, controller be according to receive encapsulation that the second switch reports there is the sign of the first switch the quantity of the first packet receiving notice message determine the quantity of the link between the second switch of the first probe messages of broadcasting the first switch of the first probe messages and receiving broadcast.Such as, controller has received 3 the first packet receiving notice messages that encapsulated the sign of the first switch that the second switch reports, controller can be determined so, the first switch of broadcast the first probe messages and receive between second switch of the first probe messages of broadcast and have 3 links.
505: to the first switch, send second and send request message, wherein, second sends request and in message, has encapsulated the second probe messages, the second probe messages has been recorded the sign of the first switch and the sign that the second probe messages has been recorded designated port, and the first switch has the second probe messages is sent request to decapsulation message out and outwards forwards the ability of the second probe messages by designated port from second.
After determining the number of links of the existence between the first switch and the second switch, controller need to be determined the concrete annexation between the port of the first switch and the port of the second switch.Particularly, controller is constructed the second probe messages, and sign and the first switch of in the second probe messages, having recorded corresponding the first switch forward the port-mark of this second probe messages from designated port.Then, controller is encapsulated into second by the second probe messages and sends request in message.Controller sends request message by packaged second and sends in the first switch corresponding with the switch identification of recording in the second probe messages and go, so that the first switch obtains the second probe messages after sending request message decapsulation by second, and forward the second probe messages by the designated port of the first switch of recording in the second probe messages.Such as, in the second probe messages, having recorded the port that the first switch forwards this second probe messages is the second port, so at the first switch by the second port repeat this second probe messages.
506: receive the second packet receiving notice message that the second switch sends, wherein, the second packet receiving notice message has encapsulated the second received probe messages and the sign that receives the receiving port of the second probe messages.
The second switch being connected with the first switch designated port receives after the second probe messages, can be packaged with the second probe messages to controller report and notify message with the second packet receiving that the receiving port that receives the second probe messages of the first switch forwarding identifies.Correspondingly, controller receives the second packet receiving notice message.Such as, the 3rd port of the second switch has received the second probe messages, has encapsulated the second probe messages so and receive the port-mark of the 3rd port of the second switch of the second probe messages in the second packet receiving notice message.
507: according to the sign of the designated port in the sign of the first switch in the second probe messages, the second probe messages, from the second switch receive the second packet receiving notice message and the second packet receiving notice message of receiving from the second switch the sign of the receiving port that encapsulates, determine between the designated port of the first switch and the receiving port of the second switch and have link.
Controller receives after the second packet receiving notice message that the second switch sends, decapsulation the second packet receiving notice message, obtain the second probe messages and send the port-mark of the second switch of the second packet receiving notice message, then according to the port-mark of the designated port of the first switch of forwarding the second probe messages of recording in the second probe messages and the receiving port sign of the second switch that receives the second probe messages of broadcast, further determine between the designated port of the first switch and the receiving port of the second switch and have link.Such as, controller finds that according to the record in the second probe messages the second probe messages broadcasted by the second port of the first switch, and received by the 3rd port of the second switch, so, controller is determined between the second port of the first switch and the 3rd port of the second switch and is had a link.
The second probe messages for other designated port structure sending when controller is forwarded to after the second switch by other designated ports of the first switch, and controller just can be known the link existing between other designated ports of the first switch and other ports of the second switch.When controller, to other, all switches of a more than link that exist send after the second probe messages, can obtain all topological relations between switch in SDN.
Be different from prior art, in the probe messages that present embodiment middle controller sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, the first switch receives after probe messages, then probe messages is broadcasted by all of the port.The second switch of receiving the probe messages that the first switch broadcasts sends the probe messages of having recorded the second switch and receive the port-mark of probe messages port again to controller.Making controller and to receive probe messages from the second switch according to the sign of the first switch encapsulating in probe messages determines between the first switch and the concrete port of the second switch and has link.When there is multilink between the first switch and the second switch, the probe messages that controller first sends according to the second transmitter is determined the number of links between the first switch and the second switch, then to the first switch, again send and recorded the sign of the first switch and comprised from the information of which port repeat of the first switch, the first switch receives after probe messages, then probe messages is broadcasted by designated port.The second switch that receives the probe messages that the first switch broadcasts sends probe messages again to controller.Making controller and to receive probe messages from the second switch according to the sign of the sign of the first switch encapsulating in probe messages, the first switch designated port determines between the first switch designated port and the second switch and has link.Due to, in the probe messages that controller sends for the first time to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of the first switch is many again, controller is also only required to be a probe messages of the first switch fabric and sends a probe messages to the first switch, determine while there is a more than link between the first switch and the second switch, to the first switch, send the probe messages of having recorded designated port again, greatly reduced the waste of the resource of controller and switch.
Consult Fig. 6, Fig. 6 is the flow chart of the application's probe messages discover method one execution mode.Comprise the steps:
601: what switch received that controller sends first sends request message, wherein, first sends request in message and has encapsulated the first probe messages, and sign and the first probe messages that the first probe messages has been recorded switch do not comprise from the information of which port repeat of switch.
In order to determine the topological relation between the switch in SDN, at controller, it is first probe messages of switch fabric, and the first probe messages is encapsulated in to first and sends request message and send this to switch corresponding to the sign of the switch with encapsulating in the first probe messages and first send request after message, the switch corresponding with switch identification in the first probe messages receives first and sends request message.Wherein, in the first probe messages, encapsulated in the sign of corresponding switch and probe messages and do not comprised switch from the information of which port repeat.
602: by first, send request message and carry out decapsulation, to obtain the first probe messages.
Switch receives first and sends request after message, and the first probe messages is sent request message to decapsulation out from first.
603: all of the port by switch is outwards broadcasted the first probe messages.
Switch obtains after the first probe messages, switch is outwards broadcasted this first probe messages by all ports, so that the switch being connected with the switch of broadcast the first probe messages receives after this first probe messages, to controller, send the first packet receiving notice message encapsulated the first probe messages, further make controller determine the switch of broadcast the first probe messages and to receive the link of the existence between the switch of the first probe messages of broadcast according to the first packet receiving notice message.
Be different from prior art, in the probe messages that the switch reception controller of present embodiment sends, recorded the sign of switch and do not comprised from the information of which port repeat of the first switch, will after the probe messages decapsulation receiving, again probe messages have been broadcasted by all of the port.Can make controller can receive after the probe messages reporting from the switch that receives the probe messages of broadcast, according to the sign of the switch of broadcast the first probe messages encapsulating in probe messages and from receiving the switch of the first probe messages of broadcast, receive probe messages and determine the switch of broadcast the first probe messages and receive between the switch of the first probe messages of broadcast and have link.Due to, in the probe messages that switch receives, recorded the sign of switch and do not comprised from the information of which port repeat of switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of switch is many again, switch also only need receive a probe messages from controller, has greatly reduced the waste of the resource of controller and switch.
Consult Fig. 7, Fig. 7 is the flow chart of another execution mode of the application's probe messages discover method.Comprise the steps:
701: what switch received that controller sends first sends request message, wherein, first sends request in message and has encapsulated the first probe messages, and sign and the first probe messages that the first probe messages has been recorded switch do not comprise from the information of which port repeat of switch.
In order to determine the topological relation between the switch in SDN, controller is first probe messages of each switch fabric, then, controller is encapsulated into first by first probe messages of having constructed and sends request in message, and first send request message packaged after, to switch corresponding to the sign of the switch with encapsulating in the first probe messages, send this and first send request message.Correspondingly, the switch corresponding with switch identification in the first probe messages receives first and sends request message.Wherein, in the first probe messages, encapsulated in the sign of corresponding switch and the first probe messages and do not comprised switch from the information of which port repeat.
702: by first, send request message and carry out decapsulation, to obtain the first probe messages.
Switch receives first and sends request after message, and the first probe messages is sent request message to decapsulation out from first.
703: all of the port by switch is outwards broadcasted the first probe messages.
Switch obtains after the first probe messages, and switch is outwards broadcasted this first probe messages by all ports, so that the switch being connected with the switch of broadcast the first probe messages receives this first probe messages.The switch being connected with the switch of broadcast the first probe messages receives after the first probe messages, message is notified in the first packet receiving that has encapsulated the port-mark of the first probe messages the first probe messages and that receive broadcast to controller transmission, further makes controller can determine according to the first packet receiving notice message the link of the existence between the switch of broadcasting the switch of the first probe messages and receiving the first probe messages of broadcasting.
704: what switch received that controller sends second sends request message, wherein, second sends request in message and has encapsulated the second probe messages, and the second probe messages has been recorded the sign of switch and the sign that the second probe messages has been recorded designated port.
If broadcast the more than link that exists between the switch of the first probe messages and the switch of the first probe messages of reception broadcast, in order to determine between which port of the first switch and the designated port of friendship the second switch, have link, one of each port configuration that need to be switch at controller has been recorded the second probe messages of switch identification and switch designated port sign.Controller is encapsulated in second by the second probe messages and sends request message and send this to switch corresponding to the sign of the switch with encapsulating in the second probe messages and second send request message, correspondingly, the switch corresponding with switch identification in the second probe messages receives second and sends request message.
705: by second, send request message and carry out decapsulation, to obtain the second probe messages.From the second probe messages, obtain again the port-mark that switch forwards the designated port of this second probe messages.
706: the designated port by switch outwards forwards the second probe messages, so that the switch being connected with the switch ports themselves of broadcast the second probe messages is after receiving this second probe messages, to controller, send the second packet receiving notice message of the port-mark of the second probe messages encapsulated the second probe messages and to have received broadcast, further make controller can determine according to the second packet receiving notice message the link of the existence between the switch ports themselves of the second probe messages that forwards the switch ports themselves of the second probe messages and receive forwarding.
The second probe messages for other designated port structure sending when controller is forwarded to after the second switch by other designated ports of the first switch, and controller just can be known the link existing between other designated ports of the first switch and other ports of the second switch.When controller, to other, all switches of a more than link that exist send after the second probe messages, can obtain all topological relations between switch in SDN.
Be different from prior art, in the probe messages that the switch reception controller of present embodiment sends, recorded the sign of switch and do not comprised from the information of which port repeat of the first switch, will after the probe messages decapsulation receiving, again probe messages have been broadcasted by all of the port.Can make controller can receive after the probe messages reporting from the switch that receives the probe messages of broadcast, according to the sign of the switch of broadcast the first probe messages encapsulating in probe messages and from receiving the switch of the first probe messages of broadcast, receive probe messages and determine the switch of broadcast the first probe messages and receive between the switch of the first probe messages of broadcast and have number of links, if there is a more than link, the second probe messages of the sign of the switch switch identification that received record that controller sends and designated port, to the second probe messages decapsulation and broadcast away from designated port, and then make controller determine annexation concrete between switch ports themselves.Due to, in the probe messages that switch receives, recorded the sign of switch and do not comprised from the information of which port repeat of switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of switch is many again, switch also only need receive a probe messages from controller, when there is a more than link between definite neighboring switch, receive again the second probe messages that comprises designated port that controller sends, greatly reduced the waste of the resource of controller and switch.
Consult Fig. 8, Fig. 8 is the structural representation of an execution mode of the application's link discovery device.The link discovery device of present embodiment comprises sending module 801, receiver module 802 and judge module 803.
Sending module 801 sends request message for sending first to the first switch, wherein, first sends request and in message, has encapsulated the first probe messages, sign and the first probe messages that the first probe messages has been recorded the first switch do not comprise from the information of which port repeat of the first switch, and the first switch has the first probe messages is sent request message to decapsulation out and ability from the first probe messages to all of the port that broadcast from first.
The first packet receiving notice message that receiver module 802 sends for receiving the second switch, wherein, the second switch is the switch that receives the first probe messages of the first switch broadcast, the first packet receiving notice message has encapsulated the first probe messages.
Judge module 803 is for the sign of the first switch of encapsulating according to probe messages and from the second switch, receive the first packet receiving notice message and determine between the first switch and the second switch and have link.
Alternatively, the first packet receiving notice message that the second switch that receiver module 802 receives sends has also encapsulated the sign of receiving port, wherein, receiving port is the port that the second switch receives the probe messages that the first switch broadcasts, judge module 803 is also for the sign of the first switch of encapsulating according to probe messages, from the second switch receive the first packet receiving notice message and the first packet receiving notice message of receiving from the second switch the sign of the receiving port that encapsulates, determine between the first switch and the receiving port of the second switch and have link.
The quantity of the sign of the receiving port that alternatively, judge module 803 also encapsulates for the first packet receiving notice message receiving from the second switch according to controller is determined the quantity of the link between the first switch and the second switch.Sending module 801 also sends request message for sending second to the first switch, wherein, second sends request and in message, has encapsulated the second probe messages, the second probe messages has been recorded the sign of the first switch and the sign that the second probe messages has been recorded designated port, and the first switch has the second probe messages is sent request to decapsulation message out and outwards forwards the ability of the second probe messages by designated port from second.The second packet receiving notice message that receiver module 802 also sends for receiving the second switch, wherein, the second packet receiving notice message has encapsulated the second received probe messages and the sign that receives the receiving port of the second probe messages.Judge module 803 also for according to the sign of the designated port in the sign of the first switch of the second probe messages, the second probe messages, from the second switch receive the second packet receiving notice message and the second packet receiving notice message of receiving from the second switch the sign of the receiving port that encapsulates, determine between the designated port of the first switch and the receiving port of the second switch and have link.
Be appreciated that the device shown in Fig. 8 can execution graph 4 and embodiment corresponding to Fig. 5 in each step.
Be different from prior art, in the probe messages that in present embodiment, sending module sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, the first switch receives after probe messages, then probe messages is broadcasted by all of the port.The second switch that receiver module receives the probe messages that the first switch broadcasts sends probe messages again to controller.Making judge module and to receive probe messages from the second switch according to the sign of the first switch encapsulating in probe messages determines between the first switch and the second switch and has link.Due to, in the probe messages that sending module sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of the first switch is many again, judge module is also only required to be a probe messages of the first switch fabric and sends a probe messages to the first switch, has greatly reduced the waste of the resource of controller and switch.
Consult Fig. 9, Fig. 9 is the structural representation of an execution mode of the application's controller.The controller of present embodiment comprises transmitter 901, receiver 902 and processor 903.
Transmitter 901 sends request message for sending first to the first switch, wherein, first sends request and in message, has encapsulated the first probe messages, sign and the first probe messages that the first probe messages has been recorded the first switch do not comprise from the information of which port repeat of the first switch, and the first switch has the first probe messages is sent request message to decapsulation out and ability from the first probe messages to all of the port that broadcast from first.
The first packet receiving notice message that receiver 902 sends for receiving the second switch, wherein, the second switch is the switch that receives the first probe messages of the first switch broadcast, the first packet receiving notice message has encapsulated the first probe messages.
Processor 903 is for the sign of the first switch of encapsulating according to probe messages and from the second switch, receive the first packet receiving notice message and determine between the first switch and the second switch and have link.
Switch in present embodiment also comprises memory 904, and memory 904 can comprise read-only memory and random access memory, and provides instruction and data to processor 903.A part for memory 904 can also comprise nonvolatile RAM (NVRAM).
Memory 904 has been stored following element, executable module or data structure, or their subset, or their superset:
Operational order: comprise various operational orders, for realizing various operations.
Operating system: comprise various system programs, for realizing various basic businesses and processing hardware based task.
In embodiments of the present invention, processor 903, by calling the operational order (this operational order can be stored in operating system) of memory 904 storages, is carried out aforesaid operations.
Processor 903 can also be called CPU (Central Processing Unit, CPU).Memory 904 can comprise read-only memory and random access memory, and provides instruction and data to processor 702.A part for memory 904 can also comprise nonvolatile RAM (NVRAM).In concrete application, each assembly of controller is coupled by bus system 905, and wherein bus system 905, except comprising data/address bus, can also comprise power bus, control bus and status signal bus in addition etc.But for the purpose of clearly demonstrating, in the drawings various buses are all designated as to bus system 905.
The method that the invention described above embodiment discloses can be applied in processor 903, or is realized by processor 903.Processor 903 may be a kind of integrated circuit (IC) chip, has the disposal ability of signal.In implementation procedure, each step of said method can complete by the integrated logic circuit of the hardware in processor 903 or the instruction of form of software.Above-mentioned processor 903 can be general processor, digital signal processor (DSP), application-specific integrated circuit (ASIC) (ASIC), ready-made programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic device, discrete hardware components.Can realize or carry out disclosed each method, step and logic diagram in the embodiment of the present invention.General processor can be that microprocessor or this processor can be also the processors of any routine etc.Step in conjunction with the disclosed method of the embodiment of the present invention can directly be presented as that hardware decoding processor is complete, or complete with the hardware in decoding processor and software module combination.Software module can be positioned at random asccess memory, and flash memory, read-only memory, in the storage medium of this area maturations such as programmable read only memory or electrically erasable programmable memory, register.This storage medium is positioned at memory 904, and the information in processor 903 read memories 904 completes the step of said method in conjunction with its hardware.
Alternatively, the first packet receiving notice message that the second switch that receiver 902 receives sends has also encapsulated the sign of receiving port, wherein, receiving port is the port that the second switch receives the probe messages that the first switch broadcasts, processor 903 is also for the sign of the first switch of encapsulating according to probe messages, from the second switch receive the first packet receiving notice message and the first packet receiving notice message of receiving from the second switch the sign of the receiving port that encapsulates, determine between the first switch and the receiving port of the second switch and have link.
The quantity of the sign of the receiving port that alternatively, processor 903 also encapsulates for the first packet receiving notice message receiving from the second switch according to controller is determined the quantity of the link between the first switch and the second switch.Transmitter 901 also sends request message for sending second to the first switch, wherein, second sends request and in message, has encapsulated the second probe messages, the second probe messages has been recorded the sign of the first switch and the sign that the second probe messages has been recorded designated port, and the first switch has the second probe messages is sent request to decapsulation message out and outwards forwards the ability of the second probe messages by designated port from second.The second packet receiving notice message that receiver 902 also sends for receiving the second switch, wherein, the second packet receiving notice message has encapsulated the second received probe messages and the sign that receives the receiving port of the second probe messages.Processor 903 also for according to the sign of the designated port in the sign of the first switch of the second probe messages, the second probe messages, from the second switch receive the second packet receiving notice message and the second packet receiving notice message of receiving from the second switch the sign of the receiving port that encapsulates, determine between the designated port of the first switch and the receiving port of the second switch and have link.
Be different from prior art, in the probe messages that in present embodiment, transmitter sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, the first switch receives after probe messages, then probe messages is broadcasted by all of the port.The second switch that receiver receives the probe messages that the first switch broadcasts sends probe messages again to controller.Making judge module and to receive probe messages from the second switch according to the sign of the first switch encapsulating in probe messages determines between the first switch and the second switch and has link.Due to, in the probe messages that transmitter sends to the first switch, recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of the first switch is many again, processor is also only required to be a probe messages of the first switch fabric and sends a probe messages to the first switch, has greatly reduced the waste of the resource of controller and switch.
Consult Figure 10, Figure 10 is the structural representation of the application's probe messages dispensing device one execution mode, and the probe messages dispensing device of present embodiment comprises receiver module 1001, decapsulation module 1002 and sending module 1003,
Receiver module 1,001 first sends request message for what receive that controller sends, wherein, first sends request in message and has encapsulated the first probe messages, and sign and the first probe messages that the first probe messages has been recorded switch do not comprise from the information of which port repeat of switch;
Decapsulation module 1002 is carried out decapsulation for sending request message by first, to obtain the first probe messages;
Sending module 1003 is outwards broadcasted the first probe messages for all of the port by switch.
Alternatively, receiver module 1001 also second sends request message for what receive that controller sends, wherein, second sends request in message and has encapsulated the second probe messages, and the second probe messages has been recorded the sign of switch and the sign that the second probe messages has been recorded designated port; Decapsulation module 1002 is also carried out decapsulation for sending request message by second, to obtain the second probe messages; Sending module 1003 also outwards forwards the second probe messages for the designated port by switch.
Be appreciated that the device shown in Figure 10 can execution graph 6 and embodiment corresponding to Fig. 7 in each step.
Be different from prior art, in the probe messages that the receiver module reception controller of present embodiment sends, recorded the sign of switch and do not comprised from the information of which port repeat of the first switch, decapsulation module will be broadcasted probe messages sending module after the probe messages decapsulation receiving again by all of the port.Can make controller can receive after the probe messages reporting from the switch that receives the probe messages of broadcast, according to the sign of the switch of broadcast the first probe messages encapsulating in probe messages and from receiving the switch of the first probe messages of broadcast, receive probe messages and determine the switch of broadcast the first probe messages and receive between the switch of the first probe messages of broadcast and have link.Due to, in the probe messages that switch receives, recorded the sign of switch and do not comprised from the information of which port repeat of switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of switch is many again, switch also only need receive a probe messages from controller, has greatly reduced the waste of the resource of controller and switch.
Consult Figure 11, Figure 11 is the structural representation of the application's switch one execution mode, and the probe messages dispensing device of present embodiment comprises receiver 1101, processor 1102 and transmitter 1103,
Receiver 1,101 first sends request message for what receive that controller sends, wherein, first sends request in message and has encapsulated the first probe messages, and sign and the first probe messages that the first probe messages has been recorded switch do not comprise from the information of which port repeat of switch;
Processor 1102 carries out decapsulation for sending request message by first, to obtain the first probe messages;
Transmitter 1103 is outwards broadcasted the first probe messages for all of the port by switch.
Switch in present embodiment also comprises memory 1104, and memory 1104 can comprise read-only memory and random access memory, and provides instruction and data to processor 903.A part for memory 904 can also comprise nonvolatile RAM (NVRAM).
Memory 1104 has been stored following element, executable module or data structure, or their subset, or their superset:
Operational order: comprise various operational orders, for realizing various operations.
Operating system: comprise various system programs, for realizing various basic businesses and processing hardware based task.
In embodiments of the present invention, processor 1102, by calling the operational order (this operational order can be stored in operating system) of memory 1104 storages, is carried out aforesaid operations.
Processor 1102 can also be called CPU (Central Processing Unit, CPU).Memory 1104 can comprise read-only memory and random access memory, and provides instruction and data to processor 1103.A part for memory 1104 can also comprise nonvolatile RAM (NVRAM).In concrete application, each assembly of controller is coupled by bus system 1105, and wherein bus system 1105, except comprising data/address bus, can also comprise power bus, control bus and status signal bus in addition etc.But for the purpose of clearly demonstrating, in the drawings various buses are all designated as to bus system 1105.
The method that the invention described above embodiment discloses can be applied in processor 1102, or is realized by processor 1102.Processor 1102 may be a kind of integrated circuit (IC) chip, has the disposal ability of signal.In implementation procedure, each step of said method can complete by the integrated logic circuit of the hardware in processor 1102 or the instruction of form of software.Above-mentioned processor 1102 can be general processor, digital signal processor (DSP), application-specific integrated circuit (ASIC) (ASIC), ready-made programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic device, discrete hardware components.Can realize or carry out disclosed each method, step and logic diagram in the embodiment of the present invention.General processor can be that microprocessor or this processor can be also the processors of any routine etc.Step in conjunction with the disclosed method of the embodiment of the present invention can directly be presented as that hardware decoding processor is complete, or complete with the hardware in decoding processor and software module combination.Software module can be positioned at random asccess memory, and flash memory, read-only memory, in the storage medium of this area maturations such as programmable read only memory or electrically erasable programmable memory, register.This storage medium is positioned at memory 1104, and the information in processor 1102 read memories 1104 completes the step of said method in conjunction with its hardware.
Alternatively, receiver 1101 also second sends request message for what receive that controller sends, wherein, second sends request in message and has encapsulated the second probe messages, and the second probe messages has been recorded the sign of switch and the sign that the second probe messages has been recorded designated port; Processor 1102 also carries out decapsulation for sending request message by second, to obtain the second probe messages; Transmitter 1103 also outwards forwards the second probe messages for the designated port by switch.
Be different from prior art, in the probe messages that the receiver reception controller of present embodiment sends, recorded the sign of switch and do not comprised from the information of which port repeat of the first switch, processor will be broadcasted probe messages transmitter after the probe messages decapsulation receiving again by all of the port.Can make controller can receive after the probe messages reporting from the switch that receives the probe messages of broadcast, according to the sign of the switch of broadcast the first probe messages encapsulating in probe messages and from receiving the switch of the first probe messages of broadcast, receive probe messages and determine the switch of broadcast the first probe messages and receive between the switch of the first probe messages of broadcast and have link.Due to, in the probe messages that switch receives, recorded the sign of switch and do not comprised from the information of which port repeat of switch, so, probe messages is not bound any one port, can be used for any one port, therefore even the port of switch is many again, switch also only need receive a probe messages from controller, has greatly reduced the waste of the resource of controller and switch.
Consult Figure 12, Figure 12 is the structural representation of the another execution mode of the application's link discovery system.The link discovery system of present embodiment comprises controller 1210 and switch 1220.Controller 1210 is connected with each switch 1220 in network respectively, and between the switch 1220 in network, topology connects.For the topological connection relation that controller 1210 is found between switch 1220, the controller 1210 of present embodiment is probe messages templates of each switch 1220 structure, in the probe messages template of constructing, recorded the sign of corresponding switch 1220, then controller 1210 is encapsulated in probe messages template to send request in message, and to switch corresponding to the sign of the switch with encapsulating in probe messages 1220, sends this and send request message.Switch 1220 receives and sends request after message, to sending request message, carry out decapsulation, obtain probe messages template, and after the sign that sends the transmit port of this probe messages template is filled up in probe messages template, by port corresponding to the sign with above-mentioned transmit port, outwards forward this probe messages template.The switch 1220 being connected with the switch 1220 that forwards probe messages template receives after the probe messages template of forwarding, the probe messages template receiving and the port-mark that receives this probe messages template are encapsulated in packet receiving notice message, and send packet receivings notice messages to controller 1210.Like this, controller 210 just can find forwarding probe messages template switch 220 transmit port and receive the link between switch 1220 receiving ports of probe messages of forwarding.
The controller 1210 of take below describes as probe messages template of switch 2 structures as example.
Controller 1210 is probe messages templates of switch 2 structures, has encapsulated the sign Node2 of corresponding switch 2 in the probe messages template of constructing.After structural exploration message template, controller 1210 is encapsulated into the probe messages template of having constructed to send request in message, then, by send request message correspondence send to have sign Node2 switch 2 in go.
Switch 2 receives and sends request after message, to sending request message, carry out decapsulation, obtain probe messages template, and after the sign that sends the transmit port of this probe messages template is filled up in probe messages template, by port corresponding to the sign with above-mentioned transmit port, outwards forward this probe messages template.As shown in figure 12, switch 2 comprises 4 ports, port one, port 2, port 3 and port 4.Switch 2 receives after probe messages template, and switch 2 is encapsulated into the sign Port1 of port one in probe messages template, and by port one, the probe messages template that is packaged with port-mark Port1 is forwarded; Switch 2 is encapsulated into the sign Port2 of port 2 in probe messages template, and by port 2, the probe messages template that is packaged with port-mark Port2 is forwarded; Switch 2 is encapsulated into the sign Port3 of port 3 in probe messages template again, and by port 3, the probe messages template that is packaged with port-mark Port3 is forwarded; Switch 2 is encapsulated into the sign Port4 of port 4 in probe messages template again, and by port 4, the probe messages template that is packaged with port-mark Port4 is forwarded.
The probe messages template that the corresponding ports of the desampler 2 that the switch 1 being connected with switch 2, exchange 3 and switch 4 are corresponding forwards.As shown in figure 12, the port one of switch 2 is connected with the port one of switch 3, the port 2 of switch 2 is connected with the port 3 of switch 4, and the port 3 of switch 2 is connected with the port 2 of switch 1, and the port 4 of switch 2 is connected with the port 3 of switch 3.So when the port one of switch 2 forwards after this probe messages template, the port one of switch 3 can receive this probe messages template.The port 2 of switch 2 forwards after this probe messages template, and the port 3 of switch 4 can receive this probe messages template.The port 3 of switch 2 forwards after this probe messages template, and the port 2 of switch 1 can receive this probe messages template.The port 4 of switch 2 forwards after this probe messages template, and the port 3 of switch 3 can receive this probe messages template.
Switch 1, switch 3, and reports this packet receiving notice message respectively by the probe template message receiving and receive probe messages template port-mark and be encapsulated into packet receiving notice message with switch 4 to controller 1210.For example, switch 1 is encapsulated into packet receiving notice message by the port-mark Port2 of the probe messages template receiving and reception probe messages template, and this packet receiving notice message is reported to controller 1210; Switch 3 is encapsulated into packet receiving notice message by the probe messages receiving and port-mark Port1, and this packet receiving notice message is reported to controller 1210; Switch 4 is encapsulated into packet receiving notice message by the probe messages receiving and port-mark Port3, and this packet receiving notice message is reported to controller 210, switch 3 is encapsulated into packet receiving notice message by the probe messages receiving and port-mark Port3, and this packet receiving notice message is reported to controller 1210.
Controller 1210 receives after the packet receiving notice message that switch 1 sends, the packet receiving notice message that decapsulation switch 1 sends is to obtain probe messages template, then according to the sign Node2 of the exchange 2 in probe messages template, the port-mark Port2 that message is notified in the sign Port3 of transmit port, the packet receiving sending from switch 1, determines between the port 3 of switch 2 and the port 2 of switch 1 and has link.
Controller 1210 receives after the packet receiving notice message that switch 3 sends, the packet receiving notice message that decapsulation switch 3 sends is to obtain probe messages template, then according to the sign Node2 of the exchange 2 in probe messages template, the port-mark Port1 that message is notified in the sign Port1 of transmit port, the packet receiving sending from switch 3, determines between the port one of switch 2 and the port one of switch 3 and has link.
Controller 1210 receives after the packet receiving notice message that switch 4 sends, the packet receiving notice message that decapsulation switch 4 sends is to obtain probe messages template, then according to the sign Node2 of the exchange 2 in probe messages template, the port-mark Port3 that message is notified in the sign Port2 of transmit port, the packet receiving sending from switch 4, determines between the port 2 of switch 2 and the port 3 of switch 4 and has link.
Controller 1210 receives after the packet receiving notice message that switch 3 sends, the packet receiving notice message that decapsulation switch 3 sends is to obtain probe messages template, then according to the sign Node2 of the exchange 2 in probe messages template, the port-mark Port3 that message is notified in the sign Port4 of transmit port, the packet receiving sending from switch 3, determines between the port 4 of switch 2 and the port 3 of switch 3 and has link.
When controller is constructed and sent after probe messages template for each switch 1220, controller 1210 just can be known all links between switch 220, thereby obtains all topological relations between switch 220.
Consult Figure 13, Figure 13 is the flow chart of the another execution mode of the application's link discovery method.Present embodiment contains following steps:
1301: to the first switch, send request message, wherein, send request and in message, encapsulated probe messages template, probe messages template has been recorded the sign of described the first switch, and the first switch has the decapsulation from send request message of probe messages template out and by the sign that sends the transmit port of probe messages template is filled up to the ability in probe messages template.
Controller is in order to find the topological connection relation between switch, it is probe messages template of the first switch fabric, in the probe messages of constructing, recorded the sign of the first corresponding switch, then controller is encapsulated in probe messages template to send request in message, and to the first switch corresponding to the sign of the switch with encapsulating in probe messages, send this and send request message, so that switch can by probe messages template, from send request message, decapsulation be out, then, the sign that sends the transmit port of probe messages template is filled up in probe messages template, and this probe messages template is outwards forwarded by port corresponding to the sign with transmit port.
1302: receive the packet receiving notice message that the second switch sends, wherein, the second switch is the switch that receives the probe messages template that the first switch sends by transmit port, and packet receiving notice message has encapsulated the sign that probe messages template and the second switch receive the receiving port of probe messages template.
When the second switch being connected with the first switch receives after probe messages template, probe messages template and the port-mark that receives this probe messages template are encapsulated in packet receiving notice message, and send packet receiving notice message to controller.Correspondingly, controller receives the packet receiving notice message that the second switch sends.
1303: according to the transmit port of the sign of the first switch encapsulating in probe messages, the first switch, receive from the second switch sign that packet receiving notice message and the second switch receive the receiving port of probe messages template and determine between the transmit port of the first switch and the receiving port of the second switch and have link.
The packet receiving notice message that controller decapsulation the second switch sends is to obtain probe messages template, and from probe messages template, obtain the sign of the first switch, the first switch is encapsulated in the sign of the transmit port of the transmission probe messages template in probe messages template, and second switch be encapsulated in the sign of the receiving port of the reception probe messages template in probe messages template, then, controller is according to the first switch identification, the sign of the first exchange transmit port, the sign of the second switch receiving port is determined between the transmit port of the first switch and the receiving port of the second switch and is had link.
When controller sends after probe messages template for each switch, controller is known all links between switch, thereby obtains the topological relation between switch.
Be different from prior art, in the probe messages template that present embodiment middle controller sends to the first switch, recorded the sign of the first switch, the first switch receives after probe messages, the sign that sends the transmit port of this probe messages template is filled up in probe messages, more outwards forwards this probe messages template by port corresponding to the sign with transmit port.The second switch that receives the probe messages template that the first switch forwards sends probe messages template again to controller.Making controller and to receive probe messages template from the second switch according to the sign of the sign of the first switch encapsulating in probe messages, the first switch transmit port determines between the first switch transmit port and the second switch receiving port and has link.Due to, in the probe messages template that controller sends to the first switch, only recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, the first switch only need to be filled up to the sign of transmit port in probe messages template and forward after receiving probe messages, even if the port of the first switch is many again, controller is also only required to be a probe messages of the first switch fabric and sends a probe messages to the first switch, has greatly reduced the waste of the resource of controller and switch.
Consult Figure 14, Figure 14 is the flow chart of an execution mode of the application's probe messages template sending method.The probe messages template sending method of present embodiment comprises the steps:
1401: switch receives the message that sends request that controller sends, and wherein, sends request in message and has encapsulated probe messages template, and probe messages template has been recorded the sign of switch.
In order to determine the topological relation between the switch in SDN, controller is probe messages template of each switch fabric.Then, controller is encapsulated into the probe messages template of having constructed to send request in message, and to the switch of the sign correspondence of the switch of the encapsulation in probe messages template, sends this and send request message.Correspondingly, switch receives and sends request message.Wherein, in probe messages, encapsulated in the sign of corresponding switch and probe messages template and do not comprised switch from the information of which port repeat.
1402: probe messages template is carried out to decapsulation from sending request message, to obtain probe messages template.
1403: the sign that sends the transmit port of probe messages template is filled up in probe messages template, and probe messages template is outwards forwarded by transmit port.
Switch obtains after probe messages template, after the sign that sends the transmit port of this probe messages template is filled up in probe messages template, by port corresponding to the sign with above-mentioned transmit port, outwards forwards this probe messages template.So that the switch 1220 being connected with the switch that forwards probe messages template receives after the probe messages template of forwarding, the probe messages template receiving and the port-mark that receives this probe messages template are encapsulated in packet receiving notice message, and notify message to send to controller packet receiving.Make controller determine between the transmit port of switch and the receiving port of the switch of reception probe messages template and have link according to the sign of the receiving port of the switch of the sign of the transmit port of the switch of recording in probe messages template and reception probe messages template.
When all switches all receive after the probe messages template of controller transmission, can make controller know all links between switch, thereby obtain the topological relation between switch.
Be different from prior art, in present embodiment, switch has received record that controller sends after the sign probe messages template of switch, the sign that sends the transmit port of this probe messages template is filled up in probe messages, more outwards forwards this probe messages template by port corresponding to the sign with transmit port.The switch that receives the probe messages template of forwarding sends probe messages template again to controller.Make controller can be according to the sign of switch of the forwarding probe messages template encapsulating in probe messages, the sign of transmit port and determine between the transmit port of the switch that forwards probe messages template and the receiving port of the switch of reception probe messages template and have link from receiving probe messages template that the switch of probe messages sends.Due to, in the probe messages template that the controller that switch receives sends, only recorded the sign of switch and do not comprised from the information of which port repeat of the first switch, switch only need to be filled up to the sign of transmit port in probe messages template and forward after receiving probe messages, even if the port of switch is many again, controller is also only required to be a probe messages of switch fabric and sends a probe messages to switch, has greatly reduced the waste of the resource of controller and switch.
Consult Figure 15, Figure 15 is the structural representation of another execution mode of the application's link discovery device.The link discovery device of present embodiment comprises sending module 1501, receiver module 1502 and judge module 1503,
Sending module 1501 is for sending request message to the first switch, wherein, send request and in message, encapsulated probe messages template, probe messages template has been recorded the sign of the first switch, and the first switch has the decapsulation from send request message of probe messages template out and by the sign that sends the transmit port of probe messages template is filled up to the ability in probe messages template.
The packet receiving notice message that receiver module 1502 sends for receiving the second switch, wherein, the second switch is the switch that receives the probe messages template that the first switch sends by transmit port, and packet receiving notice message has encapsulated the sign that probe messages template and the second switch receive the receiving port of probe messages template.
Judge module 1503 for the sign of the first switch that encapsulates according to probe messages, the transmit port of the first switch, receive from the second switch sign that packet receiving notice message and the second switch receive the receiving port of probe messages template and determine between the transmit port of the first switch and the receiving port of the second switch and have link.
Be appreciated that the device shown in Figure 15 can carry out each step in the embodiment that Figure 13 is corresponding.
Be different from prior art, in the probe messages template that in present embodiment, sending module sends to the first switch, recorded the sign of the first switch, the first switch receives after probe messages, the sign that sends the transmit port of this probe messages template is filled up in probe messages, more outwards forwards this probe messages template by port corresponding to the sign with transmit port.The second switch that receiver module receives the probe messages template that the first switch forwards sends probe messages template again to controller.Making judge module and to receive probe messages template from the second switch according to the sign of the sign of the first switch encapsulating in probe messages, the first switch transmit port determines between the first switch transmit port and the second switch receiving port and has link.Due to, in the probe messages template that sending module sends to the first switch, only recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, the first switch only need to be filled up to the sign of transmit port in probe messages template and forward after receiving probe messages, even if the port of the first switch is many again, sending module is also only required to be a probe messages of the first switch fabric and sends a probe messages to the first switch, has greatly reduced the waste of the resource of controller and switch.
Consult Figure 16, Figure 16 is the structural representation of another execution mode of the application's controller.The link discovery device of present embodiment comprises transmitter 1601, receiver 1602 and processor 1603,
Transmitter 1601 is for sending request message to the first switch, wherein, send request and in message, encapsulated probe messages template, probe messages template has been recorded the sign of the first switch, and the first switch has the decapsulation from send request message of probe messages template out and by the sign that sends the transmit port of probe messages template is filled up to the ability in probe messages template.
The packet receiving notice message that receiver 160 sends for receiving the second switch, wherein, the second switch is the switch that receives the probe messages template that the first switch sends by transmit port, and packet receiving notice message has encapsulated the sign that probe messages template and the second switch receive the receiving port of probe messages template.
Processor 1603 for the sign of the first switch that encapsulates according to probe messages, the transmit port of the first switch, receive from the second switch sign that packet receiving notice message and the second switch receive the receiving port of probe messages template and determine between the transmit port of the first switch and the receiving port of the second switch and have link.
Switch in present embodiment also comprises memory 1604, and memory 1604 can comprise read-only memory and random access memory, and provides instruction and data to processor 1603.A part for memory 1604 can also comprise nonvolatile RAM (NVRAM).
Memory 1604 has been stored following element, executable module or data structure, or their subset, or their superset:
Operational order: comprise various operational orders, for realizing various operations.
Operating system: comprise various system programs, for realizing various basic businesses and processing hardware based task.
In embodiments of the present invention, processor 1603, by calling the operational order (this operational order can be stored in operating system) of memory 1604 storages, is carried out aforesaid operations.
Processor 1603 can also be called CPU (Central Processing Unit, CPU).Memory 1604 can comprise read-only memory and random access memory, and provides instruction and data to processor 1603.A part for memory 1604 can also comprise nonvolatile RAM (NVRAM).In concrete application, each assembly of controller is coupled by bus system 1605, and wherein bus system 1605, except comprising data/address bus, can also comprise power bus, control bus and status signal bus in addition etc.But for the purpose of clearly demonstrating, in the drawings various buses are all designated as to bus system 1605.
The method that the invention described above embodiment discloses can be applied in processor 1603, or is realized by processor 1603.Processor 1603 may be a kind of integrated circuit (IC) chip, has the disposal ability of signal.In implementation procedure, each step of said method can complete by the integrated logic circuit of the hardware in processor 1603 or the instruction of form of software.Above-mentioned processor 1603 can be general processor, digital signal processor (DSP), application-specific integrated circuit (ASIC) (ASIC), ready-made programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic device, discrete hardware components.Can realize or carry out disclosed each method, step and logic diagram in the embodiment of the present invention.General processor can be that microprocessor or this processor can be also the processors of any routine etc.Step in conjunction with the disclosed method of the embodiment of the present invention can directly be presented as that hardware decoding processor is complete, or complete with the hardware in decoding processor and software module combination.Software module can be positioned at random asccess memory, and flash memory, read-only memory, in the storage medium of this area maturations such as programmable read only memory or electrically erasable programmable memory, register.This storage medium is positioned at memory 1604, and the information in processor 1603 read memories 1604 completes the step of said method in conjunction with its hardware.
Be different from prior art, in the probe messages template that in present embodiment, transmitter sends to the first switch, recorded the sign of the first switch, the first switch receives after probe messages, the sign that sends the transmit port of this probe messages template is filled up in probe messages, more outwards forwards this probe messages template by port corresponding to the sign with transmit port.The second switch that receiver receives the probe messages template that the first switch forwards sends probe messages template again to controller.Making processor and to receive probe messages template from the second switch according to the sign of the sign of the first switch encapsulating in probe messages, the first switch transmit port determines between the first switch transmit port and the second switch receiving port and has link.Due to, in the probe messages template that transmitter sends to the first switch, only recorded the sign of the first switch and do not comprised from the information of which port repeat of the first switch, the first switch only need to be filled up to the sign of transmit port in probe messages template and forward after receiving probe messages, even if the port of the first switch is many again, transmitter is also only required to be a probe messages of the first switch fabric and sends a probe messages to the first switch, has greatly reduced the waste of the resource of controller and switch.
Consult Figure 17, Figure 17 is the structural representation of the application's probe messages dispensing device one execution mode.The probe messages template of present embodiment comprises receiver module 1701, decapsulation module 1702 and sending module 1703,
Receiver module 1701, for receiving the message that sends request that controller sends, wherein, sends request in message and has encapsulated probe messages template, and probe messages template has been recorded the sign of switch;
Decapsulation module 1702 is for probe messages template is carried out to decapsulation from sending request message, to obtain probe messages template;
Sending module 1703 is for the sign that sends the transmit port of probe messages template is filled up to probe messages template, and probe messages template is outwards forwarded by transmit port.
Be appreciated that the device shown in Figure 17 can carry out each step in the embodiment that Figure 14 is corresponding.
Be different from prior art, in present embodiment, receiver module has received record that controller sends after the sign probe messages template of switch, decapsulation module decapsulation obtains probe messages template, sending module is filled up to the sign that sends the transmit port of this probe messages template in probe messages, more outwards forwards this probe messages template by port corresponding to the sign with transmit port.The switch that receives the probe messages template of forwarding sends probe messages template again to controller.Make controller can be according to the sign of switch of the forwarding probe messages template encapsulating in probe messages, the sign of transmit port and determine between the transmit port of the switch that forwards probe messages template and the receiving port of the switch of reception probe messages template and have link from receiving probe messages template that the switch of probe messages sends.Due to, in the probe messages template that the controller that receiver module receives sends, only recorded the sign of switch and do not comprised from the information of which port repeat of the first switch, receiver module only need to be filled up to the sign of transmit port in probe messages template and forward after receiving probe messages, even if the port of switch is many again, controller is also only required to be a probe messages of switch fabric and sends a probe messages to switch, has greatly reduced the waste of the resource of controller and switch
Consult Figure 18, Figure 18 is the structural representation of another execution mode of the application's switch.The probe messages template of present embodiment comprises receiver 1801, processor 1802 and transmitter 1803,
Receiver 1801, for receiving the message that sends request that controller sends, wherein, sends request in message and has encapsulated probe messages template, and probe messages template has been recorded the sign of switch;
Processor 1802 is for probe messages template is carried out to decapsulation from sending request message, to obtain probe messages template;
Transmitter 1803 is for the sign that sends the transmit port of probe messages template is filled up to probe messages template, and probe messages template is outwards forwarded by transmit port.
Switch in present embodiment also comprises memory 1804, and memory 1804 can comprise read-only memory and random access memory, and provides instruction and data to processor 1802.A part for memory 1804 can also comprise nonvolatile RAM (NVRAM).
Memory 1804 has been stored following element, executable module or data structure, or their subset, or their superset:
Operational order: comprise various operational orders, for realizing various operations.
Operating system: comprise various system programs, for realizing various basic businesses and processing hardware based task.
In embodiments of the present invention, processor 1802, by calling the operational order (this operational order can be stored in operating system) of memory 1804 storages, is carried out aforesaid operations.
Processor 1802 can also be called CPU (Central Processing Unit, CPU).Memory 1804 can comprise read-only memory and random access memory, and provides instruction and data to processor 1802.A part for memory 1804 can also comprise nonvolatile RAM (NVRAM).In concrete application, each assembly of controller is coupled by bus system 1805, and wherein bus system 1805, except comprising data/address bus, can also comprise power bus, control bus and status signal bus in addition etc.But for the purpose of clearly demonstrating, in the drawings various buses are all designated as to bus system 1805.
The method that the invention described above embodiment discloses can be applied in processor 1802, or is realized by processor 1802.Processor 1802 may be a kind of integrated circuit (IC) chip, has the disposal ability of signal.In implementation procedure, each step of said method can complete by the integrated logic circuit of the hardware in processor 1802 or the instruction of form of software.Above-mentioned processor 1802 can be general processor, digital signal processor (DSP), application-specific integrated circuit (ASIC) (ASIC), ready-made programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic device, discrete hardware components.Can realize or carry out disclosed each method, step and logic diagram in the embodiment of the present invention.General processor can be that microprocessor or this processor can be also the processors of any routine etc.Step in conjunction with the disclosed method of the embodiment of the present invention can directly be presented as that hardware decoding processor is complete, or complete with the hardware in decoding processor and software module combination.Software module can be positioned at random asccess memory, and flash memory, read-only memory, in the storage medium of this area maturations such as programmable read only memory or electrically erasable programmable memory, register.This storage medium is positioned at memory 1804, and the information in processor 1802 read memories 1804 completes the step of said method in conjunction with its hardware.
Be different from prior art, in present embodiment, receiver has received record that controller sends after the sign probe messages template of switch, processor decapsulation obtains probe messages template, transmitter is filled up to the sign that sends the transmit port of this probe messages template in probe messages, more outwards forwards this probe messages template by port corresponding to the sign with transmit port.The switch that receives the probe messages template of forwarding sends probe messages template again to controller.Make controller can be according to the sign of switch of the forwarding probe messages template encapsulating in probe messages, the sign of transmit port and determine between the transmit port of the switch that forwards probe messages template and the receiving port of the switch of reception probe messages template and have link from receiving probe messages template that the switch of probe messages sends.Due to, in the probe messages template that the controller that receiver receives sends, only recorded the sign of switch and do not comprised from the information of which port repeat of the first switch, receiver module only need to be filled up to the sign of transmit port in probe messages template and forward after receiving probe messages, even if the port of switch is many again, controller is also only required to be a probe messages of switch fabric and sends a probe messages to switch, has greatly reduced the waste of the resource of controller and switch
In the several execution modes that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiments described above is only schematic, for example, the division of described module or unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the object of present embodiment scheme.
In addition, each functional unit in each execution mode of the application can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and also can adopt the form of SFU software functional unit to realize.
If the form of SFU software functional unit of usining described integrated unit realizes and during as production marketing independently or use, can be stored in a computer read/write memory medium.Understanding based on such, the all or part of of the part that the application's technical scheme contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) carry out all or part of step of method described in each execution mode of the application.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), the various media that can be program code stored such as random access memory (RAM, Random Access Memory), magnetic disc or CD.

Claims (14)

1. a link discovery method, is characterized in that, comprises the steps:
To the first switch, send first and send request message, wherein, described first sends request and in message, has encapsulated the first probe messages, sign and described the first probe messages that described the first probe messages has been recorded described the first switch do not comprise from the information of which port repeat of described the first switch, and described the first switch has described the first probe messages is sent request message to decapsulation out and ability from described the first probe messages to all of the port that broadcast from described first;
Receive the first packet receiving notice message that the second switch sends, wherein, described the second switch is the switch that receives described first probe messages of described the first switch broadcast, and described the first packet receiving notice message has encapsulated described the first probe messages;
According to the sign of the first switch encapsulating in described the first probe messages and receive described the first packet receiving notice message from described the second switch and determine between described the first switch and described the second switch and have link.
2. method according to claim 1, it is characterized in that, described the first packet receiving notice message has also encapsulated the sign of receiving port, wherein, described receiving port is the port that described the second switch receives the described probe messages that described the first switch broadcasts
Described according to the sign of the first switch encapsulating in described probe messages and receive described the first packet receiving notice message from described the second switch and determine between described the first switch and described the second switch and exist the step of link to be specially:
According to the sign of the first switch encapsulating in described probe messages, from described the second switch receive described the first packet receiving notice message and described the first packet receiving notice message of receiving from described the second switch the sign of the described receiving port that encapsulates, determine between described the first switch and the receiving port of described the second switch and have link.
3. method according to claim 2, is characterized in that, if there are a plurality of links between described the first switch and described the second switch, described method also comprises the steps:
The quantity of the sign of the described receiving port encapsulating described the first packet receiving notice message receiving from described the second switch according to controller is determined the quantity of the link between described the first switch and described the second switch;
To described the first switch, send second and send request message, wherein, described second sends request and in message, has encapsulated the second probe messages, described the second probe messages has been recorded the sign of described the first switch and the sign that described the second probe messages has been recorded designated port, and described the first switch has described the second probe messages is sent request to decapsulation message out and outwards forwards the ability of described the second probe messages by described designated port from described second;
Receive the second packet receiving notice message that described the second switch sends, wherein, described the second packet receiving notice message has encapsulated received described the second probe messages and the sign that receives the receiving port of described the second probe messages;
According to the sign of the described designated port in the sign of described the first switch in described the second probe messages, described the second probe messages, from described the second switch receive described the second packet receiving notice message and described the second packet receiving notice message of receiving from described the second switch the sign of the receiving port that encapsulates, determine between the described designated port of described the first switch and the receiving port of described the second switch and have link.
4. a probe messages sending method, is characterized in that, described method comprises the steps:
What switch received that controller sends first sends request message, wherein, described first sends request in message and has encapsulated the first probe messages, and sign and described the first probe messages that described the first probe messages has been recorded described switch do not comprise from the information of which port repeat of described switch;
By described first, send request message and carry out decapsulation, to obtain described the first probe messages;
All of the port by described switch is outwards broadcasted described the first probe messages.
5. method according to claim 4, is characterized in that, described method also comprises the steps:
What switch received that controller sends second sends request message, wherein, described second sends request in message and has encapsulated the second probe messages, and described the second probe messages has been recorded the sign of described switch and the sign that described the second probe messages has been recorded designated port;
By described second, send request message and carry out decapsulation, to obtain described the second probe messages;
Designated port by described switch outwards forwards described the second probe messages.
6. a link discovery device, is characterized in that, comprises sending module, receiver module and judge module,
Described sending module sends request message for sending first to the first switch, wherein, described first sends request and in message, has encapsulated the first probe messages, sign and described the first probe messages that described the first probe messages has been recorded described the first switch do not comprise from the information of which port repeat of described the first switch, and described the first switch has described the first probe messages is sent request message to decapsulation out and ability from described the first probe messages to all of the port that broadcast from described first;
The first packet receiving notice message that described receiver module sends for receiving the second switch, wherein, described the second switch is the switch that receives described first probe messages of described the first switch broadcast, and described the first packet receiving notice message has encapsulated described the first probe messages;
Described judge module is for the sign of the first switch of encapsulating according to described probe messages and from described the second switch, receive described the first packet receiving notice message and determine between described the first switch and described the second switch and have link.
7. device according to claim 6, it is characterized in that, the first packet receiving notice message that described the second switch that described receiver module receives sends has also encapsulated the sign of receiving port, wherein, described receiving port is the port that described the second switch receives the described probe messages that described the first switch broadcasts
Described judge module also for the sign of the first switch of encapsulating according to described probe messages, from described the second switch receive described the first packet receiving notice message and described the first packet receiving notice message of receiving from described the second switch the sign of the described receiving port that encapsulates, determine between described the first switch and the receiving port of described the second switch and have link.
8. device according to claim 7, is characterized in that,
The quantity of the sign of the described receiving port that described judge module also encapsulates for described the first packet receiving notice message receiving from described the second switch according to controller is determined the quantity of the link between described the first switch and described the second switch;
Described sending module also sends request message for sending second to described the first switch, wherein, described second sends request and in message, has encapsulated the second probe messages, described the second probe messages has been recorded the sign of described the first switch and the sign that described the second probe messages has been recorded designated port, and described the first switch has described the second probe messages is sent request to decapsulation message out and outwards forwards the ability of described the second probe messages by described designated port from described second;
The second packet receiving notice message that described receiver module also sends for receiving described the second switch, wherein, described the second packet receiving notice message has encapsulated received described the second probe messages and the sign that receives the receiving port of described the second probe messages;
Described judge module also for according to the sign of the described designated port in the sign of described first switch of described the second probe messages, described the second probe messages, from described the second switch receive described the second packet receiving notice message and described the second packet receiving notice message of receiving from described the second switch the sign of the receiving port that encapsulates, determine between the described designated port of described the first switch and the receiving port of described the second switch and have link.
9. a probe messages dispensing device, is characterized in that, comprising: receiver module, decapsulation module and sending module,
Described receiver module first sends request message for what receive that controller sends, wherein, described first sends request in message and has encapsulated the first probe messages, and sign and described the first probe messages that described the first probe messages has been recorded described switch do not comprise from the information of which port repeat of described switch;
Described decapsulation module is carried out decapsulation for sending request message by described first, to obtain described the first probe messages;
Described sending module is outwards broadcasted described the first probe messages for all of the port by described switch.
10. device according to claim 9, it is characterized in that, described receiver module also second sends request message for what receive that controller sends, wherein, described second sends request in message and has encapsulated the second probe messages, and described the second probe messages has been recorded the sign of described switch and the sign that described the second probe messages has been recorded designated port;
Described decapsulation module is also carried out decapsulation for sending request message by described second, to obtain described the second probe messages;
Described sending module also outwards forwards described the second probe messages for the designated port by described switch.
11. 1 kinds of link discovery methods, is characterized in that, comprise the steps:
To the first switch, send request message, wherein, described sending request encapsulated probe messages template in message, described probe messages template has been recorded the sign of described the first switch, described the first switch has described probe messages template is sent request to decapsulation message out and the sign that sends the transmit port of described probe messages template is filled up in described probe messages template, the ability then sending from described;
Receive the packet receiving notice message that the second switch sends, wherein, described the second switch is the switch that receives the described probe messages template that described the first switch sends by described transmit port, fills in the sign that probe messages template after transmit port sign and described the second switch receive the receiving port of described probe messages template described in described packet receiving notice message has encapsulated;
According to the described transmit port of the sign of the first switch encapsulating in described probe messages, described the first switch, from described the second switch, receive sign that described packet receiving notice message and described the second switch receive the receiving port of described probe messages template and determine between the described transmit port of described the first switch and the described receiving port of described the second switch and have link.
12. 1 kinds of probe messages template sending methods, is characterized in that, described method comprises the steps:
Switch receives the message that sends request that controller sends, wherein, described in send request in message and encapsulated probe messages template, described probe messages template has been recorded the sign of described switch;
Described probe messages template is carried out to decapsulation from the described message that sends request, to obtain described probe messages template;
The sign that sends the transmit port of described probe messages template is filled up in described probe messages template, and described probe messages template is outwards forwarded by described transmit port.
13. 1 kinds of link discovery devices, is characterized in that, comprise sending module, receiver module and judge module,
Described sending module is for sending request message to the first switch, wherein, described sending request encapsulated probe messages template in message, described probe messages template has been recorded the sign of described the first switch, described the first switch has described probe messages template is sent request to decapsulation message out and the sign that sends the transmit port of described probe messages template is filled up in described probe messages template, the ability then sending from described;
The packet receiving notice message that described receiver module sends for receiving the second switch, wherein, described the second switch is the switch that receives the described probe messages template that described the first switch sends by described transmit port, fills in the sign that probe messages template after transmit port sign and described the second switch receive the receiving port of described probe messages template described in described packet receiving notice message has encapsulated;
Described judge module for the sign of the first switch that encapsulates according to described probe messages, the described transmit port of described the first switch, receive from described the second switch sign that described packet receiving notice message and described the second switch receive the receiving port of described probe messages template and determine between the described transmit port of described the first switch and the described receiving port of described the second switch and have link.
14. 1 kinds of probe messages template dispensing devices, is characterized in that, comprise receiver module, decapsulation module and sending module,
Described receiver module is for receiving the message that sends request that controller sends, wherein, described in send request in message and encapsulated probe messages template, described probe messages template has been recorded the sign of described switch;
Described decapsulation module is for carrying out decapsulation by described probe messages template from the described message that sends request, to obtain described probe messages template;
Described sending module is used for the sign that sends the transmit port of described probe messages template to be filled up to described probe messages template, and described probe messages template is outwards forwarded by described transmit port.
CN201410250846.0A 2014-06-06 2014-06-06 link discovery method and device Active CN104038446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410250846.0A CN104038446B (en) 2014-06-06 2014-06-06 link discovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410250846.0A CN104038446B (en) 2014-06-06 2014-06-06 link discovery method and device

Publications (2)

Publication Number Publication Date
CN104038446A true CN104038446A (en) 2014-09-10
CN104038446B CN104038446B (en) 2017-07-07

Family

ID=51469038

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410250846.0A Active CN104038446B (en) 2014-06-06 2014-06-06 link discovery method and device

Country Status (1)

Country Link
CN (1) CN104038446B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283738A (en) * 2014-10-11 2015-01-14 杭州华三通信技术有限公司 Link detecting method and device
CN105763463A (en) * 2016-01-27 2016-07-13 杭州华三通信技术有限公司 Method and device for transmitting link detection message
WO2017157318A1 (en) * 2016-03-18 2017-09-21 华为技术有限公司 Link discovery method and apparatus
CN107682270A (en) * 2017-09-13 2018-02-09 北京百卓网络技术有限公司 A kind of method for discovering network topology and device
CN108039983A (en) * 2017-12-06 2018-05-15 锐捷网络股份有限公司 Line-hunting method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2521308A1 (en) * 2009-12-28 2012-11-07 Nec Corporation Communications system and port information collection method
CN103001887A (en) * 2012-11-22 2013-03-27 中兴通讯股份有限公司 Link keeping alive method, controller and switchboard
EP2621136A2 (en) * 2012-01-26 2013-07-31 Brocade Communications Systems, Inc. Link aggregation in software-defined networks
CN103259728A (en) * 2013-05-24 2013-08-21 华为技术有限公司 OFS in-band communication method and OFS
CN103825825A (en) * 2014-01-18 2014-05-28 浙江大学 Flexible, extensible and safe inter-domain topology discovery method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2521308A1 (en) * 2009-12-28 2012-11-07 Nec Corporation Communications system and port information collection method
EP2621136A2 (en) * 2012-01-26 2013-07-31 Brocade Communications Systems, Inc. Link aggregation in software-defined networks
CN103001887A (en) * 2012-11-22 2013-03-27 中兴通讯股份有限公司 Link keeping alive method, controller and switchboard
CN103259728A (en) * 2013-05-24 2013-08-21 华为技术有限公司 OFS in-band communication method and OFS
CN103825825A (en) * 2014-01-18 2014-05-28 浙江大学 Flexible, extensible and safe inter-domain topology discovery method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283738A (en) * 2014-10-11 2015-01-14 杭州华三通信技术有限公司 Link detecting method and device
CN104283738B (en) * 2014-10-11 2018-07-17 新华三技术有限公司 A kind of chain circuit detecting method and equipment
CN105763463A (en) * 2016-01-27 2016-07-13 杭州华三通信技术有限公司 Method and device for transmitting link detection message
CN105763463B (en) * 2016-01-27 2020-01-03 新华三技术有限公司 Method and device for transmitting link detection message
WO2017157318A1 (en) * 2016-03-18 2017-09-21 华为技术有限公司 Link discovery method and apparatus
CN107204924A (en) * 2016-03-18 2017-09-26 华为技术有限公司 Link discovery method and device
CN107204924B (en) * 2016-03-18 2020-09-25 华为技术有限公司 Link discovery method and device
US10797986B2 (en) 2016-03-18 2020-10-06 Huawei Technologies Co., Ltd. Link discovery method and apparatus
CN107682270A (en) * 2017-09-13 2018-02-09 北京百卓网络技术有限公司 A kind of method for discovering network topology and device
CN108039983A (en) * 2017-12-06 2018-05-15 锐捷网络股份有限公司 Line-hunting method and device

Also Published As

Publication number Publication date
CN104038446B (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN109981155B (en) Beam training method and related equipment
CN108337111B (en) Method and device for acquiring network node topology
CN104038446A (en) Link discovery method and device
CN109088820B (en) Cross-device link aggregation method and device, computing device and storage medium
CN111050361A (en) Message transmission method, device and system
CN109412922B (en) Method, forwarding device, controller and system for transmitting message
JP7193620B2 (en) Data transmission method, radio access network device and terminal device
CN104426680A (en) Data transmission method, device and system
CN105357737A (en) Method and device for accessing WiFi device to wireless access point
US9847937B2 (en) Hardware acceleration for routing programs
CN111586629A (en) Vehicle remote diagnosis method in ZigBee mode and related device
CN104936315A (en) Method for transmitting data through WiFi, master device and module devices
CN104639348A (en) Network device and configuration method thereof
CN103581317A (en) Method for sharing network resources
CN110113771B (en) Data processing method, device, gateway equipment and storage medium
CN103188153A (en) Bidirectional forwarding detection (BFD) message sending method and equipment on broadcast network link
CN105763463B (en) Method and device for transmitting link detection message
CN104348728A (en) Method and equipment for generating forwarding information
WO2021047621A1 (en) Transmission method and apparatus
CN102917370B (en) Method, device and system for determining corresponding near-end unit of far-end unit and far-end unit
CN110876155A (en) Simulation system and method for wireless mesh network
JP2018522480A (en) Method and apparatus for searching a fronthaul topology
CN102801686A (en) Equipment control method, main equipment, secondary equipment as well as main-secondary equipment group
CN115065637B (en) Method and device for transmitting computing power resource information and electronic equipment
CN115022424A (en) Virtual control method, system, equipment and medium for network card of hydroelectric LCU controller

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant