Method, system and electronic device for automatically identifying devices and device paths in a session

By automatically identifying and matching the path sequence of network devices, the problems of manual configuration errors and time waste in the existing technology are solved, and the accuracy and efficiency of network session analysis are improved.

CN115174414BActive Publication Date: 2024-08-27科来网络技术股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210868052.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2024-08-27
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

When existing analysis software performs network session analysis, users usually need to manually configure device paths, which can easily lead to configuration errors and waste of time. It is also difficult to accurately analyze and monitor network performance without understanding the network topology relationship.

Method used

By configuring the router information of network devices, building a mapping table between IDs and IPv6 addresses, decoding the link node routing list information in data packets, matching and displaying the path sequence of network devices, and automatically generating business logic diagrams and network topology diagrams.

Benefits of technology

It realizes the automatic identification of devices and device paths in network sessions, reduces user configuration time, improves the accuracy of analysis, and avoids misjudgments caused by not understanding the relationship between network devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115174414B
    Figure CN115174414B
Patent Text Reader

Abstract

The present invention relates to the technical field of network traffic analysis, and discloses a method, system and electronic device for automatically identifying devices and device paths in a session, including: S1, configuring the router information of the network device, and constructing a mapping table between the ID of the network device and the IPv6 address; S2, obtaining the data packets of both directions of the network session, and decoding to obtain the routing list information of the link nodes in the data packets; S3, searching the mapping table between the ID of the network device and the IPv6 address through the routing list information, and matching the corresponding network device; S4, displaying the matched network device in the order of the routing list in the routing list information. The present invention can automatically identify the devices and device paths in the network session, can reduce the time consumed by the user in the network analysis and configuration of the device, and ensure the accuracy of the device-related analysis and configuration scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network traffic analysis, and in particular to a method, system and electronic device for automatically identifying devices and device paths in a session. Background Art

[0002] At present, the session analysis of many analysis software is mainly based on the link perspective, focusing on displaying the statistical indicators of the link and comparing the indicators between links. If users want to perform session analysis from the perspective of the device, they often need to manually configure the session path. That is, many analysis software can only rely on users to manually configure the device path when performing network topology configuration and business configuration. In other words, in actual use, when users want to view the devices that the session passes through from the perspective of the device, they often view the results of their own manual configuration, and the results of the manually configured network path may not be accurate enough. If the configuration is wrong, it will cause inevitable losses. At the same time, configuring the device path in the network session will also consume too much time of the user. If users do not understand the relationship between the network topology and the device, it is easy for them to make configuration errors, resulting in a series of subsequent analysis and monitoring data errors and inevitable losses. Summary of the invention

[0003] The present invention provides a method, system and electronic device for automatically identifying devices and device paths in a session, which can automatically identify devices in a network session, automatically sort out the sequence of the session flow through routing device paths, and automatically generate the relationship between the devices in a business logic diagram and a network topology diagram.

[0004] The present invention is achieved through the following technical solutions:

[0005] A method for automatically identifying a device and a device path in a session, comprising:

[0006] S1. Configure the router information of the network device and construct a mapping table between the ID of the network device and the IPv6 address;

[0007] S2. Obtain data packets in both directions of the network session, and decode to obtain routing list information of link nodes in the data packets;

[0008] S3, searching the mapping table between the ID and IPv6 address of the network device through the routing list information, and matching the corresponding network device;

[0009] S4. Display the matched network devices according to the order of the routing list in the routing list information.

[0010] As an optimization, the routing list information includes IPv6 address information and IPv6 path sequence.

[0011] As an optimization, in S2, the specific steps of decoding to obtain the IPv6 path order of the link nodes in the data packet are:

[0012] S2.1, decode the data packet, and obtain the source node address and routing header of the link node from the decoded information;

[0013] S2.2, extract the Segment List[] information of the link node from the routing header;

[0014] S2.3, obtain the tail node with Segment List 0, and push the tail node with Segment List 0 into the specific network segment route (SR specific);

[0015] S2.4. Taking the tail node as the starting point and the source node as the end point, obtain the Segment List[] information of the link nodes passed in the network session in reverse order;

[0016] S2.5. Obtain the order of link nodes through the source node address combined with the Segment List[] information, and map the IPv6 path order of the network device according to the mapping table.

[0017] As an optimization, in S3, the specific steps of searching the mapping table between the ID and IPv6 address of the network device through the routing list information and matching the corresponding network device are as follows:

