WO2017113238A1 - 一种建立路由表的方法、电子设备及网络 - Google Patents

一种建立路由表的方法、电子设备及网络 Download PDF

Info

Publication number
WO2017113238A1
WO2017113238A1 PCT/CN2015/099971 CN2015099971W WO2017113238A1 WO 2017113238 A1 WO2017113238 A1 WO 2017113238A1 CN 2015099971 W CN2015099971 W CN 2015099971W WO 2017113238 A1 WO2017113238 A1 WO 2017113238A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
path
address
data packet
next hop
Prior art date
Application number
PCT/CN2015/099971
Other languages
English (en)
French (fr)
Inventor
蒋胜
杜宗鹏
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202010982742.4A priority Critical patent/CN112217723A/zh
Priority to CN202010981133.7A priority patent/CN112152921B/zh
Priority to CN201580057570.7A priority patent/CN107431968B/zh
Priority to PCT/CN2015/099971 priority patent/WO2017113238A1/zh
Priority to EP15911867.8A priority patent/EP3389310B1/en
Publication of WO2017113238A1 publication Critical patent/WO2017113238A1/zh
Priority to US16/022,729 priority patent/US10708167B2/en
Priority to US16/903,338 priority patent/US11658896B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/26Route discovery packet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/28Connectivity information management, e.g. connectivity discovery or connectivity update for reactive routing

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, an electronic device, and a network for establishing a routing table.
  • the Interior Gateway Protocol is a protocol for exchanging routing information between gateways (hosts and routers) within an autonomous network. Routing information can be used for Internet Protocol (English: Internet Protocol, IP for short) or other network protocols to illustrate how routing is performed.
  • each interface of each router is set with an IP address, where the router is a forwarding device that forwards IP packets.
  • OSPF Open Shortest Path First
  • router ID RouteerID
  • area-id area-id
  • associated IP and wildcard mask etc.
  • the IGP routing protocol includes the following: Each router periodically sends its own interface information (including the cost value of the link) to the perimeter, and also forwards the interface information sent by other routers. After each router's information is fully sent to each router in the network, each router will calculate a topology map of the entire network. Each router calculates a shortest path tree that takes itself as the root node and reaches any other known node (ie, the network segment of its interfaces) through its own network topology map, and then generates a routing table.
  • the index entries of the routing table are all the network segments learned during the information exchange process, and the forwarding entries corresponding to each network segment are filled in according to the outgoing interface and the next hop of the topology guide of the tree. Therefore, a possible IP routing entry includes the destination IP address of the packet, the IP address of the next hop, and the outbound interface of the next hop.
  • the way to establish a routing table through the IGP routing protocol requires more parameters to be configured on each routing node. For example, you need to configure the process ID, router ID, area ID, associated IP, and wildcard mask on the router. Wait.
  • the embodiments of the present invention provide a method, an electronic device, and a network for establishing a routing table, which are used to solve the technical problem that the method for establishing a routing table in the prior art needs to be configured with more parameters and cannot implement zero configuration.
  • an embodiment of the present invention provides a method for establishing a routing table, including:
  • the first node obtains a first probe data packet, where the first probe data packet has a source address and a destination address; the first node is a source node corresponding to the source address or the source node corresponds to the destination address An intermediate node on the path of the destination node; the first node obtains a new first probe data packet; wherein, when the first node is the intermediate node, the first node is the first node The address is recorded in the first probe data packet to form the new first probe data packet; when the first node is the source node, the new first probe data packet is the first a probe data packet; the first node sends the new first probe data packet; the first node receives the first response data packet, and the first response data packet includes a second path, where The second path is an opposite path of the first path; the first path is an address of a node through which the new first probe data packet passes; the first node is according to the first node in the second path Address of the previous address established The table entry; wherein the routing table entry
  • the path node from the source node to the destination node is recorded by the probe data packet, and then the destination node to the source node are forwarded through the response packet reverse path, so that the source node and the middle node
  • the method for establishing a routing table in the embodiment of the present invention is simpler, and each node can implement zero configuration.
  • the method for establishing a routing table is simpler than that of the routing table entry described in the prior art. Establish a routing table.
  • the first node Establishing a path evaluation entry, where the path evaluation entry includes the source address and the destination address, an address of the next hop node, and an evaluation value of the outbound interface, the next hop node, and the outbound interface, a service identifier and/or a service target; wherein the address of the next hop node is the previous address.
  • This embodiment is used to evaluate routing entries to facilitate monitoring and optimization of routing entries.
  • the first node sends the new first probe data packet, including: The first node randomly selects a next hop node and the outbound interface sends the new first probe data packet.
  • an embodiment of the present invention provides a method for managing a routing table, including:
  • the first node obtains a second probe data packet, where the second probe data packet has a source address and a destination address; the first node is a source node corresponding to the source address or the source node corresponds to the destination address An intermediate node on the path of the destination node; the first node obtains a new second probe data packet; wherein, when the first node is the intermediate node, the first node is the first node Addressing the second probe data packet to form the new second probe data packet; when the first node is a source node, the new second probe data packet is the second probe a data packet; the first node sends the new second probe data packet according to a pre-established routing entry according to a predetermined probability; the first node receives a second response data packet, where the second response data packet includes a fourth path, where the fourth path is an opposite path of the third path; the third path is an address of a node through which the new second probe data packet passes; if the matching is successful in the routing entry, And said When the previous
  • the pre-established routing table is monitored by using the probe packet and the response packet to improve the adaptive capability of the routing table.
  • the method further includes: if the matching is not successful in the routing entry, the first node is according to the fourth path The previous address of the address of the first node is used to establish a new routing entry.
  • This embodiment can be used to discover new paths, thereby implementing multi-path coexistence.
  • the method further includes:
  • the first The node determines whether to update the routing entry.
  • the method in this embodiment can be used to optimize routing entries so that the routing table has higher adaptive capabilities.
  • the second aspect or the first possible implementation of the second aspect or the second possible implementation of the second aspect may be combined with the first aspect or the first possible implementation of the first aspect or the first aspect The second possible implementation.
  • an embodiment of the present invention provides a method for establishing a routing table, including: a source node generates a first probe data packet, where the first probe data packet has a source address and a destination address; and the source address is the source An address of the node; the source node sends the first probe data packet; the source node receives a first response data packet, the first response data packet includes a second path, and the second path is a first path An opposite path; the first path is an address of a node through which the first probe data packet passes; the source node generates a first path establishment packet, and the first path establishment packet includes the first path; The source node establishes a routing entry according to the address of the next hop node of the source address and the outbound interface in the first path, where the routing entry includes the destination address and the next hop node Address and outgoing interface.
  • the path node from the source node to the destination node is recorded by the probe data packet, and then the destination node to the source node is forwarded through the response packet reverse path, and then the reverse path is again Performing the inverse path processing and generating the first path establishing packet, so that the source node can conveniently establish the routing entry, and the establishment manner of the routing entry in the IGP protocol in the prior art is established in the embodiment of the present invention.
  • the routing table method is simpler, and each node can implement a zero-configuration routing table.
  • the method further includes If the routing entry has been established, and the outbound interface corresponding to the first path is inconsistent, the source node determines whether the outbound interface corresponding to the first path is more Preferably, when the outbound interface corresponding to the first path is better, the source node updates the established routing entry.
  • This embodiment can be used for monitoring and optimization of routing tables to improve the adaptive capability of the routing table.
  • the method further includes: the source node sends a first path setup packet to the source node in the first path, and the destination An intermediate node between the nodes, so that the intermediate node updates the respective routing entries according to the next hop address of the address of the intermediate node in the first path and the outbound interface.
  • the second aspect or the first possible implementation of the second aspect or the second possible implementation of the second aspect may be combined with the third aspect or the first possible implementation of the third aspect or the third aspect The second possible implementation.
  • an embodiment of the present invention provides a method for establishing a routing table, including: generating a first probe data packet, where the first probe data packet has a source address and a destination address; on a network including at least two nodes Transmitting, by the source node corresponding to the source address, the first probe data packet until reaching a destination node corresponding to the destination address, and recording an address of a node through which the first probe data packet passes 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, where the first response data packet includes the second path Sending the first response data packet along the second path until the source node is reached; establishing a routing entry according to the second path, where the routing entry includes the destination address and a next hop node Address and outgoing interface.
  • the method further includes: establishing a path evaluation entry according to the second path and the service target, where the path evaluation entry includes Determining the source address and the destination address, the address of the next hop node, and the evaluation value, service identifier, and/or service target of the outbound interface, the next hop node, and the outbound interface.
  • the embodiment of the present invention provides a method for managing a routing table, including: generating a second probe data packet, where the second probe data packet has the source address and the destination address; And sending, by the source node corresponding to the source address, the second probe data packet according to a preset routing entry according to a predetermined probability to the destination node corresponding to the address, and recording the first And detecting a address of the node through which the data packet passes to form a third path; generating a fourth path according to the third path; wherein the fourth path is an opposite path of the third path; generating a second response data packet
  • the second response data packet includes the fourth path; the second response data packet is sent along the fourth path until the source node is reached; if the matching is successful in the routing entry, When the address of the next hop in the fourth path and the outbound interface are different from the address and the outbound interface of the next hop in the routing entry, the address of the new next hop node is added to the routing entry. And the outbound interface, adding
  • the method further includes: if the matching succeeds in the routing entry, and the address of the next hop in the fourth path, and When the outbound interface is the same as the address of the next hop and the outbound interface in the routing entry, the next hop node in the pre-established path evaluation entry and the evaluation value of the outbound interface are updated.
  • the method further includes: if the matching is not successful in the routing entry, establishing a new routing table according to the fourth path Item, and create a new path evaluation entry.
  • the determining whether to update the routing entry includes: determining a new next hop node and an evaluation value of the outbound interface; The evaluation value of the next hop node and the outbound interface and the evaluation value of the next hop node and the outbound interface in the pre-established path evaluation entry determine whether to update the routing entry.
  • the determining whether to update the routing entry includes: determining a new next hop node and an evaluation value of the outbound interface; The evaluation value of the one-hop node and the outbound interface is input to the random neural network, and determining whether to update the routing table according to the operation result of the random neural network; wherein each neuron of the random neural network corresponds to an outbound interface, the random neural network The network is trained by the historical next hop node and the evaluation value of the outbound interface.
  • the fifth aspect or any of the first possible implementation of the fifth aspect to the fourth possible implementation of the fifth aspect may be combined with the fourth aspect or the first possible implementation of the fourth aspect In the way.
  • an embodiment of the present invention provides a method for establishing a routing table, including: generating a first probe data packet, where the first probe data packet has a source address and a destination address; on a network including at least two nodes Transmitting, by the source node corresponding to the source address, the first probe data packet until reaching a destination node corresponding to the destination address, and recording an address of a node through which the first probe data packet passes 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, where the first response data packet includes the second path Transmitting the first response data packet along the second path until reaching the source node; generating a first path establishment packet, where the first path establishment packet includes an opposite path of the second path; The reverse path establishes a routing entry, wherein the routing entry includes the destination address, an address of a next hop node, and an outbound interface.
  • the method further includes: if the routing entry has been established, and the outbound interface in the established routing entry corresponds to the opposite path If the outbound interface is inconsistent, it is determined whether the outbound interface corresponding to the opposite path is better. When the outbound interface corresponding to the opposite path is better, the established routing entry is updated.
  • the method further includes: generating a second probe data packet, where the second probe data packet has the source address and the destination address; Transmitting, according to the routing entry, the second probe data packet from the source node according to the routing entry on the network until reaching the destination node, and recording an address of a node through which the second probe data packet passes Forming a third path; generating a fourth path according to the third path; wherein the fourth path is an opposite path of the third path; generating a second response data packet, where the second response data packet includes a fourth path; sending the second response data packet along the fourth path until reaching the source node; if the matching is successful in the routing entry, and the address of the next hop in the fourth path And when the outbound interface is the same as the address and the outbound interface of the next hop in the routing entry, the next hop node in the pre-established path evaluation entry and the evaluation value of the outbound interface are updated.
  • an embodiment of the present invention provides a data packet sending method, including: receiving a service data packet; the service data packet has a destination address, and includes a service identifier and/or a service target; according to the destination address, the The service identifier and/or the service target perform the longest match in the pre-established routing entry, including the destination address, the address of the next hop node, the outbound interface, the service identifier, and/or the service target; The address of the next hop node of the routing entry and the outbound interface send the service data packet.
  • an embodiment of the present invention provides an electronic device, including: a processor, configured to generate a first probe data packet, where the first probe data packet has a source address and a destination address; and the electronic device serves as a source node.
  • the source address is an address of the source node; an interface; a transmitter, configured to send the first probe data packet by using the interface, and a receiver, configured to receive the first response data packet by using the interface,
  • the first response data packet includes a second path, where the second path is an opposite path of the first path; the first path is an address of a node through which the first probe data packet passes;
  • the method further includes: establishing a routing entry according to the last address of the address of the electronic device in the second path; wherein the routing entry includes the destination address, an address of a next hop node, and an outbound interface; The address of the next hop node is the previous address.
  • the processor is further configured to: establish a path evaluation entry, where the path evaluation entry includes the source address and the destination An address, an address of the next hop node, and an evaluation value, a service identifier, and/or a service target of the outbound interface, the next hop node, and the outbound interface, where the address of the next hop node is the previous one address.
  • the transmitter is configured to: randomly select a next hop node, and send the New first probe packet.
  • an embodiment of the present invention provides an electronic device, including: an interface, and a receiver, configured to receive, by using the interface, a first probe packet, where the first probe data packet has a source address and a destination address, and the The address of the node through which the first probe data packet currently passes; the electronic device is an intermediate node on the path of the destination node corresponding to the source node and the destination node corresponding to the destination address; a processor, configured to record an address of the electronic device in the first probe data packet to form a new first probe data packet, and a transmitter, configured to send the new first probe data by using the interface a packet, the receiver is further configured to receive the first response data packet by using the interface, where the first response data packet includes a second path, where the second path is an opposite path of the first path; The first path is an address of a node through which the new first probe data packet passes; the processor is further configured to establish a routing entry according to a previous address of an address of the electronic device in the second path;
  • the processor is further configured to: establish a path evaluation entry, where the path evaluation entry includes the source address and the destination An address, an address of the next hop node, and an evaluation value, a service identifier, and/or a service target of the outbound interface, the next hop node, and the outbound interface, where the address of the next hop node is the previous one address.
  • an embodiment of the present invention provides an electronic device, including: a processor, configured to generate a second probe data packet, where the second probe data packet has a source address and a destination address; and the electronic device serves as a source node.
  • the source address is an address of the source node; an interface; the transmitter is configured to send the second probe data packet according to a pre-established routing entry according to a predetermined probability; and the receiver is configured to receive the second through the interface a response packet, the second response packet includes a fourth path, the fourth path is an opposite path of the third path, and the third path is an address of a node through which the second probe data packet passes;
  • the processor is further configured to: if the matching is successful in the routing entry, and the last address of the address of the electronic device in the fourth path is the same as the next hop node in the routing entry When the addresses are the same, the next hop node in the pre-established path evaluation entry and the evaluation value of the outbound interface are updated.
  • the processor is further configured to: if the matching is not successful in the routing entry, according to the fourth path A new routing entry is created by the previous address of the address of a node.
  • the processor is further And if: if the matching is successful in the routing entry, 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 entry, determining whether Update the routing entry.
  • the processor is configured to: determine a new next hop node and an evaluation value of the outbound interface; The new next hop node and the evaluation value of the outbound interface and the next hop node in the path evaluation entry and the evaluation value of the outbound interface determine whether to update the routing entry.
  • the processor is configured to: determine a new next hop node and an evaluation value of the outbound interface; The new next hop node and the evaluation value of the outbound interface are input to the random neural network, and according to the operation result of the random neural network, whether to update the routing table; wherein each neuron of the random neural network corresponds to an outgoing interface, The random neural network is trained by the historical next hop node and the evaluation value of the outbound interface.
  • an embodiment of the present invention provides an electronic device, including: an interface, and a receiver, configured to receive a second probe data packet by using the interface, where the second probe data packet has a source address and a destination address, and The address of the node through which the second probe data packet currently passes; the electronic device is an intermediate node on the path of the destination node corresponding to the source node and the destination node corresponding to the destination address; the processor is configured to The address of the electronic device is recorded in the second probe data packet to form the new second probe data packet; the transmitter is configured to send the new packet through the interface according to a pre-established routing entry according to a predetermined probability a second probe data packet; the receiver is further configured to: receive a second response data packet, where the second response data packet includes a fourth path, and the fourth path is an opposite path of the third path; The third path is an address of a node through which the new second probe packet passes; the processor is further configured to: if the matching succeeds in the routing entry, and in the fourth
  • the processing The device is further configured to: establish a new routing entry according to a previous address of the address of the electronic device in the fourth path when the routing entry does not match successfully.
  • the processor is further configured to: if the matching succeeds in the routing entry, and the electronic in the fourth path When the previous address of the address of the device is different from the address of the next hop node in the routing entry, it is determined whether to update the routing entry.
  • the processor is configured to: determine a new next hop node and an evaluation value of the outbound interface; The new next hop node and the evaluation value of the outbound interface and the next hop node in the path evaluation entry and the evaluation value of the outbound interface determine whether to update the routing entry.
  • the processor is configured to: determine a new next hop node and an evaluation value of the outbound interface; And inputting the evaluation value of the new next hop node and the outbound interface into the random neural network, determining whether to update the routing table according to the operation result of the random neural network; wherein each neuron of the random neural network corresponds to an outgoing interface
  • the random neural network is trained by the historical next hop node and the evaluation value of the outbound interface.
  • an embodiment of the present invention provides an electronic device, including: a processor, configured to generate a first probe data packet, where the first probe data packet has a source address and a destination address; An address of the electronic device, the electronic device as a source node; an interface; a transmitter, configured to send the first probe data packet by using the interface; and a receiver, configured to receive, by using the interface, a first response data packet, where The first response data packet includes a second path, where the second path is an opposite path of the first path; the first path is an address of a node through which the first probe data packet passes; the processor,
  • the method further includes: generating a first path establishment packet, where the first path establishment packet includes the first path; establishing a routing entry according to an address of the next hop node of the source address and an outbound interface in the first path The routing entry includes the destination address, an address of the next hop node, and an outbound interface.
  • the processing The device is further configured to: if the routing entry has been established, and the outbound interface corresponding to the first path is inconsistent, the outbound interface corresponding to the first path is determined to be better; When the outbound interface corresponding to the first path is better, the established routing entry is updated.
  • the transmitter is further configured to send the first path setup packet by using the interface And an intermediate node between the source node and the destination node in the first path, so that the intermediate node updates the next hop address and the outbound interface according to the address of the intermediate node in the first path Their respective routing entries.
  • the processor And the method is further configured to: generate a second probe data packet, where the second probe data packet has the source address and the destination address; and the transmitter is further configured to: send the first according to the routing entry according to a predetermined probability a second probe data packet; the interface device is further configured to: receive, by the interface, a second response data packet, where the second response data packet includes a fourth path, where the fourth path is an opposite path of the third path; The third path is an address of a node through which the second probe data packet passes; the processor is further configured to: if the matching succeeds in the routing entry, and the source address in the fourth path When the address of the next hop and the outbound interface are the same as the address of the next hop and the outbound interface in the routing entry, the next hop node in the pre-established path evaluation entry and the
  • the embodiment of the present invention provides a network, where the network includes a source node, a destination node, and an intermediate node between the source node and the destination node, where the source node is used to generate a first probe. Transmitting the first probe data packet to an intermediate node adjacent to the source node; wherein the first probe data packet has a source address of the source node and a destination address of the destination node; The intermediate node is configured to sequentially send the first probe data packet from the adjacent intermediate node to the adjacent intermediate node of the destination node until the destination node is reached, and record the respective address in the intermediate node.
  • the destination node is configured to generate 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, wherein the first response data packet includes the a second path; the destination node, the intermediate node is configured to sequentially send the first response data packet along the second path until the source node is reached; the intermediate node and the source node are used according to the The second path establishes a routing entry, where the routing entry includes the destination address, an address of a next hop node, and an outbound interface.
  • the intermediate node and the source node are further configured to establish a path evaluation entry according to the second path and a service target, where
  • the path evaluation entry includes the source address and the destination address, an address of a next hop node, and an evaluation value, a service identifier, and/or a service target of the outbound interface, the next hop node, and the outbound interface.
  • an embodiment of the present invention provides a network, where the network includes a source node, a destination node, and an intermediate node between the source node and the destination node, where the source node is configured to generate a second probe.
  • the second probe data packet to an adjacent intermediate node, the second probe data packet having a source address of the source node and a destination address of the destination node; And the adjacent intermediate node starts to use the neighboring intermediate node of the destination node to sequentially send the second probe data packet according to a preset routing entry according to a predetermined probability until the destination node corresponding to the address is reached, and Recording a respective address in the second probe data packet to form a third path; the destination node is configured to generate a fourth path according to the third path and generate a second response data packet; wherein the fourth path An opposite path of the third path; the fourth path is included in the second response data packet; the destination node, the intermediate node is used to follow the fourth path Sending the second response data packet until reaching the source node; the intermediate node and the source node are configured to: if the matching in the routing entry is successful, and the address of the next hop in the fourth path And when the outbound interface is different from the address and the outbound interface of the next hop in the
  • the intermediate node and the source node are further configured to: if the matching succeeds in the routing entry, and the fourth Road When the address of the next hop in the path and the outbound interface are the same as the address and the outbound interface of the next hop in the routing entry, the next hop node in the pre-established path evaluation entry and the evaluation value of the outbound interface are updated. .
  • the intermediate node and the source node are further configured to: if the matching is not successful in the routing entry, The fourth path establishes a new routing entry and establishes a new path evaluation entry.
  • the fourteenth aspect or the first possible implementation of the fourteenth aspect or the second possible implementation of the fourteenth aspect may be combined with the thirteenth aspect or the first possible implementation of the thirteenth aspect in.
  • an embodiment of the present invention provides a network, where the network includes a source node, a destination node, and an intermediate node between the source node and the destination node, where the source node is used to generate a first probe. Transmitting the first probe data packet to a neighboring intermediate node, the first probe data packet having a source address of the source node and a destination address of the destination node; And the adjacent intermediate nodes start to send the first probe data packet until the destination node is sent until the adjacent intermediate node of the destination node, and record the respective address in the first probe data packet.
  • the destination node is configured 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, the intermediate node is configured to send the first response data packet along the second path until reaching the source node;
  • the source node is further configured to generate a first path establishment packet and establish a routing entry according to the opposite path, where the first path establishment packet includes an opposite path of the second path, where the routing entry includes Determining a destination address, an address of a next hop node, and an outbound interface;
  • the source node is further configured to send the first path establishment packet to an adjacent intermediate node; and the intermediate node from the adjacent intermediate node Starting to the neighboring intermediate node of the destination node, the routing entry is established according to the opposite path when the first path establishment packet is received.
  • the source node is further configured to: if a routing entry has been established, and an outbound interface in the established routing entry If the outbound interface corresponding to the opposite path is inconsistent, it is determined whether the outbound interface corresponding to the opposite path is better. When the outbound interface corresponding to the opposite path is better, the established routing entry is updated.
  • an embodiment of the present invention provides an electronic device, including: an interface; a receiver, configured to receive a service data packet; the service data packet has a destination address, and includes a service identifier and/or a service target; And performing a longest match in the pre-established routing entry according to the destination address, the service identifier, and/or the service target, where the routing entry includes a destination address, an address of a next hop node, and an outbound interface, a service identifier and/or a service target; the sender, configured to send the service data packet by matching an address of a next hop node of a successful routing entry and an outbound interface; wherein the outbound interface is an interface in the interface .
  • the embodiment of the present invention provides an electronic device, where the electronic device includes a first possible implementation manner of implementing the first aspect or the first aspect, or a second possible implementation manner of the first aspect
  • the functional unit of the method in includes a first possible implementation manner of implementing the first aspect or the first aspect, or a second possible implementation manner of the first aspect
  • an embodiment of the present invention provides an electronic device, where the electronic device includes a first possible implementation manner for implementing the second aspect or the second aspect, and the fourth possible implementation manner of the second aspect A functional unit of any of the methods.
  • an embodiment of the present invention provides an electronic device, where the electronic device includes a first possible implementation manner of implementing the third aspect or the third aspect, or a second possible implementation manner of the third aspect.
  • an embodiment of the present invention provides an electronic device, where the electronic device includes a functional unit for implementing the method of the seventh aspect.
  • FIG. 1a-1c are network structure diagrams according to an embodiment of the present invention.
  • FIG. 2 is a structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for establishing a routing table according to an embodiment of the present invention
  • FIG. 4 is a flowchart of another method for establishing a routing table according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of still another method for establishing a routing table according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for establishing a routing table on a source node side according to an embodiment of the present disclosure
  • FIG. 7 is a structural diagram of another electronic device according to an embodiment of the present invention.
  • the embodiments of the present invention provide a method, an electronic device, and a network for establishing a routing table, which are used to solve the technical problem that the method for establishing a routing table in the prior art needs to be configured with more parameters and cannot implement zero configuration.
  • a method for establishing a routing table is provided by an embodiment of the present invention.
  • the method can be applied to a network.
  • FIG. 1a to FIG. 1c it is a possible network structure diagram in the embodiment of the present invention.
  • 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 may all be routing devices, specifically, access, aggregation, core routers, enterprise network routers (such as enterprise network edge routers), or home gateways, as shown in Figure 1c.
  • the source node S can be a user equipment, accessing the Internet through the home gateway, and performing network telephone (English: Voice over Internet Protocol, VoIP for short) communication with another user equipment.
  • the source node S and the destination node D are user equipments
  • the intermediate node M is a router, such as the network shown in FIG. 1a.
  • the destination node D can be considered a server of a service or content provider.
  • the source node S, the intermediate node M, and the destination node D may all be home or enterprise networks or user equipment.
  • the foregoing network is an IP network, and each node has its own IP address, and the entire network communicates by using an IP address.
  • the network may also be a 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.
  • the user equipment mentioned in this document may be a wireless terminal or a wired terminal, and no
  • the line terminal can be a device that provides voice and/or other service data connectivity to the user, a handheld device with wireless connectivity, or other processing device that is connected to the wireless modem.
  • the wireless terminal can communicate with one or more core networks via a radio access network (English: Radio Access Network; RAN for short), and the wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and has
  • the computer of the mobile terminal for example, may be a portable, pocket, handheld, computer built-in or in-vehicle mobile device that exchanges language and/or data with the wireless access network.
  • the wireless terminal may also be referred to as a system, a subscriber unit, a subscriber station, a mobile station, a mobile station, a remote station, a remote terminal, and a remote terminal. Access Terminal, User Terminal, User Agent, User Device or User Equipment.
  • FIG. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • the electronic device is a source node S, an intermediate node M or a destination node D.
  • 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 and the receiver 30 and the processor 10 can be connected via a bus.
  • the memory 40, the transmitter 20, and the receiver 30 and the processor 10 may not be a bus structure, but may be other structures, such as a star structure, which is not specifically limited herein.
  • the processor 10 may be a central processing unit, an application specific integrated circuit (ASIC), and may be one or more integrated circuits for controlling program execution, and may be used on site.
  • a hardware circuit developed by a Field Programmable Gate Array (FPGA) can be a baseband processor.
  • processor 10 may include at least one processing core.
  • the memory 40 may include a read only memory (English: Read Only Memory, Jane) Called: ROM), random access memory (English: Random Access Memory, referred to as: RAM) and disk storage.
  • the memory 40 is used to store data required by the processor 10 to operate.
  • the number of memories 40 is one or more.
  • the number of interfaces 50 is one or more for connecting with adjacent nodes.
  • transmitter 20 and the receiver 30 may be physically independent of each other or integrated.
  • Transmitter 20 can send data packets to other nodes via interface 50.
  • Receiver 30 can receive data transmitted by other nodes via interface 50.
  • FIG. 3 is a flowchart of a method for establishing a routing table in an embodiment of the present invention. As shown in FIG. 3, the method includes:
  • Step 101 Generate a first probe data packet, where the first probe data packet has a source address and a destination address.
  • Step 102 The first probe data packet is sent from the source node corresponding to the source address on the network that includes the at least two nodes until the destination node corresponding to the destination address is reached, and the first probe data packet is recorded.
  • Step 103 Generate a second path according to the first path, where the second path is a reverse path of the first path;
  • Step 104 Generate a first response data packet, where the first response data packet includes a second path.
  • Step 105 Send a first response data packet along the second path until the source node is reached;
  • Step 106 Establish a routing entry according to the second path, where the routing entry includes the destination address, an address of a next hop node, and an outbound interface.
  • step 101 is performed by the source node S.
  • the source node S when a service needs to access the network, the source node S generates a first probe packet (English: Exploring Packet, EP for short).
  • 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.
  • step 102 is performed, that is, the first EP packet is sent from the source address through the network, for example, until the destination address is reached.
  • the first EP packet is first sent by the source node S. If the source node S has only one outbound interface, namely the interface 50 described above, the sender 20 of the source node S sends the first EP to the intermediate node M connected to the interface 50 via the unique interface 50. If the source node S There are multiple outbound interfaces, that is, there are multiple interfaces 50, and the transmitter 20 of the source node S can randomly select one interface 50 to send the first EP to the intermediate node M connected to the interface 50.
  • the source node and the inter-node may use other methods, such as sending the first EP from the preset fixed interface or sending the first broadcast, in addition to the manner of randomly selecting the interface. EP.
  • the intermediate node M When the intermediate node M receives the first EP, an operation similar to that of the source node S may be performed, that is, the address of the intermediate node M node is written into the first EP, a new first EP is formed, and one or a random selection is made.
  • the preset fixed interface 50 transmits a new first EP. The above process is repeated at the subsequent intermediate node M until the first EP reaches the destination node D. At this point, step 102 is performed.
  • the first EP When the first EP arrives at the destination node D, the first EP has recorded the address of the node through which it passed, and the addresses of these passed nodes form the first path.
  • the timestamp of reaching each node is also recorded in the first EP, and the role of the timestamp will be described in detail later.
  • the first EP may be configured with a time to live (English: Time to live, TTL for short). Therefore, when the first EP is sent, it may occur that the TTL is 0 before being reached to the destination node D. Case.
  • the destination node D may perform step 103 and step 104. Specifically, in step 103, the loop in the first path may be removed first, and then the opposite path in which the loop is removed is taken as the second path.
  • the destination node D generates a first response data packet (English: Response Packet, RP for short) 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.
  • RP Response Packet
  • step 105 is performed. Specifically, the transmitter 20 of the destination node D sends the first RP to the intermediate node M through the second path.
  • the first path is the source node S ⁇ the intermediate node M1 ⁇ the intermediate node M2 ⁇ the intermediate node M3 ⁇ the destination node D.
  • the second path is the destination node D ⁇ intermediate node M3 ⁇ intermediate node M2 ⁇ intermediate node M1 ⁇ source node S.
  • 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.
  • the intermediate node M When the intermediate node M receives the first RP, it performs an operation similar to that of the destination node D, that is, transmits the first RP according to the second path. The other intermediate node M repeats the above process until the first RP reaches the source node S. At this point, step 105 is performed.
  • step 106 may be performed, that is, the routing entry is established according to the second path.
  • the routing entry may include the destination address, an address of a next hop node, and an outbound interface.
  • the second path continues to use the foregoing example as an example.
  • each node interacts with a neighboring node, so that the correspondence between the address of the neighboring node and the outbound interface is obtained. Therefore, according to the address of the next hop node in the second path, the next hop node can be obtained. Outbound interface.
  • the intermediate node S and the source node S may use the interface that receives the first RP packet as the outbound interface of the next hop node.
  • the intermediate node M2 receives the first RP, performs the destination address matching, and finds that the routing entry of the destination node D has not been established yet, the routing entry is established, and one of the possible routing tables is in the form of Table 2. Show.
  • the intermediate node M repeats the above steps to establish respective routing entries for the destination node D.
  • the source node S performs the destination address matching, and finds that the routing entry of the destination node D has not been established yet, and the routing entry is established.
  • the format of one possible routing table is as shown in Table 3. .
  • the source node S and the intermediate node M establish a routing entry to the destination node D. Therefore, after the step 106, when there is a service data packet 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 routing entry, and forward the service data packet until reaching the destination node D.
  • the path node from the source node S to the destination node D is recorded by the probe packet, and then forwarded from the destination node D to the source node S through the reverse path of the response packet, so that The source node S and the intermediate node D are convenient to establish routing entries.
  • the method for establishing a routing table in the embodiment of the present invention is simpler than the manner in which the routing entries are described in the prior art.
  • the node can implement a zero-configuration setup routing table.
  • the first EP further includes a service identifier and/or a service target, and specifically includes three cases, where the first EP further includes a service identifier, or the first EP further includes a service identifier and a service target, or
  • the EP also includes business objectives.
  • the service identifier is the unique identifier of the service.
  • the service identifier is a digital certificate for the service, and the digital certificate can be assigned by the source node S or the source node S to a specific server application.
  • the digital certificate is globally unique.
  • the identity of the source node S plus the serial number can be used to express the service identity of the service.
  • the service identifier may not be unique, and the service identifier may be combined with other identifiers to uniquely identify a service.
  • the service target may be a combination of one or more requirements of a quantized quality of service (English: Quality of Service, QoS for short).
  • the goal can be one or more of minimizing latency, minimizing packet loss, minimizing jitter (for voice traffic), minimum cost, and the like.
  • the default service target (such as the minimum hop count) can be preset in the network.
  • the first EP can be It may include only the service identifier or may not include the service identifier.
  • the first RP also includes a service identifier and/or a service target. Specifically, which one is included in the first EP, which is included in the first RP.
  • the routing entry when the routing entry is established, the routing entry further includes a service identifier and/or a service target. That is, the routing entry may include the service identifier separately, or may include the service target separately, and may also include the service identifier and the service target. The purpose of the service identifier and business target in the routing entry will be described later.
  • the method further includes: establishing a path evaluation entry according to the second path, the service identifier, and/or the service target, wherein the path evaluation entry may include the source address and The destination address, the address of the next hop node, and the evaluation value, service identifier, and/or service target of the outbound interface, the next hop node, and the outbound interface.
  • the service identifier and/or the business target are objects that are juxtaposed with the second path as a whole.
  • the business identity and/or business objectives include three scenarios, one is a separate business identity, the other is a separate business goal, and the third is both.
  • the intermediate node M and the source node S that receive the first RP may establish a path evaluation entry according to the second path, the service target, and the like.
  • One of the possible path evaluation entries is shown in Table 4 below.
  • the evaluation value of the next hop node and the outbound interface is determined according to a predetermined rule according to the service target.
  • the business objectives can be quantified (eg, delay, packet loss rate) and further converted into values, which is the evaluation value.
  • the time delay included in the target can be determined by the timestamp described above.
  • the service identifier For example, when the source node S receives the first RP, according to the second path, the service identifier And the service target establishment path evaluation item, where the service target carried in the first RP is a low delay, and the service identifier is b1.
  • the established route evaluation table is shown in Table 5 below.
  • evaluation values are assumed to be values calculated according to the above-described rules or other rules, and are merely examples and are not intended to limit the present invention.
  • the method further includes: generating a second probe data packet, The second probe data packet has the source address and the destination address; the second probe data packet is sent according to a pre-established routing entry according to a predetermined probability on the network from the source node until the arrival of the a destination node, and recording an address of a node through which the second probe packet passes to form a third path; generating a fourth path according to the third path;
  • the fourth path is an opposite path of the third path; generating a second response data packet, wherein the second response data packet includes the fourth path; and sending the second response data packet along the fourth path until reaching the location Describe the source node.
  • the next hop node in the pre-established route evaluation entry and the evaluation value of the outbound interface are updated.
  • the evaluation value of the next hop node and the outbound interface is updated according to the information carried in the second RP.
  • the second RP includes a service target, for example, a low delay
  • the second RP packet carries a timestamp to each node, so the next hop can be recalculated according to the timestamp.
  • the evaluation value of the point and the outbound interface is then used to overwrite the original evaluation value with the recalculated evaluation value. This part of the content can be seen as an update of the original path information.
  • the pre-established route evaluation entry may be established by using the foregoing method, or may be established by other methods.
  • the source node S may generate a second EP when a new service needs to access the network, or for the old service.
  • the second EP may be periodically sent for path monitoring and path exploration.
  • the source node S and the intermediate node M have established a routing entry to the destination node D by the foregoing method or other methods, the source node S and the intermediate node M are on the network from the source node according to a predetermined probability.
  • the established routing entry sends the second EP until the destination node D is reached.
  • the address of the node through which the second EP passes is recorded to form a third path. This step is similar to the foregoing step 102. Let me repeat.
  • the destination node After the second EP reaches the destination node D, the destination node acquires the third path recorded in the second EP, and generates a fourth path according to the third path, where the fourth path is the reverse path of the third path (if the third path exists).
  • the loop is removed, wherein the step is similar to the foregoing step 103, and details are not described herein again.
  • the destination node D Similar to step 104, the destination node D generates a second RP, wherein the second RP includes a fourth path.
  • steps similar to step 105 are performed. That is, the second RP is transmitted along the fourth path until reaching the source node S.
  • the node receiving the second RP such as the intermediate node M and the source node S, if the matching in the routing table entry is successful, and the next hop of the own address in the fourth path
  • the foregoing evaluation value is updated.
  • the RP arrives to generate a new timestamp and delay value, and the evaluation value of the next hop node and the outbound interface can be updated accordingly.
  • the predetermined probability can be set according to actual conditions. For example, suppose the predetermined probability is 95%, in other words, it means that there is a 5% chance that the second EP is randomly routed instead of forwarding according to the original routing entry. If the second EP is exactly all forwarded according to the routing entry, then The second RP is successfully matched in the intermediate node and the source node S, and the address and the outbound interface of the next hop in the fourth path are the same as the address and the outbound interface of the next hop in the routing entry. In other words, such a second EP is used for monitoring the original path, and the original path information can be updated according to the monitoring result.
  • the node receiving the second RP may not be the node in the second path, so the destination is not yet established.
  • the routing entry of the node D, so the node receiving the second RP, the intermediate node M can be matched by the destination address. If the routing entry is not found, that is, if the matching is not successful, the method can be as described in step 106. Create a new routing entry.
  • the second EP can be used to explore new paths, which facilitates multi-path coexistence.
  • a new path evaluation entry may also be established in the manner described above.
  • the node that receives the second RP may also be a node in the second path, for example, Intermediate node M3, then the routing table entry will match successfully.
  • the address of the next hop of the address of the intermediate node M3 in the fourth path and the outgoing interface may be different from the address and outgoing interface of the next hop obtained in step 106.
  • the address of the new next hop node and the outbound interface are added to the routing entry, and the new next hop node and the evaluation value of the outbound interface are added to the foregoing path evaluation entry. Or, determine whether to update the routing table entry. In this embodiment, it can be regarded as an exploration of a new path, which is advantageous for finding a better path.
  • the routing entry may be updated according to the evaluation value of the new next hop node and the outbound interface, and the evaluation value of the original next hop node and the outbound interface. For example, if the target is low latency, the original next hop node and the outbound interface have an evaluation value of 0.05, and the new next hop node is determined according to the service target and the new timestamp in the fourth path. If the evaluation value of the outbound interface is 0.04, then the routing table is optimized, and the service data packet is forwarded according to the path of the new next hop node.
  • determining whether to update the routing table according to other rules, for example, determining a new next hop node and an evaluation value of the outbound interface, and evaluating the new next hop node and the outbound interface.
  • Input a random neural network, determined according to the operation result of the random neural network Whether to update the routing table; wherein each neuron of the random neural network corresponds to an outbound interface, and the random neural network is trained by the historical next hop node and the evaluation value of the outbound interface.
  • 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 identification or target).
  • the neural network is trained on the above-mentioned network real-time measured values, such as evaluation values, and whether to update the routing table is determined according to the training result.
  • An embodiment of a random artificial neural network in an embodiment of the present invention will be briefly described below.
  • each interface 50 of the intermediate node M corresponds to one neuron. Neurons have two attributes, one is the excitement weight, and the other is the suppression weight.
  • the magnitude of the increase of the two properties of the neuron is determined.
  • the reward operation is triggered to the neuron 2 (hypothesis)
  • the neuron corresponding to the current outbound interface is a large increase in the excitatory weight of the neuron 2), and the suppression weight to the other neurons will increase slightly.
  • T k-1 is greater than R k
  • the penalty operation is triggered, the suppression weight to neuron 2 is greatly increased, and the excitatory weight to other neurons is slightly increased.
  • the operation result of the neural network is selected as the output interface of the next hop. In principle, the higher the excitability value is. The easier it is to be selected. If the newly selected outbound interface is different from the previous outgoing interface, then the routing table can be updated.
  • the node that receives the second RP may also be a node in the second path, for example, Intermediate node M1, then the routing table entry will match successfully. It is assumed that the destination address matches on the M1, and the address of the next hop of the address of the intermediate node M1 in the fourth path and the outbound interface are the same as the address and the outbound interface of the next hop obtained in step 106. The next hop node in the foregoing path evaluation entry and the evaluation value of the outbound interface can be updated.
  • the above describes the implementation of the routing table establishment, monitoring and optimization, how to describe how Forward the service data packet.
  • the IP forwarding of the present invention supports further performing according to the destination address and the service identifier/service target, but is also compatible with the traffic without the service target and the service identifier. That is, when the IP routing table is established, the entry of the service identifier and/or the service target is added at the same time, and if the data packet carries the service identifier and the service target, the longest match is performed, and the outbound interface matching the service identifier/service target is matched. Select the outbound interface.
  • the method includes:
  • the service data packet has a destination address, and includes a service identifier and/or a service target;
  • routing entry includes the destination address, the address of the next hop node, the outbound interface, the service identifier, and / or business objectives;
  • the service data packet is sent by matching the address of the next hop node of the successful routing entry and the outbound interface.
  • the description of the service identifier and/or the service target is targeted to the service identifier and the service target.
  • the business identity and/or business objectives are aligned as a whole with other target audiences.
  • the longest matching principle is that when there are multiple entries in the routing table that can match the destination address in the IP network, the longest (most accurate) one of the masks is generally used as a match. Determine the next hop. Also called the longest prefix match, it is the algorithm that the router searches the routing table for routing.
  • IPv4 routing table For example, consider the following IPv4 routing table:
  • the matching in the embodiment is successful, that is, the destination address, the service identifier, and/or the service target are matched.
  • the convergence is performed only according to the destination address, but the service is not distinguished, and the granularity of the traditional routing scheme is relatively large.
  • the aggregation is performed according to the destination address + service identifier and/or service target. , so the particle size is slightly lower.
  • FIG. 4 it is a flowchart of a method for establishing a routing table on a first node side according to an embodiment of the present invention, where the method includes:
  • Step 201 The first node obtains a first probe data packet, where the first probe data packet has a source address and a destination address.
  • Step 202 The first node obtains a new first probe data packet.
  • the first node When the first node is an intermediate node, the first node records the address of the first node in the first probe data packet to form a new first probe. a data packet; when the first node is the source node, the new first probe data packet is the first probe data packet in step 201;
  • Step 203 The first node sends a new first probe data packet.
  • Step 204 The first node receives the first response data packet, where the first response data packet includes a second path, and the second path is an opposite path of the first path (removed if there is a loop); the first path is a new one.
  • Step 205 The first node establishes a routing entry according to the previous address of the address of the first node in the second path, where the routing entry includes the destination address, the address of the next hop node, and the outbound interface.
  • the address of the next hop node is the previous address.
  • the previous address is filled in the address bar of the next hop node of the routing entry.
  • step 201 includes: the first node generates the first EP.
  • processor 10 which may be the first node, generates a first EP.
  • step 201 includes: the first node receives the first EP.
  • the receiver 30 of the first node receives the first EP through the interface 50.
  • step 202 the processor 10, for example, the first node, encapsulates the address of the first node in the first EP to form a new first EP.
  • step 203 specifically, the transmitter 20 of the first node transmits a new first EP via the interface 50.
  • the receiver 30, which is specifically, for example, the first node, receives the first RP through the interface 50.
  • step 205 can be performed by processor 10 of the first node.
  • the method further includes: the first node establishes a path evaluation entry, where the path evaluation entry includes the source address and the destination address, an address of a next hop node, and an outbound interface and a next hop.
  • the address of the next hop node is the previous address.
  • step 203 includes: the first node randomly selects a next hop node, and the outbound interface sends a new first probe data packet. In actual use, it may also be sent by other rules, such as sending a new first EP through a preset fixed interface, or sending a new first EP in the form of a broadcast.
  • the method further includes: obtaining, by the first node, a second probe data packet, where the second probe data packet has the source address and the destination address; obtaining a new second probe data packet; A node records the address of the first node in the second probe data packet to form a new second probe data packet; when the first node is the source node, the new second probe data packet is the second probe data packet a packet, the first node sends a new second probe data packet according to the routing entry according to a predetermined probability; the first node receives the second response data packet, where the second response data packet includes a fourth path, and the fourth path The reverse path of the third path (removed if there is a loop); the third path is the address of the node through which the new second probe packet passes; if the match is successful in the routing entry, and the fourth When the previous address of the address of the first node in the path is the same as the address of the next hop node in the routing entry, optionally, the first node updates the next hop address in
  • the method further includes: if the unmatched success in the routing entry, the first node establishes a new routing entry according to a previous address of the address of the first node in the fourth path.
  • the method further includes: if the matching is successful in the routing entry, and the last address of the address of the first node in the fourth path is the same as the next hop node in the routing entry When the addresses are different, optionally, it is determined whether to update the routing entry.
  • the determining whether to update the routing entry includes: determining, by the first node, a new next hop node and an evaluation value of the outbound interface; the first node according to the new next hop node and the outbound interface The evaluation value and the next hop node in the path evaluation entry and the evaluation value of the outbound interface determine whether to update the routing entry.
  • each neuron of the random neural network corresponds to an outbound interface, and the random neural network is trained by the historical next hop node and the evaluation value of the outbound interface.
  • the method includes:
  • Step 301 Generate a first probe data packet, where the first probe data packet has a source address and a destination address.
  • Step 302 Send the first probe data packet from a source node corresponding to the source address to a destination node corresponding to the destination address on a network that includes at least two nodes, and record the first probe data.
  • Step 303 Generate a second path according to the first path, where the second path is the The reverse path of the first path;
  • Step 304 Generate a first response data packet, where the first response data packet includes the second path.
  • Step 305 Send the first response data packet along the second path until the source node is reached.
  • Step 306 Generate a first path establishment package, where the first path establishment package includes an opposite path of the second path.
  • Step 307 Establish a routing entry according to the reverse path, where the routing entry includes the destination address, an address of a next hop node, and an outbound interface.
  • steps 301 to 305 are similar to the foregoing steps 101 to 105.
  • step 307 is similar to step 106.
  • the second path is the opposite path of the first path from which the loop is removed.
  • the path setup packet carries the bandwidth requirement of the service, and the node on the path pre-allocates the bandwidth resource for the service.
  • the source node may receive multiple RP packets carrying the second path, and the source node may select one or more paths to transmit services and meet the bandwidth requirements of the service.
  • the method in the embodiment of the present invention circumvents the risk of the routing loop caused by the independent decision forwarding interface of each router, and further, the method in the embodiment of the present invention supports the resource reservation on the path. And provide better support for multipath transmission services.
  • the routing entry further includes a service identifier and/or a service target.
  • the method further includes: determining, for the source node, that the routing entry is established, and the outbound interface in the established routing entry is inconsistent with the outbound interface corresponding to the opposite path, determining the opposite path Whether the corresponding outbound interface is better; when the outbound interface corresponding to the opposite path is better, the established routing entry is updated.
  • This step can be performed in particular by the processor 10 of the source node.
  • determining whether the outbound interface corresponding to the opposite path is better may be determined by the size of the evaluation value of the outbound interface, or may be determined by, for example, the foregoing random artificial network, and the specific implementation process is as described above. Similar, so I won't go into details here.
  • the method further includes: sending a first path setup packet to other intermediate nodes on the opposite path, so that other intermediate nodes establish a routing entry according to the opposite path.
  • the method further includes: generating a second probe data packet, where the second probe data packet has a source address and the destination address; and according to a pre-established routing table from the source node according to a predetermined probability on the network Transmitting a second probe data packet until reaching the destination node, and recording an address of a node through which the second probe data packet passes to form a third path; generating a fourth path according to the third path; wherein the fourth path is the third path An opposite path of the path; generating a second response packet, the second response packet includes the fourth path; transmitting a second response packet along the fourth path until reaching the source node; if in the routing entry If the matching succeeds, and the address of the next hop in the fourth path and the outbound interface are the same as the address and the outbound interface of the next hop in the routing entry, the next step in the pre-established path evaluation entry is updated.
  • the evaluation value of the hop node and the outbound interface is updated.
  • the execution body of the last step of the method is a source node, and the pre-established routing table may be established by the method shown in FIG. 3, may be established by the method shown in FIG. 5, or may be established by other means. of.
  • the rest of the content is similar to the content of the second EP packet described above, so it will not be described here.
  • FIG. 6 is a flowchart of the source node side of the method shown in FIG. 5.
  • the method includes:
  • Step 401 The source node generates a first probe data packet, where the first probe data packet has a source address and a destination address, and the source address is an address of the source node.
  • Step 402 The source node sends the first probe data packet.
  • Step 403 The source node receives the first response data packet, where the first response data packet includes a second path, and the second path is an opposite path of the first path; the first path is an address of a node through which the first probe data packet passes;
  • Step 404 The source node generates a first path establishment package, where the first path establishment package includes a first path.
  • Step 405 The source node establishes a routing entry according to the address of the next hop node of the source address and the outbound interface in the first path, where the routing entry includes the destination address and the next hop The address of the point and the outgoing interface.
  • Step 401 is similar to step 201
  • step 402 is similar to step 203
  • step 404 to step 405 are similar to steps 306 to 607.
  • the method further includes: if the routing entry has been established, and the outbound interface in the established routing entry is inconsistent with the outgoing interface corresponding to the first path, the source node determines the first path Whether the corresponding outbound interface is better; when the outbound interface corresponding to the first path is better, the source node updates the established routing entry.
  • the method further includes: the source node sends a first path setup packet to an intermediate node between the source node and the destination node in the first path, so that the intermediate node is configured according to the The next hop address of the address of the intermediate node in the first path and the outbound interface update respective routing entries.
  • the method further includes: the source node generates a second probe data packet, where the second probe data packet has the source address and the destination address; and the source node sends the first packet according to the routing entry according to a predetermined probability a second probe data packet; the source node receives the second response data packet, the second response data packet includes a fourth path, and the fourth path is an opposite path of the third path; the third path is a path of the second probe data packet.
  • the address of the node if the matching is successful in the routing entry, and the address of the next hop of the source address in the fourth path, and the outbound interface and the address of the next hop in the routing entry, When the interfaces are the same, the source node updates the next hop node in the pre-established path evaluation entry and the evaluation value of the outbound interface.
  • an embodiment of the present invention further provides an electronic device.
  • the electronic device includes: a processing unit 401, a sending unit 402, and a receiving unit 403.
  • the electronic device can be used to implement any of the methods described above.
  • other unit modules can also be configured according to actual needs.
  • the processing unit 401 is configured to obtain a first probe data packet, where the first probe data packet has a source address and a destination address; and the electronic device a source node corresponding to the source address or an intermediate node on a path of the destination node corresponding to the destination node; and obtaining a new first probe based on the first probe data packet a data packet; wherein, when the electronic device is the intermediate node, recording an address of the electronic device in the first probe data packet to form the new first probe data packet; when the electronic device When the device is the source node, the new first probe data packet is the first probe data packet; the sending unit 402 is configured to send the new first probe data packet; and the receiving unit 403 is configured to: Receiving the first response data packet, where the first response data packet includes a second path, where the second path is an opposite path of the first path; the first path is the new first probe data packet
  • the processing unit 401 is further configured to: establish a routing entry according
  • the processing unit 401 is further configured to: establish a path evaluation entry, where the path evaluation entry includes the source address and the destination address, an address of the next hop node, and an outbound interface, The evaluation value, the service identifier, and/or the service target of the next hop node and the outbound interface; wherein the address of the next hop node is the previous address.
  • the sending unit 402 is configured to: randomly select the next hop node and send the new first probe data packet by the outbound interface.
  • the processing unit 401 is further configured to: obtain a second probe data packet, where the second probe data packet has the source address and the destination address; and obtain a new second based on the second probe data packet Detecting a data packet; wherein, when the electronic device is the intermediate node, recording an address of the electronic device in the first probe data packet to form the new first probe data packet; When the electronic device is the source node, the new first probe data packet is the first probe data packet;
  • the sending unit 402 is further configured to: send the new second probe data packet according to the routing entry according to a predetermined probability
  • the receiving unit 403 is further configured to: receive a second response data packet, where the second response data packet includes a fourth path, where the fourth path is an opposite path of the third path; and the third path is the new path The address of the node through which the second probe packet passes;
  • the processing unit 401 is further configured to: if the matching succeeds in the routing entry, and the last address of the address of the electronic device in the fourth path and the address of the next hop node in the routing entry When the same is the same, the next hop node in the path evaluation entry and the evaluation value of the outbound interface are updated.
  • the processing unit 401 is further configured to: establish a new routing entry according to the last address of the address of the electronic device in the fourth path, if the matching is not successful in the routing entry.
  • the processing unit 401 is further configured to: if the matching succeeds in the routing entry, and the last address of the address of the electronic device in the fourth path and the next hop in the routing entry When the addresses of the nodes are different, it is determined whether to update the routing entry.
  • the processing unit 401 is configured to: determine a new next hop node and an evaluation value of the outbound interface; according to the new next hop node and the evaluation value of the outbound interface and the next in the path evaluation entry The evaluation values of the hop node and the outbound interface determine whether to update the routing entry.
  • the processing unit 401 is configured to: determine a new next hop node and an evaluation value of the outbound interface; input the evaluation value of the new next hop node and the outbound interface into a random neural network, according to the random neural network The operation result determines whether to update the routing table; wherein each neuron of the random neural network corresponds to an outbound interface, and the random neural network is trained by the historical next hop node and the evaluation value of the outbound interface.
  • the processing unit 401 is configured to generate a first probe data packet, where the first probe 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 configured to send the first probe data packet, and the receiving unit 403 is configured to receive the first response data packet, where the first address
  • the response data packet includes a second path, where the second path is an opposite path of the first path; the first path is an address of a node through which the first probe data packet passes; and the processing unit 401 is further configured to: generate a first path establishment packet, where the first path establishment packet includes the first path; and a routing entry is established according to an address of the next hop node of the source address in the first path and an outbound interface; The routing entry includes the destination address, an address of the next hop node, and an outbound interface.
  • the processing unit 401 is further configured to: if the routing entry has been established, and the outbound interface in the established routing entry is inconsistent with the outbound interface corresponding to the first path, determine, corresponding to the first path Whether the outbound interface is better; when the outbound interface corresponding to the first path is better, the established routing entry is updated.
  • the sending unit 402 is further configured to: send a first path setup packet to an intermediate node between the source node and the destination node in the first path, so that the intermediate node is according to the first
  • the next hop address of the address of the intermediate node in the path and the outbound interface update their respective routing entries.
  • the processing unit 401 is further configured to: generate a second probe data packet, where the second probe data packet has the source address and the destination address;
  • the sending unit 402 is further configured to: send the second probe data packet according to the routing entry according to a predetermined probability
  • the receiving unit 403 is further configured to: receive a second response data packet, where the second response data packet includes a fourth path, where the fourth path is an opposite path of the third path; and the third path is the second path The address of the node through which the packet is probed;
  • the processing unit 401 is further configured to: if the matching succeeds in the routing entry, and the address of the next hop of the source address in the fourth path, and the outbound interface and the next hop in the routing entry When the address and the outbound interface are the same, the next hop node in the pre-established path evaluation entry and the evaluation value of the outbound interface are updated.
  • the receiving unit 403 is configured to receive a service data packet; the service data packet has a destination address, and includes a service identifier and/or a service target; 401. Perform a longest match in a pre-established routing entry according to the destination address, the service identifier, and/or a service target, where the routing entry includes a destination address, an address of a next hop node, and an outbound interface.
  • the service identifier and/or the service target are sent by the sending unit 402, configured to send the service data packet by matching the address of the next hop node of the successful routing entry and the outbound interface.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

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

