Specific embodiment
The terms "and/or", is only a kind of incidence relation for describing affiliated partner, and expression may have three kinds of passes
System, for example, A and/or B, can represent:Individualism A exists simultaneously A and B, these three situations of individualism B.
Term " first " and " second " in the description of the present application and attached drawing etc. be for distinguish different objects or
Person is for different disposal of the difference to same target rather than the particular order for description object.
In addition, the term " comprising " and " having " being previously mentioned in the description of the present application and their any deformation, it is intended that
It is to cover non-exclusive include.Such as process, method, system, product or the equipment for containing series of steps or unit do not have
The step of having listed or unit are defined in, but optionally further includes the step of other are not listed or unit or optionally
It further includes for the intrinsic other steps of these processes, method, product or equipment or unit.
It should be noted that in the embodiment of the present application, " illustrative " or " such as " etc. words for representing to make example, example
Card or explanation.Be described as in the embodiment of the present application " illustrative " or " such as " any embodiment or designing scheme should
It is interpreted than other embodiments or designing scheme more preferably or more advantage.Specifically, " illustrative " or " example are used
Such as " word is intended to that related notion is presented in specific ways.
In the description of the present application, unless otherwise indicated, the meaning of " multiple " refers to two or more.
The method of Path selection provided by the embodiments of the present application can be applied to center as shown in Figure 1-branching type network
In, the center-branching type network includes at least one Centroid and at least two branch nodes, and branch node can pass through one
Item or multi-hop link are connected with Centroid.
Illustratively, two Centroids are shown in Fig. 1, are respectively Centroid C1 and Centroid C2.It also illustrates
Four branch nodes are respectively branch node B1, branch node B2, branch node B3 and branch node B4.Each centromere
Point and each branch node are respectively provided at least one communication port.
Wherein, Centroid C1 has port P1-1With port P1- 2, Centroid C2 have port P2-1, branch node B1
With port PB1-1With port PB1-2, Centroid B2 is with port PB2-1, port PB2-2With port PB2-3, branch node B3 has
Port PB3-1With port PB3-2, branch node B4 is with port PB4-1With port PB4-2。
The method of Path selection provided by the embodiments of the present application is described in detail below in conjunction with Fig. 1.
Execution route selection flow before, it is necessary to in center-branching type network Centroid, branch node with
And port is initialized.
First, one or more equipment in network is arranged to Centroid, by taking Fig. 1 as an example, two centromeres is set
Point is respectively Centroid C1 and Centroid C2, Centroid can be set by way of manual configuration, can also be passed through
Other modes are set, and the application is without limitation.
Then, each branch node initializes the corresponding link in each port of itself and each port.It can will hold
The hop count of the corresponding Centroid of mouth is arranged to a larger value or is arranged to infinitely great, with the end of any one branch node
Exemplified by mouth P, Pc1-hopIt is port P compared with the hop count of Centroid C1, Pc2-hopIt is port P compared with the jump of Centroid C2
Number, can set Pc1-hop=65535, Pc2-hop=65535.In addition, by the corresponding link in port compared with two Centroids
Role is arranged to " unknown ", such as can represent " unknown " with " -1 ", i.e. Lc1-R=-1, Lc2-R=-1.
After initialization flow is completed, you can the flow of execution route selection, embodiments herein mainly include inspection
Request flow, detection response flow and fault detect flow are surveyed, each flow will be specifically addressed below.
With reference to center shown in FIG. 1-branching type network, the embodiment of the present application provides a kind of method of Path selection, should
Method relates generally to detection request flow, as shown in Fig. 2, this method includes:
Step 201, Centroid periodicity sending detection request message.
Wherein, Centroid can send detection request message by itself available all of the port.Detect request message
Detection request protocol message is can be described as, hereinafter Unify legislation is detection request message.
Detect request message include at least message hop count, can also include destination address, source address, Ether protocoll type,
Detection messages subtype, source device ID, transmission hop count and filling field.Illustratively, it is as shown in table 1 to detect request message.
Table 1
Wherein, requesting node equipment is to initiate the equipment for detecting request message, i.e. Centroid, node centered on source address
Accessing wirelessly control (Media Access Control, MAC) address.
The initial value of transmission hop count in the detection request message that Centroid is sent represents transmission hop count as 1 for 0x01,
Transmission hop count in detection request message is used to inform the hop count passed through in the branch node detection request message transmission process.
Step 202, branch node receive detection request message.
Wherein, branch node can centered on-branching type network in any one branch node.It is understood that
If the branch node and Centroid are direct-connected, which can receive the detection request message from Centroid;If
The branch node is not direct-connected with Centroid, then the branch node can receive the detection request message of other branch nodes forwarding.
If the receiving port hop count of step 202, branch node is more than message hop count, branch node is opposite by receiving port
Message hop count is updated in the hop count of Centroid.
By taking branch node and Centroid are direct-connected as an example, the receiving port of branch node detects the end of request message for reception
Mouthful, using the receiving port as Pc1-hopExemplified by, since the initial value of each port of branch node is all set to 65535, so point
The hop count of the receiving port of Zhi Jiedian is naturally larger than the transmission hop count 1 in message, so the hop count of the receiving port is updated to
1。
The port of the jumping figure value minimum of itself is arranged to master port by step 203, branch node, by the corresponding chain of master port
Road is arranged to the primary link to communicate with Centroid.
It is understood that since Centroid periodicity sending detects request message, so branch node can be with the cycle
Property receive detection request message, the hop count of branch node from the detection request message that different ports receives may be different, are
Find the shortest path between branch node and Centroid, branch node can be set the port of the jumping figure value minimum of itself
It is the primary link to communicate with Centroid by the corresponding link setting of master port for master port.Since master port is branch node
Jumping figure value minimum port, so shortest path when branch node is communicated by primary link with Centroid, branch node
It can preferentially be communicated by primary link with Centroid.
In addition, the port of the jumping figure value minimum in addition to master port can be arranged to standby port by branch node, it will standby port
Corresponding link setting is the standby link to communicate with Centroid.
Optionally, branch node can set one or more standby ports, such as can also will remove master port and first
The port of jumping figure value minimum outside standby port is arranged to second standby port.
The method for the Path selection that embodiments herein provides, branch node can be according to the transmission in detection request message
Hop count updates the hop count of the receiving port of itself, and then determines the port of the jumping figure value minimum of itself as master port, master port pair
The link answered is primary link, and since jumping figure value is smaller, the transmission path represented between Centroid is shorter, so preferential use
The master port of jumping figure value minimum is communicated with Centroid realizes automatically selecting for optimal path, and node device need not
Complicated agreement is run, the method for simplifying Path selection can meet the need that SDN technologies simplify node device control function
It asks.
In a kind of possible realization method of the embodiment of the present application, branch node set receiving port hop count it
Afterwards, detection request message will can also be transmitted to other branch nodes, as shown in figure 3, this method includes:Step 301 is to step
Rapid 306.
Wherein, step 301 is identical to step 203 with step 201 to step 303, and details are not described herein again.
It should be noted that the application not execution sequence between conditioning step 304 and step 303, with step in Fig. 3
Exemplified by 304 perform after step 303, step 304 can also be performed before step 303 or synchronously held with step 303
Row.
Message hop count in step 304, branch node update detection request message, before updated message hop count is update
Message hop count add 1.
It is understood that it will be detected before request message is sent to next-hop branch node in branch node, it is necessary to will
Message hop count in detection request message adds 1.
If the hop count in step 305, branch node there are first port is greater than or equal to updated message hop count, divide
Zhi Jiedian forwards detection request message by first port to other branch nodes.
It should be noted that if the hop count in branch node there are first port is jumped more than or equal to updated message
Number, illustrate also there are the next-hop branch node of the branch node in center-branching type network, so can by first port to
Other branch nodes forwarding detection request message.
Wherein, if the hop count in branch node there are multiple ports is greater than or equal to updated message hop count, branch
The port that node need to be greater than or equal to updated message hop count by each hop count forwards the detection request message.
If the hop count of all of the port is respectively less than updated message hop count in step 306, branch node, branch node is lost
Abandon detection request message.
Wherein, if the hop count of all of the port is respectively less than updated message hop count in branch node, illustrate that there is no connections
In the next-hop branch node of the branch node, it is possible to abandon detection request message.
It is above detection request flow, each branch node can ask report according to the detection that above-mentioned flow processing receives
Text, and the port hop count of itself is set, after branch node receives detection request message, it is also necessary to respond detection request report
Text needs to perform detection response flow.Specific method is that branch node sends the first detection back message by master port,
First detection back message includes the mark of master port and is arranged to the transmission hop count of initial value.Wherein, initial value can be with
For 0X01, the first jump is represented.
Optionally, branch node can send the second detection back message, the second detection back message bag by standby port
It includes the mark of master port and is arranged to the transmission hop count of initial value.Wherein, initial value can be 0X01, represent the first jump.
Wherein, the first detection back message and the second detection back message are detection back message, detect back message
Detection response protocol message is referred to as, referred to as detects back message below.Optionally, the form of back message is detected such as
Shown in table 2.
Table 2
It is understood that branch node can send detection back message by master port upper hop branch node,
Branch node may also receive the detection back message of other branch nodes transmission, receive other points to branch node below
Processing method after the detection back message that Zhi Jiedian is sent illustrates:
Branch node receives the 3rd detection back message by second port, and the 3rd detection back message is by the second section
The detection back message that the master port of point is sent, section point are in addition to the branch node for receiving the 3rd detection back message
Other branch nodes.
If master port is not present in branch node, can drop the 3rd detection back message, if branch node there are master port,
Neighbor information is then created, neighbor information includes at least the mark of section point and the mark of second port.Then by the 3rd detection
Transmission hop count in back message adds 1, and sends the 3rd detection back message by master port.It is understood that only pass through
Main side port transmission detection back message can so that detect back message is transferred to Centroid by shortest path.
Illustratively, neighbor information is as shown in table 3.
Table 3
After branch node creates the neighbor information of section point, if the follow-up branch node receives purpose website to be somebody's turn to do
The message of section point then directly can send the message by second port to section point, realize by shortest path to
Section point sends message, improves the efficiency of message transmissions
It should be noted that branch node and each Centroid are detected request message and are detected and responded by periodically interaction
Message is master port and/or primary link, standby port and/or standby link and neighbours' this case time that each branch node may be updated, can
It fails to avoid due to obsolescence of information caused by time-out, ensures that branch node can be transmitted by optimum link into row information.
The method of Path selection provided by the embodiments of the present application is illustrated below in conjunction with specific example, with shown in Fig. 1
Center-branching type network exemplified by.
It is detection request processing flow first, Centroid C1 is periodically through port P1-1、P1-2Send detection request association
Message is discussed, Centroid C2 is periodically through port P2-1Detection request message is sent, and then branch node B1 can be received and come from
The detection request message of Centroid C1, branch node B2 can receive the inspection from Centroid C1 and from Centroid C2
Survey request message.The transmission hop count detected in request message can be added 1 by branch node B1, and detection request message is transmitted to point
The transmission hop count detected in request message can be added 1 by Zhi Jiedian B3, branch node B2, and detection request message is transmitted to branch
Node B4.
By taking branch node B3 as an example, the processing after detection request message is received to branch node and is illustrated.
B3 can pass through port PB3-1, it is 2 to receive hop count, and the detection request message from C1 can be by port PB3-1Compared with
The hop count of C1 is arranged to 2, is denoted as:PB3-1-C1-hop=2.
Then, B3 will be by port PB3-1The hop count field of the detection request message from C1 received is incremented by 3, and by
Port PB3-2It is sent to B4.
Similarly, B3 can pass through port PB3-2Hop count is received as 3, the detection request message from C1;By port PB3-2
Hop count is received as 3, the detection request message from C2.And then port P is setB3-2It is 3 compared with the hop count of C1, compared with C2
Hop count for 3, be denoted as:PB3-2-C1-hop=3, PB3-2-C2-hop=3.
And then the port of jumping figure value minimum may be selected as master port in B3, if there are the ends of multiple jumping figure values minimum in B3
Mouthful, i.e. the jumping figure value of these ports is identical, then using the port of sequence number minimum in the port of multiple jumping figure values minimum as master port
B3 is P compared with the master port of C1B3-1(hop count:2), primary link LB3-1
Standby port compared with C1 is PB3-2(hop count:3), standby link LB3-2
Master port compared with C2 is PB3-2(hop count:3), primary link LB3-1.Without standby port and standby link.
It can also carry out detection afterwards and respond flow, master port, primary link, standby port and standby chain are determined in branch node B3
After road, you can report selection result to Centroid.
Still by taking branch node B3 as an example, B3 periodically can send detection back message to Centroid C1.Wherein, pass through
Master port PB3-1The content of the detection back message of transmission is as shown in table 4.
Table 4
B3 passes through standby port PB3-2The content of the detection back message of transmission is as shown in table 5.
Table 5
Similarly, B3 can also pass through port PB3-2Detection back message is sent to Centroid C2.
Afterwards, each branch node on B3 to Centroid C1, C2 paths can receive the detection response report of B3 transmissions
The corresponding neighbor informations of B3 can be respectively created in text, each branch node or Centroid.
Wherein, the neighbor information for the B3 that Centroid C1 is created is as shown in table 6.
Table 6
The neighbor information for the B3 that Centroid C1 is created is as shown in table 7.
Table 7
The method for the Path selection that embodiments herein provides can pass through week mainly for center-branching type network
Phase property, which sends detection request message and detects back message, realizes that the path between branch node and Centroid automatically selects, and assists
View interaction is simple, and system processing expense is small, and each branch node only need to send data by primary link can realize optimal path
Quick selection.When this method is applied in SDN network, the complexity of network equipment control protocol can be reduced, reduce or
Initial network configuration needs are eliminated, the control function that the requirement of SDN technologies simplifies the network equipment can be met, improve network control work(
The requirement of energy concentration degree.
Optionally, when occurring path failure between node, in order to improve the promptness of handling failure, in above-described embodiment
On the basis of, the embodiment of the present application additionally provides a kind of method of fault detect processing, and branch node determines to correspond to Centroid
The master port Pm of C1C1Afterwards, that is, timer and counter are started, the initial value of timer and counter is 0.If the branch node
Pass through master port PmC1A detection request message from Centroid C1 is received, then restarts timer, and by counter
Value resets to 0;If timer has timed, out, but does not receive the detection request message from Centroid C1 yet, then it is fixed to restart
When device, and the value of counter is added 1, when the value of counter is more than preset value, then empties master port and the master of the branch node
Link, and by former master port compared with the hop count P of Centroid C1c1-hop65535 are arranged to, to trigger the branch node again
Select master port and primary link.
Optionally, Centroid and branch node can also carry out the neighbor information of self maintained availability inspection, inspection
Node or branch node often receive one-time detection from other branch nodes (such as branch node 1) and respond report centered on checking method
Text refreshes the neighbor information of a branch node 1, if continuous several times do not receive the detection back message of the transmission of branch node 1,
Then think the connecting link failure between branch node 1, and then Centroid or branch node can be corresponding by branch node 1
Neighbor information is deleted.
The embodiment of the present application can carry out function module or functional unit according to above method example to branch node
Division, for example, can correspond to each function divides each function module or functional unit, it can also be by two or more
Function be integrated in a processing module.The form that hardware had both may be employed in above-mentioned integrated module is realized, can also be used
The form of software function module or functional unit is realized.Wherein, it is to the division of module or unit in the embodiment of the present application
Schematically, it is only a kind of division of logic function, there can be other dividing mode in actual implementation.
Embodiments herein also provides a kind of device of Path selection, as shown in figure 4, the device includes:Communication unit
401, processing unit 402, the communication unit 401 includes at least one port.Optionally, which it is single can also to include storage
Member 403.
Communication unit 401 detects request message for receiving, and detection request message includes message hop count;
Processing unit 402, if being more than message hop count for the receiving port hop count of communication unit 401, by receiving port
Message hop count is updated to compared with the hop count of Centroid;The port of the jumping figure value minimum of communication unit 401 is arranged to main side
Mouthful, it is the primary link to communicate with Centroid by the corresponding link setting of master port.
Optionally, processing unit 402 are additionally operable to the port of the jumping figure value minimum in addition to master port being arranged to standby end
Mouthful, it is the standby link to communicate with Centroid by the corresponding link setting in standby port.
Optionally, processing unit 402, the message hop count being additionally operable in update detection request message, updated message are jumped
Number adds 1 for the message hop count before update;
Communication unit 401, if be additionally operable in communication unit 401 there are first port hop count be greater than or equal to it is updated
Message hop count then forwards detection request message by first port to other branch nodes;
Processing unit 402 is additionally operable to if it is determined that the hop count of all of the port is respectively less than updated message in communication unit 401
Hop count then abandons detection request message.
Optionally, communication unit 401 are additionally operable to send the first detection back message by master port, and the first detection is responded
Message includes the mark of master port and is arranged to the transmission hop count of initial value;And/or the second inspection is sent by standby port
Back message is surveyed, the second detection back message includes the mark of standby port and is arranged to the transmission hop count of initial value.
Optionally, communication unit 401 are additionally operable to receive the 3rd detection back message by second port, and the 3rd detects back
It is the detection back message sent by the master port of section point to answer message, and section point is other sections in addition to device
Point;
Processing unit 402 is additionally operable to if it is determined that master port is not present in communication unit 401, then report is responded in the 3rd detection of discarding
Text;If communication unit 401 there are master port, creates neighbor information, neighbor information includes at least the mark and the of section point
The mark of Two-port netwerk;The transmission hop count in back message, which is detected, by the 3rd adds 1.
Communication unit 401 is additionally operable to send the 3rd detection back message by master port;
Communication unit 401, if being additionally operable to receive the message that purpose website is section point, by second port to the
Two nodes send the message that purpose website is section point.
Storage unit 403, for storing the program code of branch node and data.
Embodiments herein also provides a kind of branch node, as shown in figure 5, the branch node includes memory 501, place
Manage device 502, transceiver 503 and bus 504.
Wherein, processor 502 can realize the function of above-mentioned processing unit 402, and knot can be realized or performed to processor 502
Close the described various illustrative logic blocks of present disclosure, module and circuit.The processor 502 can be center
Processor, general processor, digital signal processor, application-specific integrated circuit, field programmable gate array or other are programmable
Logical device, transistor logic, hardware component or its any combination.It can realize or perform with reference to disclosure
The described various illustrative logic blocks of content, module and circuit.The processor 502 can also realize computing function
Combination, such as include one or more microprocessors combination, combination of DSP and microprocessor etc..
Transceiver 503 is used to support the communication of branch node and other network entities, can realize above-mentioned communication unit 401
Function.
Memory 501, memory can include volatile memory, such as random access memory;The memory also may be used
To include nonvolatile memory, such as read-only memory, flash memory, hard disk or solid state disk;The memory can be with
The combination of memory including mentioned kind.
Bus 504 can be expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..Bus 504 can be divided into address bus, data/address bus, controlling bus etc..For ease of table
Show, only represented in Fig. 5 with a thick line, it is not intended that an only bus or a type of bus.
Through the above description of the embodiments, it is apparent to those skilled in the art that, for description
It is convenienct and succinct, it, can as needed will be upper only with the division progress of above-mentioned each function module for example, in practical application
It states function distribution to be completed by different function modules, i.e., the internal structure of device is divided into different function modules, to complete
All or part of function described above.The specific work process of the system, apparatus, and unit of foregoing description, before may be referred to
The corresponding process in embodiment of the method is stated, details are not described herein.
The embodiment of the present application also provides a kind of computer readable storage medium, and finger is stored in computer readable storage medium
Order, when branch node performs the instruction, branch saves in the method flow shown in branch node execution above method embodiment
Each step that point performs.
Wherein, computer readable storage medium, such as electricity, magnetic, optical, electromagnetic, infrared ray can be but not limited to or partly led
System, device or the device of body or arbitrary above combination.The more specific example of computer readable storage medium is (non-poor
The list of act) include:Electrical connection, portable computer diskette with one or more conducting wires, hard disk, random access memory
(Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), erasable type may be programmed read-only
It is memory (Erasable Programmable Read Only Memory, EPROM), register, hard disk, optical fiber, portable
Compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), light storage device, magnetic memory
Part or the computer readable storage medium of above-mentioned any appropriate combination or any other form well known in the art.
A kind of illustrative storage medium is coupled to processor, so as to enable a processor to from the read information, and can be to
The storage medium writes information.Certainly, storage medium can also be the component of processor.Pocessor and storage media can be with
In application-specific IC (Application Specific Integrated Circuit, ASIC).In the application
In embodiment, computer readable storage medium can be any tangible medium for including or storing program, which can be referred to
Make the either device use or in connection of execution system, device.
The above is only the specific embodiment of the application, but the protection domain of the application is not limited thereto, any
The change or replacement in technical scope disclosed in the application, should all cover within the protection domain of the application.Therefore, this Shen
Protection domain please should be subject to the protection scope in claims.