[0018] S3.1. Determine whether there is a network device in the mapping table between the network device ID and the IPv6 address according to the IPv6 address information of the link node obtained by decoding the data packet; if there is a corresponding network device, jump to S3.2; otherwise, jump to S3.3;

[0019] S3.2, output the IPv6 address of the network device, and then jump to S3.5, otherwise, return to S3.1, and continue to determine the network device corresponding to the IPv6 address information of the next link node in the network session;

[0020] S3.3, determine whether it is necessary to match and map the IPv6 address of the link node with the ID address of the new network device and add it to the mapping table. If so, jump to S3.4; otherwise, jump to S3.5;

[0021] S3.4, match and map the IPv6 address of the link node with the ID address of the new network device and add them to the mapping table, and then output the IP address of the newly created network device;

[0022] S3.5, determine whether the link node is the last link node in the network session, if so, jump to S3.6, otherwise, return to S3.1;

[0023] S3.6, end.

[0024] As an optimization, the specific steps of S4 are: displaying the matched network devices in the order of the IPv6 paths of the network devices.

[0025] As an optimization, in S1, the IPv6 address ranges of any of the network devices cannot overlap.

[0026] As an optimization, the IPv6 address may be a single IPv6 address or multiple IPv6 addresses.

[0027] As an optimization, the network session is a TCP session or a UDP session.

[0028] The present invention also discloses a system for automatically identifying devices and device paths in a session, comprising:

[0029] A configuration module, used to configure the router information of the network device and construct a mapping table between the ID of the network device and the IPv6 address;

[0030] The acquisition and decoding module is used to obtain the data packets in both directions of the network session and decode to obtain the routing list information of the link nodes in the data packets;

[0031] A retrieval module, used to search the mapping table between the ID and IPv6 address of the network device through the routing list information, and match the corresponding network device;

[0032] The display module is used to display the matched network devices according to the order of the routing list in the routing list information.

[0033] The present invention also discloses an electronic device, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method for automatically identifying devices and device paths in a session as described above.

[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0035] The present invention can automatically identify devices and device paths in a network session, and automatically configure device connection relationships in a network topology diagram, thereby reducing the time consumed by users in network analysis and device configuration, ensuring the accuracy of device-related analysis and configuration scenarios, and preventing users from making erroneous judgments on network performance, network failures, etc. without understanding the actual network device relationships. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:

[0037] Figure 1 A flowchart of a method for automatically identifying devices and device paths in a session according to the present invention;

[0038] Figure 2 This is a diagram of the process of automatically identifying devices and automatically combing device paths by SRv6 in an embodiment through a method for automatically identifying devices and device paths in a session described in the present invention. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0040] Example 1

[0041] like Figure 1 As shown, a method for automatically identifying a device and a device path in a session includes:

[0042] S1. Configure the router information of the network device, that is, configure the router information that may pass through the network in the network device management, and build a mapping table between the ID of the network device and the IPv6 address. In this embodiment, the IPv6 address range of any of the network devices cannot be crossed, otherwise the unique ID of the network device cannot be determined according to the ID. For example, two IPv6 addresses: 2001:DB8::346:8D56-2002:DB8:0:B::25:D58, 2001:DB8::346:8D58-2002:DB8:0:B::25:D60, these two IPv6 address ranges are crossed, and the intersection is: 2001:DB8::346:8D58. The IPv6 address supports a single IPv6 address, multiple IPv6 addresses, multiple IPv6 address ranges and multiple network segment styles, where the network segment is a collection of multiple IP addresses or IP address ranges.

[0043] S2. Obtain data packets in both directions of the network session through the data collection point (link), retrieve the specific TCP / UDP session in the search page, and decode to obtain the routing list information of the link node in the data packet. Specifically, the routing list information includes IPv6 address information and IPv6 path sequence.

[0044] In this embodiment, in S2, the specific steps of decoding to obtain the IPv6 path sequence of the link nodes in the data packet are:

[0045] S2.1, decode the data packet, and obtain the source node address and routing header of the link node from the decoded information;

[0046] S2.2, extract the Segment List[] information of the link node from the routing header;

[0047] S2.3. Get the tail node with Segment List 0, and push the tail node with Segment List 0 into SRspecific;

