Method for establishing routing table, electronic device and network

By detecting and responding to data packets, the zero configuration establishment of routing table entries is realized, and the problem of many configuration parameters in the existing technology is solved, and the flexibility and management efficiency of the network are improved.

CN112217723BActive Publication Date: 2025-04-04HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010982742.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2015-12-30
Publication Date
2025-04-04
Estimated Expiration
2035-12-30

AI Technical Summary

Technical Problem

The way to establish routing tables in the prior art requires configuring more parameters, and zero configuration cannot be achieved.

Method used

By detecting the path node from the source node to the destination node, and then forwarding from the destination node to the source node through the reply packet reverse path, the source node and intermediate node can easily establish routing table entries and achieve zero configuration.

Benefits of technology

The process of establishing routing table entries is simplified, and each node can realize the establishment of routing tables with zero configuration, improving the flexibility and management efficiency of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112217723B_ABST
    Figure CN112217723B_ABST
Patent Text Reader

Abstract

A method, electronic device and network for establishing a routing table. The method comprises: generating a first detection data packet, the first detection data packet having a source address and a destination address; sending the first detection data packet from a source node corresponding to the source address on a network comprising at least two nodes until it reaches a destination node corresponding to the destination address, and recording the addresses of the nodes passed by the first detection data packet to form a first path; generating a second path according to the first path, wherein the second path is a reverse path of the first path; generating a first response data packet, the first response data packet including the second path; sending the first response data packet along the second path until it reaches the source node; establishing a routing table entry according to the second path, wherein the routing table entry includes the destination address, the address of the next hop node and the outbound interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method for establishing a routing table, electronic equipment and a network. Background Art

[0002] Interior Gateway Protocol (IGP) is a protocol for exchanging routing information between gateways (hosts and routers) within an autonomous network. Routing information can be used in Internet Protocol (IP) or other network protocols to describe how routing is performed.

[0003] The premise of the IGP protocol is that each interface of each router is set with an IP address, where the router is a forwarding device that forwards IP data packets. Before the IGP protocol runs, various parameters need to be set on the router. For example, in a typical IGP protocol, Open Shortest Path First (OSPF), the process number, router ID, area ID, associated IP and wildcard mask need to be configured on the router.

[0004] The IGP routing protocol includes the following contents: Each router sends its own interface information (including the link cost value) to the surrounding area regularly, and also forwards the interface information sent by other routers. After the information of each router is fully delivered to each router in the network, each router will calculate a topological structure diagram of the entire network. Each router calculates a shortest path tree with itself as the root node to any other known node (that is, the network segment of each interface) through its own network topology diagram, and then generates a routing table. The index items of the routing table are all the network segments known in the process of information exchange, and the forwarding items corresponding to each network segment are filled in according to the outgoing interface and next hop guided by the topology of this tree. Therefore, a possible IP routing table entry includes the destination IP address of the data packet, the IP address of the next hop, and the outgoing interface of the next hop.

[0005] When the network topology changes, such as when a link is disconnected, the above steps are repeated to re-establish the routing table entries.

[0006] As can be seen from the above description, the method of establishing a routing table through the IGP routing protocol requires configuring more parameters on each routing node, such as configuring the process number, router identifier, area identifier, associated IP, wildcard mask, etc. on the router. Summary of the invention

[0007] The embodiment of the present invention provides a method, electronic device and network for establishing a routing table, so as to solve the technical problem that the method for establishing a routing table in the prior art needs to configure many parameters and cannot achieve zero configuration.

[0008] In a first aspect, an embodiment of the present invention provides a method for establishing a routing table, comprising:

[0009] The first node obtains a first detection data packet, which has a source address and a destination address; the first node is a source node corresponding to the source address or an intermediate node on the path between the source node and the destination node corresponding to the destination address; the first node obtains a new first detection data packet; wherein, when the first node is the intermediate node, the first node records the address of the first node in the first detection data packet to form the new first detection data packet; when the first node is the source node, the new first detection data packet is the first detection data packet; the first node sends the new first detection data packet; the first node receives the first response data packet, which includes a second path, which is the opposite path of the first path; the first path is the address of the node passed by the new first detection data packet; the first node establishes a routing table entry according to the previous address of the address of the first node in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

[0010] It can be seen from the above description that in the embodiment of the present invention, the path nodes from the source node to the destination node are recorded by detecting the data packet, and then the response data packet is forwarded from the destination node to the source node in the reverse path, so that the source node and the intermediate node can easily establish routing table entries. Compared with the method of establishing routing table entries described in the IGP protocol in the prior art, the method of establishing a routing table in the embodiment of the present invention is simpler, and each node can achieve zero configuration to establish a routing table.

[0011] In combination with the first aspect, in a first possible implementation of the first aspect, the first node establishes a path evaluation table entry, wherein the path evaluation table entry includes the source address and the destination address, the address of the next hop node and the outbound interface, the evaluation value of the next hop node and the outbound interface, the service identifier and / or the service target; wherein the address of the next hop node is the previous address. This embodiment is used to evaluate the routing table entry so as to facilitate monitoring and optimization of the routing table entry.

[0012] In combination with the first aspect or the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the first node sends the new first detection data packet, including: the first node randomly selects a next hop node and an output interface to send the new first detection data packet.

[0013] In a second aspect, an embodiment of the present invention provides a method for managing a routing table, including:

[0014] The first node obtains a second detection data packet, which has a source address and a destination address; the first node is a source node corresponding to the source address or an intermediate node on the path between the source node and the destination node corresponding to the destination address; the first node obtains a new second detection data packet; wherein, when the first node is the intermediate node, the first node records the address of the first node in the second detection data packet to form the new second detection data packet; when the first node is the source node, the new second detection data packet is the second detection data packet; the first node sends the new second detection data packet according to a pre-established routing table entry at a predetermined probability; the first node receives a second reply data packet, which includes a fourth path, which is the opposite path of the third path; the third path is the address of the node passed by the new second detection data packet; if the match is successful in the routing table entry, and the previous address of the address of the first node in the fourth path is the same as the address of the next hop node in the routing table entry, the first node updates the evaluation value of the next hop node and the outbound interface in the pre-established path evaluation table entry.

[0015] It can be seen from the above description that in the embodiment of the present invention, the pre-established routing table is monitored using the detection packet and the response data packet to improve the adaptive capability of the routing table.

[0016] In combination with the second aspect, in a first possible implementation of the second aspect, the method further includes: if no match is successful in the routing table entry, the first node establishes a new routing table entry according to the previous address of the address of the first node in the fourth path. This embodiment can be used to discover new paths, thereby achieving multi-path coexistence.

[0017] In combination with the second aspect, in a second possible implementation manner of the second aspect, the method further includes:

[0018] If the match is successful in the routing table entry, and the previous address of the address of the first node in the fourth path is different from the address of the next hop node in the routing table entry, the first node determines whether to update the routing table entry. The method in this embodiment can be used to optimize the routing table entry so that the routing table has higher adaptability.

[0019] The second aspect or the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect can be combined into the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect.

[0020] In a third aspect, an embodiment of the present invention provides a method for establishing a routing table, comprising: a source node generates a first detection data packet, the first detection data packet having a source address and a destination address; the source address is the address of the source node; the source node sends the first detection data packet; the source node receives a first response data packet, the first response data packet includes a second path, the second path is the opposite path of the first path; the first path is the address of the node passed by the first detection data packet; the source node generates a first path establishment packet, the first path establishment packet includes the first path; the source node establishes a routing table entry according to the address of the next hop node of the source address in the first path and the output interface; wherein the routing table entry includes the destination address, the address of the next hop node and the output interface.

[0021] It can be seen from the above description that in this embodiment, the path nodes from the source node to the destination node are recorded by detecting the data packet, and then the reverse path of the response data packet is forwarded from the destination node to the source node, and then the reverse path is processed again and the first path establishment packet is generated, so that the source node can easily establish the routing table entry. Compared with the method of establishing the routing table entry described by the IGP protocol in the prior art, the method of establishing the routing table in the embodiment of the present invention is simpler, and each node can achieve zero configuration to establish the routing table.

[0022] In combination with the third aspect, in a first possible implementation of the third aspect, the method further includes: if a routing table entry has been established, and the outgoing interface in the established routing table entry is inconsistent with the outgoing interface corresponding to the first path, the source node determines whether the outgoing interface corresponding to the first path is better; when the outgoing interface corresponding to the first path is better, the source node updates the established routing table entry. This embodiment can be used to monitor and optimize the routing table to improve the adaptive capability of the routing table.

[0023] In combination with the third aspect, in a second possible implementation of the third aspect, the method also includes: the source node sends a first path establishment packet to an intermediate node between the source node and the destination node in the first path, so that the intermediate node updates its respective routing table entries according to the next hop address and outbound interface of the address of the intermediate node in the first path.

[0024] The second aspect or the first possible implementation manner of the second aspect or the second possible implementation manner of the second aspect may be combined into the third aspect or the first possible implementation manner of the third aspect or the second possible implementation manner of the third aspect.

[0025] In a fourth aspect, an embodiment of the present invention provides a method for establishing a routing table, comprising: generating a first probe data packet, the first probe data packet having a source address and a destination address; sending the first probe data packet starting from a source node corresponding to the source address on a network comprising at least two nodes until it reaches a destination node corresponding to the destination address, and recording the addresses of the nodes passed by the first probe data packet to form a first path; generating a second path based on the first path; wherein the second path is a reverse path of the first path; generating a first reply data packet, the first reply data packet including the second path; sending the first reply data packet along the second path until it reaches the source node; establishing a routing table entry based on the second path, wherein the routing table entry includes the destination address, the address of the next hop node, and the outbound interface.