Abstract

一种建立路由表的方法、电子设备及网络。该方法包括:生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;在包含有至少两个节点的网络上从所述源地址对应的源节点开始发送所述第一探测数据包直至到达所述目的地址对应的目的节点,并记录所述第一探测数据包所经过的节点的地址以形成第一路径;根据所述第一路径生成第二路径;其中,所述第二路径为所述第一路径的反向路径;生成第一应答数据包,所述第一应答数据包中包括所述第二路径;沿所述第二路径发送所述第一应答数据包直至到达所述源节点;根据所述第二路径建立路由表项,其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口。

Description

一种建立路由表的方法、电子设备及网络 技术领域
本发明涉及通信技术领域,尤其涉及一种建立路由表的方法、电子设备及网络。
背景技术
内部网关协议(英文:Interior Gateway Protocol,简称:IGP)是在一个自治网络内网关(主机和路由器)间交换路由信息的协议。路由信息能用于因特网协议(英文:Internet Protocol,简称:IP)或者其它网络协议来说明路由传送是如何进行的。
IGP协议的前提是每台路由器的每个接口都设定了IP地址,其中,路由器为转发IP数据包的转发设备。IGP协议运行前还需要在路由器上设定各种参数,例如在一种典型的IGP协议,开放式最短路径优先(英文:Open Shortest Path First,简称:OSPF)中,需要在路由器上配置进程号,路由器标识(RouterID),区域标识(area-id),关联的IP和通配符掩码等。
IGP路由协议包含以下内容:每台路由器都把自己的接口信息(其中包括了链路的成本值)定期向周边发送,也转发其它路由器发送的接口信息。每台路由器的信息充分送达到网络中每台路由器后,每台路由器都会计算出一张整网的拓扑结构图。每台路由器通过自己持有的网络拓扑结构图,计算出一颗以自己为根节点,到达任何其它已知的节点(即其各接口的网段)的最短路径树,然后生成路由表。路由表的索引项是信息互换过程中得知的所有的网段,而每一个网段对应的转发项,依照这棵树的拓扑指引的出接口和下一跳去填写。因此,一个可能的IP路由表项包括数据包的目的IP地址、下一跳的IP地址以及下一跳的出接口。
当网路拓扑发生变化时,比如某条链路中断时,就重复上述步骤,重新建立路由表项。
由上述描述可以看出,通过IGP路由协议建立路由表的方式需要每个路由节点上配置较多的参数,例如要在路由器上配置进程号、路由器标识、区域标识、关联的IP、通配符掩码等。
发明内容
本发明实施例提供一种建立路由表的方法、电子设备及网络,用以解决现有技术中存在的建立路由表的方式需要配置较多参数,无法实现零配置的技术问题。
第一方面,本发明实施例提供一种建立路由表的方法,包括:
第一节点获得第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述第一节点为所述源地址对应的源节点或所述源节点与所述目的地址对应的目的节点的路径上的中间节点;所述第一节点获得新的第一探测数据包;其中,当所述第一节点为所述中间节点时,所述第一节点将所述第一节点的地址记录在所述第一探测数据包中,形成所述新的第一探测数据包;当所述第一节点为所述源节点时,所述新的第一探测数据包即为所述第一探测数据包;所述第一节点发送所述新的第一探测数据包;所述第一节点接收所述第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述新的第一探测数据包所经过的节点的地址;所述第一节点根据所述第二路径中所述第一节点的地址的上一个地址建立路由表项;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;其中,所述下一跳节点的地址为所述上一个地址。
由上述描述可以看出,在本发明实施例中,通过探测数据包记录从源节点到目的节点的路径节点,再通过应答数据包反路径从目的节点到源节点进行转发,使得源节点和中间节点方便的进行路由表项的建立,相较于现有技术中IGP协议所描述的路由表项的建立方式,本发明实施例中的建立路由表的方法更加简单,各个节点可以实现零配置的建立路由表。
结合第一方面,在第一方面的第一种可能的实现方式中,所述第一节点 建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、所述下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标;其中,所述下一跳节点的地址为所述上一个地址。本实施例用来对路由表项进行评估,以便于方便对路由表项进行监测、优化。
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述第一节点发送所述新的第一探测数据包,包括:所述第一节点随机选择下一跳节点以及出接口发送所述新的第一探测数据包。
第二方面,本发明实施例提供一种管理路由表的方法,包括:
第一节点获得第二探测数据包,所述第二探测数据包具有源地址和目的地址;所述第一节点为所述源地址对应的源节点或所述源节点与所述目的地址对应的目的节点的路径上的中间节点;所述第一节点获得新的第二探测数据包;其中,当所述第一节点为所述中间节点时,所述第一节点将所述第一节点的地址记录在所述第二探测数据包中,形成所述新的第二探测数据包;当所述第一节点为源节点时,所述新的第二探测数据包即为所述第二探测数据包;所述第一节点按照预定几率根据预先建立的路由表项发送所述新的第二探测数据包;所述第一节点接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述新的第二探测数据包所经过的节点的地址;如果在所述路由表项中匹配成功,且所述第四路径中的所述第一节点的地址的上一个地址与所述路由表项中的下一跳节点的地址相同时,所述第一节点更新预先建立的路径评估表项中的所述下一跳节点以及出接口的评价值。
由以上描述可以看出,在本发明实施例中,利用探测包和应答数据包对预先建立的路由表进行监测,以提高路由表的自适应能力。
结合第二方面,在第二方面的第一种可能的实现方式中,所述方法还包括:如果在所述路由表项中未匹配成功时,所述第一节点根据所述第四路径 中所述第一节点的地址的上一个地址建立新的路由表项。本实施例可以用来发现新的路径,进而实现多路径共存。
结合第二方面,在第二方面的第二种可能的实现方式中,所述方法还包括:
如果在所述路由表项中匹配成功,且所述第四路径中所述第一节点的地址的上一个地址与所述路由表项中的下一跳节点的地址不同时,所述第一节点确定是否更新所述路由表项。本实施例中的方法可以用来对路由表项进行优化,以使路由表具有更高的自适应能力。
第二方面或第二方面的第一种可能的实现方式或第二方面的第二种可能的实现方式可以结合到第一方面或第一方面的第一种可能的实现方式或第一方面的第二种可能的实现方式中。
第三方面,本发明实施例提供一种建立路由表的方法,包括:源节点生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述源地址为所述源节点的地址;所述源节点发送所述第一探测数据包;所述源节点接收第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述第一探测数据包所经过的节点的地址;所述源节点生成第一路径建立包,所述第一路径建立包中包括所述第一路径;所述源节点根据所述第一路径中所述源地址的下一跳节点的地址以及出接口建立路由表项;其中,所述路由表项包括所述目的地址、所述下一跳节点的地址以及出接口。
由以上描述可以看出,在本实施例中,通过探测数据包记录从源节点到目的节点的路径节点,再通过应答数据包反路径从目的节点到源节点进行转发,然后再将反路径再次进行反路径处理并生成第一路径建立包,使得源节点方便的进行路由表项的建立,相较于现有技术中IGP协议所描述的路由表项的建立方式,本发明实施例中的建立路由表的方法更加简单,各个节点可以实现零配置的建立路由表。
结合第三方面,在第三方面的第一种可能的实现方式中,所述方法还包 括:如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述第一路径对应的出接口不一致,所述源节点则确定所述第一路径对应的出接口是否更优;当所述第一路径对应的出接口更优时,所述源节点则更新所述已经建立的路由表项。本实施例可以用来路由表的监测和优化,以提高路由表的自适应能力。
结合第三方面,在第三方面的第二种可能的实现方式中,所述方法还包括:所述源节点发送第一路径建立包给所述第一路径中所述源节点与所述目的节点之间的中间节点,以使所述中间节点根据所述第一路径中所述中间节点的地址的下一跳地址以及出接口更新各自的路由表项。
第二方面或第二方面的第一种可能的实现方式或第二方面的第二种可能的实现方式可以结合到第三方面或第三方面的第一种可能的实现方式或第三方面的第二种可能的实现方式中。
第四方面,本发明实施例提供一种建立路由表的方法,包括:生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;在包含有至少两个节点的网络上从所述源地址对应的源节点开始发送所述第一探测数据包直至到达所述目的地址对应的目的节点,并记录所述第一探测数据包所经过的节点的地址以形成第一路径;根据所述第一路径生成第二路径;其中,所述第二路径为所述第一路径的反向路径;生成第一应答数据包,所述第一应答数据包中包括所述第二路径;沿所述第二路径发送所述第一应答数据包直至到达所述源节点;根据所述第二路径建立路由表项,其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口。
结合第四方面,在第四方面的第一种可能的实现方式中,所述方法还包括:根据所述第二路径和业务目标建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标。
第五方面,本发明实施例提供一种管理路由表的方法,包括:生成第二探测数据包,所述第二探测数据包具有所述源地址和所述目的地址;在包含 有至少两个节点网络上从所述源地址对应的源节点开始按照预定几率根据预设的路由表项发送所述第二探测数据包直至到达所述地址对应的目的节点,并记录所述第二探测数据包所经过的节点的地址以形成第三路径;根据所述第三路径生成第四路径;其中,所述第四路径为所述第三路径的相反路径;生成第二应答数据包,所述第二应答数据包中包括所述第四路径;沿所述第四路径发送所述第二应答数据包直至到达所述源节点;如果在所述路由表项中匹配成功,且所述第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口不同时,则在所述路由表项中添加新的下一跳节点的地址以及出接口、在预先建立的路径评估表项中添加新的下一跳节点以及出接口的评价值;或者确定是否更新所述路由表项。
结合第五方面,在第五方面的第一种可能的实现方式中,所述方法还包括:如果在所述路由表项中匹配成功,且所述第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
结合第五方面,在第五方面的第二种可能的实现方式中,所述方法还包括:如果在所述路由表项中未匹配成功时,则根据所述第四路径建立新的路由表项,以及建立新的路径评估表项。
结合第五方面,在第五方面的第三种可能的实现方式中,所述确定是否更新所述路由表项,包括:确定新的下一跳节点以及出接口的评价值;根据所述新的下一跳节点以及出接口的评价值以及所述预先建立的路径评估表项中的下一跳节点以及出接口的评价值确定是否更新路由表项。
结合第五方面,在第五方面的第四种可能的实现方式中,所述确定是否更新路由表项,包括:确定新的下一跳节点以及出接口的评价值;将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
第五方面或第五方面的第一种可能的实现方式至第五方面的第四种可能的实现方式中的任意一种方式可以结合到第四方面或第四方面的第一种可能的实现方式中。
第六方面,本发明实施例提供一种建立路由表的方法,包括:生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;在包含有至少两个节点的网络上从所述源地址对应的源节点开始发送所述第一探测数据包直至到达所述目的地址对应的目的节点,并记录所述第一探测数据包所经过的节点的地址以形成第一路径;根据所述第一路径生成第二路径;其中,所述第二路径为所述第一路径的反向路径;生成第一应答数据包,所述第一应答数据包中包括所述第二路径;沿所述第二路径发送所述第一应答数据包直至到达所述源节点;生成第一路径建立包,所述第一路径建立包中包括所述第二路径的相反路径;根据所述相反路径建立路由表项,其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口。
结合第六方面,在第六方面的第一种可能的实现方式中,所述方法还包括:如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述相反路径对应的出接口不一致,则确定所述相反路径对应的出接口是否更优;当所述相反路径对应的出接口更优时,则更新所述已经建立的路由表项。
结合第六方面,在第六方面的第二种可能的实现方式中,所述方法还包括:生成第二探测数据包,所述第二探测数据包具有所述源地址和所述目的地址;在所述网络上从所述源节点按照预定几率根据所述路由表项发送所述第二探测数据包直至到达所述目的节点,并记录所述第二探测数据包所经过的节点的地址以形成第三路径;根据所述第三路径生成第四路径;其中,所述第四路径为所述第三路径的相反路径;生成第二应答数据包,所述第二应答数据包中包括所述第四路径;沿所述第四路径发送所述第二应答数据包直至到达所述源节点;如果在所述路由表项中匹配成功,且所述第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
第七方面,本发明实施例提供一种数据包发送方法,包括:接收业务数据包;所述业务数据包具有目的地址,并且包含业务标识和/或业务目标;根据所述目的地址、所述业务标识和/或业务目标在预先建立的路由表项中进行最长匹配,所述路由表项包括目的地址、下一跳节点的地址以及出接口、业务标识和/或业务目标;通过匹配成功的路由表项的下一跳节点的地址以及出接口发送所述业务数据包。
第八方面,本发明实施例提供一种电子设备,包括:处理器,用于生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述电子设备作为源节点,所述源地址为所述源节点的地址;接口;发送器,用于通过所述接口发送所述第一探测数据包;接收器,用于通过所述接口接收所述第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述第一探测数据包所经过的节点的地址;所述处理器还用于:根据所述第二路径中所述电子设备的地址的上一个地址建立路由表项;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;其中,所述下一跳节点的地址为所述上一个地址。
结合第八方面,在第八方面的第一种可能的实现方式中,所述处理器还用于:建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、所述下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标;其中,所述下一跳节点的地址为所述上一个地址。
结合第八方面或第八方面的第一种可能的实现方式,在第八方面的第二种可能的实现方式中,所述发送器用于:随机选择下一跳节点以及所述接口发送所述新的第一探测数据包。
第九方面,本发明实施例提供一种电子设备,包括:接口;接收器,用于通过所述接口接收第一探测包,所述第一探测数据包具有源地址和目的地址,以及所述第一探测数据包当前所经过节点的地址;所述电子设备为所述源地址对应的源节点与所述目的地址对应的目的节点的路径上的中间节点; 处理器,用于将所述电子设备的地址记录在所述第一探测数据包中,形成新的第一探测数据包;发送器,用于通过所述接口发送所述新的第一探测数据包;所述接收器还用于通过所述接口接收所述第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述新的第一探测数据包所经过的节点的地址;所述处理器还用于根据所述第二路径中所述电子设备的地址的上一个地址建立路由表项;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;其中,所述下一跳节点的地址为所述上一个地址。
结合第九方面,在第九方面的第一种可能的实现方式中,所述处理器还用于:建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、所述下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标;其中,所述下一跳节点的地址为所述上一个地址。
第十方面,本发明实施例提供一种电子设备,包括:处理器,用于生成第二探测数据包,所述第二探测数据包具有源地址和目的地址;所述电子设备作为源节点,所述源地址为所述源节点的地址;接口;发送器,用于按照预定几率根据预先建立的路由表项发送所述第二探测数据包;接收器,用于通过所述接口接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述第二探测数据包所经过的节点的地址;所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中的所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址相同时,更新预先建立的路径评估表项中的所述下一跳节点以及出接口的评价值。
结合第十方面,在第十方面的第一种可能的实现方式中,所述处理器还用于:如果在所述路由表项中未匹配成功时,根据所述第四路径中所述第一节点的地址的上一个地址建立新的路由表项。
结合第十方面,在第十方面的第二种可能的实现方式中,所述处理器还 用于:如果在所述路由表项中匹配成功,且所述第四路径中所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址不同时,确定是否更新所述路由表项。
结合第十方面的第二种可能的实现方式,在第十方面的第三种可能的实现方式中,所述处理器用于:确定新的下一跳节点以及出接口的评价值;根据所述新的下一跳节点以及出接口的评价值和所述路径评估表项中的下一跳节点以及出接口的评价值确定是否更新路由表项。
结合第十方面的第二种可能的实现方式,在第十方面的第四种可能的实现方式中,所述处理器用于:确定新的下一跳节点以及出接口的评价值;将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
第十一方面,本发明实施例提供一种电子设备,包括:接口;接收器,用于通过所述接口接收第二探测数据包,所述第二探测数据包具有源地址和目的地址,以及所述第二探测数据包当前所经过节点的地址;所述电子设备为所述源地址对应的源节点与所述目的地址对应的目的节点的路径上的中间节点;处理器,用于将所述电子设备的地址记录在所述第二探测数据包中,形成所述新的第二探测数据包;发送器,用于按照预定几率根据预先建立的路由表项通过所述接口发送所述新的第二探测数据包;所述接收器还用于:接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述新的第二探测数据包所经过的节点的地址;所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中的所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址相同时,更新所述路径评估表项中的所述下一跳节点以及出接口的评价值。
结合第十一方面,在第十一方面的第一种可能的实现方式中,所述处理 器还用于:在所述路由表项中未匹配成功时,根据所述第四路径中所述电子设备的地址的上一个地址建立新的路由表项。
结合第十一方面,在第十一方面的第二种可能的实现方式中,所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址不同时,确定是否更新所述路由表项。
结合第十一方面的第二种可能的实现方式,在第十一方面的第三种可能的实现方式中,所述处理器用于:确定新的下一跳节点以及出接口的评价值;根据所述新的下一跳节点以及出接口的评价值和所述路径评估表项中的下一跳节点以及出接口的评价值确定是否更新路由表项。
结合第十一方面的第二种可能的实现方式,在第十一方面的第四种可能的实现方式中,所述处理器用于:确定新的下一跳节点以及出接口的评价值;将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
第十二方面,本发明实施例提供一种电子设备,包括:处理器,用于生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述源地址为所述电子设备的地址,所述电子设备作为源节点;接口;发送器,用于通过所述接口发送所述第一探测数据包;接收器,用于通过所述接口接收第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述第一探测数据包所经过的节点的地址;所述处理器,还用于生成第一路径建立包,所述第一路径建立包中包括所述第一路径;根据所述第一路径中所述源地址的下一跳节点的地址以及出接口建立路由表项;其中,所述路由表项包括所述目的地址、所述下一跳节点的地址以及出接口。
结合第十二方面,在第十二方面的第一种可能的实现方式中,所述处理 器还用于:如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述第一路径对应的出接口不一致,确定所述第一路径对应的出接口是否更优;当所述第一路径对应的出接口更优时,更新所述已经建立的路由表项。
结合第十二方面或第十二方面的第一种可能的实现,在第十二方面的第二种可能的实现方式中,所述发送器还用于通过所述接口发送第一路径建立包给所述第一路径中所述源节点与所述目的节点之间的中间节点,以使所述中间节点根据所述第一路径中所述中间节点的地址的下一跳地址以及出接口更新各自的路由表项。
结合第十二方面或第十二方面的第一种可能的实现或第十二方面的第二种可能的实现方式,在第十二方面的第三种可能的实现方式中,所述处理器还用于:生成第二探测数据包,所述第二探测数据包具有所述源地址和所述目的地址;所述发送器还用于:按照预定几率根据所述路由表项发送所述第二探测数据包;所述接口器还用于:通过所述接口接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述第二探测数据包所经过的节点的地址;所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中所述源地址的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
第十三方面,本发明实施例提供一种网络,所述网络包括源节点、目的节点和位于所述源节点及所述目的节点之间的中间节点,所述源节点用于生成第一探测数据包并将所述第一探测数据包发送给与所述源节点相邻的中间节点;其中,所述第一探测数据包具有所述源节点的源地址和所述目的节点的目的地址;所述中间节点中从所述相邻的中间节点开始直至所述目的节点的相邻中间节点为止用于依次发送所述第一探测数据包直至到达所述目的节点,并将各自的地址记录在所述第一探测数据包中以形成第一路径;所述目的节点用于根据所述第一路径生成第二路径;其中,所述第二路径为所述第一路径的反向路径;生成第一应答数据包,所述第一应答数据包中包括所述 第二路径;所述目的节点、所述中间节点用于沿所述第二路径依次发送所述第一应答数据包直至到达所述源节点;所述中间节点和所述源节点用于根据所述第二路径建立路由表项,其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口。
结合第十三方面,在第十三方面的第一种可能的实现方式中,所述中间节点和所述源节点还用于根据所述第二路径和业务目标建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标。
第十四方面,本发明实施例提供一种网络,所述网络包括源节点、目的节点和位于所述源节点及所述目的节点之间的中间节点,所述源节点用于生成第二探测数据包并发送所述第二探测数据包给相邻的中间节点,所述第二探测数据包具有所述源节点的源地址和所述目的节点的目的地址;所述中间节点中从所述相邻的中间节点开始直至所述目的节点的相邻中间节点为止用于依次按照预定几率根据预设的路由表项发送所述第二探测数据包直至到达所述地址对应的目的节点,并将各自的地址记录在所述第二探测数据包中以形成第三路径;所述目的节点用于根据所述第三路径生成第四路径并生成第二应答数据包;其中,所述第四路径为所述第三路径的相反路径;所述第二应答数据包中包括所述第四路径;所述目的节点、所述中间节点用于沿所述第四路径依次发送所述第二应答数据包直至到达所述源节点;所述中间节点和所述源节点用于如果在所述路由表项中匹配成功,且所述第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口不同时,则在所述路由表项中添加新的下一跳节点的地址以及出接口、在预先建立的路径评估表项中添加新的下一跳节点以及出接口的评价值;或者确定是否更新所述路由表项。
结合第十四方面,在第十四方面的第一种可能的实现方式中,所述中间节点和所述源节点还用于:如果在所述路由表项中匹配成功,且所述第四路 径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
结合第十四方面,在第十四方面的第二种可能的实现方式中,所述中间节点和所述源节点还用于:如果在所述路由表项中未匹配成功时,则根据所述第四路径建立新的路由表项,以及建立新的路径评估表项。
第十四方面或第十四方面的第一种可能的实现方式或第十四方面的第二种可能的实现方式可以结合到第十三方面或第十三方面的第一种可能的实现方式中。
第十五方面,本发明实施例提供一种网络,所述网络包括源节点、目的节点和位于所述源节点及所述目的节点之间的中间节点,所述源节点用于生成第一探测数据包并发送所述第一探测数据包给相邻的中间节点,所述第一探测数据包具有所述源节点的源地址和所述目的节点的目的地址;所述中间节点中从所述相邻的中间节点开始直至所述目的节点的相邻中间节点为止用于依次发送所述第一探测数据包直至到达所述目的节点,并将各自的地址记录在所述第一探测数据包中以形成第一路径;所述目的节点用于根据所述第一路径生成第二路径并生成第一应答数据包;其中,所述第二路径为所述第一路径的反向路径;所述第一应答数据包中包括所述第二路径;所述目的节点、所述中间节点用于沿所述第二路径发送所述第一应答数据包直至到达所述源节点;所述源节点还用于生成第一路径建立包并根据所述相反路径建立路由表项,所述第一路径建立包中包括所述第二路径的相反路径;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;所述源节点还用于将所述第一路径建立包发送给相邻的中间节点;所述中间节点中从所述相邻的中间节点开始直至所述目的节点的相邻中间节点为止用于在接收到所述第一路径建立包时根据所述相反路径建立路由表项。
结合第十五方面,在第十五方面的第一种可能的实现方式中,所述源节点还用于:如果已经建立了路由表项,并且已经建立的路由表项中的出接口 与所述相反路径对应的出接口不一致,则确定所述相反路径对应的出接口是否更优;当所述相反路径对应的出接口更优时,则更新所述已经建立的路由表项。
第十六方面,本发明实施例提供一种电子设备,包括:接口;接收器,用于接收业务数据包;所述业务数据包具有目的地址,并且包含业务标识和/或业务目标;处理器,用于根据所述目的地址、所述业务标识和/或业务目标在预先建立的路由表项中进行最长匹配,所述路由表项包括目的地址、下一跳节点的地址以及出接口、业务标识和/或业务目标;发送器,用于通过匹配成功的路由表项的下一跳节点的地址以及出接口发送所述业务数据包;其中,所述出接口为所述接口中的接口。
第十七方面,本发明实施例提供一种电子设备,所述电子设备包括用于实现第一方面或第一方面的第一种可能的实现方式或第一方面的第二种可能的实现方式中的方法的功能单元。
第十八方面,本发明实施例提供一种电子设备,所述电子设备包括用于实现第二方面或第二方面的第一种可能的实现方式至第二方面的第四种可能的实现方式中任意一种方法的功能单元。
第十九方面,本发明实施例提供一种电子设备,所述电子设备包括用于实现第三方面或第三方面的第一种可能的实现方式或第三方面的第二种可能的实现方式中的方法的功能单元。
第二十方面,本发明实施例提供一种电子设备,所述电子设备包括用于实现第七方面的方法的功能单元。
附图说明
图1a-图1c为本发明实施例提供的一种网络结构图;
图2为本发明实施例提供的一种电子设备的结构图;
图3为本发明实施例提供的一种建立路由表的方法的流程图;
图4为本发明实施例提供的另一种建立路由表的方法的流程图;
图5为本发明实施例提供的再一种建立路由表的方法的流程图;
图6为本发明实施例提供的一种源节点侧的建立路由表的方法的流程图
图7为本发明实施例提供的另一种电子设备的结构图。
具体实施方式
本发明实施例提供一种建立路由表的方法、电子设备及网络,用以解决现有技术中存在的建立路由表的方式需要配置较多参数,无法实现零配置的技术问题。
以下将结合附图对本发明实施例的目的、技术方案和优点进行清楚、详细的描述。
本发明实施例提供的一种建立路由表的方法。该方法可以应用于一种网络中,请参考图1a至图1c,为本发明实施例中可能的网络结构图。如图1a至图1c所示,该网络包括源节点S、中间节点M和目的节点D。其中,源节点S、中间节点M和目的节点D可以均是路由设备,具体可以是接入、汇聚、核心路由器,企业网路由器(例如企业网边缘路由器),也可以是家庭网关,如图1c所示的网络。再例如,源节点S可以是一个用户设备,通过家庭网关接入因特网,与另外一个用户设备进行网络电话(英文:Voice over Internet Protocol,简称:VoIP)通信。此时,源节点S和目的节点D均为用户设备,而中间节点M即为路由器,如图1a所示的网络。再例如,目的节点D可以认为是服务或内容提供商的服务器。再例如,源节点S、中间节点M和目的节点D可以均为家庭或企业网络或者用户设备。
可选的,上述网络为IP网络,每个节点均有自己的IP地址,整个网络通过IP地址进行通信。
可选的,上述网络也可以是非IP网络,在非IP网络中,地址可以不是IP地址,而是对应于非IP网络的通信地址,整个网络通过该通信地址进行通信。
其中,本文中提到的用户设备,可以是无线终端也可以是有线终端,无 线终端可以是指向用户提供语音和/或其他业务数据连通性的设备,具有无线连接功能的手持式设备、或连接到无线调制解调器的其他处理设备。无线终端可以经无线接入网(英文:Radio Access Network;简称:RAN)与一个或多个核心网进行通信,无线终端可以是移动终端,如移动电话(或称为“蜂窝”电话)和具有移动终端的计算机,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(英文:Personal Communication Service;简称:PCS)电话、无绳电话、会话发起协议(英文:Session Initiation Protocol;简称:SIP)话机、无线本地环路(英文:Wireless Local Loop;简称:WLL)站、个人数字助理(英文:Personal Digital Assistant;简称:PDA)等设备。无线终端也可以称为系统、订户单元(Subscriber Unit)、订户站(Subscriber Station),移动站(Mobile Station)、移动台(Mobile)、远程站(Remote Station)、远程终端(Remote Terminal)、接入终端(Access Terminal)、用户终端(User Terminal)、用户代理(User Agent)、用户设备(User Device or User Equipment)。
接下来请参考图2,图2为本发明实施例提供的电子设备的可能的结构图。该电子设备为源节点S、中间节点M或目的节点D。如图2所示,该电子设备包括:处理器10、发送器20、接收器30、存储器40、接口50。存储器40、发送器20和接收器30和处理器10可以通过总线进行连接。当然,在实际运用中,存储器40、发送器20和接收器30和处理器10之间可以不是总线结构,而可以是其它结构,例如星型结构,本申请不作具体限定。
可选的,处理器10具体可以是中央处理器、特定应用集成电路(英文:Application Specific Integrated Circuit,简称:ASIC),可以是一个或多个用于控制程序执行的集成电路,可以是使用现场可编程门阵列(英文:Field Programmable Gate Array,简称:FPGA)开发的硬件电路,可以是基带处理器。
可选的,处理器10可以包括至少一个处理核心。
可选的,存储器40可以包括只读存储器(英文:Read Only Memory,简 称:ROM)、随机存取存储器(英文:Random Access Memory,简称:RAM)和磁盘存储器。存储器40用于存储处理器10运行时所需的数据。存储器40的数量为一个或多个。
可选的,接口50的数量为一个或多个,用于与相邻的节点连接。
可选的,发送器20和接收器30在物理上可以相互独立也可以集成在一起。发送器20可以通过接口50将数据包发送给其它节点。接收器30可以通过接口50接收其它节点发送的数据。
接下来请参考如图3所示,为本发明实施例中的建立路由表的方法的流程图。如图3所示,该方法包括:
步骤101:生成第一探测数据包,第一探测数据包具有源地址和目的地址;
步骤102:在包含有至少两个节点的网络上从所述源地址对应的源节点开始发送第一探测数据包直至到达所述目的地址对应的目的节点,并记录第一探测数据包所经过的节点的地址以形成第一路径;
步骤103:根据所述第一路径生成第二路径;其中,第二路径为第一路径的反向路径;
步骤104:生成第一应答数据包,第一应答数据包中包括第二路径;
步骤105:沿第二路径发送第一应答数据包直至到达所述源节点;
步骤106:根据所述第二路径建立路由表项,其中,路由表项包括所述目的地址、下一跳节点的地址以及出接口。
具体的,步骤101由源节点S来执行。举例来说,当有业务需要接入网络时,源节点S生成一个第一探测数据包(英文:Exploring Packet,简称:EP)。第一EP具有源地址和目的地址。其中,源地址即为源节点S的IP地址。目的地址为目的节点D的IP地址。
接下来执行步骤102,即通过例如上述网络从源地址开始发送第一EP包直到到达目的地址。具体的,首先由源节点S发送第一EP包。如果源节点S只有一个出接口,即前述描述的接口50,那么源节点S的发送器20通过该唯一的接口50发送第一EP给与该接口50连接的中间节点M。如果源节点S 的出接口有多个,即接口50有多个,那么源节点S的发送器20可以随机选择一个接口50发送第一EP给与该接口50连接的中间节点M。当然,在实际运用中,源节点以及之间节点除了可以使用随机选择接口的方式之外,还可以采用其它方式,例如从预设的固定接口发送第一EP,或者以广播的方式发送第一EP。
当中间节点M接收到第一EP时,可以执行与源节点S类似的操作,即将该中间节点M节点的地址写入第一EP中,形成新的第一EP,并随机选择一个或者是从预设的固定接口50发送新的第一EP。在后续的中间节点M重复上述过程,直到第一EP到达目的节点D。此时步骤102执行完成。
当第一EP到达目的节点D时,第一EP已经记录了其所经过的节点的地址,这些经过的节点的地址形成第一路径。
可选的,第一EP中还记录了达到每个节点的时间戳,关于时间戳的作用,将在后面进行详细描述。
需要说明的是,第一EP可以设置有生存时间(英文:Time to live,简称:TTL),所以,在发送第一EP时,有可能会出现在到达目的节点D之前,TTL为0被丢弃的情况。
当第一EP到达目的节点D之后,目的节点D可以执行步骤103和步骤104。具体的,在步骤103中,可以是先将第一路径中的环路去除,然后将去除了环路的相反路径作为第二路径。目的节点D生成第一应答数据包(英文:Response Packet,简称:RP),并在第一RP中携带第二路径。换言之,第一RP能够依据第二路径,逐跳的到达源节点。
接下来执行步骤105。具体的,目的节点D的发送器20通过第二路径发送第一RP给与中间节点M。举例来说,假设第一路径为源节点S→中间节点M1→中间节点M2→中间节点M3→目的节点D。那么第二路径为目的节点D→中间节点M3→中间节点M2→中间节点M1→源节点S。其中,中间节点M表示第一EP是从中间节点M转发的。目的节点D按照第二路径将第一RP发送给中间节点M3。
当中间节点M接收到第一RP时,执行与目的节点D类似的操作,即按照第二路径发送第一RP。其它中间节点M重复上述过程,直到第一RP到达源节点S。此时步骤105执行完成。
在中间节点M以及源节点S接收到第一RP时,如果未建立路由表项,或者想重新建立路由表项,则可以执行步骤106,即根据第二路径建立路由表项。具体的,该路由表项可以包括所述目的地址,下一跳节点的地址以及出接口。举例来说,第二路径继续以前述例子为例,当中间节点M3接收到第一RP时,进行目的地址匹配,发现还没有建立目的节点D的路由表项,则建立路由表项,其中一种可能的路由表的形式如表一所示。
目的地址 下一跳节点 出接口
目的节点D的IP地址 节点D的IP地址 2
表一
需要说明的是,通常各个节点会和邻居节点进行交互,所以会得到邻居节点的地址和出接口的对应关系,所以根据第二路径中下一跳节点的地址,即可得到下一跳节点对应的出接口。当然,也可以是中间节点S和源节点S将接收到第一RP包的接口作为下一跳节点的出接口。
类似的,当中间节点M2接收到第一RP时,进行目的地址匹配,发现还没有建立目的节点D的路由表项,则建立路由表项,其中一种可能的路由表的形式如表二所示。
目的地址 下一跳节点 出接口
目的节点D的IP地址 中间节点M3的IP地址 3
表二
中间节点M重复上述步骤建立各自的针对目的节点D的路由表项。当第一RP到达源节点S时,源节点S进行目的地址匹配,发现还没有建立目的节点D的路由表项,则建立路由表项,其中一种可能的路由表的形式如表三所示。
目的地址 下一跳节点 出接口
目的节点D的IP地址 中间节点M1的IP地址 4
表三
至此,源节点S以及中间节点M建立了到目的节点D的路由表项。因此,在步骤106之后,当有业务数据包需要从源节点S发送到目的节点D时,源节点S和中间节点M可以根据上述路由表项进行路由,转发业务数据包直至到达目的节点D。
由上述描述可以看出,在本发明实施例中,通过探测数据包记录从源节点S到目的节点D的路径节点,再通过应答数据包反路径从目的节点D到源节点S进行转发,使得源节点S和中间节点D方便的进行路由表项的建立,相较于现有技术中IGP协议所描述的路由表项的建立方式,本发明实施例中的建立路由表的方法更加简单,各个节点可以实现零配置的建立路由表。
可选的,第一EP还包括业务标识和/或业务目标,具体的,包括三种情况,第一EP还包括业务标识,或者,第一EP还包括业务标识和业务目标,或者,第一EP还包括业务目标。
其中,业务标识,是该业务的唯一标识。例如,业务标识为针对该业务的一个数字证书,该数字证书可以由源节点S分配或者源节点S到特定的服务器申请得到。该数字证书具有全局唯一性。再例如,可以用源节点S的标识加上序列号来表达该业务的业务标识。
当然,在实际运用中,业务标识也可以不是唯一的,业务标识可以结合其它标识共同唯一确定一个业务。
业务目标可以是用户业务的量化的服务质量(英文:Quality of Service,简称:QoS)等需求的一个或者多个的组合。举例来说,目标可以是最小化时延、最小化丢包率、最小化抖动(针对语音业务)、最小成本等中的一个或多个。
网络中可以预设默认的业务目标(如最小化跳数),此时,第一EP中可 以仅包括业务标识,也可以不包括业务标识。
对应的,第一RP中也包括业务标识和/或业务目标。具体的,第一EP中包括哪个,第一RP中就包括哪个。
可选的,步骤106中,建立路由表项时,路由表项还包括业务标识和/或业务目标。即,路由表项可以单独包括业务标识,也可以单独包括业务目标,也可以同时包括业务标识以及业务目标。关于路由表项中的业务标识、业务目标的用途将在后面介绍。
因此,在步骤105执行的过程中,该方法还包括:根据所述第二路径、业务标识和/或业务目标建立路径评估表项,其中,所述路径评估表项可以包括所述源地址和所述目的地址、下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标。
其中,需要说明的是,业务标识和/业务目标作为整体与第二路径为并列的对象。业务标识和/业务目标包括三种情况,一是单独的业务标识,二是单独的业务目标,三是二者均包括。
在具体实施过程中,接收到第一RP的中间节点M和源节点S可以根据所述第二路径、业务目标等建立路径评估表项。其中一种可能的路径评估表项如下表四所示。
Figure PCTCN2015099971-appb-000001
表四
其中,下一跳节点以及出接口的评价值根据业务目标按照预定规则确定的。在实际运用中,可以将业务目标量化(例如延时、丢包率),并进一步转化为数值,即为评价值。可选的,当目标有多个时,可以在量化目标时,为每个目标设定一个权值。在目标包括时延时,可以通过前述描述的时间戳来确定。
举例来说,当源节点S接收到第一RP时,根据所述第二路径、业务标识 以及业务目标建立路径评估表项,其中,第一RP中携带的业务目标为低时延,业务标识为b1。建立的路由评估表如下表五所示。
Figure PCTCN2015099971-appb-000002
表五
在表五中,评价值假设为按照上述描述的规则或者其它规则计算出来的值,仅为举例,而不是用于限定本发明。
可选的,为了监测路径的性能以及优化路由表,以使网络可以更快的对网络流量的变化作出反应,提供路由表的自适应能力,该方法还包括:生成第二探测数据包,所述第二探测数据包具有所述源地址和所述目的地址;在所述网络上从所述源节点开始按照预定几率根据预先建立的路由表项发送所述第二探测数据包直至到达所述目的节点,并记录所述第二探测数据包所经过的节点的地址以形成第三路径;根据所述第三路径生成第四路径;其中,
第四路径为第三路径的相反路径;生成第二应答数据包,所述第二应答数据包中包括所述第四路径;沿所述第四路径发送所述第二应答数据包直至到达所述源节点。
可选的,如果在所述路由表项中目的地址等匹配成功,且所述第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,即下一跳的地址相同,且下一跳节点的出接口也相同,则更新预先建立的路由评估表项中的下一跳节点以及出接口的评价值。
可选的,根据第二RP中携带的信息来更新下一跳节点以及出接口的评价值。举例来说,第二RP中包括有业务目标,例如为低时延,那么第二RP包中就会携带到达每个节点的时间戳,所以可以根据时间戳重新计算下一跳节 点以及出接口的评价值,然后利用重新计算得到的评价值覆盖原有的评价值。该部分内容可以看作是对原有路径信息的更新。
可选的,预先建立的路由评估表项可以通过前述方法建立的,也可以是通过其它方式建立的。
可选的,可以是当有新业务需要接入网络时,或者是对于旧的业务,源节点S可以生成第二EP。
可选的,可以是周期性发送第二EP进行路径监测和路径探索。
因为已经通过前述方法或其它方法,源节点S和中间节点M已经建立了到达目的节点D的路由表项,所以源节点S和中间节点M在所述网络上从所述源节点按照预定几率根据已经建立的路由表项发送第二EP直至到达目的节点D,在这个转发的过程中,记录第二EP所经过的节点的地址以形成第三路径,该步骤与前述步骤102类似,在此不再赘述。
当第二EP到达目的节点D之后,目的节点获取第二EP中记录的第三路径,并根据第三路径生成第四路径,第四路径为第三路径的反向路径(如果第三路径存在环路则去除),其中,该步骤与前述步骤103类似,在此不再赘述。
与步骤104类似,目的节点D生成第二RP,其中,第二RP中包括第四路径。接下来执行与步骤105类似的步骤。即沿第四路径发送第二RP直至到达源节点S。在该步骤的执行过程中,接收到第二RP的节点,如中间节点M、源节点S,如果在自己的路由表项中匹配成功,且所述第四路径中的自己地址的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,则更新前述评价值。
举例来说,假设该业务以时延为评价标准,RP到达会产生新的时间戳和时延数值,据此可以更新该下一跳节点以及出接口的评价值。
可选的,预定几率可以根据实际情况进行设置。举例来说,假设预定几率为95%,换言之,即表示有5%的几率,第二EP被随机路由,而不是按照原有路由表项进行转发。如果第二EP正好全部被按照所述路由表项转发,那 么第二RP就会在中间节点、源节点S匹配成功,且第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同。换言之,这样的第二EP是用于对原有路径的监测,并可以根据监测结果更新原有路径信息。
如果第二EP在部分中间节点M上,或者源节点S上,没有被按照所述路由表项转发,那么接收到第二RP的节点可能不是第二路径中的节点,所以还未建立到目的节点D的路由表项,所以接收到第二RP的节点,中间节点M可以通过目的地址进行匹配,若发现还未建立路由表项,即未匹配成功时,则可以如步骤106中所述的方式建立新的路由表项。在本实施例中,第二EP可以被用来探索新的路径,有利于实现多路径共存。
可选的,还可以如前述所述的方式建立新的路径评估表项。
可选的,如果第二EP在部分中间节点M上,或者源节点S上,没有被按照所述路由表项转发,那么接收到第二RP的节点也可能是第二路径中的节点,例如中间节点M3,那么路由表项就会匹配成功。然而,虽然目的地址匹配,但是可能第四路径中的中间节点M3的地址的下一跳的地址以及出接口与步骤106中得到的下一跳的地址以及出接口不同,此时,可以在前述路由表项中添加新的下一跳节点的地址以及出接口、以及在前述路径评估表项中添加新的下一跳节点以及出接口的评价值。或者,确定是否更新路由表项。在本实施例中,可以看作是对新路径的探索,有利于找到更优的路径。
可选的,可以根据新的下一跳节点以及出接口的评价值以及原有的下一跳节点以及出接口的评价值确定更新路由表项。举例来说,假设目标为低时延,原有的下一跳节点以及出接口的评价值为0.05,而根据业务目标以及第四路径中新的时间戳确定出的新的下一跳节点以及出接口的评价值为0.04,那么则优化路由表,后续会按照新的下一跳节点的路径转发业务数据包。
当然,在实际运用中,也可以根据其它规则确定是否要更新路由表,例如:确定新的下一跳节点以及出接口的评价值,将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定 是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
举例来说,可以在中间节点M针对每个业务建立一个人工神经网络,例如粒度可以是三元组(源地址、目的地址、业务标识或目标)。通过机器学习的算法,对上述网络实时的测量值,例如评价值训练该神经网络,并且根据训练的结果来决策是否更新路由表。以下将简单描述一种随机人工神经网络在本发明实施例中的实施方式。举例来说,中间节点M的每个接口50对应一个神经元。神经元有两个属性,一是兴奋权值,二是抑制权值。中间节点M通过前述方式获得评价值G,然后R=1/G。然后根据预定算法计算一个阈值出来,例如Tk=aTk-1+(1-a)Rk,其中,a的取值范围为(0-1),用来调节Tk-1和Rk的权重,Tk是一个动态的数值,来跟踪历史奖励的值,k=1,2,3,……,是不断产生的奖励值R的测量值。然后根据该Tk-1和Rk的大小来决定神经元的两个属性的增加幅度,具体的,当Tk-1小于或等于Rk,则触发奖励操作,通向神经元2(假设当前的出接口对应的神经元是神经元2)的兴奋权值就会有较大的增加,通向其它神经元的抑制权值就会较小的增加。如果Tk-1大于Rk,则触发惩罚操作,通向神经元2的抑制权值就会有较大增加,通向其它神经元的兴奋权值就会有较小增加。当获得新的评价值后,则继续按照上述方式进行处理,不断对神经网络进行训练,最后选择神经网络的运算结果作为下一跳的出接口,从原理上讲,兴奋值越高的出接口越容易被选中。如果新选择出的出接口与之前的出接口不同,那么就可以更新路由表。
可选的,如果第二EP在部分中间节点M上,或者源节点S上,没有被按照所述路由表项转发,那么接收到第二RP的节点也可能是第二路径中的节点,例如中间节点M1,那么路由表项就会匹配成功。假设在M1上目的地址匹配,且第四路径中的中间节点M1的地址的下一跳的地址以及出接口与步骤106中得到的下一跳的地址以及出接口相同,此时,可选的,可以更新前述路径评估表项中的下一跳节点以及出接口的评价值。
上述描述了路由表的建立、监测以及优化的实施方式,下面将描述如何 对业务数据包进行转发。
本发明的IP转发,支持进一步按照目的地址和业务标识/业务目标进行,但是也可以兼容没有业务目标和业务标识的流量。即在建立IP路由表的时候,同时加入业务标识和/或业务目标的条目,数据报文如果携带了业务标识、业务目标,则进行最长匹配,按照匹配了业务标识/业务目标的出接口选择出接口。
具体的,对于源节点S和中间节点M而言,该方法包括:
接收业务数据包;所述业务数据包具有目的地址,并且包含业务标识和/或业务目标;
根据所述目的地址、所述业务标识和/或业务目标在预先建立的路由表项中进行最长匹配,所述路由表项包括目的地址、下一跳节点的地址以及出接口、业务标识和/或业务目标;
通过匹配成功的路由表项的下一跳节点的地址以及出接口发送所述业务数据包。
需要说明的是,本实施例中业务标识和/或业务目标的描述方式,针对的目标对象为业务标识和业务目标。业务标识和/或业务目标作为整体与其它目标对象并列。
可选的,在本实施例中,最长匹配原则是指IP网络中当路由表中有多条条目可以匹配目的地址时,一般就采用掩码最长(最精确)的一条作为匹配项并确定下一跳。也叫最长前缀匹配,是路由器在查找路由表进行选路的算法。
例如,考虑下面这个IPv4的路由表:
192.168.20.16/28e0
192.168.0.0/16s0
在要查找目的地址192.168.20.19时,不难发现上述两条都匹配,即这两条都包含要查找的目的地址。此时根据最长掩码匹配原则,选择第一条进行匹配(更明确),所以数据包将通过e0发送出去。
再例如,在IPv6的场景下,考虑下面这个IPv6的路由表:
2001:db8:21d0:3f48:1b9:88d1:cf98:fcaf/128e0
::/0s0
在要查找目的地址2001:db8:21d0:3f48:1b9:88d1:cf98:fcaf时,发现上述两条都匹配,即这两条都包含要查找的目的地址。此时根据最长掩码匹配原则,选择第一条进行匹配(更明确),所以数据包将通过e0发送出去。
可选的,在本实施例中的匹配成功,是指目的地址、业务标识和/或业务目标均匹配。因为在现有技术中,仅按照目的地址进行汇聚,但是对业务不区分,导致传统的路由方案的颗粒度比较大,而本发明实施例中,按照目的地址+业务标识和/业务目标进行汇聚,所以颗粒度稍低。
以下将描述源地址对应的源节点,或者源节点与目的地址对应的目的节点的路径上的中间节点侧的建立路由表的方法,为便于描述,以下将统称为第一节点。请参考图4所示,为本发明实施例提供的第一节点侧的建立路由表的方法流程图,该方法包括:
步骤201:第一节点获得第一探测数据包,所述第一探测数据包具有源地址和目的地址;
步骤202:第一节点获得新的第一探测数据包;其中,当第一节点为中间节点时,第一节点将第一节点的地址记录在第一探测数据包中,形成新的第一探测数据包;当第一节点为源节点时,新的第一探测数据包即为步骤201中的第一探测数据包;
步骤203:第一节点发送新的第一探测数据包;
步骤204:第一节点接收第一应答数据包,第一应答数据包中包括第二路径,第二路径为第一路径的相反路径(如果有环路则去除);第一路径为新的第一探测数据包所经过的节点的地址;
步骤205:第一节点则根据第二路径中第一节点的地址的上一个地址建立路由表项;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;其中,所述下一跳节点的地址为所述上一个地址。
其中,上一个地址填写在路由表项的下一跳节点的地址栏中。
当第一节点为源节点S时,步骤201包括:第一节点生成第一EP。举例来说,可以是第一节点的处理器10生成第一EP。
当第一节点为中间节点M时,步骤201包括:第一节点接收第一EP。举例来说,第一节点的接收器30通过接口50接收第一EP。
在步骤202中,具体例如是第一节点的处理器10将第一节点的地址封装在第一EP中,形成新的第一EP。
在步骤203中,具体例如是第一节点的发送器20通过接口50发送新的第一EP。
在步骤204中,具体例如是第一节点的接收器30通过接口50接收第一RP。
步骤205的实施方式,具体请参考前述对步骤106的描述。具体的,步骤205可以由第一节点的处理器10执行。
可选的,该方法还包括:第一节点建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、下一跳节点的地址以及出接口、下一跳节点以及出接口的评价值、业务标识和/或业务目标。其中,所述下一跳节点的地址为所述上一个地址。具体的实施过程在前述已描述过,在此不再赘述。该步骤可以由第一节点的处理器10执行。
可选的,步骤203包括:第一节点随机选择下一跳节点以及出接口发送新的第一探测数据包。在实际运用中,也可以是通过其它规则发送,例如通过预设的固定接口发送新的第一EP,或者是以广播的形式发送新的第一EP。
可选的,该方法还包括:第一节点获得第二探测数据包,所述第二探测数据包具有所述源地址和所述目的地址;获得新的第二探测数据包;其中,当第一节点将第一节点的地址记录在第二探测数据包中,形成新的第二探测数据包;当第一节点为源节点时,新的第二探测数据包即为所述第二探测数据包;第一节点按照预定几率根据所述路由表项发送新的第二探测数据包;第一节点接收第二应答数据包,第二应答数据包中包括第四路径,第四路径 为第三路径的相反路径(如果有环路则去除);第三路径为所述新的第二探测数据包所经过的节点的地址;如果在所述路由表项中匹配成功,且第四路径中的所述第一节点的地址的上一个地址与所述路由表项中的下一跳节点的地址相同时,可选的,第一节点更新路径评估表项中的下一跳地址以及出接口的评价值。该方法的具体实施过程请参考前述的描述,在此不再赘述。
进一步,所述方法还包括:如果在所述路由表项中未匹配成功时,第一节点根据所述第四路径中所述第一节点的地址的上一个地址建立新的路由表项。
进一步,所述方法还包括:如果在所述路由表项中匹配成功,且所述第四路径中所述第一节点的地址的上一个地址与所述路由表项中的下一跳节点的地址不同时,可选的,确定是否更新所述路由表项。
可选的,所述确定是否更新所述路由表项,包括:第一节点确定新的下一跳节点以及出接口的评价值;第一节点根据所述新的下一跳节点以及出接口的评价值和所述路径评估表项中的下一跳节点以及出接口的评价值确定是否更新路由表项。
或者,确定新的下一跳节点以及出接口的评价值;将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
上述方法步骤的实施方式已经在前述描述,所以在此不再赘述。
接下来将描述另一种建立路由表的方法,请参考图5所示,该方法包括:
步骤301:生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;
步骤302:在包含有至少两个节点的网络上从所述源地址对应的源节点开始发送所述第一探测数据包直至到达所述目的地址对应的目的节点,并记录所述第一探测数据包所经过的节点的地址以形成第一路径;
步骤303:根据所述第一路径生成第二路径;其中,所述第二路径为所述 第一路径的反向路径;
步骤304:生成第一应答数据包,所述第一应答数据包中包括所述第二路径;
步骤305:沿所述第二路径发送所述第一应答数据包直至到达所述源节点;
步骤306:生成第一路径建立包,所述第一路径建立包中包括所述第二路径的相反路径;
步骤307:根据所述相反路径建立路由表项,其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口。
其中,步骤301至步骤305的具体实施方式类似于前述步骤101至步骤105。步骤307的具体实施方式与步骤106类似。
在步骤306中,第二路径即为去除了环路的第一路径的相反路径。
可选的,该路径建立包携带该业务的带宽需求,路径上的节点为该业务预先分配带宽资源。该方法中源节点可能收到多个携带第二路径的RP包,源节点可以选择一个或多个路径来传输业务,以及满足业务的带宽需求。
由以上描述可以看出,本发明实施例中的方法规避了各个路由器独立决策转发接口带来的路由环路的风险,并且进一步的,本发明实施例中的方法支持在路径上预留资源,以及为多路径传输业务提供了更好的支持。
可选的,路由表项还包括业务标识和/或业务目标。
可选的,所述方法还包括:对于源节点,如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述相反路径对应的出接口不一致,则确定所述相反路径对应的出接口是否更优;当所述相反路径对应的出接口更优时,则更新所述已经建立的路由表项。该步骤具体可以由源节点的处理器10来执行。
可选的,确定所述相反路径对应的出接口是否更优,具体可以通过出接口的评价值的大小来确定,也可以通过例如前述的随机人工网络的方式来确定,具体的实施过程与前述类似,所以此处不再赘述。
可选的,在步骤207之后,该方法还包括:发送第一路径建立包给所述相反路径上的其它中间节点,以使其它中间节点根据所述相反路径建立路由表项。
可选的,该方法还包括:生成第二探测数据包,第二探测数据包具有述源地址和所述目的地址;在所述网络上从所述源节点按照预定几率根据预先建立的路由表项发送第二探测数据包直至到达所述目的节点,并记录第二探测数据包所经过的节点的地址以形成第三路径;根据第三路径生成第四路径;其中,第四路径为第三路径的相反路径;生成第二应答数据包,第二应答数据包中包括所述第四路径;沿第四路径发送第二应答数据包直至到达所述源节点;如果在所述路由表项中匹配成功,且所述第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
该方法的最后一个步骤的执行主体为源节点,预先建立的路由表,可以是通过图3所示的方法建立的,也可以是通过图5所示的方法建立的,或者是通过其它方式建立的。该部分内容的其余部分与前述描述第二EP包的内容类似,所以在此不再赘述。
接下来请再参考图6所示,为图5所示方法的源节点侧的流程图。该方法包括:
步骤401:源节点生成第一探测数据包,第一探测数据包具有源地址和目的地址;所述源地址为所述源节点的地址;
步骤402:源节点发送第一探测数据包;
步骤403:源节点接收第一应答数据包,第一应答数据包中包括第二路径,第二路径为第一路径的相反路径;第一路径为第一探测数据包所经过的节点的地址;
步骤404:源节点生成第一路径建立包,第一路径建立包中包括第一路径;
步骤405:源节点根据第一路径中所述源地址的下一跳节点的地址以及出接口建立路由表项;其中,所述路由表项包括所述目的地址、所述下一跳节 点的地址以及出接口。
其中,步骤401与步骤201类似,步骤402与步骤203类似,步骤404至步骤405与步骤306至步骤607类似。
可选的,所述方法还包括:如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述第一路径对应的出接口不一致,源节点则确定所述第一路径对应的出接口是否更优;当所述第一路径对应的出接口更优时,源节点则更新所述已经建立的路由表项。
可选的,所述方法还包括:所述源节点发送第一路径建立包给所述第一路径中所述源节点与所述目的节点之间的中间节点,以使所述中间节点根据所述第一路径中所述中间节点的地址的下一跳地址以及出接口更新各自的路由表项。
可选的,所述方法还包括:源节点生成第二探测数据包,第二探测数据包具有所述源地址和所述目的地址;源节点按照预定几率根据所述路由表项发送所述第二探测数据包;源节点接收第二应答数据包,第二应答数据包中包括第四路径,第四路径为第三路径的相反路径;第三路径为所述第二探测数据包所经过的节点的地址;如果在所述路由表项中匹配成功,且所述第四路径中所述源地址的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,可选的,源节点更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
基于同一发明构思,本发明实施例还提供一种电子设备,请参考图6所示,该电子设备包括:处理单元401、发送单元402以及接收单元403。
该电子设备可用于实现前述所描述的任一方法。在实际运用过程中,还可以根据实际需求配置其它单元模块。
具体的,当该电子设备用于实现如图4所示的方法时,处理单元401,用于获得第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述电子设备为所述源地址对应的源节点或所述源节点与所述目的地址对应的目的节点的路径上的中间节点;并基于所述第一探测数据包获得新的第一探测 数据包;其中,当所述电子设备为所述中间节点时,将所述电子设备的地址记录在所述第一探测数据包中,形成所述新的第一探测数据包;当所述电子设备为所述源节点时,所述新的第一探测数据包即为所述第一探测数据包;发送单元402,用于发送所述新的第一探测数据包;接收单元403,用于接收所述第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述新的第一探测数据包所经过的节点的地址;处理单元401还用于:根据所述第二路径中所述电子设备的地址的上一个地址建立路由表项;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;其中,所述下一跳节点的地址为所述上一个地址。
可选的,处理单元401还用于:建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、所述下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标;其中,所述下一跳节点的地址为所述上一个地址。
可选的,发送单元402用于:随机选择下一跳节点以及出接口发送所述新的第一探测数据包。
可选的,处理单元401还用于:获得第二探测数据包,所述第二探测数据包具有所述源地址和所述目的地址;并基于所述第二探测数据包获得新的第二探测数据包;其中,当所述电子设备为所述中间节点时,将所述电子设备的地址记录在所述第一探测数据包中,形成所述新的第一探测数据包;当所述电子设备为所述源节点时,所述新的第一探测数据包即为所述第一探测数据包;
发送单元402还用于:按照预定几率根据所述路由表项发送所述新的第二探测数据包;
接收单元403还用于:接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述新的第二探测数据包所经过的节点的地址;
处理单元401还用于:如果在所述路由表项中匹配成功,且所述第四路径中的所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址相同时,更新所述路径评估表项中的所述下一跳节点以及出接口的评价值。
可选的,处理单元401还用于:如果在所述路由表项中未匹配成功时,根据所述第四路径中所述电子设备的地址的上一个地址建立新的路由表项。
可选的,处理单元401还用于:如果在所述路由表项中匹配成功,且所述第四路径中所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址不同时,确定是否更新所述路由表项。
可选的,处理单元401用于:确定新的下一跳节点以及出接口的评价值;根据所述新的下一跳节点以及出接口的评价值和所述路径评估表项中的下一跳节点以及出接口的评价值确定是否更新路由表项。
可选的,处理单元401用于:确定新的下一跳节点以及出接口的评价值;将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
具体的,当该电子设备用于实现前述源节点侧的路由表建立方法时,处理单元401,用于生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述源地址为所述电子设备的地址;所述电子设备作为源节点;发送单元402,用于发送所述第一探测数据包;接收单元403,用于接收第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述第一探测数据包所经过的节点的地址;处理单元401还用于:生成第一路径建立包,所述第一路径建立包中包括所述第一路径;根据所述第一路径中所述源地址的下一跳节点的地址以及出接口建立路由表项;其中,所述路由表项包括所述目的地址、所述下一跳节点的地址以及出接口。
可选的,处理单元401还用于:如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述第一路径对应的出接口不一致,确定所述第一路径对应的出接口是否更优;当所述第一路径对应的出接口更优时,更新所述已经建立的路由表项。
可选的,发送单元402还用于:发送第一路径建立包给所述第一路径中所述源节点与所述目的节点之间的中间节点,以使所述中间节点根据所述第一路径中所述中间节点的地址的下一跳地址以及出接口更新各自的路由表项。
可选的,处理单元401还用于:生成第二探测数据包,所述第二探测数据包具有所述源地址和所述目的地址;
发送单元402还用于:按照预定几率根据所述路由表项发送所述第二探测数据包;
接收单元403还用于:接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述第二探测数据包所经过的节点的地址;
处理单元401还用于:如果在所述路由表项中匹配成功,且所述第四路径中所述源地址的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
具体的,当该电子设备用于实现前述业务数据包发送方法时,接收单元403,用于接收业务数据包;所述业务数据包具有目的地址,并且包含业务标识和/或业务目标;处理单元401,用于根据所述目的地址、所述业务标识和/或业务目标在预先建立的路由表项中进行最长匹配,所述路由表项包括目的地址、下一跳节点的地址以及出接口、业务标识和/或业务目标;发送单元402,用于通过匹配成功的路由表项的下一跳节点的地址以及出接口发送所述业务数据包。
前述实施例中的各个方法中的各种变化方式和具体实例同样适用于本实 施例的电子设备,通过前述对各个方法的详细描述,本领域技术人员可以清楚的知道本实施例中域间路由装置的实施方法,所以为了说明书的简洁,在此不再详述。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要 求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (37)

  1. 一种建立路由表的方法,其特征在于,包括:
    第一节点获得第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述第一节点为所述源地址对应的源节点或所述源节点与所述目的地址对应的目的节点的路径上的中间节点;
    所述第一节点获得新的第一探测数据包;其中,当所述第一节点为所述中间节点时,所述第一节点将所述第一节点的地址记录在所述第一探测数据包中,形成所述新的第一探测数据包;当所述第一节点为所述源节点时,所述新的第一探测数据包即为所述第一探测数据包;
    所述第一节点发送所述新的第一探测数据包;
    所述第一节点接收所述第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述新的第一探测数据包所经过的节点的地址;
    所述第一节点根据所述第二路径中所述第一节点的地址的上一个地址建立路由表项;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;其中,所述下一跳节点的地址为所述上一个地址。
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一节点建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、所述下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标;其中,所述下一跳节点的地址为所述上一个地址。
  3. 如权利要求1或2述的方法,其特征在于,所述第一节点发送所述新的第一探测数据包,包括:
    所述第一节点随机选择下一跳节点以及出接口发送所述新的第一探测数据包。
  4. 一种管理路由表的方法,其特征在于,包括:
    第一节点获得第二探测数据包,所述第二探测数据包具有源地址和目的地址;所述第一节点为所述源地址对应的源节点或所述源节点与所述目的地址对应的目的节点的路径上的中间节点;
    所述第一节点获得新的第二探测数据包;其中,当所述第一节点为所述中间节点时,所述第一节点将所述第一节点的地址记录在所述第二探测数据包中,形成所述新的第二探测数据包;当所述第一节点为源节点时,所述新的第二探测数据包即为所述第二探测数据包;
    所述第一节点按照预定几率根据预先建立的路由表项发送所述新的第二探测数据包;
    所述第一节点接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述新的第二探测数据包所经过的节点的地址;
    如果在所述路由表项中匹配成功,且所述第四路径中的所述第一节点的地址的上一个地址与所述路由表项中的下一跳节点的地址相同时,所述第一节点更新预先建立的路径评估表项中的所述下一跳节点以及出接口的评价值。
  5. 如权利要求4所述的方法,其特征在于,所述方法还包括:
    如果在所述路由表项中未匹配成功时,所述第一节点根据所述第四路径中所述第一节点的地址的上一个地址建立新的路由表项。
  6. 如权利要求4所述的方法,其特征在于,所述方法还包括:
    如果在所述路由表项中匹配成功,且所述第四路径中所述第一节点的地址的上一个地址与所述路由表项中的下一跳节点的地址不同时,
    所述第一节点确定是否更新所述路由表项。
  7. 如权利要求6所述的方法,其特征在于,所述确定是否更新所述路由表项,包括:
    所述第一节点确定新的下一跳节点以及出接口的评价值;
    所述第一节点根据所述新的下一跳节点以及出接口的评价值和所述路径 评估表项中的下一跳节点以及出接口的评价值确定是否更新路由表项。
  8. 如权利要求6所述的方法,其特征在于,所述确定是否更新路由表项,包括:
    确定新的下一跳节点以及出接口的评价值;
    将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
  9. 一种建立路由表的方法,其特征在于,包括:
    源节点生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述源地址为所述源节点的地址;
    所述源节点发送所述第一探测数据包;
    所述源节点接收第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述第一探测数据包所经过的节点的地址;
    所述源节点生成第一路径建立包,所述第一路径建立包中包括所述第一路径;
    所述源节点根据所述第一路径中所述源地址的下一跳节点的地址以及出接口建立路由表项;其中,所述路由表项包括所述目的地址、所述下一跳节点的地址以及出接口。
  10. 如权利要求9所述的方法,其特征在于,所述方法还包括:
    如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述第一路径对应的出接口不一致,所述源节点则确定所述第一路径对应的出接口是否更优;
    当所述第一路径对应的出接口更优时,所述源节点则更新所述已经建立的路由表项。
  11. 如权利要求9或10所述的方法,其特征在于,所述方法还包括:
    所述源节点发送第一路径建立包给所述第一路径中所述源节点与所述目的节点之间的中间节点,以使所述中间节点根据所述第一路径中所述中间节点的地址的下一跳地址以及出接口更新各自的路由表项。
  12. 一种电子设备,其特征在于,包括:
    处理器,用于生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述电子设备作为源节点,所述源地址为所述源节点的地址;
    接口;
    发送器,用于通过所述接口发送所述第一探测数据包;
    接收器,用于通过所述接口接收所述第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述第一探测数据包所经过的节点的地址;
    所述处理器还用于:根据所述第二路径中所述电子设备的地址的上一个地址建立路由表项;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;其中,所述下一跳节点的地址为所述上一个地址。
  13. 如权利要求12所述的电子设备,其特征在于,所述处理器还用于:建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、所述下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标;其中,所述下一跳节点的地址为所述上一个地址。
  14. 如权利要求12或13所述的电子设备,其特征在于,所述发送器用于:随机选择下一跳节点以及所述接口发送所述新的第一探测数据包。
  15. 一种电子设备,其特征在于,包括:
    接口;
    接收器,用于通过所述接口接收第一探测包,所述第一探测数据包具有源地址和目的地址,以及所述第一探测数据包当前所经过节点的地址;所述电子设备为所述源地址对应的源节点与所述目的地址对应的目的节点的路径上的中间节点;
    处理器,用于将所述电子设备的地址记录在所述第一探测数据包中,形成新的第一探测数据包;
    发送器,用于通过所述接口发送所述新的第一探测数据包;
    所述接收器还用于通过所述接口接收所述第一应答数据包,所述第一应答数据包中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述新的第一探测数据包所经过的节点的地址;
    所述处理器还用于根据所述第二路径中所述电子设备的地址的上一个地址建立路由表项;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;其中,所述下一跳节点的地址为所述上一个地址。
  16. 如权利要求15所述的电子设备,其特征在于,所述处理器还用于:建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、所述下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标;其中,所述下一跳节点的地址为所述上一个地址。
  17. 一种电子设备,其特征在于,包括:
    处理器,用于生成第二探测数据包,所述第二探测数据包具有源地址和目的地址;所述电子设备作为源节点,所述源地址为所述源节点的地址;
    接口;
    发送器,用于按照预定几率根据预先建立的路由表项发送所述第二探测数据包;
    接收器,用于通过所述接口接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述第二探测数据包所经过的节点的地址;
    所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中的所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址相同时,更新预先建立的路径评估表项中的所述下一跳节点以及出接口的评价值。
  18. 如权利要求17所述的电子设备,其特征在于,所述处理器还用于:如果在所述路由表项中未匹配成功时,根据所述第四路径中所述第一节点的地址的上一个地址建立新的路由表项。
  19. 如权利要求17所述的电子设备,其特征在于,所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址不同时,确定是否更新所述路由表项。
  20. 如权利要求19所述的电子设备,其特征在于,所述处理器用于:确定新的下一跳节点以及出接口的评价值;根据所述新的下一跳节点以及出接口的评价值和所述路径评估表项中的下一跳节点以及出接口的评价值确定是否更新路由表项。
  21. 如权利要求19所述的电子设备,其特征在于,所述处理器用于:确定新的下一跳节点以及出接口的评价值;将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
  22. 一种电子设备,其特征在于,包括:
    接口;
    接收器,用于通过所述接口接收第二探测数据包,所述第二探测数据包具有源地址和目的地址,以及所述第二探测数据包当前所经过节点的地址;所述电子设备为所述源地址对应的源节点与所述目的地址对应的目的节点的路径上的中间节点;
    处理器,用于将所述电子设备的地址记录在所述第二探测数据包中,形成所述新的第二探测数据包;
    发送器,用于按照预定几率根据预先建立的路由表项通过所述接口发送所述新的第二探测数据包;
    所述接收器还用于:接收第二应答数据包,所述第二应答数据包中包括 第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述新的第二探测数据包所经过的节点的地址;
    所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中的所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址相同时,更新所述路径评估表项中的所述下一跳节点以及出接口的评价值。
  23. 如权利要求22所述的电子设备,其特征在于,所述处理器还用于:在所述路由表项中未匹配成功时,根据所述第四路径中所述电子设备的地址的上一个地址建立新的路由表项。
  24. 如权利要求22所述的电子设备,其特征在于,所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中所述电子设备的地址的上一个地址与所述路由表项中的下一跳节点的地址不同时,确定是否更新所述路由表项。
  25. 如权利要求24所述的电子设备,其特征在于,所述处理器用于:确定新的下一跳节点以及出接口的评价值;根据所述新的下一跳节点以及出接口的评价值和所述路径评估表项中的下一跳节点以及出接口的评价值确定是否更新路由表项。
  26. 如权利要求24所述的电子设备,其特征在于,所述处理器用于:确定新的下一跳节点以及出接口的评价值;将所述新的下一跳节点以及出接口的评价值输入随机神经网络,根据所述随机神经网络的运算结果确定是否更新路由表;其中,所述随机神经网络的每个神经元对应一个出接口,所述随机神经网络经过历史下一跳节点以及出接口的评价值训练。
  27. 一种电子设备,其特征在于,包括:
    处理器,用于生成第一探测数据包,所述第一探测数据包具有源地址和目的地址;所述源地址为所述电子设备的地址,所述电子设备作为源节点;
    接口;
    发送器,用于通过所述接口发送所述第一探测数据包;
    接收器,用于通过所述接口接收第一应答数据包,所述第一应答数据包 中包括第二路径,所述第二路径为第一路径的相反路径;所述第一路径为所述第一探测数据包所经过的节点的地址;
    所述处理器,还用于生成第一路径建立包,所述第一路径建立包中包括所述第一路径;根据所述第一路径中所述源地址的下一跳节点的地址以及出接口建立路由表项;其中,所述路由表项包括所述目的地址、所述下一跳节点的地址以及出接口。
  28. 如权利要求27所述的电子设备,其特征在于,所述处理器还用于:如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述第一路径对应的出接口不一致,确定所述第一路径对应的出接口是否更优;当所述第一路径对应的出接口更优时,更新所述已经建立的路由表项。
  29. 如权利要求26或27所述的电子设备,其特征在于,所述发送器还用于通过所述接口发送第一路径建立包给所述第一路径中所述源节点与所述目的节点之间的中间节点,以使所述中间节点根据所述第一路径中所述中间节点的地址的下一跳地址以及出接口更新各自的路由表项。
  30. 如权利要求26-29任一项所述的电子设备,其特征在于,所述处理器还用于:生成第二探测数据包,所述第二探测数据包具有所述源地址和所述目的地址;
    所述发送器还用于:按照预定几率根据所述路由表项发送所述第二探测数据包;
    所述接口器还用于:通过所述接口接收第二应答数据包,所述第二应答数据包中包括第四路径,所述第四路径为第三路径的相反路径;所述第三路径为所述第二探测数据包所经过的节点的地址;
    所述处理器还用于:如果在所述路由表项中匹配成功,且所述第四路径中所述源地址的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
  31. 一种网络,其特征在于,所述网络包括源节点、目的节点和位于所 述源节点及所述目的节点之间的中间节点,
    所述源节点用于生成第一探测数据包并将所述第一探测数据包发送给与所述源节点相邻的中间节点;其中,所述第一探测数据包具有所述源节点的源地址和所述目的节点的目的地址;
    所述中间节点中从所述相邻的中间节点开始直至所述目的节点的相邻中间节点为止用于依次发送所述第一探测数据包直至到达所述目的节点,并将各自的地址记录在所述第一探测数据包中以形成第一路径;
    所述目的节点用于根据所述第一路径生成第二路径;其中,所述第二路径为所述第一路径的反向路径;生成第一应答数据包,所述第一应答数据包中包括所述第二路径;
    所述目的节点、所述中间节点用于沿所述第二路径依次发送所述第一应答数据包直至到达所述源节点;
    所述中间节点和所述源节点用于根据所述第二路径建立路由表项,其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口。
  32. 如权利要求31所述的网络,其特征在于,所述中间节点和所述源节点还用于根据所述第二路径和业务目标建立路径评估表项,其中,所述路径评估表项包括所述源地址和所述目的地址、下一跳节点的地址以及出接口、所述下一跳节点以及出接口的评价值、业务标识和/或业务目标。
  33. 一种网络,其特征在于,所述网络包括源节点、目的节点和位于所述源节点及所述目的节点之间的中间节点,
    所述源节点用于生成第二探测数据包并发送所述第二探测数据包给相邻的中间节点,所述第二探测数据包具有所述源节点的源地址和所述目的节点的目的地址;
    所述中间节点中从所述相邻的中间节点开始直至所述目的节点的相邻中间节点为止用于依次按照预定几率根据预设的路由表项发送所述第二探测数据包直至到达所述地址对应的目的节点,并将各自的地址记录在所述第二探测数据包中以形成第三路径;
    所述目的节点用于根据所述第三路径生成第四路径并生成第二应答数据包;其中,所述第四路径为所述第三路径的相反路径;所述第二应答数据包中包括所述第四路径;
    所述目的节点、所述中间节点用于沿所述第四路径依次发送所述第二应答数据包直至到达所述源节点;
    所述中间节点和所述源节点用于如果在所述路由表项中匹配成功,且所述第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口不同时,则在所述路由表项中添加新的下一跳节点的地址以及出接口、在预先建立的路径评估表项中添加新的下一跳节点以及出接口的评价值;或者确定是否更新所述路由表项。
  34. 如权利要求33所述的网络,其特征在于,所述中间节点和所述源节点还用于:如果在所述路由表项中匹配成功,且所述第四路径中的下一跳的地址以及出接口与所述路由表项中的下一跳的地址以及出接口相同时,更新预先建立的路径评估表项中的下一跳节点以及出接口的评价值。
  35. 如权利要求33所述的网络,其特征在于,所述中间节点和所述源节点还用于:如果在所述路由表项中未匹配成功时,则根据所述第四路径建立新的路由表项,以及建立新的路径评估表项。
  36. 一种网络,其特征在于,所述网络包括源节点、目的节点和位于所述源节点及所述目的节点之间的中间节点,
    所述源节点用于生成第一探测数据包并发送所述第一探测数据包给相邻的中间节点,所述第一探测数据包具有所述源节点的源地址和所述目的节点的目的地址;
    所述中间节点中从所述相邻的中间节点开始直至所述目的节点的相邻中间节点为止用于依次发送所述第一探测数据包直至到达所述目的节点,并将各自的地址记录在所述第一探测数据包中以形成第一路径;
    所述目的节点用于根据所述第一路径生成第二路径并生成第一应答数据包;其中,所述第二路径为所述第一路径的反向路径;所述第一应答数据包 中包括所述第二路径;
    所述目的节点、所述中间节点用于沿所述第二路径发送所述第一应答数据包直至到达所述源节点;
    所述源节点还用于生成第一路径建立包并根据所述相反路径建立路由表项,所述第一路径建立包中包括所述第二路径的相反路径;其中,所述路由表项包括所述目的地址、下一跳节点的地址以及出接口;
    所述源节点还用于将所述第一路径建立包发送给相邻的中间节点;
    所述中间节点中从所述相邻的中间节点开始直至所述目的节点的相邻中间节点为止用于在接收到所述第一路径建立包时根据所述相反路径建立路由表项。
  37. 如权利要求36所述的网络,其特征在于,所述源节点还用于:如果已经建立了路由表项,并且已经建立的路由表项中的出接口与所述相反路径对应的出接口不一致,则确定所述相反路径对应的出接口是否更优;当所述相反路径对应的出接口更优时,则更新所述已经建立的路由表项。
