WO2019114779A1 - Information collection - Google Patents

Information collection Download PDF

Info

Publication number
WO2019114779A1
WO2019114779A1 PCT/CN2018/120785 CN2018120785W WO2019114779A1 WO 2019114779 A1 WO2019114779 A1 WO 2019114779A1 CN 2018120785 W CN2018120785 W CN 2018120785W WO 2019114779 A1 WO2019114779 A1 WO 2019114779A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
request message
information
message
request
Prior art date
Application number
PCT/CN2018/120785
Other languages
French (fr)
Chinese (zh)
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 新华三技术有限公司
Publication of WO2019114779A1 publication Critical patent/WO2019114779A1/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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL

Definitions

  • the present disclosure relates to the field of communications technologies, and in particular, to an information collecting method, apparatus, device, and machine readable storage medium.
  • MPLS Multi-Protocol Label Switching
  • LSP Label Switched Path
  • TE Traffic Engineering, traffic engineering, tunnels, etc.
  • the ingress node can use MPLS Tracert technology to collect information about each node passing through the ingress node to the egress node, such as an IP address, a label, etc., to be able to locate the failed node.
  • the ingress node may first send a request packet with a TTL (Time To Live) value of 1, and receive a response packet returned by the first node, and collect the first node from the response packet. information. Then, the ingress node sends a request message with a TTL value of 2, receives a response message returned by the second node, and collects information of the second node from the response message, and so on.
  • TTL Time To Live
  • the ingress node may not collect the information of the node when collecting information of each node by using MPLS Tracert technology.
  • FIG. 1 is a flowchart of an information collecting method in an embodiment of the present disclosure
  • 3A is a schematic diagram of an application scenario in an embodiment of the present disclosure.
  • FIG. 3B is a schematic diagram of operations of the information collecting method in the application scenario shown in FIG. 3A according to an embodiment of the present disclosure
  • 3C is a schematic diagram of operations of the related art in the application scenario shown in FIG. 3A;
  • FIG. 4 is a structural diagram of an information collecting device in an embodiment of the present disclosure.
  • FIG. 5 is a hardware structural diagram of an ingress node in an embodiment of the present disclosure.
  • FIG. 6 is a structural diagram of an information collecting device in another embodiment of the present disclosure.
  • FIG. 7 is a hardware structural diagram of a forwarding node in an embodiment of the present disclosure.
  • first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information without departing from the scope of the present disclosure.
  • second information may also be referred to as first information.
  • word “if” may be interpreted to mean “at time” or "when” or "in response to determination.”
  • the embodiment of the present disclosure proposes an information collecting method, which can be applied to a network including an ingress node, a forwarding node, and an egress node, such as an MPLS network.
  • a tunnel such as an LSP tunnel or a TE tunnel
  • the ingress node can use the MPLS Tracert technology to collect node information (such as IP address, label, etc.) and next hop information of the forwarding node, and node information (such as IP address, label, and so on) of the egress node. Based on this information, the failed node can be located.
  • FIG. 1 it is a flowchart of an information collecting method proposed in the embodiment of the present disclosure. This method can be applied to an ingress node. The method can include the following steps.
  • Step 101 Generate a request message for collecting information of the node.
  • Step 102 Send the request message, and receive a response message for the request message; if the node information (such as the IP address, label, etc. of the forwarding node) and the next hop information are obtained from the response message, Forwarding the IP address of the next hop of the node, etc., and recording the correspondence between the node information and the next hop information.
  • the node information such as the IP address, label, etc. of the forwarding node
  • the next hop information are obtained from the response message, Forwarding the IP address of the next hop of the node, etc., and recording the correspondence between the node information and the next hop information.
  • the ingress node when it needs to collect the node information of the forwarding node by using the MPLS Tracert technology, it may generate a request packet for collecting information of the node, and send the request packet. If the destination node of the request packet is a forwarding node, the forwarding node may send a response packet for the request packet to the ingress node after receiving the request packet, where the response packet may carry the node of the forwarding node. Information and next hop information. In this way, after receiving the response packet, the ingress node can obtain the node information and the next hop information from the response packet, and locally record the correspondence between the node information and the next hop information.
  • the egress node may send a response packet for the request message to the ingress node after receiving the request message, and the response message may be Carry the node information of the egress node.
  • the egress node does not have a corresponding next hop. Therefore, the response packet does not carry the next hop information of the egress node.
  • the ingress node can obtain the node information of the egress node from the response packet, and locally record the node information of the egress node. Because the response packet does not carry the next hop information, the ingress node does not obtain the next hop information of the egress node from the response packet, and the next hop information of the egress node is not recorded locally.
  • the ingress node After receiving the response message sent by the egress node, the ingress node has collected the node information and the next hop information of the forwarding node and the node information of the egress node. Therefore, the ingress node stops the request packet sending operation, that is, the request packet is no longer sent, and the information collecting process can be ended.
  • Step 103 If at least two response messages for the request message are received, the request message is regenerated by using the at least two response messages, where the request message includes the next one of the at least two response messages. Jump information. Then, the operation of transmitting the request message and receiving the response message for the request message is returned.
  • a timer can also be started for the request message, and the time of the timer can be configured according to experience.
  • the ingress node sends a request packet and starts a timer for the request packet. After the timer expires, the ingress node may receive the time period from the time the packet is sent to the end of the timer. The number of response messages to the request message.
  • the request message is regenerated by using the at least two response messages, and the regenerated request message may carry the at least The two respond to the next hop information of each message in the message, and then return to step 102.
  • the request message is regenerated by using the one response message.
  • the request message is regenerated by using the one response message.
  • only the next hop information in the one response message may be carried, and then return to step 102.
  • the forwarding node between the ingress node and the egress node needs to forward the received request message
  • the at least two next hops may be separately Send the request message.
  • the forwarding node may send a response packet to the ingress node, where the response packet may carry the forwarding node.
  • the forwarding node When the forwarding node is not the target node of the received request message, the request message needs to be forwarded.
  • the request message may include, but is not limited to, an mpls echo request message
  • the response message may include, but is not limited to, an mpls echo reply message
  • the MPLS Tracert technology can be used to collect the node information and the next hop information of each node, so that the collected nodes can be utilized.
  • the node information and the next hop information accurately resolve the path between the ingress node and the egress node.
  • FIG. 2 it is a flowchart of another information collecting method proposed in the embodiment of the present disclosure, which may be applied to a forwarding node between an ingress node and an egress node, and the forwarding is performed.
  • the node has at least two next hops, and the method may include the following steps.
  • Step 201 Receive a request message sent by the ingress node, and determine whether the node is the target node of the request message; if the node is the target node of the request message, go to step 202; if the node is not the request message Step 203 is performed on the target node of the text.
  • Step 202 Send a response message for the request message to the ingress node, where the response message may carry the node information of the local node and the next hop information corresponding to the at least two next hops respectively.
  • Step 203 Obtain at least two new request messages, and send the obtained new request messages to the at least two next hops respectively.
  • the number of new request packets obtained by the forwarding node is the same as the number of next hops.
  • the forwarding node determines that the node is the target node of the request message. However, if the TTL value carried in the request packet is not a specified value, it is determined that the node is not the target node of the request message. In this case, the forwarding node modifies the TTL value of the request packet (for example, minus 1) to obtain a new request packet, and sends the new request based on the next hop information of the local node carried in the response packet. Message.
  • a specified value such as 1
  • the request message may include, but is not limited to, an mpls echo request message
  • the response message may include, but is not limited to, an mpls echo reply message
  • the node information and the next hop information of each node may be collected by using the MPLS Tracert technology, so that the node information of each node may be utilized.
  • the next hop information accurately resolves the path between the ingress node and the egress node.
  • network device 301 is an ingress node
  • network devices 302-305 are forwarding nodes
  • network device 306 is an egress node.
  • network device 302 has two next hops (i.e., network devices 303 and 304), while network devices 303-305 each have only one next hop.
  • the management IP address of the network device 301 is 1.1.1.1, and the IP address of the interface 3011 is 11.1.1.1.
  • the management IP address of the network device 302 is 2.2.2.2, the IP address of the interface 3021 is 11.1.1.2, the IP address of the interface 3022 is 12.1.1.1, and the IP address of the interface 3023 is 14.1.1.1.
  • the management IP address and interface IP address of other network devices refer to Figure 3A, and details are not described herein.
  • the management IP address of the network device refers to an MPLS LSR-ID (Label Switch Router-IDentity) address.
  • an LSR-ID address needs to be assigned to each network device supporting the MPLS service.
  • the meaning of the LSR-ID address is the name of the network device in the MPLS network.
  • the IP address of the above interface is also referred to as an interface IP address hereinafter.
  • node information such as IP address, label, etc.
  • next hop information of a forwarding node such as network devices 301 to 305
  • node information such as an IP address
  • egress node such as network device 306
  • the label collection method may include the following steps as shown in FIG. 3B.
  • Step a the network device 301 sends a request message 1 and starts a timer 1 for the request message 1.
  • the request message 1 is generated, and the request message 1 is sent through the interface 3011.
  • the packet type of the request packet 1 may be a UDP (User Datagram Protocol) type.
  • the source IP address is the IP address 11.1.1.1 of the interface 3011, and the destination IP address is 127.0.0.1 (the address represents a local address, which means any network device that receives the packet.
  • the message is processed directly instead of forwarding, and the TTL value is 1.
  • the source port is a variable value X (can be dynamically adjusted as needed, and is not limited thereto), and the destination port is a fixed value (for example, 3503), and the destination port indicates that the request packet 1 is used.
  • LSP ping Label Switching Path ping
  • the request message 1 may further carry mpls echo information, and the mpls echo information may include tunnel information, such as label information corresponding to the interface 3011, and the label information is a tunnel between the network devices 301-306 (such as an LSP tunnel or a TE tunnel). ) tag information.
  • the mpls echo information may also include the IP address 11.1.1.2 of the interface 3021.
  • the network device 301 can start the timer 1 for the request message 1, and the time of the timer 1 can be configured according to experience. After the timer 1 times out, the network device 301 can count the number of response messages received by the device for the request message 1 in the period from the transmission of the request message 1 to the end of the timer 1 timeout.
  • Step b After receiving the request message 1, the network device 302 decrements the TTL value of the request message 1 by one.
  • the modified TTL value is 0, and the destination port is a fixed value (for example, 3503). Therefore, it is determined that the request message 1 is used to perform LSP ping, and the response packet 1 for the request message 1 is sent to the network device 301.
  • the network device 302 Since the network device 302 receives the request message 1 through the interface 3021, and the request message 1 carries the IP address 11.1.1.2 of the interface 3021, the network device 302 sends the response message 1 through the interface 3021.
  • the packet type of the response packet 1 can be of the UDP type.
  • the source IP address is the IP address 11.1.1.2 of the interface 3021
  • the destination IP address is the IP address 11.1.1.1 of the interface 3011 (the source IP address of the request packet 1)
  • the TTL value is 255.
  • the source port is a fixed value (such as 3503) to indicate that the response packet 1 is used to perform LSP ping
  • the destination port is a variable value X (can be dynamically adjusted as needed).
  • the response message 1 can also carry the mpls echo information
  • the mpls echo information can include the node information of the network device 302 (such as the management IP address of the network device 302, the interface IP address, the label of the interface, etc., and the node information is not limited.
  • the next hop information of the network device 302, the next hop information may also be referred to as downstream information.
  • the next hop information of the network device 302 may include: an IP address of the next hop corresponding to the interface 3022, that is, an IP address 12.1.1.2 of the interface 3031 of the network device 303; and an IP address of the next hop corresponding to the interface 3023, that is, The IP address of the interface 3041 of the network device 304 is 14.1.1.2.
  • the network device 302 can obtain the next hop information of the network device 302 from the local device based on the tunnel information (such as the label information corresponding to the interface 3011).
  • Step c After the timer 1 times out, the network device 301 counts the number of response messages received for the request message 1 in the time period from the sending of the request message 1 to the end of the timer 1 time. Since only the response message 1 is received, the node information and the next hop information of the network device 302 are obtained from the response message 1, and the correspondence between the node information and the next hop information is recorded, and the request message is generated by using the response message 1. In the text 2, the request message 2 is sent, and the timer 2 is started for the request message 2.
  • the network device 301 can obtain the node information of the network device 302 (such as the IP address 11.1.1.2 of the interface 3021, the management IP address 2.2.2.2, the label of the interface 3021, etc.) and the next hop information (such as the IP address) from the response message 1. 12.1.1.2 and 14.1.1.2), and record the correspondence shown in Table 1.
  • the IP address 11.1.1.2 with the node information as the interface is taken as an example, and the content of the corresponding relationship is not limited.
  • the TTL value of 1 indicates the next hop of the network device 301
  • 11.1.1.2 is the interface IP address of the next hop
  • the next hop to the egress node has two next hops, the two next hops.
  • the IP addresses of the interfaces are 12.1.1.2 and 14.1.1.2.
  • the request message 2 may carry the next hop information in the response message 1, for example, the request message 2 carries the IP address of the next hop interface 12.1.1.2 and 14.1.1.2.
  • the content of the request message 2 is similar to the content of the request message 1, except that the TTL value of the request message 2 is 2, and the mpls echo information of the request message 2 includes the next hop information in the response message 1. That is, IP addresses 12.1.1.2 and 14.1.1.2. The content of this request message 2 will not be repeated here.
  • Step d After receiving the request message 2, the network device 302 decrements the TTL value of the request message 2 by 1 to obtain the request message 3. Since the TTL value of the request message 3 is 1, instead of 0, the network device 302 is not the target node of the request message 3, and needs to continue to forward the request message 3. When forwarding the request message 3, since the network device 302 has two next hops (ie, network devices 303 and 304), the network device 302 transmits the request message 3 through the interfaces 3022, 3023.
  • the network device 302 parses the destination port from the request packet 3 to a fixed value (for example, 3503), it determines that the request packet 3 is used to perform LSP ping, and determines that the request packet 3 needs to be forwarded.
  • a fixed value for example, 3503
  • the network device 302 can copy (N-1) request messages 3, thereby obtaining N request messages 3, where N is the next hop count of the network device 302. Thus, network device 302 can send a request message 3 to each next hop.
  • Step e After receiving the request message 3, the network device 303 decrements the TTL value of the request message 3 by one. Since the modified TTL value is 0, and the destination port is a fixed value (for example, 3503), it is determined that the request message 3 is used to perform LSP ping, and the response packet 2 for the request message 3 is sent to the network device 301.
  • the network device 304 After receiving the request message 3, the network device 304 decrements the TTL value of the request message 3 by one. Since the modified TTL value is 0, and the destination port is a fixed value (for example, 3503), it is determined that the request message 3 is used to perform LSP ping, and the response packet 3 for the request message 3 is sent to the network device 301.
  • the network device 303 Since the network device 303 receives the request message 3 through the interface 3031, and the request message 3 carries the IP address 12.1.1.2 of the interface 3031, the network device 303 sends the response message 2 through the interface 3031.
  • the network device 304 receives the request message 3 through the interface 3041, and the request message 3 carries the IP address 14.1.1.2 of the interface 3041. Therefore, the network device 304 sends the response message 3 through the interface 3041.
  • the content of the response packet 2 is similar to the content of the response packet 1.
  • the difference between the two is that the source IP address of the response packet 2 is the IP address 12.1.1.2 of the interface 3031, and the mpls echo carried by the response packet 2 is
  • the information may include the node information of the network device 303 (such as the management IP address, the interface IP address, the label of the interface, etc.), and the next hop information of the network device 303 (such as the IP address of the next hop corresponding to the interface 3032, that is, the network device 305).
  • the IP address of interface 3051 is 13.1.1.2).
  • the content of the response packet 3 is similar to the content of the response packet 1.
  • the difference between the two may be that the source IP address of the response packet 3 is the IP address 14.1.1.2 of the interface 3041, and the response packet 3 carries.
  • the mpls echo information may include the node information of the network device 304 (such as the management IP address, the interface IP address, the label of the interface, and the like), and the next hop information of the network device 304 (such as the IP address of the next hop corresponding to the interface 3042, that is, the network.
  • the IP address of the interface 3052 of the device 305 is 15.1.1.2).
  • Step f After the timer 2 expires, the network device 301 counts the number of response messages received for the request message 2 in the time period from the sending of the request message 2 to the end of the timer 2 counting. The response message 2 and the response message 3 are received. Therefore, the node information and the next hop information of the network device 303 are obtained from the response message 2, and the correspondence between the node information and the next hop information is recorded. The node information and the next hop information of the network device 304 are obtained in the response message 3, and the corresponding relationship between the node information and the next hop information is recorded. Then, the response message 2 and the response message 3 are used to generate the request message 4, the request message 4 is sent, and the timer 3 is started for the request message 4.
  • the network device 301 After the network device 301 obtains the node information of the network device 303, the next hop information, the node information of the network device 304, and the next hop information, the corresponding relationship table is shown in Table 2.
  • the request message 4 may carry the next hop information in the response message 2, that is, the IP address 13.1.1.2, and may carry the response message.
  • the content of the request message 4 may be similar to the content of the request message 1. The difference may be that the TTL value of the request message 4 is 3; the mpls echo information of the request message 4 includes the response message 2 and the response message 3 The next hop information in the middle, namely IP addresses 13.1.1.2 and 15.1.1.2, will not be repeated here.
  • the network device 302 After receiving the request message 4, the network device 302 decrements the TTL value of the request message 4 by 1 to obtain the request message 5, and sends the request message 5 through the interfaces 3022 and 3023, respectively.
  • the network device 303 decrements the TTL value of the request message 5 by 1 to obtain the request message 6, and sends the request message 6 through the interface 3032.
  • the network device 304 After receiving the request message 5, the network device 304 decrements the TTL value of the request message 5 by 1 to obtain the request message 7, and sends the request message 7 through the interface 3042.
  • step h after receiving the request message 6, the network device 305 decrements the TTL value of the request message 6 by 1, because the modified TTL value is 0, and the destination port is a fixed value (such as 3503), therefore, to the network
  • the device 301 sends a response message 4 for the request message 6.
  • the network device 305 After receiving the request message 7, the network device 305 decrements the TTL value of the request message 7 by 1. Since the modified TTL value is 0, and the destination port is a fixed value (such as 3503), the network device 305 sends the TTL value to the network device 301.
  • the network device 305 Since the network device 305 receives the request message 6 through the interface 3051, and the request message 6 carries the IP address 13.1.1.2 of the interface 3051, the network device 305 sends the response message 4 through the interface 3051.
  • the network device 305 receives the request message 7 through the interface 3052, and the request message 7 carries the IP address 15.1.1.2 of the interface 3052. Therefore, the network device 305 sends the response message 5 through the interface 3052.
  • the content of the response packet 4 is similar to that of the response packet 1.
  • the difference is that the source IP address of the response packet 4 is the IP address 13.1.1.2 of the interface 3051, and the mpls echo information carried in the response packet 4 may include the network.
  • the node information of the device 305 and the next hop information of the network device 305 (such as the IP address of the next hop corresponding to the interface 3053, that is, the IP address 16.1.1.2 of the interface 3061 of the network device 306).
  • the content of the response message 5 is similar to that of the response message 4, except that the source IP address is the IP address 15.1.1.2 of the interface 3052.
  • Step i After the timer 3 expires, the network device 301 counts the number of response messages received for the request message 4 in the time period from the sending of the request message 4 to the end of the timer 3 counting. Obtaining the response message 4 and the response message 5, the node information and the next hop information of the network device 305 are obtained from the response message 4, and the correspondence between the node information and the next hop information is recorded. The node information and the next hop information of the network device 305 are obtained in the response message 5, and the correspondence between the node information and the next hop information is recorded. Then, the response message 4 is generated by using the response message 4 and the response message 5, the request message 8 is transmitted, and the timer 4 is started for the request message 8.
  • the correspondence table regenerated by the network device 301 is shown in Table 3. No limitation is imposed on this.
  • the request message 8 is carried.
  • the next hop information is the IP address 16.1.1.2.
  • the content of the request message 8 is similar to the content of the request message 1, and the difference may be that the TTL value of the request message 8 is 4, and the next hop information carried is the IP address 16.1.1.2, which is not repeated. Narration.
  • Step j After receiving the request message 8, the network device 302 decrements the TTL value of the request message 8 by 1, and sends the TTL value modified request message 8 through the interfaces 3022 and 3023 respectively.
  • the network device 303, 304 After receiving the TTL value modified request message 8, the network device 303, 304 decrements the TTL value of the received request message by 1 and sends the TTL value modified request message through the interface 3032/interface 3042, respectively.
  • the network device 305 After receiving the request message 8 whose TTL value is modified again, the network device 305 decrements the TTL value of the received request message by 1, and sends the TTL value modified request message three times through the interface 3053.
  • the network device 306 receives two request messages, and refers to the two request messages as the request message 9 and the request message 10.
  • Step k After receiving the request message 9, the network device 306 decrements the TTL value of the request message 9 by 1. Since the TTL value is 0, the destination port is a fixed value, so the network device 301 sends the request message 9 Respond to message 6. Similarly, a response message 7 for the request message 10 is sent to the network device 301.
  • the network device 306 Since the network device 306 receives the request message 9/10 through the interface 3061, and the request message 9/10 carries the IP address 16.1.1.2 of the interface 3061, the network device 306 sends the response message 6/response message through the interface 3061. 7.
  • the content of the response packet 6/7 is similar to that of the response packet 1. The difference is that the source IP address of the response packet 6/7 is the IP address 16.1.1.2 of the interface 3061, and the response packet 6/7 is carried.
  • the mpls echo information may include node information of the network device 306 and does not carry next hop information.
  • Step 1 After the timer 4 expires, the network device 301 counts the number of response messages received for the request message 8 in the time period from the transmission of the request message 8 to the end of the timer 4 timeout. Since the response message 6 and the response message 7 are received, and the content of the response message 6 and the response message 7 are the same, the node information of the network device 306 is obtained from the response message 6, and the node information is recorded.
  • the correspondence table regenerated by the device 301 is shown in Table 4, and no limitation is imposed thereon.
  • the response packet 6/7 does not carry the next hop information. Therefore, the IP address 16.1.1.2 is the node information of the egress node, stops the sending of the request packet, and ends the information collection process. So far, the network device 301 collects the node information and the next hop information of the forwarding node and the node information of the egress node, as shown in Table 4.
  • the network device 301 after the timer expires, if the network device 301 still does not receive the response packet for the request packet, the current hop (that is, the network device corresponding to the TTL value) is considered unreachable, and the TTL value is obtained. Add 1 to get a new request message, and send the new request message to continue to probe the next hop.
  • the timers started for different request messages may be the same time or different.
  • the time of the timer is related to the TTL value of the request message. For example, when the TTL value of the request message is larger, the timer time is larger.
  • the network device 302 does not send the request message 3 through the interface 3022 and the interface 3023, but adopts a hash algorithm.
  • An interface is selected from the interface 3022 and the interface 3023. Assuming that the selection interface 3022 sends the request message 3, only the network device 303 will send a response message for the request message 2 (step e').
  • the network device 301 sends the request message 4 again (step f')
  • it carries the next hop information of the network device 303, that is, the IP address 13.1.1.2, and does not carry the next hop information of the network device 304. That is, the IP address is 15.1.1.2.
  • the network device 302 transmits the request message 5 obtained from the request message 4 (step g'), it continues to select an interface from the interface 3022 and the interface 3023 by using a hash algorithm. Assume that the selection interface 3023 sends the request message 5, the network device 305 will receive the request message 7 obtained from the request message 5 through the interface 3052, and the request message 7 carries the IP address 13.1.1.2 of the interface 3051. Not the IP address 15.1.1.2 of interface 3052. In this case, the network device 305 will not be able to send the correct response message to the network device 301, thereby causing the network device 301 to fail to correctly collect the information of the network device 305.
  • the embodiment of the present disclosure further provides an information collecting device, which can be applied to an ingress node.
  • the device may include:
  • a generating module 401 configured to generate a request message for collecting information of the node
  • the sending module 402 is configured to send a request message.
  • the receiving module 403 is configured to receive at least one response packet for the request packet.
  • the processing module 404 is configured to obtain node information and next hop information from the at least one response packet, and record a correspondence between the node information and the next hop information.
  • the generating module 401 is further configured to regenerate the request message by using the received at least one response message for the request message, where the request message includes all the at least one response message.
  • One-hop information; the re-generated request message is sent by the sending module 402.
  • the generating module 401 is further configured to: after the sending module 402 sends the request message, start a timer for the request message; after the timer expires, the statistics start from sending the request message to the timer. The number of response messages received for the request message in the time period after the end of the timeout period; if at least two response messages are received, the request message is regenerated by using the at least two response messages; And receiving a response message, and regenerating the request message by using the one response message, where the request message includes next hop information in the one response message.
  • the processing module 404 is further configured to: obtain node information of the egress node from the response packet, record node information of the egress node, and stop sending the request message.
  • An electronic device (such as an ingress node) provided by an embodiment of the present disclosure may be as shown in FIG. 5 from a hardware level.
  • the electronic device includes a machine readable storage medium 501 and a processor 502.
  • Machine-readable storage medium 501 stores machine-executable instructions that are executable by processor 502.
  • the processor 502 is in communication with the machine readable storage medium 501, reads and executes the machine executable instructions stored in the machine readable storage medium 501, and implements the information collection operations disclosed by the above examples of the present disclosure.
  • machine-readable storage medium 501 can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and the like.
  • the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk. (such as a disc, dvd, etc.), or a similar storage medium, or a combination thereof.
  • the embodiment of the present disclosure further provides an information collecting apparatus, which may be applied to a forwarding node between an ingress node and an egress node, and the forwarding node has at least two next hops.
  • an information collecting apparatus which may be applied to a forwarding node between an ingress node and an egress node, and the forwarding node has at least two next hops.
  • FIG. 6, which is a structural diagram of the device the device may include:
  • the receiving module 601 is configured to receive a request message sent by the ingress node
  • the sending module 602 is configured to: when the local node is the target node of the request message, send a response message to the ingress node; the response message carries the node information of the local node, and the at least two next hops correspond to The next hop information; when the local node is not the target node of the request message, the at least two request messages are obtained, and the obtained request message is separately sent to the at least two next hops.
  • the information collecting apparatus further includes a determining module (not shown in the figure), and the determining module is configured to: after receiving the request message, if the TTL value carried in the request packet is specified The value is determined to be the target node of the request message; if the TTL value carried in the request message is not a specified value, it is determined that the node is not the target node of the request message.
  • the electronic device (such as a forwarding node) provided by the embodiment of the present disclosure can be seen from the hardware level as shown in FIG. 7 .
  • a machine readable storage medium 701 and a processor 702 are included.
  • Machine-readable storage medium 701 stores machine-executable instructions that are executable by the processor 702.
  • the processor 702 is in communication with the machine readable storage medium 701, reads and executes the machine executable instructions stored in the machine readable storage medium 701, and implements the information collection operations disclosed by the above examples of the present disclosure.
  • machine-readable storage medium 701 can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and the like.
  • the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk. (such as a disc, dvd, etc.), or a similar storage medium, or a combination thereof.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, and a game control.
  • embodiments of the present disclosure can be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware aspects. Moreover, embodiments of the present disclosure may take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • these 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 instruction means implements the functions specified in one or more blocks of the flowchart or in a flow 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.

Abstract

Disclosed are an information collecting method and device, an electronic device and a machine-readable storage medium, which are applied to a network comprising an ingress node, a forwarding node and an egress node. According to an example of the method, after an ingress node sends a request message used for collecting information of a node, the ingress node may receive at least one response message for the request message; the ingress node, if acquiring node information and next hop information from the response message, records a correspondence between the node information and the next hop information, uses all of the responses messages received for the request message to regenerate a request message, and sends the regenerated request message; and the ingress node, if only acquiring the node information from the response message, determines that the node information pertains to an egress node.

Description

信息收集collect message
相关申请的交叉引用Cross-reference to related applications
本专利申请要求于2017年12月13日提交的、申请号为2017113264694、发明名称为“一种信息收集方法、装置、设备及机器可读存储介质”的中国专利申请的优先权,该申请的全文以引用的方式并入本文中。The present application claims priority to Chinese Patent Application No. 2017113264694, filed on Dec. 13, 2017, the entire disclosure of which is incorporated herein by reference. The entire text is incorporated herein by reference.
技术领域Technical field
本公开涉及通信技术领域,尤其是涉及一种信息收集方法、装置、设备及机器可读存储介质。The present disclosure relates to the field of communications technologies, and in particular, to an information collecting method, apparatus, device, and machine readable storage medium.
背景技术Background technique
在MPLS(Multi-Protocol Label Switching,多协议标签交换)网络中,可以在入口(ingress)节点与出口(egress)节点之间创建隧道,如LSP(Label Switched Path,标签交换路径)隧道或者TE(Traffic Engineering,流量工程)隧道等。On a MPLS (Multi-Protocol Label Switching) network, you can create a tunnel between the ingress node and the egress node, such as an LSP (Label Switched Path) tunnel or TE ( Traffic Engineering, traffic engineering, tunnels, etc.
入口节点可以使用MPLS Tracert(跟踪路由)技术,收集从入口节点到出口节点所经过的各节点的信息,如IP地址、标签等,以能够定位出发生故障的节点。The ingress node can use MPLS Tracert technology to collect information about each node passing through the ingress node to the egress node, such as an IP address, a label, etc., to be able to locate the failed node.
具体的,入口节点可以先发送TTL(Time To Live,生存时间)值为1的请求报文,接收第一个节点返回的回应报文,并从该回应报文中收集到第一个节点的信息。然后,入口节点发送TTL值为2的请求报文,接收第二个节点返回的回应报文,并从该回应报文中收集到第二个节点的信息,以此类推。Specifically, the ingress node may first send a request packet with a TTL (Time To Live) value of 1, and receive a response packet returned by the first node, and collect the first node from the response packet. information. Then, the ingress node sends a request message with a TTL value of 2, receives a response message returned by the second node, and collects information of the second node from the response message, and so on.
在实际的组网中,若入口节点与出口节点之间存在等价路径,则入口节点在使用MPLS Tracert技术收集各节点的信息时,可能会无法收集到节点的信息。In the actual networking, if there is an equivalent path between the ingress node and the egress node, the ingress node may not collect the information of the node when collecting information of each node by using MPLS Tracert technology.
附图说明DRAWINGS
为了更加清楚地说明本公开实施例中的技术方案,下面将对本公开实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据本公开实施例的这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments of the present disclosure will be briefly described below. It is obvious that the drawings in the following description are only the ones described in the present disclosure. For the embodiments, other drawings may be obtained by those skilled in the art in accordance with the drawings of the embodiments of the present disclosure.
图1是本公开一种实施方式中的信息收集方法的流程图;1 is a flowchart of an information collecting method in an embodiment of the present disclosure;
图2是本公开另一种实施方式中的信息收集方法的流程图;2 is a flowchart of an information collecting method in another embodiment of the present disclosure;
图3A是本公开一种实施方式中的应用场景示意图;3A is a schematic diagram of an application scenario in an embodiment of the present disclosure;
图3B是根据本公开实施例的信息收集方法在图3A所示应用场景下的操作示意图;FIG. 3B is a schematic diagram of operations of the information collecting method in the application scenario shown in FIG. 3A according to an embodiment of the present disclosure; FIG.
图3C是相关技术在图3A所示应用场景下的操作示意图;3C is a schematic diagram of operations of the related art in the application scenario shown in FIG. 3A;
图4是本公开一种实施方式中的信息收集装置的结构图;4 is a structural diagram of an information collecting device in an embodiment of the present disclosure;
图5是本公开一种实施方式中的入口节点的硬件结构图;5 is a hardware structural diagram of an ingress node in an embodiment of the present disclosure;
图6是本公开另一种实施方式中的信息收集装置的结构图;6 is a structural diagram of an information collecting device in another embodiment of the present disclosure;
图7是本公开一种实施方式中的转发节点的硬件结构图。FIG. 7 is a hardware structural diagram of a forwarding node in an embodiment of the present disclosure.
具体实施方式Detailed ways
在本公开使用的术语仅仅是出于描述特定实施例的目的,而非限制本公开。本公开和权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其它含义。还应当理解,本文中使用的术语“和/或”是指包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in the present disclosure is for the purpose of describing the particular embodiments, The singular forms "a", "the" and "the" It should also be understood that the term "and/or" as used herein refers to any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,此外,所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, the first information may also be referred to as second information without departing from the scope of the present disclosure. Similarly, the second information may also be referred to as first information. Depending on the context, in addition, the word "if" may be interpreted to mean "at time" or "when" or "in response to determination."
本公开实施例提出一种信息收集方法,该方法可以应用于包括入口(ingress)节点、转发节点和出口(egress)节点的网络,如MPLS网络。在MPLS网络中,入口节点与出口节点之间创建有隧道、如LSP隧道或者TE隧道等,入口节点与出口节点之间的节点为转发节点。入口节点可以使用MPLS Tracert技术,收集转发节点的节点信息(如IP地址、标签等)和下一跳信息、出口节点的节点信息(如IP地址、标签等)。基于这些信息可以定位出发生故障的节点。The embodiment of the present disclosure proposes an information collecting method, which can be applied to a network including an ingress node, a forwarding node, and an egress node, such as an MPLS network. In the MPLS network, a tunnel, such as an LSP tunnel or a TE tunnel, is created between the ingress node and the egress node, and the node between the ingress node and the egress node is a forwarding node. The ingress node can use the MPLS Tracert technology to collect node information (such as IP address, label, etc.) and next hop information of the forwarding node, and node information (such as IP address, label, and so on) of the egress node. Based on this information, the failed node can be located.
在上述应用场景下,参见图1所示,为本公开实施例中提出的信息收集方法的流程图。该方法可以应用于入口节点。该方法可以包括以下步骤。In the above application scenario, referring to FIG. 1 , it is a flowchart of an information collecting method proposed in the embodiment of the present disclosure. This method can be applied to an ingress node. The method can include the following steps.
步骤101,生成用于收集节点的信息的请求报文。Step 101: Generate a request message for collecting information of the node.
步骤102,发送所述请求报文,并接收针对该请求报文的回应报文;若从该回应报文获取到节点信息(如转发节点的IP地址、标签等)和下一跳信息(如转发节点的下一跳的IP地址等),则记录该节点信息和该下一跳信息的对应关系。Step 102: Send the request message, and receive a response message for the request message; if the node information (such as the IP address, label, etc. of the forwarding node) and the next hop information are obtained from the response message, Forwarding the IP address of the next hop of the node, etc., and recording the correspondence between the node information and the next hop information.
在一个例子中,入口节点需要使用MPLS Tracert技术收集转发节点的节点信息时,可以生成用于收集节点的信息的请求报文,并发送该请求报文。若该请求报文的目标节点是转发节点,则转发节点在接收到该请求报文后,可以向入口节点发送针对该请求报文的回应报文,该回应报文可以携带本转发节点的节点信息和下一跳信息。这样,入口节点在接收到该回应报文之后,可以从该回应报文获取到该节点信息和该下一跳信息,并在本地记录该节点信息和该下一跳信息的对应关系。In an example, when the ingress node needs to collect the node information of the forwarding node by using the MPLS Tracert technology, it may generate a request packet for collecting information of the node, and send the request packet. If the destination node of the request packet is a forwarding node, the forwarding node may send a response packet for the request packet to the ingress node after receiving the request packet, where the response packet may carry the node of the forwarding node. Information and next hop information. In this way, after receiving the response packet, the ingress node can obtain the node information and the next hop information from the response packet, and locally record the correspondence between the node information and the next hop information.
在另一个例子中,若该请求报文的目标节点是出口节点,则出口节点在接收到该请求报文后,可以向入口节点发送针对该请求报文的回应报文,该回应报文可以携带本出口节点的节点信息。由于出口节点没有对应的下一跳,因此,该回应报文未携带本出口节点的下一跳信息。这样,入口节点在接收到针对该请求报文的回应报文后,可以从该回应报文中获取到出口节点的节点信息,并在本地记录出口节点的节点信息。由于该回应报文未携带下一跳信息,因此,入口节点没有从该回应报文中获取到出口节点的下一跳信息,也就不用在本地记录出口节点的下一跳信息。In another example, if the target node of the request message is an egress node, the egress node may send a response packet for the request message to the ingress node after receiving the request message, and the response message may be Carry the node information of the egress node. The egress node does not have a corresponding next hop. Therefore, the response packet does not carry the next hop information of the egress node. In this way, after receiving the response packet for the request packet, the ingress node can obtain the node information of the egress node from the response packet, and locally record the node information of the egress node. Because the response packet does not carry the next hop information, the ingress node does not obtain the next hop information of the egress node from the response packet, and the next hop information of the egress node is not recorded locally.
进一步的,入口节点在接收到出口节点发送的回应报文后,则已经收集到转发节点的节点信息和下一跳信息、出口节点的节点信息。因此,入口节点停止请求报文的发送操作,即不再发送请求报文,可以结束信息收集流程。Further, after receiving the response message sent by the egress node, the ingress node has collected the node information and the next hop information of the forwarding node and the node information of the egress node. Therefore, the ingress node stops the request packet sending operation, that is, the request packet is no longer sent, and the information collecting process can be ended.
步骤103,若接收到至少两个针对该请求报文的回应报文,则利用该至少两个回应报文重新生成请求报文,该请求报文包括该至少两个回应报文中的下一跳信息。然后,返回执行发送请求报文,接收针对该请求报文的回应报文的操作。Step 103: If at least two response messages for the request message are received, the request message is regenerated by using the at least two response messages, where the request message includes the next one of the at least two response messages. Jump information. Then, the operation of transmitting the request message and receiving the response message for the request message is returned.
在一个例子中,还可以为该请求报文启动定时器,该定时器的时间可以根据经验进行配置。具体的,入口节点发送请求报文并为该请求报文启动定时器,在定时器超时后,则入口节点可以统计自发送该请求报文起、至该定时器计时结束为止的时间段内接收到的针对该请求报文的回应报文的数量。In an example, a timer can also be started for the request message, and the time of the timer can be configured according to experience. Specifically, the ingress node sends a request packet and starts a timer for the request packet. After the timer expires, the ingress node may receive the time period from the time the packet is sent to the end of the timer. The number of response messages to the request message.
若入口节点接收到至少两个针对该请求报文的回应报文,则利用所有所述至少两个回应报文重新生成请求报文,在重新生成的请求报文中,可以同时携带所述至少两个回 应报文中每个报文的下一跳信息,然后返回步骤102。If the ingress node receives at least two response packets for the request message, the request message is regenerated by using the at least two response messages, and the regenerated request message may carry the at least The two respond to the next hop information of each message in the message, and then return to step 102.
若入口节点只接收到针对该请求报文的一个回应报文,则利用所述一个回应报文重新生成请求报文。在重新生成的请求报文中,可以只携带所述一个回应报文中的下一跳信息,然后返回步骤102。If the ingress node receives only one response message for the request message, the request message is regenerated by using the one response message. In the regenerated request message, only the next hop information in the one response message may be carried, and then return to step 102.
在上述实施例中,当入口节点与出口节点之间的转发节点需要转发接收到的请求报文时,若该转发节点存在至少两个下一跳,则可以向该至少两个下一跳分别发送该请求报文。具体的,若该转发节点存在至少两个下一跳,则:若本转发节点是该请求报文的目标节点,则可以向入口节点发送回应报文,该回应报文可以携带本转发节点的节点信息、至少两个下一跳各自对应的下一跳信息;若本转发节点不是该请求报文的目标节点,则向至少两个下一跳分别发送该请求报文。In the foregoing embodiment, when the forwarding node between the ingress node and the egress node needs to forward the received request message, if the forwarding node has at least two next hops, the at least two next hops may be separately Send the request message. Specifically, if the forwarding node has at least two next hops, if the forwarding node is the target node of the request packet, the forwarding node may send a response packet to the ingress node, where the response packet may carry the forwarding node. The node information, the next hop information corresponding to each of the at least two next hops; if the forwarding node is not the target node of the request packet, the request message is sent to the at least two next hops respectively.
当转发节点不是接收到的请求报文的目标节点时,则需要转发该请求报文。When the forwarding node is not the target node of the received request message, the request message needs to be forwarded.
在上述实施例中,所述请求报文可以包括但不限于mpls echo request(回送请求)报文,所述回应报文可以包括但不限于mpls echo reply(回送应答)报文。In the above embodiment, the request message may include, but is not limited to, an mpls echo request message, and the response message may include, but is not limited to, an mpls echo reply message.
基于上述技术方案,本公开实施例中,当入口节点与出口节点之间存在等价路径时,可以使用MPLS Tracert技术收集各节点的节点信息、下一跳信息,从而可利用收集到的各节点的节点信息、下一跳信息准确解析入口节点与出口节点之间的路径。Based on the foregoing technical solution, in the embodiment of the present disclosure, when there is an equivalent path between the ingress node and the egress node, the MPLS Tracert technology can be used to collect the node information and the next hop information of each node, so that the collected nodes can be utilized. The node information and the next hop information accurately resolve the path between the ingress node and the egress node.
基于与上述方法同样的构思,参见图2所示,为本公开实施例中提出的另一个信息收集方法的流程图,该方法可以应用于入口节点与出口节点之间的转发节点,且该转发节点存在至少两个下一跳,该方法可以包括以下步骤。Based on the same concept as the above method, referring to FIG. 2, it is a flowchart of another information collecting method proposed in the embodiment of the present disclosure, which may be applied to a forwarding node between an ingress node and an egress node, and the forwarding is performed. The node has at least two next hops, and the method may include the following steps.
步骤201,接收入口节点发送的请求报文,并判断本节点是否是该请求报文的目标节点;若本节点是该请求报文的目标节点,则执行步骤202;若本节点不是该请求报文的目标节点,则执行步骤203。Step 201: Receive a request message sent by the ingress node, and determine whether the node is the target node of the request message; if the node is the target node of the request message, go to step 202; if the node is not the request message Step 203 is performed on the target node of the text.
步骤202,向入口节点发送针对该请求报文的回应报文,其中,该回应报文可以携带本节点的节点信息、所述至少两个下一跳分别对应的下一跳信息。Step 202: Send a response message for the request message to the ingress node, where the response message may carry the node information of the local node and the next hop information corresponding to the at least two next hops respectively.
步骤203,获得至少两个新的请求报文,并向该至少两个下一跳分别发送所获得的新的请求报文。其中,转发节点获得的新的请求报文的数量与下一跳的数量相同。Step 203: Obtain at least two new request messages, and send the obtained new request messages to the at least two next hops respectively. The number of new request packets obtained by the forwarding node is the same as the number of next hops.
在一个例子中,转发节点在接收到所述请求报文后,若该请求报文携带的TTL值是指定数值(如1),则确定本节点是该请求报文的目标节点。然而,若该请求报文携带 的TTL值不是指定数值,则确定本节点不是该请求报文的目标节点。在这种情况下,转发节点修改该请求报文的TTL值(例如减1),以获得新的请求报文,并基于该回应报文携带的本节点的下一跳信息发送该新的请求报文。In an example, after receiving the request message, if the TTL value carried in the request message is a specified value (such as 1), the forwarding node determines that the node is the target node of the request message. However, if the TTL value carried in the request packet is not a specified value, it is determined that the node is not the target node of the request message. In this case, the forwarding node modifies the TTL value of the request packet (for example, minus 1) to obtain a new request packet, and sends the new request based on the next hop information of the local node carried in the response packet. Message.
在上述实施例中,所述请求报文可以包括但不限于mpls echo request(回送请求)报文,所述回应报文可以包括但不限于mpls echo reply(回送应答)报文。In the above embodiment, the request message may include, but is not limited to, an mpls echo request message, and the response message may include, but is not limited to, an mpls echo reply message.
基于上述技术方案,本公开实施例中,当入口节点与出口节点之间存在等价路径时,可以使用MPLS Tracert技术收集各节点的节点信息、下一跳信息,从而可利用各节点的节点信息、下一跳信息准确解析入口节点与出口节点之间的路径。Based on the foregoing technical solution, in the embodiment of the present disclosure, when there is an equivalent path between the ingress node and the egress node, the node information and the next hop information of each node may be collected by using the MPLS Tracert technology, so that the node information of each node may be utilized. The next hop information accurately resolves the path between the ingress node and the egress node.
以下结合图3A所示的应用场景,对上述信息收集方法进行说明。参见图3A所示,网络设备301是入口节点,网络设备302-305是转发节点,网络设备306是出口节点。此外,网络设备302存在两个下一跳(即网络设备303和304),而网络设备303-305均只存在一个下一跳。The above information collecting method will be described below in conjunction with the application scenario shown in FIG. 3A. Referring to Figure 3A, network device 301 is an ingress node, network devices 302-305 are forwarding nodes, and network device 306 is an egress node. In addition, network device 302 has two next hops (i.e., network devices 303 and 304), while network devices 303-305 each have only one next hop.
如图3A所示,网络设备301的管理IP地址为1.1.1.1,接口3011的IP地址为11.1.1.1。网络设备302的管理IP地址为2.2.2.2,接口3021的IP地址为11.1.1.2,接口3022的IP地址为12.1.1.1,接口3023的IP地址为14.1.1.1。其它网络设备的管理IP地址和接口IP地址,参见图3A,在此不再赘述。As shown in FIG. 3A, the management IP address of the network device 301 is 1.1.1.1, and the IP address of the interface 3011 is 11.1.1.1. The management IP address of the network device 302 is 2.2.2.2, the IP address of the interface 3021 is 11.1.1.2, the IP address of the interface 3022 is 12.1.1.1, and the IP address of the interface 3023 is 14.1.1.1. For the management IP address and interface IP address of other network devices, refer to Figure 3A, and details are not described herein.
需说明的是,上述网络设备的管理IP地址是指MPLS LSR-ID(Label Switch Router-IDentity)地址。在MPLS网络的业务部署中,需要为每一台支持MPLS业务的网络设备指定一个LSR-ID地址,该LSR-ID地址的含义就是这个网络设备在MPLS网络中的名字。上述接口的IP地址在下文中也称为接口IP地址。It should be noted that the management IP address of the network device refers to an MPLS LSR-ID (Label Switch Router-IDentity) address. In the service deployment of the MPLS network, an LSR-ID address needs to be assigned to each network device supporting the MPLS service. The meaning of the LSR-ID address is the name of the network device in the MPLS network. The IP address of the above interface is also referred to as an interface IP address hereinafter.
在上述应用场景下,为了收集转发节点(如网络设备301到305)的节点信息(如IP地址、标签等)和下一跳信息、出口节点(如网络设备306)的节点信息(如IP地址、标签等),则信息收集方法可以如图3B所示包括以下步骤。In the above application scenario, in order to collect node information (such as IP address, label, etc.) and next hop information of a forwarding node (such as network devices 301 to 305), node information (such as an IP address) of an egress node (such as network device 306) The label collection method may include the following steps as shown in FIG. 3B.
步骤a、网络设备301发送请求报文1,并为请求报文1启动定时器1。Step a, the network device 301 sends a request message 1 and starts a timer 1 for the request message 1.
在网络设备301使用MPLS Tracert技术收集转发节点的节点信息和下一跳信息、出口节点的节点信息时,生成请求报文1,并通过接口3011发送请求报文1。请求报文1的报文类型可为UDP(User Datagram Protocol,用户数据报协议)类型。在请求报文1的IP头中,源IP地址为接口3011的IP地址11.1.1.1,目的IP地址为127.0.0.1(该地址表示一个本机地址,其含义是接收报文的任一网络设备不是转发而是直接处理该报 文),TTL值为1。在请求报文1的UDP头中,源端口为可变值X(可以根据需要动态调整,对此不做限制),目的端口为固定值(如3503),这个目的端口表示请求报文1用于执行LSP Ping(Label Switching Path Ping,标记交换路径检测),即正在采用MPLS Tracert技术收集路径中各节点的信息。此外,请求报文1还可以携带mpls echo信息,该mpls echo信息可以包括隧道信息,如接口3011对应的标签信息,这个标签信息是网络设备301-306之间的隧道(如LSP隧道或者TE隧道)的标签信息。此外,该mpls echo信息还可以包括接口3021的IP地址11.1.1.2。When the network device 301 collects the node information, the next hop information, and the node information of the egress node by using the MPLS Tracert technology, the request message 1 is generated, and the request message 1 is sent through the interface 3011. The packet type of the request packet 1 may be a UDP (User Datagram Protocol) type. In the IP header of the request packet 1, the source IP address is the IP address 11.1.1.1 of the interface 3011, and the destination IP address is 127.0.0.1 (the address represents a local address, which means any network device that receives the packet. The message is processed directly instead of forwarding, and the TTL value is 1. In the UDP header of the request packet 1, the source port is a variable value X (can be dynamically adjusted as needed, and is not limited thereto), and the destination port is a fixed value (for example, 3503), and the destination port indicates that the request packet 1 is used. LSP ping (Label Switching Path ping) is performed, that is, MPLS Tracert technology is being used to collect information about each node in the path. In addition, the request message 1 may further carry mpls echo information, and the mpls echo information may include tunnel information, such as label information corresponding to the interface 3011, and the label information is a tunnel between the network devices 301-306 (such as an LSP tunnel or a TE tunnel). ) tag information. In addition, the mpls echo information may also include the IP address 11.1.1.2 of the interface 3021.
网络设备301可以为请求报文1启动定时器1,定时器1的时间可以根据经验进行配置。在定时器1超时之后,网络设备301可以统计本设备在从发送请求报文1起、到定时器1计时结束为止的时间段内接收到的针对请求报文1的回应报文的数量。The network device 301 can start the timer 1 for the request message 1, and the time of the timer 1 can be configured according to experience. After the timer 1 times out, the network device 301 can count the number of response messages received by the device for the request message 1 in the period from the transmission of the request message 1 to the end of the timer 1 timeout.
步骤b、网络设备302在接收到请求报文1后,将请求报文1的TTL值减1。由于修改后的TTL值为0,且目的端口为固定值(如3503),因此,确定请求报文1用于执行LSP Ping,并向网络设备301发送针对请求报文1的回应报文1。Step b: After receiving the request message 1, the network device 302 decrements the TTL value of the request message 1 by one. The modified TTL value is 0, and the destination port is a fixed value (for example, 3503). Therefore, it is determined that the request message 1 is used to perform LSP ping, and the response packet 1 for the request message 1 is sent to the network device 301.
由于网络设备302通过接口3021接收到请求报文1,且请求报文1中携带有接口3021的IP地址11.1.1.2,因此网络设备302通过接口3021发送回应报文1。Since the network device 302 receives the request message 1 through the interface 3021, and the request message 1 carries the IP address 11.1.1.2 of the interface 3021, the network device 302 sends the response message 1 through the interface 3021.
回应报文1的报文类型可为UDP类型。在回应报文1的IP头中,源IP地址为接口3021的IP地址11.1.1.2,目的IP地址为接口3011的IP地址11.1.1.1(请求报文1的源IP地址),TTL值为255。在回应报文1的UDP头中,源端口为固定值(如3503)以表示回应报文1用于执行LSP Ping,目的端口为可变值X(可以根据需要动态调整)。此外,回应报文1还可以携带mpls echo信息,mpls echo信息可以包括网络设备302的节点信息(如网络设备302的管理IP地址、接口IP地址、接口的标签等,对此节点信息不做限制)、网络设备302的下一跳信息,该下一跳信息也可以称为downstream信息。The packet type of the response packet 1 can be of the UDP type. In the IP header of the response packet 1, the source IP address is the IP address 11.1.1.2 of the interface 3021, and the destination IP address is the IP address 11.1.1.1 of the interface 3011 (the source IP address of the request packet 1), and the TTL value is 255. . In the UDP header of the response packet 1, the source port is a fixed value (such as 3503) to indicate that the response packet 1 is used to perform LSP ping, and the destination port is a variable value X (can be dynamically adjusted as needed). In addition, the response message 1 can also carry the mpls echo information, and the mpls echo information can include the node information of the network device 302 (such as the management IP address of the network device 302, the interface IP address, the label of the interface, etc., and the node information is not limited. The next hop information of the network device 302, the next hop information may also be referred to as downstream information.
网络设备302的下一跳信息可以包括:接口3022对应的下一跳的IP地址,即网络设备303的接口3031的IP地址12.1.1.2;以及,接口3023对应的下一跳的IP地址,即网络设备304的接口3041的IP地址14.1.1.2。The next hop information of the network device 302 may include: an IP address of the next hop corresponding to the interface 3022, that is, an IP address 12.1.1.2 of the interface 3031 of the network device 303; and an IP address of the next hop corresponding to the interface 3023, that is, The IP address of the interface 3041 of the network device 304 is 14.1.1.2.
网络设备302可以基于请求报文1携带的隧道信息(如接口3011对应的标签信息),从本地获取到网络设备302的下一跳信息,对此不做限制。The network device 302 can obtain the next hop information of the network device 302 from the local device based on the tunnel information (such as the label information corresponding to the interface 3011).
步骤c、在定时器1超时后,网络设备301统计自发送请求报文1起、至定时器1 计时结束为止的时间段内接收到的针对请求报文1的回应报文的数量。由于只接收到回应报文1,因此从回应报文1中获取网络设备302的节点信息和下一跳信息,记录节点信息和下一跳信息的对应关系,并利用回应报文1生成请求报文2,发送请求报文2,并为请求报文2启动定时器2。Step c: After the timer 1 times out, the network device 301 counts the number of response messages received for the request message 1 in the time period from the sending of the request message 1 to the end of the timer 1 time. Since only the response message 1 is received, the node information and the next hop information of the network device 302 are obtained from the response message 1, and the correspondence between the node information and the next hop information is recorded, and the request message is generated by using the response message 1. In the text 2, the request message 2 is sent, and the timer 2 is started for the request message 2.
网络设备301可以从回应报文1中获取网络设备302的节点信息(如接口3021的IP地址11.1.1.2、管理IP地址2.2.2.2、接口3021的标签等)、下一跳信息(如IP地址12.1.1.2和14.1.1.2),并记录表1所示的对应关系。在表1中,是以节点信息为接口的IP地址11.1.1.2为例进行说明,对此对应关系的内容不做限制。The network device 301 can obtain the node information of the network device 302 (such as the IP address 11.1.1.2 of the interface 3021, the management IP address 2.2.2.2, the label of the interface 3021, etc.) and the next hop information (such as the IP address) from the response message 1. 12.1.1.2 and 14.1.1.2), and record the correspondence shown in Table 1. In Table 1, the IP address 11.1.1.2 with the node information as the interface is taken as an example, and the content of the corresponding relationship is not limited.
表1Table 1
TTLTTL 节点信息Node information 下一跳信息 Next hop information
11 11.1.1.211.1.1.2 12.1.1.2和14.1.1.212.1.1.2 and 14.1.1.2
基于表1,TTL值为1表示网络设备301的下一跳,11.1.1.2为该下一跳的接口IP地址,该下一跳到出口节点存在两个下一跳,这两个下一跳的接口IP地址分别为12.1.1.2和14.1.1.2。Based on Table 1, the TTL value of 1 indicates the next hop of the network device 301, 11.1.1.2 is the interface IP address of the next hop, and the next hop to the egress node has two next hops, the two next hops. The IP addresses of the interfaces are 12.1.1.2 and 14.1.1.2.
针对利用回应报文1生成请求报文2的过程,该请求报文2中可以携带回应报文1中的下一跳信息,如请求报文2携带下一跳的接口IP地址12.1.1.2和14.1.1.2。For the process of generating the request message 2 by using the response message 1, the request message 2 may carry the next hop information in the response message 1, for example, the request message 2 carries the IP address of the next hop interface 12.1.1.2 and 14.1.1.2.
请求报文2的内容与请求报文1的内容类似,不同之处在于:请求报文2的TTL值为2;请求报文2的mpls echo信息包括回应报文1中的下一跳信息,即IP地址12.1.1.2和14.1.1.2。对此请求报文2的内容,在此不再重复赘述。The content of the request message 2 is similar to the content of the request message 1, except that the TTL value of the request message 2 is 2, and the mpls echo information of the request message 2 includes the next hop information in the response message 1. That is, IP addresses 12.1.1.2 and 14.1.1.2. The content of this request message 2 will not be repeated here.
步骤d、网络设备302在接收到请求报文2之后,将请求报文2的TTL值减1,得到请求报文3。由于请求报文3的TTL值为1、而非0,因此,网络设备302不是请求报文3的目标节点,需要继续转发请求报文3。在转发请求报文3时,由于网络设备302存在两个下一跳(即网络设备303和304),因此,网络设备302通过接口3022、3023发送请求报文3。Step d: After receiving the request message 2, the network device 302 decrements the TTL value of the request message 2 by 1 to obtain the request message 3. Since the TTL value of the request message 3 is 1, instead of 0, the network device 302 is not the target node of the request message 3, and needs to continue to forward the request message 3. When forwarding the request message 3, since the network device 302 has two next hops (ie, network devices 303 and 304), the network device 302 transmits the request message 3 through the interfaces 3022, 3023.
网络设备302从请求报文3中解析出目的端口为固定值(如3503)时,确定请求报文3用于执行LSP Ping,并确定需要继续转发请求报文3。When the network device 302 parses the destination port from the request packet 3 to a fixed value (for example, 3503), it determines that the request packet 3 is used to perform LSP ping, and determines that the request packet 3 needs to be forwarded.
网络设备302可以复制(N-1)个请求报文3,从而得到N个请求报文3,N为网络设备302的下一跳数量。这样,网络设备302可以向每个下一跳发送一个请求报文3。The network device 302 can copy (N-1) request messages 3, thereby obtaining N request messages 3, where N is the next hop count of the network device 302. Thus, network device 302 can send a request message 3 to each next hop.
步骤e、网络设备303在接收到请求报文3后,将请求报文3的TTL值减1。由于修改后的TTL值为0,且目的端口为固定值(如3503),因此,确定请求报文3用于执行LSP Ping,并向网络设备301发送针对请求报文3的回应报文2。网络设备304在接收到请求报文3后,将请求报文3的TTL值减1。由于修改后的TTL值为0,且目的端口为固定值(如3503),因此,确定请求报文3用于执行LSP Ping,并向网络设备301发送针对请求报文3的回应报文3。Step e: After receiving the request message 3, the network device 303 decrements the TTL value of the request message 3 by one. Since the modified TTL value is 0, and the destination port is a fixed value (for example, 3503), it is determined that the request message 3 is used to perform LSP ping, and the response packet 2 for the request message 3 is sent to the network device 301. After receiving the request message 3, the network device 304 decrements the TTL value of the request message 3 by one. Since the modified TTL value is 0, and the destination port is a fixed value (for example, 3503), it is determined that the request message 3 is used to perform LSP ping, and the response packet 3 for the request message 3 is sent to the network device 301.
由于网络设备303通过接口3031接收到请求报文3,且请求报文3中携带有接口3031的IP地址12.1.1.2,因此网络设备303通过接口3031发送回应报文2。Since the network device 303 receives the request message 3 through the interface 3031, and the request message 3 carries the IP address 12.1.1.2 of the interface 3031, the network device 303 sends the response message 2 through the interface 3031.
同理,由于网络设备304通过接口3041接收到请求报文3,且请求报文3中携带有接口3041的IP地址14.1.1.2,因此网络设备304通过接口3041发送回应报文3。For the same reason, the network device 304 receives the request message 3 through the interface 3041, and the request message 3 carries the IP address 14.1.1.2 of the interface 3041. Therefore, the network device 304 sends the response message 3 through the interface 3041.
回应报文2的内容与回应报文1的内容类似,二者的不同之处可以在于:回应报文2的源IP地址为接口3031的IP地址12.1.1.2,回应报文2携带的mpls echo信息可以包括网络设备303的节点信息(如管理IP地址、接口IP地址、接口的标签等)、网络设备303的下一跳信息(如接口3032对应的下一跳的IP地址,即网络设备305的接口3051的IP地址13.1.1.2)。The content of the response packet 2 is similar to the content of the response packet 1. The difference between the two is that the source IP address of the response packet 2 is the IP address 12.1.1.2 of the interface 3031, and the mpls echo carried by the response packet 2 is The information may include the node information of the network device 303 (such as the management IP address, the interface IP address, the label of the interface, etc.), and the next hop information of the network device 303 (such as the IP address of the next hop corresponding to the interface 3032, that is, the network device 305). The IP address of interface 3051 is 13.1.1.2).
此外,回应报文3的内容与回应报文1的内容类似,二者的不同之处可以在于:回应报文3的源IP地址为接口3041的IP地址14.1.1.2,回应报文3携带的mpls echo信息可以包括网络设备304的节点信息(如管理IP地址、接口IP地址、接口的标签等)、网络设备304的下一跳信息(如接口3042对应的下一跳的IP地址,即网络设备305的接口3052的IP地址15.1.1.2)。In addition, the content of the response packet 3 is similar to the content of the response packet 1. The difference between the two may be that the source IP address of the response packet 3 is the IP address 14.1.1.2 of the interface 3041, and the response packet 3 carries. The mpls echo information may include the node information of the network device 304 (such as the management IP address, the interface IP address, the label of the interface, and the like), and the next hop information of the network device 304 (such as the IP address of the next hop corresponding to the interface 3042, that is, the network. The IP address of the interface 3052 of the device 305 is 15.1.1.2).
步骤f、在定时器2超时后,网络设备301统计自发送请求报文2起、至定时器2计时结束为止的时间段内接收到的针对请求报文2的回应报文的数量。由于接收到回应报文2和回应报文3,因此,从回应报文2中获取网络设备303的节点信息和下一跳信息,并记录该节点信息和该下一跳信息的对应关系,从回应报文3中获取网络设备304的节点信息和下一跳信息,并记录该节点信息和该下一跳信息的对应关系。然后,利用回应报文2和回应报文3生成请求报文4,发送请求报文4,并为请求报文4启动定时器3。Step f: After the timer 2 expires, the network device 301 counts the number of response messages received for the request message 2 in the time period from the sending of the request message 2 to the end of the timer 2 counting. The response message 2 and the response message 3 are received. Therefore, the node information and the next hop information of the network device 303 are obtained from the response message 2, and the correspondence between the node information and the next hop information is recorded. The node information and the next hop information of the network device 304 are obtained in the response message 3, and the corresponding relationship between the node information and the next hop information is recorded. Then, the response message 2 and the response message 3 are used to generate the request message 4, the request message 4 is sent, and the timer 3 is started for the request message 4.
网络设备301获取到网络设备303的节点信息、下一跳信息,网络设备304的节点信息、下一跳信息后,对应关系表参见表2,对此不做限制。After the network device 301 obtains the node information of the network device 303, the next hop information, the node information of the network device 304, and the next hop information, the corresponding relationship table is shown in Table 2.
表2Table 2
TTLTTL 节点信息Node information 下一跳信息 Next hop information
11 11.1.1.211.1.1.2 12.1.1.2和14.1.1.212.1.1.2 and 14.1.1.2
22 12.1.1.212.1.1.2 13.1.1.213.1.1.2
22 14.1.1.214.1.1.2 15.1.1.215.1.1.2
针对利用回应报文2和回应报文3生成请求报文4的过程,该请求报文4中可以携带回应报文2中的下一跳信息,即IP地址13.1.1.2,并可以携带回应报文3中的下一跳信息,即IP地址15.1.1.2,例如,请求报文4携带IP地址13.1.1.2和15.1.1.2。For the process of generating the request message 4 by using the response message 2 and the response message 3, the request message 4 may carry the next hop information in the response message 2, that is, the IP address 13.1.1.2, and may carry the response message. The next hop information in the text 3, that is, the IP address 15.1.1.2, for example, the request message 4 carries the IP addresses 13.1.1.2 and 15.1.1.2.
请求报文4的内容可以与请求报文1的内容类似,不同之处可以在于:请求报文4的TTL值为3;请求报文4的mpls echo信息包括回应报文2和回应报文3中的下一跳信息,即IP地址13.1.1.2和15.1.1.2,对此不再重复赘述。The content of the request message 4 may be similar to the content of the request message 1. The difference may be that the TTL value of the request message 4 is 3; the mpls echo information of the request message 4 includes the response message 2 and the response message 3 The next hop information in the middle, namely IP addresses 13.1.1.2 and 15.1.1.2, will not be repeated here.
步骤g、网络设备302在接收到请求报文4后,将请求报文4的TTL值减1,得到请求报文5,通过接口3022、3023分别发送请求报文5。网络设备303接收到请求报文5后,将请求报文5的TTL值减1,得到请求报文6,通过接口3032发送请求报文6。网络设备304在接收到请求报文5后,将请求报文5的TTL值减1,得到请求报文7,通过接口3042发送请求报文7。After receiving the request message 4, the network device 302 decrements the TTL value of the request message 4 by 1 to obtain the request message 5, and sends the request message 5 through the interfaces 3022 and 3023, respectively. After receiving the request message 5, the network device 303 decrements the TTL value of the request message 5 by 1 to obtain the request message 6, and sends the request message 6 through the interface 3032. After receiving the request message 5, the network device 304 decrements the TTL value of the request message 5 by 1 to obtain the request message 7, and sends the request message 7 through the interface 3042.
步骤h、网络设备305在接收到请求报文6后,将请求报文6的TTL值减1,由于修改后的TTL值为0,且目的端口为固定值(如3503),因此,向网络设备301发送针对请求报文6的回应报文4。网络设备305在接收到请求报文7后,将请求报文7的TTL值减1,由于修改后的TTL值为0,且目的端口为固定值(如3503),因此,向网络设备301发送针对请求报文7的回应报文5。In step h, after receiving the request message 6, the network device 305 decrements the TTL value of the request message 6 by 1, because the modified TTL value is 0, and the destination port is a fixed value (such as 3503), therefore, to the network The device 301 sends a response message 4 for the request message 6. After receiving the request message 7, the network device 305 decrements the TTL value of the request message 7 by 1. Since the modified TTL value is 0, and the destination port is a fixed value (such as 3503), the network device 305 sends the TTL value to the network device 301. Response message 5 for request message 7.
由于网络设备305通过接口3051接收到请求报文6,且请求报文6中携带有接口3051的IP地址13.1.1.2,因此网络设备305通过接口3051发送回应报文4。Since the network device 305 receives the request message 6 through the interface 3051, and the request message 6 carries the IP address 13.1.1.2 of the interface 3051, the network device 305 sends the response message 4 through the interface 3051.
同理,由于网络设备305通过接口3052接收到请求报文7,且请求报文7中携带有接口3052的IP地址15.1.1.2,因此网络设备305通过接口3052发送回应报文5。For the same reason, the network device 305 receives the request message 7 through the interface 3052, and the request message 7 carries the IP address 15.1.1.2 of the interface 3052. Therefore, the network device 305 sends the response message 5 through the interface 3052.
回应报文4的内容与回应报文1的内容类似,不同之处在于:回应报文4的源IP地址为接口3051的IP地址13.1.1.2,回应报文4携带的mpls echo信息可以包括网络设备305的节点信息、网络设备305的下一跳信息(如接口3053对应的下一跳的IP地址, 即网络设备306的接口3061的IP地址16.1.1.2)。回应报文5的内容与回应报文4的内容类似,只是源IP地址为接口3052的IP地址15.1.1.2。The content of the response packet 4 is similar to that of the response packet 1. The difference is that the source IP address of the response packet 4 is the IP address 13.1.1.2 of the interface 3051, and the mpls echo information carried in the response packet 4 may include the network. The node information of the device 305 and the next hop information of the network device 305 (such as the IP address of the next hop corresponding to the interface 3053, that is, the IP address 16.1.1.2 of the interface 3061 of the network device 306). The content of the response message 5 is similar to that of the response message 4, except that the source IP address is the IP address 15.1.1.2 of the interface 3052.
步骤i、在定时器3超时后,网络设备301统计自发送请求报文4起、至定时器3计时结束为止的时间段内接收到的针对请求报文4的回应报文的数量。由于接收到回应报文4和回应报文5,因此,从回应报文4中获取网络设备305的节点信息和下一跳信息,并记录该节点信息和该下一跳信息的对应关系,从回应报文5中获取网络设备305的节点信息和下一跳信息,并记录该节点信息和该下一跳信息的对应关系。然后,利用回应报文4和回应报文5生成请求报文8,发送请求报文8,并为请求报文8启动定时器4。Step i: After the timer 3 expires, the network device 301 counts the number of response messages received for the request message 4 in the time period from the sending of the request message 4 to the end of the timer 3 counting. Obtaining the response message 4 and the response message 5, the node information and the next hop information of the network device 305 are obtained from the response message 4, and the correspondence between the node information and the next hop information is recorded. The node information and the next hop information of the network device 305 are obtained in the response message 5, and the correspondence between the node information and the next hop information is recorded. Then, the response message 4 is generated by using the response message 4 and the response message 5, the request message 8 is transmitted, and the timer 4 is started for the request message 8.
网络设备301重新生成的对应关系表参见表3所示,对此不做限制。The correspondence table regenerated by the network device 301 is shown in Table 3. No limitation is imposed on this.
表3table 3
TTLTTL 节点信息Node information 下一跳信息 Next hop information
11 11.1.1.211.1.1.2 12.1.1.2和14.1.1.212.1.1.2 and 14.1.1.2
22 12.1.1.212.1.1.2 13.1.1.213.1.1.2
22 14.1.1.214.1.1.2 15.1.1.215.1.1.2
33 13.1.1.213.1.1.2 16.1.1.216.1.1.2
33 15.1.1.215.1.1.2 16.1.1.216.1.1.2
针对利用回应报文4和回应报文5生成请求报文8的过程,由于回应报文4和回应报文5携带的下一跳信息均是IP地址16.1.1.2,因此请求报文8携带的下一跳信息是IP地址16.1.1.2。请求报文8的内容与请求报文1的内容类似,不同之处可以在于:请求报文8的TTL值为4,且携带的下一跳信息为IP地址16.1.1.2,对此不再重复赘述。For the process of generating the request message 8 by using the response message 4 and the response message 5, since the next hop information carried in the response message 4 and the response message 5 is the IP address 16.1.1.2, the request message 8 is carried. The next hop information is the IP address 16.1.1.2. The content of the request message 8 is similar to the content of the request message 1, and the difference may be that the TTL value of the request message 8 is 4, and the next hop information carried is the IP address 16.1.1.2, which is not repeated. Narration.
步骤j、网络设备302在接收到请求报文8后,将请求报文8的TTL值减1,通过接口3022和3023分别发送TTL值修改后的请求报文8。网络设备303、304接收到TTL值修改后的请求报文8后,将所接收到的请求报文的TTL值减1,并分别通过接口3032/接口3042发送TTL值再次修改后的请求报文8。网络设备305接收到两个TTL值再次修改后的请求报文8后,将所接收到的请求报文的TTL值减1,并通过接口3053发送TTL值三次修改后的请求报文。最终,网络设备306接收到两个请求报文,将两个请求报文称为请求报文9和请求报文10。Step j: After receiving the request message 8, the network device 302 decrements the TTL value of the request message 8 by 1, and sends the TTL value modified request message 8 through the interfaces 3022 and 3023 respectively. After receiving the TTL value modified request message 8, the network device 303, 304 decrements the TTL value of the received request message by 1 and sends the TTL value modified request message through the interface 3032/interface 3042, respectively. 8. After receiving the request message 8 whose TTL value is modified again, the network device 305 decrements the TTL value of the received request message by 1, and sends the TTL value modified request message three times through the interface 3053. Finally, the network device 306 receives two request messages, and refers to the two request messages as the request message 9 and the request message 10.
步骤k、网络设备306在接收到请求报文9后,将请求报文9的TTL值减1,由于TTL值为0,目的端口为固定值,因此向网络设备301发送针对请求报文9的回应报文6。同理,向网络设备301发送针对请求报文10的回应报文7。Step k: After receiving the request message 9, the network device 306 decrements the TTL value of the request message 9 by 1. Since the TTL value is 0, the destination port is a fixed value, so the network device 301 sends the request message 9 Respond to message 6. Similarly, a response message 7 for the request message 10 is sent to the network device 301.
由于网络设备306通过接口3061接收到请求报文9/10,且请求报文9/10中携带接口3061的IP地址16.1.1.2,因此网络设备306通过接口3061发送回应报文6/回应报文7。Since the network device 306 receives the request message 9/10 through the interface 3061, and the request message 9/10 carries the IP address 16.1.1.2 of the interface 3061, the network device 306 sends the response message 6/response message through the interface 3061. 7.
回应报文6/7的内容与回应报文1的内容类似,不同之处在于:回应报文6/7的源IP地址为接口3061的IP地址16.1.1.2,回应报文6/7携带的mpls echo信息可以包括网络设备306的节点信息,且未携带下一跳信息。The content of the response packet 6/7 is similar to that of the response packet 1. The difference is that the source IP address of the response packet 6/7 is the IP address 16.1.1.2 of the interface 3061, and the response packet 6/7 is carried. The mpls echo information may include node information of the network device 306 and does not carry next hop information.
步骤l、在定时器4超时后,网络设备301统计自发送请求报文8起、至定时器4计时结束为止的时间段内接收到的针对请求报文8的回应报文的数量。由于接收到回应报文6和回应报文7,且回应报文6与回应报文7的内容相同,因此,从回应报文6中获取网络设备306的节点信息,并记录该节点信息,网络设备301重新生成的对应关系表参见表4所示,对此不做限制。 Step 1. After the timer 4 expires, the network device 301 counts the number of response messages received for the request message 8 in the time period from the transmission of the request message 8 to the end of the timer 4 timeout. Since the response message 6 and the response message 7 are received, and the content of the response message 6 and the response message 7 are the same, the node information of the network device 306 is obtained from the response message 6, and the node information is recorded. The correspondence table regenerated by the device 301 is shown in Table 4, and no limitation is imposed thereon.
表4Table 4
TTLTTL 节点信息Node information 下一跳信息 Next hop information
11 11.1.1.211.1.1.2 12.1.1.2和14.1.1.212.1.1.2 and 14.1.1.2
22 12.1.1.212.1.1.2 13.1.1.213.1.1.2
22 14.1.1.214.1.1.2 15.1.1.215.1.1.2
33 13.1.1.213.1.1.2 16.1.1.216.1.1.2
33 15.1.1.215.1.1.2 16.1.1.216.1.1.2
44 16.1.1.216.1.1.2  
由于回应报文6/7没有携带下一跳信息,因此,IP地址16.1.1.2就是出口节点的节点信息,停止请求报文的发送操作,结束信息收集流程。至此,网络设备301收集到转发节点的节点信息和下一跳信息、出口节点的节点信息,如表4所示。The response packet 6/7 does not carry the next hop information. Therefore, the IP address 16.1.1.2 is the node information of the egress node, stops the sending of the request packet, and ends the information collection process. So far, the network device 301 collects the node information and the next hop information of the forwarding node and the node information of the egress node, as shown in Table 4.
在上述实施例中,在定时器超时后,若网络设备301仍没有接收到针对请求报文的回应报文,则认为当前这一跳(即TTL值对应的网络设备)不可达,将TTL值加1得到新的请求报文,并发送该新的请求报文,继续探测下一跳。In the above embodiment, after the timer expires, if the network device 301 still does not receive the response packet for the request packet, the current hop (that is, the network device corresponding to the TTL value) is considered unreachable, and the TTL value is obtained. Add 1 to get a new request message, and send the new request message to continue to probe the next hop.
在上述实施例中,为不同请求报文启动的定时器的时间可以相同,也可以不同。例如,定时器的时间与请求报文的TTL值有关。例如,当请求报文的TTL值越大时,则定时器的时间越大。In the above embodiment, the timers started for different request messages may be the same time or different. For example, the time of the timer is related to the TTL value of the request message. For example, when the TTL value of the request message is larger, the timer time is larger.
在另一个例子中,如图3C所示,在与图3B所示步骤d对应的步骤d’中,网络设备302不是通过接口3022和接口3023均发送请求报文3,而是采用哈希算法从接口3022和接口3023中选择一个接口。假设选择接口3022发送请求报文3,则只有网络设备303会发送针对请求报文2的回应报文(步骤e’)。这样,网络设备301再次发送请求报文4(步骤f’)时,携带的是网络设备303的下一跳信息、即IP地址13.1.1.2,而不会携带网络设备304的下一跳信息、即IP地址15.1.1.2。In another example, as shown in FIG. 3C, in step d' corresponding to step d shown in FIG. 3B, the network device 302 does not send the request message 3 through the interface 3022 and the interface 3023, but adopts a hash algorithm. An interface is selected from the interface 3022 and the interface 3023. Assuming that the selection interface 3022 sends the request message 3, only the network device 303 will send a response message for the request message 2 (step e'). In this way, when the network device 301 sends the request message 4 again (step f'), it carries the next hop information of the network device 303, that is, the IP address 13.1.1.2, and does not carry the next hop information of the network device 304. That is, the IP address is 15.1.1.2.
接着,当网络设备302发送从请求报文4获得的请求报文5(步骤g’)时,继续采用哈希算法从接口3022和接口3023中选择一个接口。假设选择接口3023发送请求报文5,则网络设备305将通过接口3052接收到从请求报文5获得的请求报文7,由于请求报文7携带的是接口3051的IP地址13.1.1.2,而不是接口3052的IP地址15.1.1.2。,在这种情况,网络设备305将无法发送正确的回应报文给网络设备301,从而导致网络设备301无法正确收集网络设备305的信息。Next, when the network device 302 transmits the request message 5 obtained from the request message 4 (step g'), it continues to select an interface from the interface 3022 and the interface 3023 by using a hash algorithm. Assume that the selection interface 3023 sends the request message 5, the network device 305 will receive the request message 7 obtained from the request message 5 through the interface 3052, and the request message 7 carries the IP address 13.1.1.2 of the interface 3051. Not the IP address 15.1.1.2 of interface 3052. In this case, the network device 305 will not be able to send the correct response message to the network device 301, thereby causing the network device 301 to fail to correctly collect the information of the network device 305.
基于与上述方法同样的构思,本公开实施例还提出一种信息收集装置,该装置可以应用于入口节点。如图4所示,为该装置的结构图,该装置可以包括:Based on the same concept as the above method, the embodiment of the present disclosure further provides an information collecting device, which can be applied to an ingress node. As shown in FIG. 4, which is a structural diagram of the device, the device may include:
生成模块401,用于生成用于收集节点的信息的请求报文;a generating module 401, configured to generate a request message for collecting information of the node;
发送模块402,用于发送请求报文;The sending module 402 is configured to send a request message.
接收模块403,用于接收针对所述请求报文的至少一个回应报文;The receiving module 403 is configured to receive at least one response packet for the request packet.
处理模块404,用于从所述至少一个回应报文获取到节点信息和下一跳信息,并记录所述节点信息和下一跳信息的对应关系;The processing module 404 is configured to obtain node information and next hop information from the at least one response packet, and record a correspondence between the node information and the next hop information.
所述生成模块401,还用于利用接收到的针对所述请求报文的所有所述至少一个回应报文重新生成请求报文,该请求报文包括所有所述至少一个回应报文中的下一跳信息;由所述发送模块402发送重新生成的请求报文。The generating module 401 is further configured to regenerate the request message by using the received at least one response message for the request message, where the request message includes all the at least one response message. One-hop information; the re-generated request message is sent by the sending module 402.
所述生成模块401,还用于在所述发送模块402发送请求报文后,为所述请求报文启动定时器;在定时器超时后,统计从发送所述请求报文起、到定时器计时结束为止的时间段内接收到的针对所述请求报文的回应报文的数量;若接收到至少两个回应报文,则利用所述至少两个回应报文重新生成请求报文;若接收到一个回应报文,则利用所述 一个回应报文重新生成请求报文,该请求报文包括所述一个回应报文中的下一跳信息。The generating module 401 is further configured to: after the sending module 402 sends the request message, start a timer for the request message; after the timer expires, the statistics start from sending the request message to the timer. The number of response messages received for the request message in the time period after the end of the timeout period; if at least two response messages are received, the request message is regenerated by using the at least two response messages; And receiving a response message, and regenerating the request message by using the one response message, where the request message includes next hop information in the one response message.
所述处理模块404,还用于从所述回应报文中获取到所述出口节点的节点信息,并记录所述出口节点的节点信息,并停止请求报文的发送操作。The processing module 404 is further configured to: obtain node information of the egress node from the response packet, record node information of the egress node, and stop sending the request message.
本公开实施例提供的电子设备(如入口节点),从硬件层面而言,其硬件架构示意图可以参见图5所示。电子设备包括:机器可读存储介质501和处理器502。An electronic device (such as an ingress node) provided by an embodiment of the present disclosure may be as shown in FIG. 5 from a hardware level. The electronic device includes a machine readable storage medium 501 and a processor 502.
机器可读存储介质501存储有能够被所述处理器502执行的机器可执行指令。Machine-readable storage medium 501 stores machine-executable instructions that are executable by processor 502.
处理器502与机器可读存储介质501通信,读取和执行机器可读存储介质501中存储的所述机器可执行指令,实现本公开上述示例公开的信息收集操作。The processor 502 is in communication with the machine readable storage medium 501, reads and executes the machine executable instructions stored in the machine readable storage medium 501, and implements the information collection operations disclosed by the above examples of the present disclosure.
这里,机器可读存储介质501可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。Here, machine-readable storage medium 501 can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk. (such as a disc, dvd, etc.), or a similar storage medium, or a combination thereof.
基于与上述方法同样的构思,本公开实施例还提出一种信息收集装置,该装置可以应用于入口节点与出口节点之间的转发节点,且所述转发节点存在至少两个下一跳。如图6所示,为该装置的结构图,该装置可以包括:Based on the same concept as the above method, the embodiment of the present disclosure further provides an information collecting apparatus, which may be applied to a forwarding node between an ingress node and an egress node, and the forwarding node has at least two next hops. As shown in FIG. 6, which is a structural diagram of the device, the device may include:
接收模块601,用于接收所述入口节点发送的请求报文;The receiving module 601 is configured to receive a request message sent by the ingress node;
发送模块602,用于当本节点是所述请求报文的目标节点时,则向入口节点发送回应报文;所述回应报文携带本节点的节点信息、所述至少两个下一跳对应的下一跳信息;当本节点不是所述请求报文的目标节点时,则获得所述至少两个请求报文,并向所述至少两个下一跳分别发送获得的请求报文。The sending module 602 is configured to: when the local node is the target node of the request message, send a response message to the ingress node; the response message carries the node information of the local node, and the at least two next hops correspond to The next hop information; when the local node is not the target node of the request message, the at least two request messages are obtained, and the obtained request message is separately sent to the at least two next hops.
在一个例子中,所述信息收集装置还包括确定模块(在图中未视出),该确定模块用于在接收到所述请求报文后,若所述请求报文携带的TTL值是指定数值,则确定本节点是所述请求报文的目标节点;若所述请求报文携带的TTL值不是指定数值,则确定本节点不是所述请求报文的目标节点。In an example, the information collecting apparatus further includes a determining module (not shown in the figure), and the determining module is configured to: after receiving the request message, if the TTL value carried in the request packet is specified The value is determined to be the target node of the request message; if the TTL value carried in the request message is not a specified value, it is determined that the node is not the target node of the request message.
本公开实施例提供的电子设备(如转发节点),从硬件层面而言,其硬件架构示意图可以参见图7所示。包括:机器可读存储介质701和处理器702。The electronic device (such as a forwarding node) provided by the embodiment of the present disclosure can be seen from the hardware level as shown in FIG. 7 . A machine readable storage medium 701 and a processor 702 are included.
机器可读存储介质701存储有能够被所述处理器702执行的机器可执行指令。Machine-readable storage medium 701 stores machine-executable instructions that are executable by the processor 702.
处理器702与机器可读存储介质701通信,读取和执行机器可读存储介质701中存储的所述机器可执行指令,实现本公开上述示例公开的信息收集操作。The processor 702 is in communication with the machine readable storage medium 701, reads and executes the machine executable instructions stored in the machine readable storage medium 701, and implements the information collection operations disclosed by the above examples of the present disclosure.
这里,机器可读存储介质701可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。Here, machine-readable storage medium 701 can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid state drive, any type of storage disk. (such as a disc, dvd, etc.), or a similar storage medium, or a combination thereof.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function. A typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, and a game control. A combination of a tablet, a tablet, a wearable device, or any of these devices.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本公开时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, the above devices are described separately by function into various units. Of course, the functions of the various units may be implemented in one or more software and/or hardware in the practice of the present disclosure.
本领域内的技术人员应明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present disclosure can be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware aspects. Moreover, embodiments of the present disclosure may take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本公开是参照根据本公开实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
而且,这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一 个方框或者多个方框中指定的功能。Moreover, these 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 instruction means implements the functions specified in one or more blocks of the flowchart or in a flow 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.
以上所述仅为本公开的实施例而已,并不用于限制本公开。对于本领域技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本公开的权利要求范围之内。The above description is only for the embodiments of the present disclosure, and is not intended to limit the disclosure. Various changes and modifications of the present disclosure are possible to those skilled in the art. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present disclosure are intended to be included within the scope of the appended claims.

Claims (15)

  1. 一种信息收集方法,应用于入口节点,所述方法包括:An information collecting method is applied to an ingress node, and the method includes:
    生成用于收集节点的信息的请求报文;Generating a request message for collecting information of the node;
    发送所述请求报文;Sending the request message;
    接收针对所述请求报文的至少一个回应报文;Receiving at least one response message for the request message;
    若从所述至少一个回应报文获取到节点信息和下一跳信息,则If the node information and the next hop information are obtained from the at least one response packet,
    记录所述节点信息和所述下一跳信息之间的对应关系;Recording a correspondence between the node information and the next hop information;
    利用针对所述请求报文接收到的所有所述至少一个回应报文,重新生成请求报文,该重新生成的请求报文包括接收到的每个所述至少一个回应报文中的所述下一跳信息;And regenerating the request message by using all the at least one response message received by the request message, where the regenerated request message includes the next one of each of the received at least one response message One-hop information;
    返回执行所述发送请求报文、接收针对所述请求报文的至少一个回应报文的操作;Returning an operation of executing the sending request message and receiving at least one response message for the request message;
    若从所述至少一个回应报文获取到节点信息、但未获取到下一跳信息,则确认所述节点信息属于出口节点。If the node information is obtained from the at least one response message but the next hop information is not obtained, it is confirmed that the node information belongs to an egress node.
  2. 根据权利要求1所述的方法,其特征在于,接收针对所述请求报文的至少一个回应报文,包括:The method according to claim 1, wherein receiving at least one response message for the request message comprises:
    在发送所述请求报文后,为所述请求报文启动定时器;After the request message is sent, a timer is started for the request message;
    在所述定时器超时后,统计从发送所述请求报文起、到所述定时器计时结束为止的时间段内接收到的针对所述请求报文的至少一个回应报文的数量。After the timer expires, the number of at least one response message received for the request message received from the time when the request message is sent to the end of the timer is counted.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    记录所述出口节点的节点信息,并停止所述发送请求报文的操作。Recording node information of the egress node, and stopping the operation of sending the request message.
  4. 一种信息收集方法,应用于入口节点与出口节点之间的转发节点,且所述转发节点存在至少两个下一跳,所述方法包括:An information collecting method is applied to a forwarding node between an ingress node and an egress node, and the forwarding node has at least two next hops, and the method includes:
    接收所述入口节点发送的请求报文;Receiving a request message sent by the ingress node;
    若所述转发节点是所述请求报文的目标节点,则If the forwarding node is a target node of the request message, then
    向所述入口节点发送回应报文;所述回应报文携带所述转发节点的节点信息、所述至少两个下一跳对应的下一跳信息;Sending a response packet to the ingress node; the response packet carries node information of the forwarding node, and next hop information corresponding to the at least two next hops;
    若所述转发节点不是所述请求报文的目标节点,则If the forwarding node is not the target node of the request message, then
    更新所述请求报文以获得更新后的请求报文,并Updating the request message to obtain an updated request message, and
    向所述至少两个下一跳分别发送所述更新后的请求报文。Sending the updated request message to the at least two next hops respectively.
  5. 根据权利要求4所述的方法,其特征在于,The method of claim 4 wherein:
    若所述请求报文携带的TTL值是指定数值,则确定所述转发节点是所述请求报文的目标节点;If the TTL value carried in the request packet is a specified value, determining that the forwarding node is a target node of the request packet;
    若所述请求报文携带的TTL值不是指定数值,则确定所述转发节点不是所述请求报文的目标节点。And if the TTL value carried in the request packet is not a specified value, determining that the forwarding node is not a target node of the request packet.
  6. 根据权利要求5所述的方法,其特征在于,更新所述请求报文,包括:The method of claim 5, wherein the updating the request message comprises:
    按预设的规则更新所述请求报文携带的TTL值。The TTL value carried in the request packet is updated according to a preset rule.
  7. 一种信息收集装置,应用于入口节点,所述装置包括:An information collecting device is applied to an ingress node, the device comprising:
    生成模块,用于生成用于收集节点的信息的请求报文;a generating module, configured to generate a request message for collecting information of the node;
    发送模块,用于发送所述请求报文;a sending module, configured to send the request message;
    接收模块,用于接收针对所述请求报文的至少一个回应报文;a receiving module, configured to receive at least one response message for the request message;
    处理模块,用于若从所述至少一个回应报文获取到节点信息和下一跳信息,则a processing module, configured to: if node information and next hop information are obtained from the at least one response packet,
    记录所述节点信息和所述下一跳信息之间的对应关系;Recording a correspondence between the node information and the next hop information;
    使所述生成模块利用针对所述请求报文接收到的所有所述至少一个回应报文重新生成请求报文,该重新生成的请求报文包括接收到的每个所述至少一个回应报文中的所述下一跳信息;并由所述发送模块发送该重新生成的请求报文;And causing the generating module to regenerate the request message by using the at least one response message received by the request message, where the regenerated request message includes each of the received at least one response message The next hop information; and the retransmitted request message is sent by the sending module;
    所述处理模块还用于若从所述至少一个回应报文获取到节点信息、但未获取到下一跳信息,则确认所述节点信息属于出口节点。The processing module is further configured to: if the node information is acquired from the at least one response message but the next hop information is not obtained, confirm that the node information belongs to an egress node.
  8. 根据权利要求7所述的装置,其特征在于,所述处理模块被配置为:The apparatus of claim 7, wherein the processing module is configured to:
    在所述发送模块发送所述请求报文后,为所述请求报文启动定时器;After the sending module sends the request message, start a timer for the request message;
    在所述定时器超时后,统计所述接收模块在从发送所述请求报文起、到所述定时器计时结束为止的时间段内接收到的针对所述请求报文的至少一个回应报文的数量。After the timer expires, the receiving module receives at least one response packet for the request packet in a period from the time the packet is sent to the end of the timer. quantity.
  9. 根据权利要求7所述的装置,其特征在于,The device of claim 7 wherein:
    所述处理模块,还用于记录所述出口节点的节点信息,并使所述发送模块停止所述发送请求报文的操作。The processing module is further configured to record node information of the egress node, and cause the sending module to stop the operation of sending the request message.
  10. 一种信息收集装置,应用于入口节点与出口节点之间的转发节点,且所述转发节点存在至少两个下一跳,所述装置包括:An information collecting apparatus is applied to a forwarding node between an ingress node and an egress node, and the forwarding node has at least two next hops, and the apparatus includes:
    接收模块,用于接收所述入口节点发送的请求报文;a receiving module, configured to receive a request message sent by the ingress node;
    发送模块,用于Send module for
    当所述转发节点是所述请求报文的目标节点时,则向所述入口节点发送回应报文;所述回应报文携带所述转发节点的节点信息、所述至少两个下一跳对应的下一跳信息;And when the forwarding node is the target node of the request packet, sending a response packet to the ingress node; the response packet carrying node information of the forwarding node, and the at least two next hops corresponding to Next hop information;
    当所述转发节点不是所述请求报文的目标节点时,则更新所述请求报文以获得更新后的请求报文,并向所述至少两个下一跳分别发送所述更新后的请求报文。And when the forwarding node is not the target node of the request message, updating the request message to obtain an updated request message, and separately sending the updated request to the at least two next hops Message.
  11. 根据权利要求10所述的装置,其特征在于,还包括确定模块,用于The device according to claim 10, further comprising a determining module for
    若所述请求报文携带的TTL值是指定数值,则确定所述转发节点是所述请求报文的目标节点;If the TTL value carried in the request packet is a specified value, determining that the forwarding node is a target node of the request packet;
    若所述请求报文携带的TTL值不是指定数值,则确定所述转发节点不是所述请求报文的目标节点。And if the TTL value carried in the request packet is not a specified value, determining that the forwarding node is not a target node of the request packet.
  12. 一种电子设备,包括:An electronic device comprising:
    处理器;和Processor; and
    机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;a machine-readable storage medium storing machine-executable instructions executable by the processor;
    其中,所述处理器执行所述机器可执行指令,以实现权利要求1所述的方法。Wherein the processor executes the machine executable instructions to implement the method of claim 1.
  13. 一种电子设备,包括:An electronic device comprising:
    处理器;和Processor; and
    机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;a machine-readable storage medium storing machine-executable instructions executable by the processor;
    其中,所述处理器执行所述机器可执行指令,以实现权利要求4所述的方法。Wherein the processor executes the machine executable instructions to implement the method of claim 4.
  14. 一种机器可读存储介质,所述机器可读存储介质存储有机器可执行指令,所述机器可执行指令在被处理器调用和执行时,所述机器可执行指令促使所述处理器实现权利要求1的方法。A machine readable storage medium storing machine executable instructions that, when invoked and executed by a processor, cause the processor to implement a right The method of claim 1.
  15. 一种机器可读存储介质,所述机器可读存储介质存储有机器可执行指令,所述机器可执行指令在被处理器调用和执行时,所述机器可执行指令促使所述处理器实现权利要求4所述的方法。A machine readable storage medium storing machine executable instructions that, when invoked and executed by a processor, cause the processor to implement a right The method described in claim 4.
PCT/CN2018/120785 2017-12-13 2018-12-13 Information collection WO2019114779A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711326469.4 2017-12-13
CN201711326469.4A CN109218196B (en) 2017-12-13 2017-12-13 Information collection method, device, equipment and machine-readable storage medium

Publications (1)

Publication Number Publication Date
WO2019114779A1 true WO2019114779A1 (en) 2019-06-20

Family

ID=64991791

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/120785 WO2019114779A1 (en) 2017-12-13 2018-12-13 Information collection

Country Status (2)

Country Link
CN (1) CN109218196B (en)
WO (1) WO2019114779A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995025B (en) * 2021-02-05 2023-02-28 杭州迪普科技股份有限公司 Path tracking method, device, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202664A (en) * 2007-11-30 2008-06-18 华为技术有限公司 Method for reporting equipment information, system and method for obtaining equipment information
CN101325584A (en) * 2007-06-15 2008-12-17 华为技术有限公司 Method for tracing route, MPLS network system and entry node thereof
CN101729391A (en) * 2008-10-23 2010-06-09 华为技术有限公司 Method, node and system for acquiring link aggregation group information
US20110317696A1 (en) * 2010-06-29 2011-12-29 Cisco Technology In-band multicast trace in ip and mpls networks
CN102624598A (en) * 2011-01-27 2012-08-01 中兴通讯股份有限公司 Method, device and system for acquiring information on transmission path

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7937492B1 (en) * 2008-09-30 2011-05-03 Juniper Networks, Inc. LSP ping and traceroute for bypass tunnels
CN104270280B (en) * 2014-09-02 2017-11-07 烽火通信科技股份有限公司 LSP ping and tracert system and method is realized on the router
CN107248941B (en) * 2017-06-30 2020-01-10 华为技术有限公司 Method and device for detecting path

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325584A (en) * 2007-06-15 2008-12-17 华为技术有限公司 Method for tracing route, MPLS network system and entry node thereof
CN101202664A (en) * 2007-11-30 2008-06-18 华为技术有限公司 Method for reporting equipment information, system and method for obtaining equipment information
CN101729391A (en) * 2008-10-23 2010-06-09 华为技术有限公司 Method, node and system for acquiring link aggregation group information
US20110317696A1 (en) * 2010-06-29 2011-12-29 Cisco Technology In-band multicast trace in ip and mpls networks
CN102624598A (en) * 2011-01-27 2012-08-01 中兴通讯股份有限公司 Method, device and system for acquiring information on transmission path

Also Published As

Publication number Publication date
CN109218196B (en) 2020-09-08
CN109218196A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
US11303553B1 (en) Return path trace
US11303528B2 (en) Communications connection detection method and apparatus
CN108111432B (en) Message forwarding method and device
EP3451592B1 (en) Packet transmission between vxlan domains
US11190439B2 (en) Data stream transmission
CN108886536B (en) Method and system for adjusting entries in a library of transponded signals in a content-centric network
US20150319084A1 (en) Routing messages in a computer network using deterministic and probalistic source routes
CN108809759A (en) Detect the method, apparatus and router of link state
US20220150155A1 (en) Method of establishing bidirectional forwarding detection session based on bier, and bfir, bfer, system and storage medium
WO2018099394A1 (en) Packet transmission
US11025523B2 (en) Path detection
US9112787B2 (en) First hop load balancing
JP2016024816A (en) Method and system for keeping interest alive in content-centric network
CN109379241B (en) Path information determination method and device
JP2023530994A (en) IN-SITU FLOW DETECTION METHOD AND ELECTRONIC DEVICE
CN104243631A (en) Method and device for stateful conversion between IPv4 address and IPv6 address
CN102202004B (en) Routing error processing method and device and routing equipment
US11025535B2 (en) Detecting path
CN107547400B (en) Virtual machine migration method and device
US20140082161A1 (en) Method and device for transferring bootstrap message
WO2019114779A1 (en) Information collection
JP2013123152A (en) Server device, sip server device, computer program, and message distribution method
CN107547389B (en) Network access method, device and machine readable storage medium
CN114466081B (en) Method, system, equipment and storage medium for managing and controlling nodes of real-time channel group
WO2009121261A1 (en) Route managing method, device and system

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: 18887447

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18887447

Country of ref document: EP

Kind code of ref document: A1