[0026] In combination with the fourth aspect, in a first possible implementation of the fourth aspect, the method also includes: establishing a path evaluation table entry based on the second path and the service objective, wherein the path evaluation table entry includes the source address and the destination address, the address of the next hop node and the outgoing interface, the evaluation value of the next hop node and the outgoing interface, the service identifier and / or the service objective.

[0027] In a fifth aspect, an embodiment of the present invention provides a method for managing a routing table, comprising: generating a second detection data packet, the second detection data packet having the source address and the destination address; sending the second detection data packet according to a preset routing table entry starting from a source node corresponding to the source address on a network comprising at least two nodes at a predetermined probability until it reaches the destination node corresponding to the address, and recording the addresses of the nodes passed by the second detection data packet to form a third path; generating a fourth path according to the third path; wherein the fourth path is the opposite path of the third path; generating a second reply data packet, the second reply data packet including the fourth path; sending the second reply data packet along the fourth path until it reaches the source node; if the match is successful in the routing table entry, and the address and output interface of the next hop in the fourth path are different from the address and output interface of the next hop in the routing table entry, then adding the address and output interface of the new next hop node in the routing table entry, and adding the evaluation value of the new next hop node and the output interface in the pre-established path evaluation table entry; or determining whether to update the routing table entry.

[0028] In combination with the fifth aspect, in a first possible implementation of the fifth aspect, the method further includes: if the match in the routing table entry is successful, and the address and the output interface of the next hop in the fourth path are the same as the address and the output interface of the next hop in the routing table entry, updating the evaluation value of the next hop node and the output interface in the pre-established path evaluation table entry.

[0029] In combination with the fifth aspect, in a second possible implementation manner of the fifth aspect, the method further includes: if no match is found in the routing table entry, establishing a new routing table entry according to the fourth path, and establishing a new path evaluation table entry.

[0030] In combination with the fifth aspect, in a third possible implementation method of the fifth aspect, determining whether to update the routing table entry includes: determining an evaluation value of a new next hop node and an outgoing interface; determining whether to update the routing table entry based on the evaluation value of the new next hop node and the outgoing interface and the evaluation value of the next hop node and the outgoing interface in the pre-established path evaluation table entry.

[0031] In combination with the fifth aspect, in a fourth possible implementation of the fifth aspect, the determining whether to update the routing table entry includes: determining an evaluation value of a new next hop node and an outgoing interface; inputting the evaluation value of the new next hop node and the outgoing interface into a random neural network, and determining whether to update the routing table based on a calculation result of the random neural network; wherein each neuron of the random neural network corresponds to an outgoing interface, and the random neural network is trained by the evaluation values ​​of historical next hop nodes and outgoing interfaces.

[0032] Any one of the fifth aspect or the first possible implementation manner of the fifth aspect to the fourth possible implementation manner of the fifth aspect can be combined into the fourth aspect or the first possible implementation manner of the fourth aspect.

[0033] In a sixth aspect, an embodiment of the present invention provides a method for establishing a routing table, comprising: generating a first detection data packet, the first detection data packet having a source address and a destination address; sending the first detection data packet starting from a source node corresponding to the source address on a network comprising at least two nodes until it reaches a destination node corresponding to the destination address, and recording the addresses of the nodes passed by the first detection data packet to form a first path; generating a second path based on the first path; wherein the second path is a reverse path of the first path; generating a first reply data packet, the first reply data packet including the second path; sending the first reply data packet along the second path until it reaches the source node; generating a first path establishment packet, the first path establishment packet including the reverse path of the second path; establishing a routing table entry based on the reverse path, wherein the routing table entry includes the destination address, the address of the next hop node, and the output interface.

[0034] In combination with the sixth aspect, in a first possible implementation of the sixth aspect, the method also includes: if a routing table entry has been established, and the outgoing interface in the established routing table entry is inconsistent with the outgoing interface corresponding to the reverse path, determining whether the outgoing interface corresponding to the reverse path is better; when the outgoing interface corresponding to the reverse path is better, updating the established routing table entry.

[0035] In combination with the sixth aspect, in a second possible implementation of the sixth aspect, the method also includes: generating a second probe data packet, the second probe data packet having the source address and the destination address; sending the second probe data packet from the source node on the network according to the routing table entry at a predetermined probability until it reaches the destination node, and recording the addresses of the nodes passed by the second probe data packet to form a third path; generating a fourth path according to the third path; wherein the fourth path is the opposite path of the third path; generating a second reply data packet, the second reply data packet including the fourth path; sending the second reply data packet along the fourth path until it reaches the source node; if the match in the routing table entry is successful, and the address of the next hop and the outgoing interface in the fourth path are the same as the address and the outgoing interface of the next hop in the routing table entry, updating the evaluation value of the next hop node and the outgoing interface in the pre-established path evaluation table entry.

[0036] In the seventh aspect, an embodiment of the present invention provides a data packet sending method, comprising: receiving a business data packet; the business data packet has a destination address and contains a business identifier and / or a business target; performing the longest match in a pre-established routing table entry according to the destination address, the business identifier and / or the business target, the routing table entry including the destination address, the address of the next hop node and the output interface, the business identifier and / or the business target; sending the business data packet through the address of the next hop node and the output interface of the successfully matched routing table entry.

[0037] In an eighth aspect, an embodiment of the present invention provides an electronic device, comprising: a processor, for generating a first detection data packet, the first detection data packet having a source address and a destination address; the electronic device acting as a source node, the source address being the address of the source node; an interface; a transmitter, for sending the first detection data packet through the interface; a receiver, for receiving the first response data packet through the interface, the first response data packet including a second path, the second path being the opposite path of the first path; the first path being the address of the node passed by the first detection data packet; the processor is also used to: establish a routing table entry according to the previous address of the address of the electronic device in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the output interface; wherein the address of the next hop node is the previous address.

[0038] In combination with the eighth aspect, in a first possible implementation method of the eighth aspect, the processor is also used to: establish a path evaluation table entry, wherein the path evaluation table entry includes the source address and the destination address, the address of the next hop node and the outgoing interface, the evaluation value of the next hop node and the outgoing interface, the service identifier and / or service target; wherein the address of the next hop node is the previous address.

[0039] In combination with the eighth aspect or the first possible implementation of the eighth aspect, in a second possible implementation of the eighth aspect, the transmitter is used to: randomly select a next hop node and the interface to send the new first detection data packet.

[0040] In the ninth aspect, an embodiment of the present invention provides an electronic device, comprising: an interface; a receiver, used to receive a first detection packet through the interface, the first detection data packet having a source address and a destination address, and the address of a node currently passed by the first detection data packet; the electronic device is an intermediate node on the path between the source node corresponding to the source address and the destination node corresponding to the destination address; a processor, used to record the address of the electronic device in the first detection data packet to form a new first detection data packet; a transmitter, used to send the new first detection data packet through the interface; the receiver is also used to receive the first response data packet through the interface, the first response data packet includes a second path, the second path is the opposite path of the first path; the first path is the address of the node passed by the new first detection data packet; the processor is also used to establish a routing table entry according to the previous address of the address of the electronic device in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the output interface; wherein the address of the next hop node is the previous address.

[0041] In combination with the ninth aspect, in a first possible implementation method of the ninth aspect, the processor is also used to: establish a path evaluation table entry, wherein the path evaluation table entry includes the source address and the destination address, the address of the next hop node and the outgoing interface, the evaluation value of the next hop node and the outgoing interface, the service identifier and / or service target; wherein the address of the next hop node is the previous address.

[0042] In the tenth aspect, an embodiment of the present invention provides an electronic device, comprising: a processor, for generating a second detection data packet, the second detection data packet having a source address and a destination address; the electronic device acting as a source node, the source address being the address of the source node; an interface; a transmitter, for sending the second detection data packet according to a pre-established routing table entry at a predetermined probability; a receiver, for receiving a second reply data packet through the interface, the second reply data packet including a fourth path, the fourth path being the opposite path of the third path; the third path being the address of a node passed by the second detection data packet; the processor is also used to: if a match is successful in the routing table entry, and the previous address of the address of the electronic device in the fourth path is the same as the address of the next hop node in the routing table entry, update the evaluation value of the next hop node and the output interface in the pre-established path evaluation table entry.

[0043] In combination with the tenth aspect, in a first possible implementation method of the tenth aspect, the processor is also used to: if no match is successful in the routing table entry, establish a new routing table entry based on the previous address of the address of the first node in the fourth path.

[0044] In combination with the tenth aspect, in a second possible implementation of the tenth aspect, the processor is also used to: determine whether to update the routing table entry if the match in the routing table entry is successful and the previous address of the address of the electronic device in the fourth path is different from the address of the next hop node in the routing table entry.

[0045] In combination with the second possible implementation method of the tenth aspect, in a third possible implementation method of the tenth aspect, the processor is used to: determine an evaluation value of a new next hop node and an outgoing interface; and determine whether to update the routing table entry based on the evaluation value of the new next hop node and the outgoing interface and the evaluation value of the next hop node and the outgoing interface in the path evaluation table entry.

[0046] In combination with the second possible implementation method of the tenth aspect, in a fourth possible implementation method of the tenth aspect, the processor is used to: determine an evaluation value of a new next hop node and an outbound interface; input the evaluation value of the new next hop node and the outbound interface into a random neural network, and determine whether to update the routing table according to a calculation result of the random neural network; wherein each neuron of the random neural network corresponds to an outbound interface, and the random neural network is trained with the evaluation values ​​of historical next hop nodes and outbound interfaces.