PCT/CN2015/099971 2015-12-30 2015-12-30 一种建立路由表的方法、电子设备及网络 WO2017113238A1 (zh)

Priority Applications (7)

Application Number Priority Date Filing Date Title
CN202010982742.4A CN112217723A (zh) 2015-12-30 2015-12-30 一种建立路由表的方法、电子设备及网络
CN202010981133.7A CN112152921B (zh) 2015-12-30 2015-12-30 一种建立路由表的方法、电子设备及网络
CN201580057570.7A CN107431968B (zh) 2015-12-30 2015-12-30 一种建立路由表的方法、电子设备及网络
PCT/CN2015/099971 WO2017113238A1 (zh) 2015-12-30 2015-12-30 一种建立路由表的方法、电子设备及网络
EP15911867.8A EP3389310B1 (en) 2015-12-30 2015-12-30 Method for establishing routing table, electronic device and network
US16/022,729 US10708167B2 (en) 2015-12-30 2018-06-29 Routing table creation method, electronic device, and network
US16/903,338 US11658896B2 (en) 2015-12-30 2020-06-16 Routing table creation method, electronic device, and network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/099971 WO2017113238A1 (zh) 2015-12-30 2015-12-30 一种建立路由表的方法、电子设备及网络

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/022,729 Continuation US10708167B2 (en) 2015-12-30 2018-06-29 Routing table creation method, electronic device, and network

