CN108111419B - Path selection method and device - Google Patents

Path selection method and device Download PDF

Info

Publication number
CN108111419B
CN108111419B CN201711459017.3A CN201711459017A CN108111419B CN 108111419 B CN108111419 B CN 108111419B CN 201711459017 A CN201711459017 A CN 201711459017A CN 108111419 B CN108111419 B CN 108111419B
Authority
CN
China
Prior art keywords
port
node
hop count
message
branch node
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.)
Active
Application number
CN201711459017.3A
Other languages
Chinese (zh)
Other versions
CN108111419A (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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201711459017.3A priority Critical patent/CN108111419B/en
Publication of CN108111419A publication Critical patent/CN108111419A/en
Application granted granted Critical
Publication of CN108111419B publication Critical patent/CN108111419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/122Shortest path evaluation by minimising distances, e.g. by selecting a route with minimum of number of hops

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a device for path selection, relates to the field of communication, and can solve the problems that a node device has high complexity in selecting an optimal path and cannot meet the technical requirements of an SDN. The method comprises the following steps: the branch node receives a detection request message, wherein the detection request message comprises message hop count; if the hop count of the receiving port of the branch node is greater than the hop count of the message, the branch node updates the hop count of the receiving port relative to the central node into the hop count of the message; the branch node sets the port with the minimum hop number as a main port, and sets a link corresponding to the main port as a main link communicated with the central node.

Description

Path selection method and device
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for path selection.
Background
A center-branch type network is a typical topology organization form, each branch node may be connected to a central node through one or more communication links, and when a branch node may communicate with a central node through a plurality of communication links, an optimal communication link needs to be selected to communicate with the central node in order to improve the quality of transmission service.
In the prior art, in order to adapt to various networking topologies, node devices need to load initial configuration and run a complex two-layer control protocol or a three-layer routing protocol, thereby realizing automatic selection of an optimal communication link. While Software Defined Network (SDN) technology requires simplification of a control function of a node device, the node device needs to run a complex protocol to automatically select an optimal communication link, complexity is high, and the requirement of SDN technology for simplification of the control function of the node device cannot be met.
Disclosure of Invention
The application provides a method and a device for path selection, which can solve the problems that the complexity of selecting an optimal path by a node device is high and the SDN technical requirements cannot be met.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, the present application provides a method for path selection, which may include:
a branch node receives a detection request message, wherein the detection request message comprises message hop count; if the hop count of the receiving port of the branch node is greater than the message hop count, the branch node updates the hop count of the receiving port relative to the central node into the message hop count; the branch node sets the port with the minimum hop number as a main port, and sets a link corresponding to the main port as a main link communicated with the central node.
In a second aspect, the present application provides a path selection apparatus, comprising: a communication unit and a processing unit, the communication unit comprising at least one port;
the communication unit is used for receiving a detection request message, and the detection request message comprises message hop count;
the processing unit is configured to update the hop count of the receiving port relative to the central node to the message hop count if the hop count of the receiving port of the communication unit is greater than the message hop count; and setting the port with the minimum hop count value of the communication unit as a main port, and setting a link corresponding to the main port as a main link for communicating with a central node.
In a third aspect, the present application provides a branch node, comprising: a processor, a transceiver, and a memory. Wherein the memory is used to store one or more programs. The one or more programs include computer executable instructions which, when executed by the branch node, cause the branch node to perform the method of the first aspect by executing the computer executable instructions stored by the memory.
In a fourth aspect, the present application provides a computer readable storage medium having instructions stored therein, which when executed by a branch node, cause the branch node to perform the method of the first aspect.
In a fifth aspect, the present application provides a communication system, which includes the branch node in the first aspect, and further includes at least one central node and at least one branch node.
According to the path selection method and device provided by the embodiment of the application, the branch node can update the hop count of the receiving port of the branch node according to the transmission hop count in the detection request message, and further determines that the port with the minimum hop count value is the main port, the link corresponding to the main port is the main link, and as the smaller the hop count value is, the shorter the transmission path between the branch node and the central node is, the main port with the minimum hop count value is preferentially used for communicating with the central node, namely, the automatic selection of the optimal path is realized.
Drawings
Fig. 1 is a schematic structural diagram of a center-branch type network according to an embodiment of the present application;
fig. 2 is a flowchart of a method for path selection according to an embodiment of the present application;
fig. 3 is a flowchart of another method for selecting a path according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a routing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a branch node according to an embodiment of the present application.
Detailed Description
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The terms "first" and "second" and the like in the description and drawings of the present application are used for distinguishing different objects or for distinguishing different processes for the same object, and are not used for describing a specific order of the objects.
Furthermore, the terms "including" and "having," and any variations thereof, as referred to in the description of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the present application, the meaning of "a plurality" means two or more unless otherwise specified.
The method for selecting a path provided by the embodiment of the present application may be applied to a center-branch type network as shown in fig. 1, where the center-branch type network includes at least one center node and at least two branch nodes, and the branch nodes may be connected to the center node through one or multiple hop links.
Illustratively, two center nodes are shown in FIG. 1, center node C1 and center node C2, respectively. Also shown are four branch nodes, branch node B1, branch node B2, branch node B3, and branch node B4. Each central node and each branch node has at least one communication port, respectively.
Wherein the central node C1 has a port P1-1And port P12, central node C2 has port P2-1The branch node B1 has a port PB1-1And port PB1-2The central node B2 has a port PB2-1Port PB2-2And port PB2-3The branch node B3 has a port PB3-1And port PB3-2The branch node B4 has a port PB4-1And port PB4-2
The method for path selection provided by the embodiment of the present application is described in detail below with reference to fig. 1.
Before the flow of path selection is performed, it is necessary to initialize the central node, the branch nodes, and the ports in the central-branch type network.
First, one or more devices in the network are set as a central node, and taking fig. 1 as an example, two central nodes, which are the central node C1 and the central node C2, are set, and the central nodes may be set in a manual configuration manner or in other manners, which is not limited in this application.
Then, each branch node initializes its own port and a link corresponding to each port. The hop count of the central node corresponding to the port may be set to a larger value or to infinity, taking the port P of any branch node as an example, Pc1-hopIs the hop count of port P relative to central node C1, Pc2-hopFor the number of hops of port P relative to central node C2, P may be setc1-hop=65535,Pc2-hop65535. In addition, the roles of the links corresponding to the ports with respect to the two central nodes are set to "unknown", for example, the "unknown" can be represented by "-1", i.e. Lc1-R=-1,Lc2-R=-1。
After the initialization process is completed, the process of path selection may be executed, and the embodiment of the present application mainly includes a detection request process, a detection response process, and a fault detection process, which will be described in detail below.
In conjunction with the hub-and-spoke network shown in fig. 1, the present application provides a method for path selection, which mainly relates to a detection request flow, as shown in fig. 2, and includes:
step 201, the central node periodically sends a detection request message.
The central node can send the detection request message through all available ports. The detection request message may also be referred to as a detection request protocol message, and is hereinafter collectively described as a detection request message.
The detection request message at least comprises a message hop number, and also can comprise a destination address, a source address, an Ethernet protocol type, a detection message subtype, a source equipment ID, a transmission hop number and a filling field. Illustratively, the detection request message is shown in table 1.
TABLE 1
Figure BDA0001529854910000041
The request node device is a device initiating the detection request message, that is, a central node, and the source address is a Media Access Control (MAC) address of the central node.
The initial value of the transmission hop count in the detection request message sent by the central node is 0x01, which represents that the transmission hop count is 1, and the transmission hop count in the detection request message is used for informing the branch node of the number of the passed hops in the transmission process of the detection request message.
Step 202, the branch node receives the detection request message.
The branch node may be any one of the branch nodes in the hub-branch type network. It can be understood that, if the branch node is directly connected to the central node, the branch node may receive a detection request message from the central node; if the branch node is not directly connected with the central node, the branch node can receive the detection request message forwarded by other branch nodes.
Step 202, if the hop count of the receiving port of the branch node is greater than the hop count of the message, the branch node updates the hop count of the receiving port relative to the central node to the hop count of the message.
Taking the direct connection between the branch node and the central node as an example, the receiving port of the branch node is a port for receiving the detection request message, and the receiving port is Pc1-hopFor example, since the initial value of each port of the branch node is set to 65535, the hop count of the receiving port of the branch node is inevitably greater than the transmission hop count 1 in the message, so the hop count of the receiving port is updated to 1.
Step 203, the branch node sets the port with the minimum hop count value as the main port, and sets the link corresponding to the main port as the main link for communicating with the central node.
It can be understood that, since the central node periodically sends the detection request packet, the branch node may periodically receive the detection request packet, and the hop counts of the detection request packets received by the branch node from different ports may be different. Since the main port is the port with the minimum hop number of the branch node, the path of the branch node when communicating with the central node through the main link is shortest, and the branch node can preferentially communicate with the central node through the main link.
In addition, the branch node may set the port with the smallest hop count value except for the main port as a standby port, and set a link corresponding to the standby port as a standby link for communication with the central node.
Alternatively, the branch node may set one or more standby ports, and for example, may set a port having the smallest hop count value, except for the main port and the first standby port, as the second standby port.
According to the path selection method provided by the embodiment of the application, the branch node can update the hop count of the receiving port of the branch node according to the transmission hop count in the detection request message, and further determines that the port with the minimum hop count value is the main port, the link corresponding to the main port is the main link, and as the smaller the hop count value is, the shorter the transmission path between the branch node and the central node is, the main port with the minimum hop count value is preferentially used for communicating with the central node, so that the automatic selection of the optimal path is realized.
In a possible implementation manner of the embodiment of the present application, after the branch node sets the hop count of the receiving port, the detection request packet may also be forwarded to other branch nodes, as shown in fig. 3, where the method includes: step 301 to step 306.
Steps 301 to 303 are the same as steps 201 to 203, and are not described herein again.
It should be noted that the present application does not limit the execution sequence between step 304 and step 303, and step 304 may be executed before step 303 or synchronously with step 303 in fig. 3, taking the example that step 304 is executed after step 303.
And step 304, the branch node updates the message hop count in the detection request message, wherein the updated message hop count is the number of the message hops before updating plus 1.
It can be understood that before the branch node sends the detection request message to the next-hop branch node, the number of message hops in the detection request message needs to be increased by 1.
Step 305, if the hop count of the first port in the branch node is greater than or equal to the updated message hop count, the branch node forwards the detection request message to other branch nodes through the first port.
It should be noted that, if the hop count of the first port in the branch node is greater than or equal to the updated hop count of the packet, it indicates that the next-hop branch node of the branch node still exists in the center-branch type network, so that the detection request packet may be forwarded to other branch nodes through the first port.
If the hop count of the plurality of ports in the branch node is greater than or equal to the updated message hop count, the branch node needs to forward the detection request message through each port with the hop count greater than or equal to the updated message hop count.
Step 306, if the hop counts of all ports in the branch node are less than the updated message hop count, the branch node discards the detection request message.
If the hop counts of all ports in the branch node are less than the updated hop count of the message, it indicates that there is no next-hop branch node connected to the branch node, so the detection request message can be discarded.
In the above-mentioned detection request process, each branch node can process the received detection request message according to the above-mentioned process, and set its own port hop count, and after the branch node receives the detection request message, it needs to respond to the detection request message, i.e. it needs to execute the detection response process. The method specifically includes that the branch node sends a first detection response message through the main port, and the first detection response message comprises the identification of the main port and the transmission hop number set as an initial value. Where the initial value may be 0X01, representing the first hop.
Optionally, the branch node may send a second detection response packet through the standby port, where the second detection response packet includes an identifier of the main port and a transmission hop count set as an initial value. Where the initial value may be 0X01, representing the first hop.
The first detection response message and the second detection response message are both detection response messages, and the detection response messages may also be referred to as detection response protocol messages, and are hereinafter referred to as detection response messages. Optionally, the format of the detection response message is shown in table 2.
TABLE 2
Figure BDA0001529854910000071
It can be understood that, a branch node may send a detection response message to an upper-hop branch node through a main port, and the branch node may also receive detection response messages sent by other branch nodes, and the following description is provided for a processing method after the branch node receives the detection response messages sent by other branch nodes:
the branch node receives a third detection response message through the second port, the third detection response message is a detection response message sent through the main port of the second node, and the second node is other branch nodes except the branch node receiving the third detection response message.
If the branch node has no main port, the third detection response message can be discarded, and if the branch node has a main port, neighbor information is created, wherein the neighbor information at least comprises the identifier of the second node and the identifier of the second port. And then adding 1 to the transmission hop count in the third detection response message, and sending the third detection response message through the main port. It is understood that transmitting the detection response message only through the primary port may cause the detection response message to be transmitted to the central node through the shortest path.
Illustratively, the neighbor information is shown in table 3.
TABLE 3
Figure BDA0001529854910000072
After the branch node creates the neighbor information of the second node, if the subsequent branch node receives the message of which the destination site is the second node, the message can be directly sent to the second node through the second port, thereby realizing the purpose of sending the message to the second node through the shortest path, and improving the efficiency of message transmission
It should be noted that, the branch nodes and each central node may update the main port and/or the main link, the standby port and/or the standby link, and the neighbors of each branch node by periodically mutually detecting the request message and the detection response message, so as to avoid information aging failure caused by timeout, and ensure that the branch nodes can transmit information through the optimal link.
The method for selecting a path provided in the embodiment of the present application is described below with reference to a specific example, which takes the center-branch type network shown in fig. 1 as an example.
First, the flow of processing the detection request, the central node C1 periodically passes through the port P1-1、P1-2Sending a detection request protocol message, the central node C2 periodically passes through the port P2-1The branch node B1 may receive the probe request message from the central node C1, and the branch node B2 may receive the probe request messages from the central node C1 and from the central node C2. The branch node B1 may add 1 to the transmission hop count in the probe request message and forward the probe request message to the branch node B3, and the branch node B2 may add 1 to the transmission hop count in the probe request message and forward the probe request message to the branch node B4.
Taking the branch node B3 as an example, the processing after the branch node receives the detection request message will be described.
B3 may pass through port PB3-1When receiving the detection request message from C1 with hop count of 2, port P can be connectedB3-1The hop count relative to C1 is set to 2, noted as: pB3-1-C1-hop=2。
B3 will then be routed to port PB3-1Received test from C1The hop count field of the test request message is increased to 3 and is provided by the port PB3-2To B4.
Similarly, B3 may pass through port PB3-2Receiving a detection request message with hop number of 3 from C1; by port PB3-2A detection request message from C2 with hop count of 3 is received. And further sets a port PB3-2The hop count for C1 is 3 and the hop count for C2 is 3, and is recorded as: pB3-2-C1-hop=3、PB3-2-C2-hop=3。
Further, B3 may select a port with the smallest hop count value as the master port, and if there are a plurality of ports with the smallest hop count value in B3, that is, if the hop count values of these ports are the same, the port with the smallest sequence number among the plurality of ports with the smallest hop count value is used as the master port
B3 Primary Port P relative to C1B3-1(hop count: 2) and a main link of LB3-1
Spare port P relative to C1B3-2(hop count: 3) and a backup link LB3-2
Primary port P relative to C2B3-2(hop count: 3) and a main link of LB3-1. There is no standby port and standby link.
Then, the detection response flow may be executed, and after the branch node B3 determines the main port, the main link, the standby port, and the standby link, the selection result may be reported to the central node.
Still taking the branch node B3 as an example, B3 may periodically send a probe response message to the central node C1. Wherein, via the main port PB3-1The contents of the transmitted detection response message are shown in table 4.
TABLE 4
Figure BDA0001529854910000091
B3 passing through spare port PB3-2The contents of the transmitted detection response message are shown in table 5.
TABLE 5
Figure BDA0001529854910000092
Similarly, B3 may also pass through port PB3-2And sending a detection response message to the central node C2.
Then, each branch node on the path from B3 to the central node C1 and C2 may receive the detection response packet sent by B3, and each branch node or the central node may respectively create neighbor information corresponding to B3.
Wherein the neighbor information of B3 created by the central node C1 is shown in table 6.
TABLE 6
Figure BDA0001529854910000101
Neighbor information for B3 created by the central node C1 is shown in table 7.
TABLE 7
Figure BDA0001529854910000102
The path selection method provided by the embodiment of the application is mainly directed at a center-branch type network, the automatic path selection between branch nodes and a center node can be realized by periodically sending detection request messages and detection response messages, the protocol interaction is simple, the system processing cost is low, and the quick selection of the optimal path can be realized by each branch node only by sending data through a main link. When the method is applied to the SDN, the complexity of a network device control protocol can be reduced, the requirement of initial network configuration is reduced or eliminated, the SDN technical requirement can be met, the control function of the network device is simplified, and the requirement of network control function concentration is improved.
Optionally, when a path fault occurs between nodes, in order to improve timeliness of processing the fault, on the basis of the foregoing embodiments, the present application embodiment further provides a method for detecting and processing the fault, where a branch node determines a master port Pm corresponding to the central node C1C1Then, starting a timer and a counter, wherein the initial values of the timer and the counter are all0. If the branch node passes through the main port PmC1When a detection request message from the central node C1 is received, the timer is restarted, and the value of the counter is reset to 0; if the timer is overtime but still does not receive the detection request message from the central node C1, restarting the timer, adding 1 to the value of the counter, when the value of the counter is greater than the preset value, emptying the main port and the main link of the branch node, and counting the hop number P of the original main port relative to the central node C1c1-hopSet to 65535 to trigger the branch node to reselect the primary port and primary link.
Optionally, the central node and the branch node may also perform availability check on the neighbor information maintained by themselves, where the check method includes that the central node or the branch node refreshes the neighbor information of the branch node 1 once when receiving a detection response message from another branch node (e.g., the branch node 1) once, and if not receiving the detection response message sent by the branch node 1 for multiple times, it is determined that the connection link with the branch node 1 is failed, and then the central node or the branch node may delete the neighbor information corresponding to the branch node 1.
In the embodiment of the present application, the branch node may be divided into the functional modules or the functional units according to the above method examples, for example, each functional module or functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software functional module or a functional unit. The division of the modules or units in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
An embodiment of the present application further provides a path selection apparatus, as shown in fig. 4, the apparatus including: a communication unit 401 and a processing unit 402, wherein the communication unit 401 includes at least one port. Optionally, the apparatus may further comprise a storage unit 403.
A communication unit 401, configured to receive a detection request message, where the detection request message includes a message hop count;
a processing unit 402, configured to update the hop count of the receiving port relative to the central node to a message hop count if the hop count of the receiving port of the communication unit 401 is greater than the message hop count; the port with the smallest hop count value of the communication unit 401 is set as the master port, and the link corresponding to the master port is set as the master link for communication with the central node.
Optionally, the processing unit 402 is further configured to set a port with the smallest hop count value, except for the main port, as a standby port, and set a link corresponding to the standby port as a standby link for communicating with the central node.
Optionally, the processing unit 402 is further configured to update a message hop count in the detection request message, where the updated message hop count is obtained by adding 1 to the message hop count before updating;
the communication unit 401 is further configured to forward the detection request packet to another branch node through the first port if the hop count of the first port in the communication unit 401 is greater than or equal to the updated packet hop count;
the processing unit 402 is further configured to discard the detection request packet if it is determined that the hop counts of all the ports in the communication unit 401 are smaller than the updated packet hop count.
Optionally, the communication unit 401 is further configured to send a first detection response packet through the main port, where the first detection response packet includes an identifier of the main port and a transmission hop count set as an initial value; and/or sending a second detection response message through the standby port, wherein the second detection response message comprises the identifier of the standby port and the transmission hop number set as the initial value.
Optionally, the communication unit 401 is further configured to receive a third detection response packet through the second port, where the third detection response packet is a detection response packet sent through a main port of a second node, and the second node is another node except the device;
the processing unit 402 is further configured to discard the third detection response packet if it is determined that the communication unit 401 does not have the main port; if the communication unit 401 has a master port, creating neighbor information, where the neighbor information at least includes an identifier of the second node and an identifier of the second port; the number of transmission hops in the third detection response message is added by 1.
The communication unit 401 is further configured to send a third detection response packet through the master port;
the communication unit 401 is further configured to send, to the second node through the second port, the message with the destination node as the second node if the message with the destination node as the second node is received.
A storage unit 403 for storing program codes and data of the branch nodes.
Embodiments of the present application also provide a branch node, as shown in fig. 5, that includes a memory 501, a processor 502, a transceiver 503, and a bus 504.
The processor 502 may implement the functions of the processing unit 402, and the processor 502 may implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure. The processor 502 may be a central processing unit, general purpose processor, digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 502 may also be a combination of computing functions, e.g., comprising one or more microprocessors, a combination of DSPs and microprocessors, and the like.
The transceiver 503 is used to support the communication between the branch node and other network entities, and may implement the functions of the communication unit 401.
Memory 501, which may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
The bus 504 may be an Extended Industry Standard Architecture (EISA) bus or the like. The bus 504 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
An embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when a branch node executes the instructions, the branch node executes each step executed by the branch node in the method flow shown in the foregoing method embodiment.
The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a register, a hard disk, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, any suitable combination of the above, or any other form of computer readable storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuit (ASIC). In embodiments of the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. A method of path selection, comprising:
a branch node receives a detection request message, wherein the detection request message comprises message hop count; the branch node is located in a software defined SDN network;
if the hop count of the receiving port of the branch node is greater than the message hop count, the branch node updates the hop count of the receiving port relative to the central node into the message hop count;
the branch node sets a port with the minimum hop count value as a main port, and sets a link corresponding to the main port as a main link communicated with the central node;
the branch node updates the message hop count in the detection request message, wherein the updated message hop count is the message hop count before updating plus 1;
if the hop count of the first port in the branch node is greater than or equal to the updated message hop count, the branch node forwards the detection request message to other branch nodes through the first port;
and if the hop counts of all ports in the branch node are smaller than the updated message hop count, discarding the detection request message by the branch node.
2. The method of claim 1, further comprising:
and the branch node sets the port with the minimum hop number except the main port as a standby port, and sets a link corresponding to the standby port as a standby link communicated with the central node.
3. The method of claim 2, further comprising:
the branch node sends a first detection response message through the main port, wherein the first detection response message comprises the identification of the main port and the transmission hop number set as an initial value; and/or the presence of a gas in the gas,
and the branch node sends a second detection response message through the standby port, wherein the second detection response message comprises the identifier of the standby port and the transmission hop number set as an initial value.
4. The method of claim 3, further comprising:
the branch node receives a third detection response message through a second port, wherein the third detection response message is a detection response message sent through a main port of the second node, and the second node is other nodes except the branch node;
if the branch node does not have a main port, discarding the third detection response message;
if the branch node has a main port, creating neighbor information, wherein the neighbor information at least comprises the identifier of the second node and the identifier of the second port;
the branch node adds 1 to the transmission hop count in the third detection response message and sends the third detection response message through a main port;
and if the branch node receives the message of which the destination site is the second node, the branch node sends the message of which the destination site is the second node to the second node through the second port.
5. An apparatus for routing, comprising: a communication unit and a processing unit, the communication unit comprising at least one port; the device is located in a software defined SDN network;
the communication unit is used for receiving a detection request message, and the detection request message comprises message hop count;
the processing unit is configured to update the hop count of the receiving port relative to the central node to the message hop count if the hop count of the receiving port of the communication unit is greater than the message hop count; setting a port with the minimum hop count value of the communication unit as a main port, and setting a link corresponding to the main port as a main link communicated with a central node;
the processing unit is further configured to update the message hop count in the detection request message, where the updated message hop count is obtained by adding 1 to the message hop count before updating;
the communication unit is further configured to forward the detection request packet to other branch nodes through the first port if the hop count of the first port in the communication unit is greater than or equal to the updated packet hop count;
the processing unit is further configured to discard the detection request packet if it is determined that the hop counts of all the ports in the communication unit are smaller than the updated packet hop count.
6. The apparatus of claim 5,
the processing unit is further configured to set a port with the smallest hop count value except for the main port as a standby port, and set a link corresponding to the standby port as a standby link for communicating with the central node.
7. The apparatus of claim 6,
the communication unit is further configured to send a first detection response packet through the main port, where the first detection response packet includes an identifier of the main port and a transmission hop count set as an initial value; and/or sending a second detection response message through the standby port, wherein the second detection response message comprises the identifier of the standby port and the transmission hop number set as the initial value.
8. The apparatus of claim 7,
the communication unit is further configured to receive a third detection response packet through a second port, where the third detection response packet is a detection response packet sent through a main port of a second node, and the second node is a node other than the device;
the processing unit is further configured to discard the third detection response packet if it is determined that the communication unit does not have a main port; if the communication unit has a main port, creating neighbor information, wherein the neighbor information at least comprises the identifier of the second node and the identifier of the second port; adding 1 to the number of transmission hops in the third detection response message;
the communication unit is further configured to send the third detection response packet through a master port;
the communication unit is further configured to send, to the second node through the second port, a packet with a destination station as the second node if the packet with the destination station as the second node is received.
CN201711459017.3A 2017-12-28 2017-12-28 Path selection method and device Active CN108111419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711459017.3A CN108111419B (en) 2017-12-28 2017-12-28 Path selection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711459017.3A CN108111419B (en) 2017-12-28 2017-12-28 Path selection method and device

Publications (2)

Publication Number Publication Date
CN108111419A CN108111419A (en) 2018-06-01
CN108111419B true CN108111419B (en) 2021-02-02

Family

ID=62214193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711459017.3A Active CN108111419B (en) 2017-12-28 2017-12-28 Path selection method and device

Country Status (1)

Country Link
CN (1) CN108111419B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468448B (en) * 2020-11-05 2023-08-08 中国电子信息产业集团有限公司 Processing method and device of communication network, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155115A (en) * 2007-07-26 2008-04-02 杭州华三通信技术有限公司 Method and apparatus for implementing automatic tunnel
CN102932186A (en) * 2012-11-13 2013-02-13 杭州迪普科技有限公司 Trunking system and method of removing loop circuits
CN103475578A (en) * 2013-09-09 2013-12-25 华为技术有限公司 Method and device for path selection

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7869348B2 (en) * 2006-04-10 2011-01-11 Polytechnic Institute Of New York University Determining rerouting information for single-link failure recovery in an Internet protocol network
US20170171066A1 (en) * 2015-12-09 2017-06-15 Alcatel-Lucent Usa, Inc. Optimizing restoration with segment routing
CN105681153B (en) * 2016-03-16 2019-07-05 北京邮电大学 A kind of mapping method of virtual network and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155115A (en) * 2007-07-26 2008-04-02 杭州华三通信技术有限公司 Method and apparatus for implementing automatic tunnel
CN102932186A (en) * 2012-11-13 2013-02-13 杭州迪普科技有限公司 Trunking system and method of removing loop circuits
CN103475578A (en) * 2013-09-09 2013-12-25 华为技术有限公司 Method and device for path selection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《RFC2453-RIP版本2》;网络工作组G. Malkin;《www.cnpaf.net/Class/Rfcen/200502/3516.html》;20050216;全文 *
《路由选择信息协议-RIP》;ydpkto转载;《https://blog.csdn.net/yjdpkto/article/details/5643815》;20100603;参见第1页至第2页) *

Also Published As

Publication number Publication date
CN108111419A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
US10693765B2 (en) Failure protection for traffic-engineered bit indexed explicit replication
CN109698788B (en) Flow forwarding method and device and computer readable medium
CN107171977B (en) Message forwarding method and device
US9438447B2 (en) Flow distribution algorithm for aggregated links in an ethernet switch
US10148595B2 (en) Handling dynamic port/LAG changes without breaking communication in an extended bridge
US9130858B2 (en) System and method for supporting discovery and routing degraded fat-trees in a middleware machine environment
RU2612599C1 (en) Control device, communication system, method for controlling switches and program
US20170338976A1 (en) Method for Obtaining Port Path and Apparatus
CN110191064B (en) Flow load balancing method, device, equipment, system and storage medium
CN111614505B (en) Message processing method and gateway equipment
US9515881B2 (en) Method, device, and system for packet processing
US9736066B2 (en) Method, apparatus and system for establishing optical bypass
CN108111419B (en) Path selection method and device
US10476774B2 (en) Selective transmission of bidirectional forwarding detection (BFD) messages for verifying multicast connectivity
US11343153B2 (en) BGP logical topology generation method, and device
US9225667B2 (en) Communication system and network relay apparatus
CN106209634B (en) Learning method and device of address mapping relation
CN110830598B (en) Method and network equipment for establishing and transmitting interface address and alias in BGP (Border gateway protocol) session
CN107181678B (en) Method and device for route convergence
CN110545240B (en) Method for establishing label forwarding table and forwarding message based on distributed aggregation system
US10003469B2 (en) Multicast forwarding method and apparatus in transparent interconnection of lots of link network, and routing bridge
CN111385182B (en) Traffic transmission method, device and system
US20170155543A1 (en) Control apparatus, communication system, and control method
CN113132220B (en) Method and device for processing routing information
CN113141265B (en) Cross-equipment link aggregation method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041, 17 floor, maple building, 1 building, 288 Tianfu street, Chengdu, Sichuan.

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 610041 nine Xing Xing Road 16, hi tech Zone, Sichuan, Chengdu

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.