[0047] In the eleventh aspect, an embodiment of the present invention provides an electronic device, comprising: an interface; a receiver, for receiving a second detection data packet through the interface, the second detection data packet having a source address and a destination address, and the address of a node currently passed by the second detection data packet; the electronic device is an intermediate node on the path between the source node corresponding to the source address and the destination node corresponding to the destination address; a processor, for recording the address of the electronic device in the second detection data packet to form the new second detection data packet; a transmitter, for sending the new second detection data packet through the interface according to a pre-established routing table entry at a predetermined probability; the receiver is also used to: receive a second response data packet, the second response data packet includes a fourth path, the fourth path is the opposite path of the third path; the third path is the address of the node passed by the new second detection data packet; the processor is also used to: if the match in the routing table entry is successful, and the previous address of the address of the electronic device in the fourth path is the same as the address of the next hop node in the routing table entry, update the evaluation value of the next hop node and the output interface in the path evaluation table entry.

[0048] In combination with the eleventh aspect, in a first possible implementation of the eleventh aspect, the processor is further used to: when no match is successful in the routing table entry, establish a new routing table entry based on the previous address of the address of the electronic device in the fourth path.

[0049] In combination with the eleventh aspect, in a second possible implementation of the eleventh aspect, the processor is also used to: determine whether to update the routing table entry if the match in the routing table entry is successful and the previous address of the address of the electronic device in the fourth path is different from the address of the next hop node in the routing table entry.

[0050] In combination with the second possible implementation method of the eleventh aspect, in the third possible implementation method of the eleventh aspect, the processor is used to: determine the evaluation value of the new next hop node and the outgoing interface; determine whether to update the routing table entry based on the evaluation value of the new next hop node and the outgoing interface and the evaluation value of the next hop node and the outgoing interface in the path evaluation table entry.

[0051] In combination with the second possible implementation method of the eleventh aspect, in a fourth possible implementation method of the eleventh aspect, the processor is used to: determine an evaluation value of a new next hop node and an outgoing interface; input the evaluation value of the new next hop node and the outgoing interface into a random neural network, and determine whether to update the routing table according to a calculation result of the random neural network; wherein each neuron of the random neural network corresponds to an outgoing interface, and the random neural network is trained with the evaluation values ​​of historical next hop nodes and outgoing interfaces.

[0052] In the twelfth aspect, an embodiment of the present invention provides an electronic device, comprising: a processor, used to generate a first detection data packet, the first detection data packet having a source address and a destination address; the source address is the address of the electronic device, and the electronic device serves as a source node; an interface; a transmitter, used to send the first detection data packet through the interface; a receiver, used to receive a first response data packet through the interface, the first response data packet including a second path, the second path being the opposite path of the first path; the first path is the address of the node passed by the first detection data packet; the processor is also used to generate a first path establishment packet, the first path establishment packet including the first path; establish a routing table entry according to the address of the next hop node of the source address in the first path and the outgoing interface; wherein the routing table entry includes the destination address, the address of the next hop node and the outgoing interface.

[0053] In combination with the twelfth aspect, in a first possible implementation method of the twelfth aspect, the processor is also used to: if a routing table entry has been established, and the outgoing interface in the established routing table entry is inconsistent with the outgoing interface corresponding to the first path, determine whether the outgoing interface corresponding to the first path is better; when the outgoing interface corresponding to the first path is better, update the established routing table entry.

[0054] In combination with the twelfth aspect or the first possible implementation of the twelfth aspect, in the second possible implementation of the twelfth aspect, the transmitter is also used to send a first path establishment packet to the intermediate node between the source node and the destination node in the first path through the interface, so that the intermediate node updates its respective routing table entries according to the next hop address and the outgoing interface of the address of the intermediate node in the first path.

[0055] In combination with the twelfth aspect or the first possible implementation of the twelfth aspect or the second possible implementation of the twelfth aspect, in the third possible implementation of the twelfth aspect, the processor is also used to: generate a second probe data packet, the second probe data packet has the source address and the destination address; the transmitter is also used to: send the second probe data packet according to the routing table entry at a predetermined probability; the interface is also used to: receive a second reply data packet through the interface, the second reply data packet includes a fourth path, the fourth path is the opposite path of the third path; the third path is the address of the node passed by the second probe data packet; the processor is also used to: if the match is successful in the routing table entry, and the address of the next hop of the source address in the fourth path and the outbound interface are the same as the address and outbound interface of the next hop in the routing table entry, update the evaluation value of the next hop node and the outbound interface in the pre-established path evaluation table entry.

[0056] In the thirteenth aspect, an embodiment of the present invention provides a network, comprising a source node, a destination node and an intermediate node located between the source node and the destination node, the source node being used to generate a first detection data packet and send the first detection data packet to an intermediate node adjacent to the source node; wherein the first detection data packet has a source address of the source node and a destination address of the destination node; the intermediate nodes starting from the adjacent intermediate node to the adjacent intermediate node of the destination node are used to send the first detection data packet in sequence until reaching the destination node, and record their respective addresses in the first detection data packet to form a first path; the destination node is used to generate a second path according to the first path; wherein the second path is a reverse path of the first path; a first reply data packet is generated, and the first reply data packet includes the second path; the destination node and the intermediate node are used to send the first reply data packet in sequence along the second path until reaching the source node; the intermediate node and the source node are used to establish a routing table entry according to the second path, wherein the routing table entry includes the destination address, the address of the next hop node and the outbound interface.

[0057] In combination with the thirteenth aspect, in a first possible implementation method of the thirteenth aspect, the intermediate node and the source node are also used to establish a path evaluation table entry based on the second path and the service objective, wherein the path evaluation table entry includes the source address and the destination address, the address of the next hop node and the outgoing interface, the evaluation value of the next hop node and the outgoing interface, the service identifier and / or the service objective.

[0058] In a fourteenth aspect, an embodiment of the present invention provides a network, comprising a source node, a destination node and an intermediate node located between the source node and the destination node, the source node being used to generate a second detection data packet and send the second detection data packet to an adjacent intermediate node, the second detection data packet having a source address of the source node and a destination address of the destination node; the intermediate nodes starting from the adjacent intermediate node to the adjacent intermediate node of the destination node are used to send the second detection data packet in sequence according to a predetermined probability according to a preset routing table entry until reaching the destination node corresponding to the address, and record the respective addresses in the second detection data packet to form a third path; the destination node is used to send the second detection data packet according to the third path The method comprises the steps of: generating a fourth path and generating a second reply data packet according to the present invention; wherein the fourth path is the reverse path of the third path; the second reply data packet includes the fourth path; the destination node and the intermediate node are used to send the second reply data packet in sequence along the fourth path until it reaches the source node; the intermediate node and the source node are used to add the address and the outbound interface of the new next hop node in the routing table entry, and add the evaluation value of the new next hop node and the outbound interface in the pre-established path evaluation table entry if the match in the routing table entry is successful and the address and the outbound interface of the next hop in the fourth path are different from the address and the outbound interface of the next hop in the routing table entry; or determine whether to update the routing table entry.

[0059] In combination with the fourteenth aspect, in a first possible implementation method of the fourteenth aspect, the intermediate node and the source node are also used to: if the match in the routing table entry is successful, and the address and the output interface of the next hop in the fourth path are the same as the address and the output interface of the next hop in the routing table entry, update the evaluation value of the next hop node and the output interface in the pre-established path evaluation table entry.

[0060] In combination with the fourteenth aspect, in a second possible implementation of the fourteenth aspect, the intermediate node and the source node are also used to: if no match is successful in the routing table entry, establish a new routing table entry according to the fourth path, and establish a new path evaluation table entry.

[0061] The fourteenth aspect or the first possible implementation of the fourteenth aspect or the second possible implementation of the fourteenth aspect can be combined into the thirteenth aspect or the first possible implementation of the thirteenth aspect.

[0062] In a fifteenth aspect, an embodiment of the present invention provides a network, comprising a source node, a destination node, and an intermediate node located between the source node and the destination node, wherein the source node is used to generate a first detection data packet and send the first detection data packet to an adjacent intermediate node, wherein the first detection data packet has a source address of the source node and a destination address of the destination node; the intermediate nodes starting from the adjacent intermediate node to the adjacent intermediate node of the destination node are used to send the first detection data packet in sequence until reaching the destination node, and record their respective addresses in the first detection data packet to form a first path; the destination node is used to generate a second path according to the first path and generate a first response data packet; wherein the second path is The reverse path of the first path; the first response data packet includes the second path; the destination node and the intermediate node are used to send the first response data packet along the second path until it reaches the source node; the source node is also used to generate a first path establishment packet and establish a routing table entry according to the reverse path, and the first path establishment packet includes the reverse path of the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the output interface; the source node is also used to send the first path establishment packet to the adjacent intermediate node; the intermediate nodes starting from the adjacent intermediate node to the adjacent intermediate node of the destination node are used to establish a routing table entry according to the reverse path when receiving the first path establishment packet.

[0063] In combination with the fifteenth aspect, in a first possible implementation method of the fifteenth aspect, the source node is also used to: if a routing table entry has been established, and the outgoing interface in the established routing table entry is inconsistent with the outgoing interface corresponding to the reverse path, determine whether the outgoing interface corresponding to the reverse path is better; when the outgoing interface corresponding to the reverse path is better, update the established routing table entry.

[0064] In the sixteenth aspect, an embodiment of the present invention provides an electronic device, comprising: an interface; a receiver, for receiving a business data packet; the business data packet has a destination address and contains a business identifier and / or a business target; a processor, for performing a longest match in a pre-established routing table entry according to the destination address, the business identifier and / or the business target, the routing table entry including the destination address, the address of the next hop node and the output interface, the business identifier and / or the business target; a transmitter, for sending the business data packet through the address of the next hop node and the output interface of the successfully matched routing table entry; wherein the output interface is an interface among the interfaces.

[0065] In the seventeenth aspect, an embodiment of the present invention provides an electronic device, comprising a functional unit for implementing the method in the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect.

[0066] In an eighteenth aspect, an embodiment of the present invention provides an electronic device, comprising a functional unit for implementing the second aspect or any one of the first possible implementation manner of the second aspect to the fourth possible implementation manner of the second aspect.