Publications (1)

Publication Number Publication Date
WO2017113238A1 true WO2017113238A1 (zh) 2017-07-06

Family

ID=59224109

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/099971 WO2017113238A1 (zh) 2015-12-30 2015-12-30 一种建立路由表的方法、电子设备及网络

Country Status (4)

Country Link
US (2) US10708167B2 (zh)
EP (1) EP3389310B1 (zh)
CN (3) CN112217723A (zh)
WO (1) WO2017113238A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111247818A (zh) * 2019-11-18 2020-06-05 深圳市汇顶科技股份有限公司 路径选择的方法和ble设备
CN112887209A (zh) * 2019-11-30 2021-06-01 华为技术有限公司 关于数据传输的表项建立方法及相关设备

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10257072B1 (en) * 2017-09-28 2019-04-09 Cisco Technology, Inc. Weight initialization for random neural network reinforcement learning
CN107948076B (zh) * 2017-12-29 2021-08-24 杭州迪普科技股份有限公司 一种转发报文的方法及装置
US10965592B2 (en) * 2019-05-31 2021-03-30 Juniper Networks, Inc. Inter-network service chaining
JP7272227B2 (ja) * 2019-10-10 2023-05-12 富士通株式会社 ネットワーク制御装置およびネットワーク制御方法
US11088935B2 (en) * 2019-11-13 2021-08-10 Vmware, Inc. Tunnel-based routing calculation with address exclusion in software defined networking (SDN) environments
CN112583721B (zh) * 2020-11-30 2023-04-18 五八到家有限公司 业务请求的路由方法、设备、介质
US11729088B2 (en) * 2020-12-30 2023-08-15 Arteris, Inc. Broadcast switch system in a network-on-chip (NoC)
US11606265B2 (en) 2021-01-29 2023-03-14 World Wide Technology Holding Co., LLC Network control in artificial intelligence-defined networking
CN113542000B (zh) * 2021-05-20 2023-11-07 新华三大数据技术有限公司 一种进程号确定方法及装置
CN113765785B (zh) * 2021-08-19 2022-07-05 东北大学 基于dpdk的多路径传输方法
CN114389987B (zh) * 2021-12-24 2022-10-11 广州爱浦路网络技术有限公司 数据包路由方法、计算机装置和存储介质
CN116074285B (zh) * 2022-12-30 2024-07-02 中国联合网络通信集团有限公司 一种地址冲突检测方法和装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096410A (zh) * 2011-10-31 2013-05-08 上海万康无线智能控制系统有限公司 一种无线抄表系统中的数据传输方法
CN103260210A (zh) * 2013-05-31 2013-08-21 北京新岸线移动多媒体技术有限公司 一种多跳网络中多跳路由的建立方法、系统及装置
CN103457855A (zh) * 2012-06-04 2013-12-18 中兴通讯股份有限公司 无类域间路由表建立、以及报文转发的方法和装置
CN103959723A (zh) * 2014-01-07 2014-07-30 华为技术有限公司 一种重路由方法、系统以及网络设备
CN104067669A (zh) * 2012-01-24 2014-09-24 高通股份有限公司 中继选择和建立的系统和方法
CN104683210A (zh) * 2015-03-10 2015-06-03 杭州华三通信技术有限公司 一种自动建立隧道的方法和装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5940598A (en) * 1997-01-28 1999-08-17 Bell Atlantic Network Services, Inc. Telecommunications network to internetwork universal server
US6804201B1 (en) 2000-10-05 2004-10-12 S. Erol Gelenbe Cognitive packet network
US7619982B2 (en) * 2005-04-25 2009-11-17 Cisco Technology, Inc. Active probe path management
CN100566294C (zh) * 2005-09-27 2009-12-02 杭州华三通信技术有限公司 单播反向路径转发方法
US7822027B2 (en) * 2006-10-05 2010-10-26 Cisco Technology, Inc. Network routing to the socket
CN101820391A (zh) * 2010-03-17 2010-09-01 中兴通讯股份有限公司 用于ip网络的路由转发方法及网络设备
CN101980486A (zh) * 2010-10-12 2011-02-23 北京星网锐捷网络技术有限公司 地址库数据的更新方法及网络设备
CN102158300B (zh) * 2010-12-31 2013-10-09 华为技术有限公司 波分网络中建立路径的方法、通信节点和通信系统
CN102333314A (zh) * 2011-10-19 2012-01-25 南京信息工程大学 一种无线自组网的路由方法
CN102857427A (zh) * 2012-08-27 2013-01-02 上海斐讯数据通信技术有限公司 探测路由下一跳mac地址的方法及其路由设备
CN104219156B (zh) * 2014-09-16 2017-08-25 西安电子科技大学 一种适用于层次化空中自组织网络的组播路由方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096410A (zh) * 2011-10-31 2013-05-08 上海万康无线智能控制系统有限公司 一种无线抄表系统中的数据传输方法
CN104067669A (zh) * 2012-01-24 2014-09-24 高通股份有限公司 中继选择和建立的系统和方法
CN103457855A (zh) * 2012-06-04 2013-12-18 中兴通讯股份有限公司 无类域间路由表建立、以及报文转发的方法和装置
CN103260210A (zh) * 2013-05-31 2013-08-21 北京新岸线移动多媒体技术有限公司 一种多跳网络中多跳路由的建立方法、系统及装置
CN103959723A (zh) * 2014-01-07 2014-07-30 华为技术有限公司 一种重路由方法、系统以及网络设备
CN104683210A (zh) * 2015-03-10 2015-06-03 杭州华三通信技术有限公司 一种自动建立隧道的方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3389310A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111247818A (zh) * 2019-11-18 2020-06-05 深圳市汇顶科技股份有限公司 路径选择的方法和ble设备
CN112887209A (zh) * 2019-11-30 2021-06-01 华为技术有限公司 关于数据传输的表项建立方法及相关设备
CN112887209B (zh) * 2019-11-30 2023-06-20 华为技术有限公司 关于数据传输的表项建立方法及相关设备
US11929913B2 (en) 2019-11-30 2024-03-12 Huawei Technologies Co., Ltd. Method for creating data transmission entry and related device