[0048] S2.4. Taking the tail node as the starting point and the source node as the end point, obtain the Segment List[] information of the link nodes passed in the network session in reverse order;

[0049] S2.5. Obtain the order of link nodes through the source node address combined with the Segment List[] information, and map the IPv6 path order of the network device according to the mapping table.

[0050] S3, searching the mapping table between the ID and IPv6 address of the network device through the routing list information, and matching the corresponding network device;

[0051] In this embodiment, in S3, the specific steps of searching the mapping table between the ID and IPv6 address of the network device through the routing list information and matching the corresponding network device are:

[0052] S3.1. Determine whether there is a network device in the mapping table between the network device ID and the IPv6 address according to the IPv6 address information of the link node obtained by decoding the data packet; if there is a corresponding network device, jump to S3.2; otherwise, jump to S3.3;

[0053] S3.2, output the IPv6 address of the network device, and then jump to S3.5, otherwise, return to S3.1, and continue to determine the network device corresponding to the IPv6 address information of the next link node in the network session;

[0054] S3.3, determine whether it is necessary to match and map the IPv6 address of the link node with the ID address of the new network device and add it to the mapping table. If so, jump to S3.4; otherwise, jump to S3.5;

[0055] S3.4, match and map the IPv6 address of the link node with the ID address of the new network device and add them to the mapping table, and then output the IP address of the newly created network device;

[0056] S3.5, determine whether the link node is the last link node in the network session, if so, jump to S3.6, otherwise, return to S3.1;

[0057] S3.6, end.

[0058] S4. Display the matched network devices according to the order of the routing list in the routing list information.

[0059] In this embodiment, the specific step of S4 is: displaying the matched network devices according to the IPv6 path order of the network devices.

[0060] Get the IPv6 information and IPv6 path sequence in the decoded protocol data, map the IPv6 information obtained in the decoding with the IPv6 data set configured by the network device, map the IPv6 address to the corresponding configured device, and map the device path based on the previously obtained IPv6 path sequence, and finally display it.

[0061] For example, the IP bearer protocol of SR (Segment Routing) + IPv6 (hereinafter referred to as SRv6) can automatically identify devices and automatically sort out device paths through the above method. The specific implementation is as follows:

[0062] 1. Decode the data packet and obtain the Source Address and Routing Header for IPv6 (Segment Routing) from the decoded information.

[0063] 2. Extract Segment List[] information from Routing Header for IPv6 (Segment Routing).

[0064] 3. Since the Segment List will press multiple layers of labels when pressing the path label at the head end, for SRv6, multiple link nodes that need to be passed during the data packet transmission process will be pressed into the SR specific, among which the LastSegment, or the tail node (Tail-end) or the end node (End-point), is numbered 0 in the Segment List (i.e. Figure 2 Segment List [0]), and then push the nodes to be passed into SR specific in reverse order. For example, if it passes through N nodes, the last one pushed is Segment List [n-1]. The working principle is that every time a node included in Segment List is passed, the value of SL will decrease, and at the same time, the node SID of Segment List [SL] (actually an IPv6 address, but it may have different functions) will be copied to the destination IPv6 address field of the basic packet header, telling the router which node to go to next hop, so that the data packet is sent to the destination hop by hop.

[0065] 4. Based on the above content, assume that the session path through the routing device is ABCD, A is the headend node, D is the end node, and the nodes that must be passed through are B, C, and D, so push in the SR Header (reverse push):

[0066] i.SegmentList[0] = D;

[0067] ii. Segment List[1] = C;

[0068] iii.Segment List[2]=B.

[0069] 5. According to the above description, the address sequence of the routing device can be obtained through Source Address+Segment List according to the decoded information, and the specific information of the device can be obtained by matching the IPv6 address in the device configuration with the IPv6 (Source Address+Segment List) address in the above information.

[0070] Example 2

[0071] The present invention also discloses a system for automatically identifying devices and device paths in a session, comprising:

[0072] A configuration module, used to configure the router information of the network device and construct a mapping table between the ID of the network device and the IPv6 address;

[0073] The acquisition and decoding module is used to obtain the data packets in both directions of the network session and decode to obtain the routing list information of the link nodes in the data packets;

[0074] A retrieval module, used to search the mapping table between the ID and IPv6 address of the network device through the routing list information, and match the corresponding network device;

[0075] The display module is used to display the matched network devices according to the order of the routing list in the routing list information.

[0076] Example 3