[0067] In the nineteenth aspect, an embodiment of the present invention provides an electronic device, comprising a functional unit for implementing the method in the third aspect or the first possible implementation manner of the third aspect or the second possible implementation manner of the third aspect.

[0068] In the twentieth aspect, an embodiment of the present invention provides an electronic device, comprising a functional unit for implementing the method in the seventh aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1a-Figure 1c A network structure diagram provided for an embodiment of the present invention;

[0070] Figure 2 A structural diagram of an electronic device provided by an embodiment of the present invention;

[0071] Figure 3 A flowchart of a method for establishing a routing table provided by an embodiment of the present invention;

[0072] Figure 4 A flowchart of another method for establishing a routing table provided by an embodiment of the present invention;

[0073] Figure 5 A flowchart of another method for establishing a routing table provided in an embodiment of the present invention;

[0074] Figure 6 A flow chart of a method for establishing a routing table on a source node side provided by an embodiment of the present invention

[0075] Figure 7 A structural diagram of another electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0076] The embodiment of the present invention provides a method, electronic device and network for establishing a routing table, so as to solve the technical problem that the method for establishing a routing table in the prior art needs to configure many parameters and cannot achieve zero configuration.

[0077] The objectives, technical solutions and advantages of the embodiments of the present invention will be described clearly and in detail below with reference to the accompanying drawings.

[0078] The embodiment of the present invention provides a method for establishing a routing table. The method can be applied to a network, please refer to Figure 1a to Figure 1c , is a possible network structure diagram in an embodiment of the present invention. Figure 1a to Figure 1c As shown, the network includes a source node S, an intermediate node M, and a destination node D. The source node S, the intermediate node M, and the destination node D can all be routing devices, specifically access, aggregation, core routers, enterprise network routers (such as enterprise network edge routers), or home gateways, such as Figure 1c As another example, the source node S can be a user device that accesses the Internet through a home gateway and communicates with another user device via a voice over Internet Protocol (VoIP). In this case, both the source node S and the destination node D are user devices, and the intermediate node M is a router. Figure 1a For another example, the destination node D may be considered as a server of a service or content provider. For another example, the source node S, the intermediate node M and the destination node D may all be home or enterprise networks or user devices.

[0079] Optionally, the above network is an IP network, each node has its own IP address, and the entire network communicates through the IP address.

[0080] Optionally, the above network may also be a non-IP network. In the non-IP network, the address may not be an IP address, but a communication address corresponding to the non-IP network, and the entire network communicates through the communication address.

[0081] The user equipment mentioned in this article can be a wireless terminal or a wired terminal. The wireless terminal can be a device that provides voice and / or other service data connectivity to the user, a handheld device with wireless connection function, or other processing equipment connected to a wireless modem. The wireless terminal can communicate with one or more core networks via a radio access network (Radio Access Network; RAN for short). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal, for example, a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device, which exchanges language and / or data with the radio access network. For example, personal communication service (PCS) phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDA) and other devices. A wireless terminal may also be called a system, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal, an access terminal, a user terminal, a user agent, or a user device or user equipment.

[0082] Please refer to the following Figure 2 , Figure 2 A possible structural diagram of an electronic device provided in an embodiment of the present invention. The electronic device is a source node S, an intermediate node M or a destination node D. Figure 2 As shown, the electronic device includes: a processor 10, a transmitter 20, a receiver 30, a memory 40, and an interface 50. The memory 40, the transmitter 20, the receiver 30, and the processor 10 may be connected via a bus. Of course, in actual use, the memory 40, the transmitter 20, the receiver 30, and the processor 10 may not be in a bus structure, but may be in other structures, such as a star structure, which is not specifically limited in this application.

[0083] Optionally, the processor 10 may specifically be a central processing unit, an application specific integrated circuit (ASIC), one or more integrated circuits for controlling program execution, a hardware circuit developed using a field programmable gate array (FPGA), or a baseband processor.

[0084] Optionally, the processor 10 may include at least one processing core.

[0085] Optionally, the memory 40 may include a read-only memory (ROM), a random access memory (RAM), and a disk memory. The memory 40 is used to store data required by the processor 10 when it is running. The number of memories 40 is one or more.

[0086] Optionally, the number of interfaces 50 is one or more, and is used to connect to adjacent nodes.

[0087] Optionally, the transmitter 20 and the receiver 30 may be physically independent of each other or integrated together. The transmitter 20 may send data packets to other nodes through the interface 50. The receiver 30 may receive data sent by other nodes through the interface 50.

[0088] Please refer to the following Figure 3 As shown in FIG. 1 , it is a flow chart of a method for establishing a routing table in an embodiment of the present invention. Figure 3 As shown, the method includes:

[0089] Step 101: Generate a first detection data packet, where the first detection data packet has a source address and a destination address;

[0090] Step 102: sending a first detection data packet from a source node corresponding to the source address on a network including at least two nodes until it reaches a destination node corresponding to the destination address, and recording addresses of nodes passed by the first detection data packet to form a first path;

[0091] Step 103: Generate a second path according to the first path; wherein the second path is a reverse path of the first path;

[0092] Step 104: Generate a first response data packet, the first response data packet including the second path;

[0093] Step 105: Sending the first response data packet along the second path until it reaches the source node;

[0094] Step 106: Create a routing table entry according to the second path, wherein the routing table entry includes the destination address, the address of the next hop node, and the outbound interface.

[0095] Specifically, step 101 is performed by the source node S. For example, when a service needs to access the network, the source node S generates a first exploration packet (EP). The first EP has a source address and a destination address. The source address is the IP address of the source node S. The destination address is the IP address of the destination node D.

[0096] Next, step 102 is executed, i.e., the first EP packet is sent from the source address through, for example, the above-mentioned network until it reaches the destination address. Specifically, the first EP packet is first sent by the source node S. If the source node S has only one outgoing interface, i.e., the interface 50 described above, then the transmitter 20 of the source node S sends the first EP to the intermediate node M connected to the interface 50 through the only interface 50. If the source node S has multiple outgoing interfaces, i.e., there are multiple interfaces 50, then the transmitter 20 of the source node S can randomly select an interface 50 to send the first EP to the intermediate node M connected to the interface 50. Of course, in actual use, in addition to using the method of randomly selecting an interface, the source node and the intermediate nodes can also use other methods, such as sending the first EP from a preset fixed interface, or sending the first EP in a broadcast manner.

[0097] When the intermediate node M receives the first EP, it can perform operations similar to those of the source node S, that is, write the address of the intermediate node M into the first EP to form a new first EP, and randomly select one or send the new first EP from a preset fixed interface 50. The above process is repeated at subsequent intermediate nodes M until the first EP reaches the destination node D. At this point, step 102 is completed.

[0098] When the first EP reaches the destination node D, the first EP has recorded the addresses of the nodes it has passed through, and the addresses of the passed nodes form a first path.

[0099] Optionally, the first EP also records the timestamp of reaching each node. The role of the timestamp will be described in detail later.

[0100] It should be noted that the first EP may be set with a survival time (English: Time to live, abbreviated as: TTL), so when the first EP is sent, it may be discarded before reaching the destination node D because the TTL is 0.

[0101] After the first EP reaches the destination node D, the destination node D can execute step 103 and step 104. Specifically, in step 103, the loop in the first path can be removed first, and then the reverse path without the loop is used as the second path. The destination node D generates a first response packet (English: Response Packet, abbreviated as: RP) and carries the second path in the first RP. In other words, the first RP can reach the source node hop by hop according to the second path.

[0102] Next, step 105 is executed. Specifically, the transmitter 20 of the destination node D sends the first RP to the intermediate node M through the second path. For example, it is assumed that the first path is source node S→intermediate node M1→intermediate node M2→intermediate node M3→destination node D. Then the second path is destination node D→intermediate node M3→intermediate node M2→intermediate node M1→source node S. Among them, the intermediate node M indicates that the first EP is forwarded from the intermediate node M. The destination node D sends the first RP to the intermediate node M3 according to the second path.

[0103] When the intermediate node M receives the first RP, it performs an operation similar to that of the destination node D, that is, sends the first RP along the second path. Other intermediate nodes M repeat the above process until the first RP reaches the source node S. At this point, step 105 is completed.

[0104] When the intermediate node M and the source node S receive the first RP, if the routing table entry is not established, or if they want to re-establish the routing table entry, they can execute step 106, that is, establish the routing table entry according to the second path. Specifically, the routing table entry may include the destination address, the address of the next hop node, and the outbound interface. For example, the second path continues to take the above example as an example. When the intermediate node M3 receives the first RP, it performs a destination address match. If it is found that the routing table entry of the destination node D has not been established, it will establish a routing table entry. One possible form of the routing table is shown in Table 1.

[0105] Destination Address Next hop node Outbound interface IP address of destination node D IP address of node D 2

[0106] Table 1

[0107] It should be noted that each node usually interacts with neighboring nodes, so the corresponding relationship between the address of the neighboring node and the outbound interface can be obtained. Therefore, according to the address of the next-hop node in the second path, the outbound interface corresponding to the next-hop node can be obtained. Of course, the intermediate node S and the source node S can also use the interface that receives the first RP packet as the outbound interface of the next-hop node.

[0108] Similarly, when the intermediate node M2 ​​receives the first RP, it performs destination address matching and finds that no routing table entry for the destination node D has been established, so it establishes a routing table entry. A possible form of the routing table is shown in Table 2.

[0109] Destination Address Next hop node Outbound interface IP address of destination node D IP address of intermediate node M3 3

[0110] Table 2

[0111] The intermediate node M repeats the above steps to establish its own routing table entry for the destination node D. When the first RP reaches the source node S, the source node S performs destination address matching and finds that no routing table entry for the destination node D has been established, so it establishes a routing table entry. One possible form of the routing table is shown in Table 3.

[0112] Destination Address Next hop node Outbound interface IP address of destination node D IP address of intermediate node M1 4