Also Published As

Publication number Publication date
US10708167B2 (en) 2020-07-07
EP3389310B1 (en) 2022-06-01
CN112217723A (zh) 2021-01-12
US11658896B2 (en) 2023-05-23
US20200382406A1 (en) 2020-12-03
US20180316595A1 (en) 2018-11-01
CN112152921A (zh) 2020-12-29
CN107431968A (zh) 2017-12-01
CN107431968B (zh) 2020-10-09
EP3389310A1 (en) 2018-10-17
EP3389310A4 (en) 2018-12-05
CN112152921B (zh) 2023-07-28

Similar Documents

Publication Publication Date Title
WO2017113238A1 (zh) 一种建立路由表的方法、电子设备及网络
US11005729B2 (en) Satisfying service level agreement metrics for unknown applications
US10097469B2 (en) Network traffic shaping for low power and lossy networks
US10305769B2 (en) Method and apparatus for augmenting TWAMP
US9749410B2 (en) Using bit index explicit replication (BIER) in low-power and lossy networks
US9154407B2 (en) Maintained message delivery during routing domain migration
CN111049757B (zh) 一种业务流处理方法及装置
CN107948076B (zh) 一种转发报文的方法及装置
US10178019B2 (en) Low-overhead anchorless managing of producer mobility in information-centric networking
US10541899B2 (en) Data packet sending method and apparatus in IPv6 network
CN108092830B (zh) 在Mesh网络中应用TCP/IP协议的方法
WO2018036254A1 (zh) 报文转发方法及装置
US8958417B2 (en) Method and system for call admission control in a wireless mesh network
WO2017107814A1 (zh) 一种传播QoS策略的方法、装置及系统
WO2019162210A8 (en) Method and system for interfacing communication networks
WO2016202224A1 (zh) 一种传输层参数调整方法和装置
CN107454647A (zh) 周期性路由信息的发送方法及装置
CN104092610A (zh) 一种开放式最短路径优先邻居建立方法和装置
Sasikala et al. A Neuro Fuzzy based conditional shortest path routing protocol for wireless mesh network
Sharma et al. Analyzing the effect of constant and lognormal shadowing model on ad-hoc routing protocols
CN116419363B (zh) 数据传输方法、通信设备和计算机可读存储介质
JP2018006793A (ja) 転送装置、サーバ装置、および、転送方法
KR20110004677A (ko) 무선통신시스템에서 패킷 라우팅 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15911867

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2015911867

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2015911867

Country of ref document: EP

Effective date: 20180712