[0077] The present invention also discloses an electronic device, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method for automatically identifying devices and device paths in a session as described above.

[0078] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for automatically identifying devices and device paths in a session, characterized in that: include: S1. Configure the router information of the network device and construct a mapping table between the ID of the network device and the IPv6 address; S2. Obtaining data packets in both directions of the network session, and decoding to obtain routing list information of link nodes in the data packets; the routing list information includes IPv6 address information and IPv6 path sequence; The specific steps of decoding and obtaining the IPv6 path sequence of the link nodes in the data packet are: S2.1, decode the data packet, and obtain the source node address and routing header of the link node from the decoded information; S2.2, extract the Segment List[] information of the link node from the routing header; S2.

3. Get the tail node corresponding to Segment List[0], and push the tail node corresponding to Segment List[0] into the specific network segment route; S2.

4. Taking the tail node as the starting point and the source node as the end point, obtain the Segment List[] information of the link nodes passed in the network session in reverse order; S2.

5. Obtain the order of link nodes by combining the source node address with the Segment List[] information, and map the IPv6 path order of the network device according to the mapping table; S3, searching the mapping table between the ID and IPv6 address of the network device through the routing list information, and matching the corresponding network device; S4. Display the matched network devices according to the order of the routing list in the routing list information.

2. A method for automatically identifying devices and device paths in a session according to claim 1, characterized in that: In S3, the specific steps of searching the mapping table between the ID and IPv6 address of the network device through the routing list information and matching the corresponding network device are as follows: S3.

1. Determine whether a network device exists in the mapping table between the network device ID and the IPv6 address according to the IPv6 address information of the link node obtained by decoding the data packet; If there is a corresponding network device, jump to S3.2; otherwise, jump to S3.3; S3.2, output the IPv6 address of the network device, and then jump to S3.5, otherwise, return to S3.1, and continue to determine the network device corresponding to the IPv6 address information of the next link node in the network session; S3.3, determine whether it is necessary to match and map the IPv6 address of the link node with the ID address of the new network device and add it to the mapping table. If so, jump to S3.4; otherwise, jump to S3.5; S3.4, match and map the IPv6 address of the link node with the ID address of the new network device and add them to the mapping table, and then output the IP address of the newly created network device; S3.5, determine whether the link node is the last link node in the network session, if so, jump to S3.6, otherwise, return to S3.1; S3.6, end.

3. A method for automatically identifying devices and device paths in a session according to claim 2, characterized in that: The specific steps of S4 are: displaying the matched network devices according to the IPv6 path order of the network devices.

4. A method for automatically identifying devices and device paths in a session according to claim 1, characterized in that: In S1, the IPv6 address ranges of any of the network devices cannot overlap.

5. The method for automatically identifying devices and device paths in a session according to claim 1, characterized in that: The IPv6 address may be a single IPv6 address or multiple IPv6 addresses.

6. A method for automatically identifying devices and device paths in a session according to claim 1, characterized in that: The network session is a TCP session or a UDP session.

7. A system for automatically identifying devices and device paths in a session, characterized in that: include: A configuration module, used to configure the router information of the network device and construct a mapping table between the ID of the network device and the IPv6 address; The acquisition and decoding module is used to obtain the data packets in both directions of the network session and decode to obtain the routing list information of the link nodes in the data packets; The routing list information includes IPv6 address information and IPv6 path sequence; The specific steps of decoding and obtaining the IPv6 path sequence of the link nodes in the data packet are: S2.1, decode the data packet, and obtain the source node address and routing header of the link node from the decoded information; S2.2, extract the Segment List[] information of the link node from the routing header; S2.

3. Get the tail node corresponding to Segment List[0], and push the tail node corresponding to Segment List[0] into the specific network segment route; S2.

4. Taking the tail node as the starting point and the source node as the end point, obtain the Segment List[] information of the link nodes passed in the network session in reverse order; S2.

5. Obtain the order of link nodes by combining the source node address with the Segment List[] information, and map the IPv6 path order of the network device according to the mapping table; A retrieval module, used to search the mapping table between the ID and IPv6 address of the network device through the routing list information, and match the corresponding network device; The display module is used to display the matched network devices according to the order of the routing list in the routing list information.

8. An electronic device, characterized in that: It includes at least one processor and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method for automatically identifying devices and device paths in a session as described in any one of claims 1 to 6.