[0113] Table 3

[0114] At this point, the source node S and the intermediate node M have established a routing table entry to the destination node D. Therefore, after step 106, when a service data packet needs to be sent from the source node S to the destination node D, the source node S and the intermediate node M can perform routing according to the above routing table entry and forward the service data packet until it reaches the destination node D.

[0115] It can be seen from the above description that in the embodiment of the present invention, the path nodes from the source node S to the destination node D are recorded by detecting the data packet, and then the response data packet is forwarded from the destination node D to the source node S in the reverse path, so that the source node S and the intermediate node D can easily establish routing table entries. Compared with the method of establishing routing table entries described by the IGP protocol in the prior art, the method of establishing a routing table in the embodiment of the present invention is simpler, and each node can achieve zero configuration to establish a routing table.

[0116] Optionally, the first EP also includes a service identifier and / or a service target. Specifically, there are three cases: the first EP also includes a service identifier; or the first EP also includes a service identifier and a service target; or the first EP also includes a service target.

[0117] The service identifier is a unique identifier of the service. For example, the service identifier is a digital certificate for the service, which can be allocated by the source node S or applied for by the source node S to a specific server. The digital certificate is globally unique. For another example, the service identifier of the service can be expressed by the identifier of the source node S plus a serial number.

[0118] Of course, in actual application, the business identifier may not be unique. The business identifier may be combined with other identifiers to uniquely identify a business.

[0119] The service goal may be one or more of the quantified quality of service (QoS) requirements of the user service. For example, the goal may be one or more of minimizing delay, minimizing packet loss rate, minimizing jitter (for voice services), minimizing cost, etc.

[0120] A default service target (such as minimizing the number of hops) may be preset in the network. In this case, the first EP may only include the service identifier or may not include the service identifier.

[0121] Correspondingly, the first RP also includes the service identifier and / or service target. Specifically, whichever is included in the first EP is also included in the first RP.

[0122] Optionally, in step 106, when establishing the routing table entry, the routing table entry also includes a service identifier and / or a service target. That is, the routing table entry may include the service identifier alone, the service target alone, or both the service identifier and the service target. The purpose of the service identifier and the service target in the routing table entry will be described later.

[0123] Therefore, during the execution of step 105, the method also includes: establishing a path evaluation table entry based on the second path, service identifier and / or service target, wherein the path evaluation table entry may include the source address and the destination address, the address of the next hop node and the outgoing interface, the evaluation value of the next hop node and the outgoing interface, the service identifier and / or the service target.

[0124] It should be noted that the service identifier and / or service target as a whole are parallel objects with the second path. The service identifier and / or service target include three situations: one is a separate service identifier, the second is a separate service target, and the third includes both.

[0125] In a specific implementation process, the intermediate node M and the source node S that receive the first RP may establish a path evaluation table entry according to the second path, service target, etc. One possible path evaluation table entry is shown in Table 4 below.

[0126]

[0127] Table 4

[0128] Among them, the evaluation values ​​of the next hop node and the outbound interface are determined according to the business objectives according to the predetermined rules. In actual application, the business objectives can be quantified (such as delay, packet loss rate) and further converted into numerical values, namely the evaluation values. Optionally, when there are multiple objectives, a weight can be set for each objective when quantifying the objectives. When the objectives include delay, it can be determined by the timestamp described above.

[0129] For example, when the source node S receives the first RP, a path evaluation table entry is established according to the second path, service identifier and service target, wherein the service target carried in the first RP is low latency and the service identifier is b1. The established route evaluation table is shown in Table 5 below.

[0130]

[0131]

[0132] Table 5

[0133] In Table 5, the evaluation values ​​are assumed to be values ​​calculated according to the above-described rules or other rules, which are only for example and are not intended to limit the present invention.

[0134] Optionally, in order to monitor the performance of the path and optimize the routing table so that the network can respond more quickly to changes in network traffic and provide adaptive capabilities for the routing table, the method also includes: generating a second probe data packet, the second probe data packet having the source address and the destination address; sending the second probe data packet on the network from the source node according to a predetermined probability according to a pre-established routing table entry until it reaches the destination node, and recording the addresses of the nodes passed by the second probe data packet to form a third path; generating a fourth path according to the third path; wherein the fourth path is the opposite path of the third path; generating a second reply data packet, the second reply data packet including the fourth path; and sending the second reply data packet along the fourth path until it reaches the source node.

[0135] Optionally, if the destination address etc. in the routing table entry matches successfully, and the address and output interface of the next hop in the fourth path are the same as the address and output interface of the next hop in the routing table entry, that is, the address of the next hop is the same, and the output interface of the next hop node is also the same, then the evaluation value of the next hop node and the output interface in the pre-established routing evaluation table entry is updated.

[0136] Optionally, the evaluation values ​​of the next hop node and the outbound interface are updated according to the information carried in the second RP. For example, if the second RP includes a service goal, such as low latency, then the second RP packet will carry the timestamp of reaching each node, so the evaluation values ​​of the next hop node and the outbound interface can be recalculated according to the timestamp, and then the recalculated evaluation values ​​are used to overwrite the original evaluation values. This part of the content can be regarded as an update of the original path information.

[0137] Optionally, the pre-established route evaluation table entry may be established by the aforementioned method or by other means.

[0138] Optionally, when a new service needs to access the network, or for an old service, the source node S may generate a second EP.

[0139] Optionally, the second EP may be sent periodically to perform path monitoring and path exploration.

[0140] Because the source node S and the intermediate node M have established routing table entries to the destination node D through the aforementioned method or other methods, the source node S and the intermediate node M send the second EP from the source node on the network according to the established routing table entries at a predetermined probability until it reaches the destination node D. During this forwarding process, the addresses of the nodes passed by the second EP are recorded to form a third path. This step is similar to the aforementioned step 102 and will not be repeated here.

[0141] After the second EP reaches the destination node D, the destination node obtains the third path recorded in the second EP, and generates a fourth path based on the third path. The fourth path is the reverse path of the third path (if there is a loop in the third path, it is removed). This step is similar to the aforementioned step 103 and will not be repeated here.

[0142] Similar to step 104, the destination node D generates a second RP, wherein the second RP includes the fourth path. Next, a step similar to step 105 is performed. That is, the second RP is sent along the fourth path until it reaches the source node S. During the execution of this step, if the node receiving the second RP, such as the intermediate node M and the source node S, successfully matches in its own routing table entry, and the address and the outbound interface of the next hop of its own address in the fourth path are the same as the address and the outbound interface of the next hop in the routing table entry, the aforementioned evaluation value is updated.

[0143] For example, assuming that the service uses latency as the evaluation criterion, the arrival of the RP will generate a new timestamp and latency value, based on which the evaluation values ​​of the next hop node and the outbound interface can be updated.

[0144] Optionally, the predetermined probability can be set according to actual conditions. For example, assuming the predetermined probability is 95%, in other words, there is a 5% probability that the second EP is randomly routed instead of forwarded according to the original routing table entry. If the second EP is forwarded entirely according to the routing table entry, then the second RP will be successfully matched at the intermediate node and source node S, and the address and outbound interface of the next hop in the fourth path are the same as the address and outbound interface of the next hop in the routing table entry. In other words, such a second EP is used to monitor the original path, and the original path information can be updated according to the monitoring results.

[0145] If the second EP is on some intermediate nodes M or source node S, and is not forwarded according to the routing table entry, then the node receiving the second RP may not be a node in the second path, so the routing table entry to the destination node D has not been established. Therefore, the node receiving the second RP, the intermediate node M, can match by the destination address. If it is found that the routing table entry has not been established, that is, the match is not successful, a new routing table entry can be established in the manner described in step 106. In this embodiment, the second EP can be used to explore new paths, which is conducive to achieving multi-path coexistence.

[0146] Optionally, a new path evaluation table entry may be established in the manner described above.

[0147] Optionally, if the second EP is on some intermediate nodes M or source node S and is not forwarded according to the routing table entry, then the node receiving the second RP may also be a node in the second path, such as the intermediate node M3, and the routing table entry will be matched successfully. However, although the destination address matches, the address of the next hop and the outbound interface of the address of the intermediate node M3 in the fourth path may be different from the address and the outbound interface of the next hop obtained in step 106. At this time, the address and outbound interface of the new next hop node can be added to the aforementioned routing table entry, and the evaluation value of the new next hop node and the outbound interface can be added to the aforementioned path evaluation table entry. Alternatively, determine whether to update the routing table entry. In this embodiment, it can be regarded as an exploration of a new path, which is conducive to finding a better path.

[0148] Optionally, the updated routing table entry can be determined based on the evaluation value of the new next hop node and the outgoing interface and the evaluation value of the original next hop node and the outgoing interface. For example, assuming that the goal is low latency, the evaluation value of the original next hop node and the outgoing interface is 0.05, and the evaluation value of the new next hop node and the outgoing interface determined based on the business goal and the new timestamp in the fourth path is 0.04, then the routing table is optimized, and the business data packet will be forwarded according to the path of the new next hop node in the future.

[0149] Of course, in actual application, it is also possible to determine whether to update the routing table based on other rules, for example: determine the evaluation values ​​of the new next hop node and the outbound interface, input the evaluation values ​​of the new next hop node and the outbound interface into the random neural network, and determine whether to update the routing table based on the calculation results of the random neural network; wherein each neuron of the random neural network corresponds to an outbound interface, and the random neural network is trained by the evaluation values ​​of the historical next hop nodes and outbound interfaces.

[0150] For example, an artificial neural network can be established for each service at the intermediate node M, for example, the granularity can be a triple (source address, destination address, service identifier or target). The neural network is trained with the real-time measurement values ​​of the above network, such as evaluation values, through a machine learning algorithm, and a decision is made whether to update the routing table based on the training results. The following is a brief description of the implementation of a random artificial neural network in an embodiment of the present invention. For example, each interface 50 of the intermediate node M corresponds to a neuron. Neurons have two properties, one is the excitation weight, and the other is the inhibition weight. The intermediate node M obtains the evaluation value G in the aforementioned manner, and then R=1 / G. Then a threshold is calculated according to a predetermined algorithm, for example, T k =aT k-1 +(1-a)R k , where a ranges from (0-1) and is used to adjust T k-1 and R k The weight, T k is a dynamic value to track the value of historical rewards, k = 1, 2, 3, ..., is the measurement value of the continuously generated reward value R. Then according to the T k-1 and R k The size of the two properties of the neuron determines the increase in magnitude. Specifically, when T k-1 Less than or equal to R k , then the reward operation is triggered, the excitation weight leading to neuron 2 (assuming that the neuron corresponding to the current output interface is neuron 2) will increase significantly, and the inhibition weight leading to other neurons will increase slightly. k-1 Greater than R k , then the penalty operation is triggered, the inhibition weight leading to neuron 2 will increase significantly, and the excitation weight leading to other neurons will increase slightly. When a new evaluation value is obtained, the above method is continued to be used to train the neural network, and finally the operation result of the neural network is selected as the next hop output interface. In principle, the output interface with a higher excitation value is more likely to be selected. If the newly selected output interface is different from the previous output interface, the routing table can be updated.

[0151] Optionally, if the second EP is on some intermediate nodes M or source node S and is not forwarded according to the routing table entry, then the node receiving the second RP may also be a node in the second path, such as the intermediate node M1, and the routing table entry will be matched successfully. Assuming that the destination address matches on M1, and the address of the next hop and the outbound interface of the address of the intermediate node M1 in the fourth path are the same as the address and the outbound interface of the next hop obtained in step 106, at this time, optionally, the evaluation value of the next hop node and the outbound interface in the aforementioned path evaluation table entry can be updated.

[0152] The above describes the implementation method of establishing, monitoring and optimizing the routing table. The following describes how to forward the service data packet.

[0153] The IP forwarding of the present invention supports further forwarding according to the destination address and the service identifier / service target, but can also be compatible with traffic without service targets and service identifiers. That is, when establishing an IP routing table, entries of service identifiers and / or service targets are added at the same time. If a data message carries a service identifier and a service target, the longest match is performed, and an outbound interface is selected according to an outbound interface that matches the service identifier / service target.

[0154] Specifically, for the source node S and the intermediate node M, the method includes:

[0155] Receiving a service data packet; the service data packet has a destination address and includes a service identifier and / or a service target;

[0156] Performing the longest match in a pre-established routing table entry according to the destination address, the service identifier and / or the service target, the routing table entry including the destination address, the address and outbound interface of the next hop node, the service identifier and / or the service target;

[0157] The service data packet is sent through the address of the next hop node and the outbound interface of the successfully matched routing table entry.

[0158] It should be noted that the description method of the service identifier and / or service target in this embodiment is aimed at the service identifier and service target. The service identifier and / or service target are listed as a whole with other target objects.

[0159] Optionally, in this embodiment, the longest match principle means that when there are multiple entries in the routing table in the IP network that can match the destination address, the one with the longest (most accurate) mask is generally used as the match item and determines the next hop. It is also called the longest prefix match, which is the algorithm used by the router to select a route when searching the routing table.

[0160] For example, consider the following IPv4 routing table:

[0161] 192.168.20.16 / 28e0

[0162] 192.168.0.0 / 16s0

[0163] When searching for the destination address 192.168.20.19, it is not difficult to find that both of the above two match, that is, both contain the destination address to be searched. At this time, according to the longest mask matching principle, the first one is selected for matching (more clear), so the data packet will be sent out through e0.

[0164] For another example, in the IPv6 scenario, consider the following IPv6 routing table:

[0165] 2001:db8:21d0:3f48:1b9:88d1:cf98:fcaf / 128e0

[0166] :: / 0s0

[0167] When searching for the destination address 2001:db8:21d0:3f48:1b9:88d1:cf98:fcaf, it is found that both of the above two match, that is, both of them contain the destination address to be searched. At this time, according to the longest mask matching principle, the first one is selected for matching (more clear), so the data packet will be sent out through e0.

[0168] Optionally, a successful match in this embodiment means that the destination address, service identifier and / or service target are all matched. Because in the prior art, aggregation is performed only according to the destination address, but the service is not distinguished, resulting in a relatively large granularity of the traditional routing solution, while in the embodiment of the present invention, aggregation is performed according to the destination address + service identifier and / or service target, so the granularity is slightly lower.

[0169] The following will describe the method of establishing a routing table on the side of the intermediate node on the path between the source node corresponding to the source address, or the destination node corresponding to the destination address. For the convenience of description, they will be collectively referred to as the first node. Figure 4 As shown, it is a flow chart of a method for establishing a routing table on a first node side provided by an embodiment of the present invention, and the method includes:

[0170] Step 201: A first node obtains a first detection data packet, where the first detection data packet has a source address and a destination address;

[0171] Step 202: The first node obtains a new first detection data packet; when the first node is an intermediate node, the first node records the address of the first node in the first detection data packet to form a new first detection data packet; when the first node is a source node, the new first detection data packet is the first detection data packet in step 201;

[0172] Step 203: The first node sends a new first detection data packet;

[0173] Step 204: The first node receives a first response data packet, the first response data packet includes a second path, the second path is the opposite path of the first path (if there is a loop, it is removed); the first path is the address of the node passed by the new first detection data packet;

[0174] Step 205: The first node establishes a routing table entry according to the previous address of the address of the first node in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

[0175] Among them, the previous address is filled in the address column of the next hop node of the routing table entry.

[0176] When the first node is a source node S, step 201 includes: the first node generates a first EP. For example, the processor 10 of the first node may generate the first EP.

[0177] When the first node is an intermediate node M, step 201 includes: the first node receives a first EP. For example, the receiver 30 of the first node receives the first EP through the interface 50 .

[0178] In step 202, for example, the processor 10 of the first node encapsulates the address of the first node in the first EP to form a new first EP.

[0179] In step 203 , for example, the transmitter 20 of the first node sends a new first EP through the interface 50 .

[0180] In step 204 , the receiver 30 , for example, of the first node, receives the first RP through the interface 50 .

[0181] For details of the implementation of step 205, please refer to the above description of step 106. Specifically, step 205 may be executed by the processor 10 of the first node.

[0182] Optionally, the method further includes: the first node establishes a path evaluation table entry, wherein the path evaluation table entry includes the source address and the destination address, the address of the next hop node and the outgoing interface, the evaluation value of the next hop node and the outgoing interface, the service identifier and / or the service target. The address of the next hop node is the previous address. The specific implementation process has been described above and will not be repeated here. This step can be performed by the processor 10 of the first node.

[0183] Optionally, step 203 includes: the first node randomly selects a next hop node and an outgoing interface to send a new first detection data packet. In actual use, it can also be sent according to other rules, such as sending a new first EP through a preset fixed interface, or sending a new first EP in the form of broadcast.

[0184] Optionally, the method further includes: the first node obtains a second detection data packet, the second detection data packet has the source address and the destination address; obtains a new second detection data packet; wherein, when the first node records the address of the first node in the second detection data packet, a new second detection data packet is formed; when the first node is the source node, the new second detection data packet is the second detection data packet; the first node sends a new second detection data packet according to the routing table entry according to a predetermined probability; the first node receives a second response data packet, the second response data packet includes a fourth path, the fourth path is the opposite path of the third path (if there is a loop, it is removed); the third path is the address of the node passed by the new second detection data packet; if the match is successful in the routing table entry, and the previous address of the address of the first node in the fourth path is the same as the address of the next hop node in the routing table entry, optionally, the first node updates the next hop address in the path evaluation table entry and the evaluation value of the outbound interface. Please refer to the above description for the specific implementation process of this method, which will not be repeated here.

[0185] Furthermore, the method further includes: if no match is found in the routing table entry, the first node establishing a new routing table entry according to a previous address of the first node in the fourth path.

[0186] Furthermore, the method further includes: if the match in the routing table entry is successful, and the previous address of the address of the first node in the fourth path is different from the address of the next hop node in the routing table entry, optionally, determining whether to update the routing table entry.

[0187] Optionally, determining whether to update the routing table entry includes: the first node determines an evaluation value of a new next hop node and an outgoing interface; the first node determines whether to update the routing table entry based on the evaluation value of the new next hop node and the outgoing interface and the evaluation value of the next hop node and the outgoing interface in the path evaluation table entry.

[0188] Alternatively, determine the evaluation value of the new next hop node and the outbound interface; input the evaluation value of the new next hop node and the outbound interface into a random neural network, and determine whether to update the routing table based on the calculation result of the random neural network; wherein each neuron of the random neural network corresponds to an outbound interface, and the random neural network is trained with the evaluation values ​​of historical next hop nodes and outbound interfaces.

[0189] The implementation of the above method steps has been described above, so they will not be repeated here.

[0190] Next, we will describe another method of creating a routing table. Figure 5 As shown, the method includes:

[0191] Step 301: Generate a first detection data packet, wherein the first detection data packet has a source address and a destination address;

[0192] Step 302: sending the first detection data packet from the source node corresponding to the source address on a network including at least two nodes until it reaches the destination node corresponding to the destination address, and recording the addresses of the nodes passed by the first detection data packet to form a first path;

[0193] Step 303: Generate a second path according to the first path; wherein the second path is a reverse path of the first path;

[0194] Step 304: Generate a first response data packet, wherein the first response data packet includes the second path;

[0195] Step 305: Send the first response data packet along the second path until it reaches the source node;

[0196] Step 306: Generate a first path establishment packet, wherein the first path establishment packet includes a reverse path of the second path;

[0197] Step 307: Create a routing table entry according to the reverse path, wherein the routing table entry includes the destination address, the address of the next hop node, and the outbound interface.

[0198] The specific implementation of steps 301 to 305 is similar to the above-mentioned steps 101 to 105. The specific implementation of step 307 is similar to that of step 106.

[0199] In step 306, the second path is the reverse path of the first path with the loop removed.

[0200] Optionally, the path establishment packet carries the bandwidth requirement of the service, and the nodes on the path pre-allocate bandwidth resources for the service. In this method, the source node may receive multiple RP packets carrying the second path, and the source node may select one or more paths to transmit the service and meet the bandwidth requirement of the service.

[0201] It can be seen from the above description that the method in the embodiment of the present invention avoids the risk of routing loops caused by each router independently deciding the forwarding interface, and further, the method in the embodiment of the present invention supports reserving resources on the path and provides better support for multi-path transmission services.

[0202] Optionally, the routing table entry also includes a service identifier and / or a service target.

[0203] Optionally, the method further includes: for the source node, if a routing table entry has been established, and the outgoing interface in the established routing table entry is inconsistent with the outgoing interface corresponding to the reverse path, determining whether the outgoing interface corresponding to the reverse path is better; when the outgoing interface corresponding to the reverse path is better, updating the established routing table entry. This step can be specifically performed by the processor 10 of the source node.

[0204] Optionally, determine whether the output interface corresponding to the opposite path is better. Specifically, it can be determined by the size of the evaluation value of the output interface, or by, for example, the aforementioned random artificial network method. The specific implementation process is similar to the aforementioned one, so it will not be repeated here.

[0205] Optionally, after step 307, the method further includes: sending a first path establishment packet to other intermediate nodes on the reverse path, so that the other intermediate nodes establish routing table entries according to the reverse path.

[0206] Optionally, the method also includes: generating a second probe data packet, the second probe data packet having the source address and the destination address; sending the second probe data packet from the source node on the network according to a predetermined probability according to a pre-established routing table entry until it reaches the destination node, and recording the addresses of the nodes passed by the second probe data packet to form a third path; generating a fourth path according to the third path; wherein the fourth path is the opposite path of the third path; generating a second reply data packet, the second reply data packet including the fourth path; sending the second reply data packet along the fourth path until it reaches the source node; if the match in the routing table entry is successful, and the address of the next hop and the output interface in the fourth path are the same as the address of the next hop and the output interface in the routing table entry, updating the evaluation value of the next hop node and the output interface in the pre-established path evaluation table entry.

[0207] The execution subject of the last step of the method is the source node, and the pre-established routing table can be Figure 3 The method shown can also be established by Figure 5 The rest of this part is similar to the content of the second EP package described above, so it will not be repeated here.

[0208] Please refer to the following Figure 6 As shown, Figure 5 Flow chart of the source node side of the method shown. The method comprises:

[0209] Step 401: A source node generates a first detection data packet, the first detection data packet having a source address and a destination address; the source address is the address of the source node;

[0210] Step 402: The source node sends a first detection data packet;

[0211] Step 403: The source node receives a first response data packet, the first response data packet includes a second path, the second path is the opposite path of the first path; the first path is the address of the node passed by the first detection data packet;

[0212] Step 404: The source node generates a first path establishment packet, wherein the first path establishment packet includes a first path;

[0213] Step 405: The source node establishes a routing table entry according to the address of the next hop node of the source address in the first path and the outbound interface; wherein the routing table entry includes the destination address, the address of the next hop node and the outbound interface.

[0214] Among them, step 401 is similar to step 201 , step 402 is similar to step 203 , and steps 404 to 405 are similar to steps 306 to 307 .

[0215] Optionally, the method also includes: if a routing table entry has been established, and the outgoing interface in the established routing table entry is inconsistent with the outgoing interface corresponding to the first path, the source node determines whether the outgoing interface corresponding to the first path is better; when the outgoing interface corresponding to the first path is better, the source node updates the established routing table entry.

[0216] Optionally, the method also includes: the source node sends a first path establishment packet to an intermediate node between the source node and the destination node in the first path, so that the intermediate node updates its respective routing table entries according to the next hop address and output interface of the address of the intermediate node in the first path.

[0217] Optionally, the method also includes: the source node generates a second probe data packet, the second probe data packet has the source address and the destination address; the source node sends the second probe data packet according to the routing table entry at a predetermined probability; the source node receives a second reply data packet, the second reply data packet includes a fourth path, the fourth path is the opposite path of the third path; the third path is the address of the node passed by the second probe data packet; if the match is successful in the routing table entry, and the address of the next hop of the source address in the fourth path and the output interface are the same as the address and output interface of the next hop in the routing table entry, optionally, the source node updates the evaluation value of the next hop node and the output interface in the pre-established path evaluation table entry.

[0218] Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, please refer to Figure 7As shown, the electronic device includes: a processing unit 401 , a sending unit 402 and a receiving unit 403 .

[0219] The electronic device can be used to implement any of the methods described above. In actual use, other unit modules can also be configured according to actual needs.

[0220] Specifically, when the electronic device is used to implement Figure 4 In the method shown, a processing unit 401 is used to obtain a first detection data packet, the first detection data packet has a source address and a destination address; the electronic device is a source node corresponding to the source address or an intermediate node on the path between the source node and the destination node corresponding to the destination address; and a new first detection data packet is obtained based on the first detection data packet; wherein, when the electronic device is the intermediate node, the address of the electronic device is recorded in the first detection data packet to form the new first detection data packet; when the electronic device is the source node, the new first detection data packet is the first detection data packet; a sending unit 402 is used to send the new first detection data packet; a receiving unit 403 is used to receive the first response data packet, the first response data packet includes a second path, the second path is the opposite path of the first path; the first path is the address of the node passed by the new first detection data packet; the processing unit 401 is also used to: establish a routing table entry according to the previous address of the address of the electronic device in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

[0221] Optionally, the processing unit 401 is also used to: establish a path evaluation table entry, wherein the path evaluation table entry includes the source address and the destination address, the address of the next hop node and the outgoing interface, the evaluation value of the next hop node and the outgoing interface, the service identifier and / or service target; wherein the address of the next hop node is the previous address.

[0222] Optionally, the sending unit 402 is used to randomly select a next hop node and an outbound interface to send the new first detection data packet.

[0223] Optionally, the processing unit 401 is further used to: obtain a second detection data packet, the second detection data packet has the source address and the destination address; and obtain a new second detection data packet based on the second detection data packet; wherein, when the electronic device is the intermediate node, the address of the electronic device is recorded in the first detection data packet to form the new first detection data packet; when the electronic device is the source node, the new first detection data packet is the first detection data packet;

[0224] The sending unit 402 is further configured to: send the new second detection data packet according to the routing table entry at a predetermined probability;

[0225] The receiving unit 403 is further configured to: receive a second response data packet, wherein the second response data packet includes a fourth path, wherein the fourth path is a reverse path of the third path; and the third path is an address of a node passed by the new second detection data packet;

[0226] The processing unit 401 is also used to: if the match in the routing table entry is successful, and the previous address of the address of the electronic device in the fourth path is the same as the address of the next hop node in the routing table entry, update the evaluation value of the next hop node and the output interface in the path evaluation table entry.

[0227] Optionally, the processing unit 401 is further configured to: if no match is successful in the routing table entry, create a new routing table entry according to a previous address of the address of the electronic device in the fourth path.

[0228] Optionally, the processing unit 401 is further used to: if the match in the routing table entry is successful, and the previous address of the address of the electronic device in the fourth path is different from the address of the next hop node in the routing table entry, determine whether to update the routing table entry.

[0229] Optionally, the processing unit 401 is used to: determine the evaluation value of the new next hop node and the outgoing interface; and determine whether to update the routing table entry based on the evaluation value of the new next hop node and the outgoing interface and the evaluation value of the next hop node and the outgoing interface in the path evaluation table entry.

[0230] Optionally, the processing unit 401 is used to: determine an evaluation value of a new next hop node and an outgoing interface; input the evaluation value of the new next hop node and the outgoing interface into a random neural network, and determine whether to update the routing table based on the calculation results of the random neural network; wherein each neuron of the random neural network corresponds to an outgoing interface, and the random neural network is trained with the evaluation values ​​of historical next hop nodes and outgoing interfaces.

[0231] Specifically, when the electronic device is used to implement the aforementioned routing table establishment method on the source node side, the processing unit 401 is used to generate a first detection data packet, the first detection data packet has a source address and a destination address; the source address is the address of the electronic device; the electronic device serves as a source node; the sending unit 402 is used to send the first detection data packet; the receiving unit 403 is used to receive a first response data packet, the first response data packet includes a second path, the second path is the opposite path of the first path; the first path is the address of the node passed by the first detection data packet; the processing unit 401 is also used to: generate a first path establishment packet, the first path establishment packet includes the first path; establish a routing table entry according to the address of the next hop node of the source address in the first path and the outgoing interface; wherein the routing table entry includes the destination address, the address of the next hop node and the outgoing interface.

[0232] Optionally, the processing unit 401 is also used to: if a routing table entry has been established, and the outgoing interface in the established routing table entry is inconsistent with the outgoing interface corresponding to the first path, determine whether the outgoing interface corresponding to the first path is better; when the outgoing interface corresponding to the first path is better, update the established routing table entry.

[0233] Optionally, the sending unit 402 is also used to: send a first path establishment packet to an intermediate node between the source node and the destination node in the first path, so that the intermediate node updates its respective routing table entries according to the next hop address and outbound interface of the address of the intermediate node in the first path.

[0234] Optionally, the processing unit 401 is further configured to: generate a second detection data packet, wherein the second detection data packet has the source address and the destination address;

[0235] The sending unit 402 is further configured to: send the second detection data packet according to the routing table entry at a predetermined probability;

[0236] The receiving unit 403 is further configured to: receive a second response data packet, wherein the second response data packet includes a fourth path, wherein the fourth path is a reverse path of the third path; and the third path is an address of a node passed by the second detection data packet;

[0237] The processing unit 401 is also used to: if the match is successful in the routing table entry, and the address of the next hop and the outgoing interface of the source address in the fourth path are the same as the address and the outgoing interface of the next hop in the routing table entry, update the evaluation value of the next hop node and the outgoing interface in the pre-established path evaluation table entry.

[0238] Specifically, when the electronic device is used to implement the aforementioned service data packet sending method, the receiving unit 403 is used to receive the service data packet; the service data packet has a destination address and contains a service identifier and / or a service target; the processing unit 401 is used to perform the longest match in a pre-established routing table entry according to the destination address, the service identifier and / or the service target, and the routing table entry includes the destination address, the address of the next hop node and the output interface, the service identifier and / or the service target; the sending unit 402 is used to send the service data packet through the address of the next hop node and the output interface of the successfully matched routing table entry.

[0239] Various variations and specific examples of the methods in the aforementioned embodiments are also applicable to the electronic device of this embodiment. Through the aforementioned detailed description of each method, those skilled in the art can clearly understand the implementation method of the inter-domain routing device in this embodiment, so for the sake of brevity of the specification, it will not be described in detail here.

[0240] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0241] The present invention is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0242] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0243] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0244] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for establishing a routing table, characterized in that: include: The first node obtains a first detection data packet, where the first detection data packet has a source address and a destination address; The first node is a source node corresponding to the source address; The first node randomly selects a next hop node and an outbound interface to send the first detection data packet, or sends the first detection data packet to the next hop node through a preset fixed outbound interface; The first node receives a first response data packet, the first response data packet includes a second path, the second path is a reverse path of the first path; the first path includes an address of a node passed by the first detection data packet; The first node establishes a routing table entry according to the previous address of the address of the first node in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

2. The method according to claim 1, characterized in that The method further comprises: The first node establishes a path evaluation table entry, wherein the path evaluation table entry includes the destination address, the address of the next hop node and the outbound interface, and the evaluation value of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

3. The method according to claim 2, characterized in that The path evaluation table entry also includes the source address.

4. The method according to any one of claims 1 to 3, characterized in that: The first response data packet also includes a service identifier and / or a service target.

5. The method according to claim 2 or 3, characterized in that: The path evaluation table entry also includes a service identifier and / or a service target.

6. The method according to any one of claims 1 to 3, characterized in that: The second path is a reverse path of the first path with a loop removed.

7. The method according to any one of claims 1 to 3, characterized in that: Also includes: The source node generates a first path establishment packet, wherein the first path establishment packet includes a reverse path of the second path; The source node sends the first path establishment packet to the intermediate nodes in the reverse path of the second path, so that the intermediate nodes establish their own routing table entries according to the reverse path of the second path.

8. A method for establishing a routing table, characterized in that: include: The first node receives a first detection data packet, wherein the first detection data packet has a source address and a destination address; The first node is an intermediate node on a path between a source node and a destination node corresponding to the destination address; The first node records the address of the first node in the first detection data packet to form a new first detection data packet; The first node randomly selects a next hop node and an outbound interface to send the new first detection data packet, or sends the new first detection data packet to the next hop node through a preset fixed outbound interface; The first node receives a first response data packet, the first response data packet includes a second path, the second path is a reverse path of the first path; the first path includes an address of a node passed by the new first detection data packet; The first node establishes a routing table entry according to the previous address of the address of the first node in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

9. The method according to claim 8, characterized in that The method further comprises: The first node establishes a path evaluation table entry, wherein the path evaluation table entry includes the destination address, the address of the next hop node and the outbound interface, and the evaluation value of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

10. The method according to claim 9, characterized in that The first response data packet further includes a service identifier and / or a service target, and the path evaluation table entry further includes the service identifier and / or the service target.

11. The method according to any one of claims 8 to 10, characterized in that: The second path is a reverse path of the first path with a loop removed.

12. A method for establishing a routing table, characterized in that: include: The first node receives a first path establishment packet sent by a source node, the first path establishment packet includes a first path, the first path is a path from the source node to a destination node, and the first node is an intermediate node of the first path; wherein the first path establishment packet is generated by the source node according to a received first response data packet, the first response data packet is sent by the destination node to the source node, the first response data packet includes a second path, and the second path is a reverse path of the first path; The first node establishes a routing table entry to the destination node according to the first path establishment packet.

13. The method according to claim 12, characterized in that The second path is a reverse path of the first path with a loop removed.

14. An electronic device, characterized in that: include: A processing unit, configured to obtain a first detection data packet, wherein the first detection data packet has a source address and a destination address; the electronic device is a source node corresponding to the source address; A sending unit, configured to randomly select a next hop node and an outgoing interface to send the first detection data packet, or to send the first detection data packet to the next hop node through a preset fixed outgoing interface; A receiving unit, configured to receive a first response data packet, wherein the first response data packet includes a second path, the second path being a reverse path of the first path; the first path includes an address of a node passed by the first detection data packet; The processing unit is also used to establish a routing table entry according to the previous address of the address of the electronic device in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the output interface; wherein the address of the next hop node is the previous address.

15. The electronic device according to claim 14, characterized in that: The processing unit is also used to establish a path evaluation table entry, wherein the path evaluation table entry includes the destination address, the address of the next hop node and the outbound interface, and the evaluation value of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

16. The electronic device according to claim 15, characterized in that: The path evaluation table entry also includes the source address.

17. The electronic device according to any one of claims 14 to 16, characterized in that: The first response data packet also includes a service identifier and / or a service target.

18. The electronic device according to claim 15 or 16, characterized in that: The path evaluation table entry also includes a service identifier and / or a service target.

19. The electronic device according to any one of claims 14 to 16, characterized in that: The second path is a reverse path of the first path with a loop removed.

20. The electronic device according to any one of claims 14 to 16, characterized in that: The processing unit is further configured to generate a first path establishment packet, wherein the first path establishment packet includes a reverse path of the second path; The sending unit is further configured to send the first path establishment packet to an intermediate node in a reverse path of the second path, so that the intermediate node establishes a respective routing table entry according to the reverse path of the second path.

21. An electronic device, characterized in that: include: A receiving unit, configured to receive a first detection data packet, wherein the first detection data packet has a source address and a destination address; The electronic device is an intermediate node on a path between a source node and a destination node corresponding to the destination address; a processing unit, configured to record the address of the electronic device in the first detection data packet to form a new first detection data packet; A sending unit, configured to randomly select a next hop node and an outgoing interface to send the new first detection data packet, or to send the new first detection data packet to the next hop node through a preset fixed outgoing interface; The receiving unit is further used to receive a first response data packet, wherein the first response data packet includes a second path, and the second path is a reverse path of the first path; the first path includes an address of a node passed by the new first detection data packet; The processing unit is also used to establish a routing table entry according to the previous address of the address of the electronic device in the second path; wherein the routing table entry includes the destination address, the address of the next hop node and the output interface; wherein the address of the next hop node is the previous address.

22. The electronic device according to claim 21, characterized in that: The processing unit is also used to establish a path evaluation table entry, wherein the path evaluation table entry includes the destination address, the address of the next hop node and the outbound interface, and the evaluation value of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

23. The electronic device according to claim 22, characterized in that: The path evaluation table entry also includes a service identifier and / or a service target.

24. The electronic device according to any one of claims 21 to 23, characterized in that: The first response data packet also includes a service identifier and / or a service target.

25. An electronic device, characterized in that: include: a receiving unit, configured to receive a first path establishment packet sent by a source node, wherein the first path establishment packet includes a first path, the first path is a path from the source node to a destination node, and the electronic device is an intermediate node of the first path; wherein the first path establishment packet is generated by the source node according to a received first response data packet, the first response data packet is sent by the destination node to the source node, and the first response data packet includes a second path, and the second path is a reverse path of the first path; A processing unit is used to establish a routing table entry to the destination node according to the first path establishment packet.

26. The electronic device according to claim 25, characterized in that The second path is a reverse path of the first path with a loop removed.

27. A network, characterized in that The network includes a source node, a destination node, and an intermediate node located between the source node and the destination node. The source node is used to generate a first detection data packet and send the first detection data packet to an adjacent intermediate node, wherein the first detection data packet has a source address of the source node and a destination address of the destination node; The intermediate nodes starting from the adjacent intermediate nodes to the adjacent intermediate nodes of the destination node are used to send the first detection data packet in sequence until reaching the destination node, and record their respective addresses in the first detection data packet to form a first path; wherein the source node or the intermediate node randomly selects a next hop node and an outgoing interface, or sends the first detection data packet to the next hop node through a preset fixed outgoing interface; The destination node is used to generate a second path according to the first path and generate a first response data packet; wherein the second path is a reverse path of the first path; the first response data packet includes the second path; the destination node and the intermediate node are used to send the first response data packet along the second path until it reaches the source node; The source node establishes a routing table entry according to the second path, and the routing table entry includes the destination address, the address of the next hop node, and the outbound interface.

28. The network of claim 27, wherein: The source node is further configured to generate a first path establishment packet, wherein the first path establishment packet includes a reverse path of the second path; and to send the first path establishment packet to an adjacent intermediate node; The intermediate nodes starting from the adjacent intermediate node to the adjacent intermediate node of the destination node are used to establish a routing table entry according to the first path establishment packet when receiving the first path establishment packet.

29. A network according to claim 27 or 28, characterized in that The source node is also used to establish a path evaluation table entry, wherein the path evaluation table entry includes the destination address, the address of the next hop node and the outbound interface, and the evaluation value of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.

Citation Information

Patent Citations

  • Method for establishing path in wavelength division network, communication node and communication system

    CN102158300A