Path planning method, system and equipment for in-band network telemetering message and medium
By obtaining and calculating the maximum message byte size of the telemetry path, determining the optimal path to ensure that the message size is transmitted within the safe range, the packet discarding problem caused by excessive metadata in in-band network telemetry is solved, and the correct Monitoring of network traffic and dynamic path shunt.
Patent Information
- Application Number
- CN202411089658.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-05
AI Technical Summary
In in-band network telemetry, the increase in metadata causes the packet size to exceed the maximum transmission unit, resulting in packet discarding, and the prior art cannot effectively realize monitoring of network traffic.
By obtaining information on the telemetry path in the network between the user server and the target server, the maximum allowable packet byte size is calculated, and the optimal path is determined based on this information to ensure that the packet size is transmitted within a safe range, so as to realize the telemetry path dynamic path shunt.
It effectively solves the problem of packet discarding caused by excessive metadata, ensures the completeness and accuracy of monitoring network traffic, and realizes dynamic path diversion of telemetry messages.
Smart Images

Figure CN118900248A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network telemetry technology, and in particular to a path planning method, system, device and medium for in-band network telemetry messages. Background Art
[0002] When using the in-band network telemetry mechanism to monitor network traffic, metadata is usually inserted into the in-band network telemetry (INT) message to record the telemetry information of each jump on the telemetry path; the size of the metadata will increase with the number of jumps and affect the size of the entire in-band network telemetry message. In a multi-path environment, since the in-band network telemetry message may be transmitted through different paths, and the number of jumps on each path and the MTU (Maximum Transmission Unit) of the link may be different, the messages on some paths are more likely to be discarded because the message size exceeds the MTU due to the insertion of metadata, thereby increasing the complexity of network management.
[0003] The existing method for solving the problem of message discarding is mainly to set the M flag in the message header, indicating that any metadata inserted into the telemetry message later may exceed the MTU, or to delete the metadata from the message to reduce the message size; the existing technology cannot monitor the network traffic because of the problem of no longer writing or deleting metadata.
[0004] Therefore, there is an urgent need for a method for monitoring network traffic while ensuring normal message transmission to solve the above technical problems. Summary of the invention
[0005] Based on this, it is necessary to provide a path planning method, system, device and medium for in-band network telemetry messages to address the above technical problems.
[0006] In a first aspect, the present application provides a path planning method for an in-band network telemetry message, the method comprising:
[0007] Acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0008] Calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0009] In response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, the optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
[0010] In some embodiments, any telemetry path includes a starting switch, a terminating switch, and at least one relay switch, and obtaining telemetry information of at least one telemetry path included in the network between the user server and the target server includes:
[0011] Real-time monitoring of whether the terminating switch receives an initial in-band network telemetry message, wherein the initial in-band network telemetry message is an in-band network telemetry message generated by the starting switch according to the data packet sent by the user server;
[0012] In response to monitoring that the terminating switch on the telemetry path receives the initial in-band network telemetry message, acquiring metadata in the initial in-band network telemetry message;
[0013] The metadata is uploaded to a controller in the network, and the metadata is parsed by the controller to obtain the telemetry information of the telemetry path that matches the initial in-band network telemetry message.
[0014] In some embodiments, the obtaining of telemetry information of at least one telemetry path included in the network between the user server and the target server further includes:
[0015] Detecting whether the initial in-band network telemetry message transmitted on each telemetry path includes a size identifier, wherein the size identifier is used to indicate that metadata in the initial in-band network telemetry message cannot be further increased;
[0016] If it is detected that the initial in-band network telemetry message transmitted on the designated telemetry path contains the size identifier, parsing metadata in the initial in-band network telemetry message containing the size identifier;
[0017] determining whether specified telemetry information in metadata in an initial in-band network telemetry message including the size identifier is complete;
[0018] If the specified telemetry information in the metadata of the initial in-band network telemetry message containing the size identifier is complete, then determining that the specified telemetry information is the telemetry information that matches the specified telemetry path
[0019] If the specified telemetry information in the metadata of the initial in-band network telemetry message including the size identifier is incomplete, notifying the starting switch to generate a minimum size telemetry message;
[0020] The minimum-sized telemetry message is sent to a terminating switch via the designated telemetry path to obtain designated telemetry information matching the designated telemetry path.
[0021] In some embodiments, the calculating the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules includes:
[0022] The controller analyzes the uploaded metadata to obtain a minimum maximum transmission unit value among maximum transmission units corresponding to a plurality of links on a telemetry path matching the metadata;
[0023] The controller calculates the maximum message byte size allowed by the detected telemetry path according to a preset formula and uploads it to the telemetry information database, wherein the preset formula is:
[0024] p = mhx*y;
[0025] Among them, p represents the maximum message byte size, m represents the minimum value of the maximum transmission unit among the maximum transmission units corresponding to multiple links on a telemetry path, x represents the metadata byte size, y represents the total number of hops on the telemetry path; h represents the header byte size of the initial in-band network telemetry message.
[0026] In some embodiments, the method further comprises:
[0027] In response to detecting that there is an update switch whose configuration is updated among the plurality of relay switches included in the network, the controller calculates a to-be-determined maximum message byte size allowed by a telemetry path including the update switch;
[0028] The controller compares the to-be-determined maximum message byte size with the maximum message byte size currently stored in the telemetry information database and matching the telemetry path;
[0029] If the to-be-determined maximum message byte size is inconsistent with the maximum message byte size currently stored in the telemetry information database and matching the telemetry path, the controller updates the maximum message byte size allowed by the telemetry path in the data to the to-be-determined maximum message byte size.
[0030] In some embodiments, in response to the in-band network telemetry message to be allocated initiated by the user server at the current time node, determining the optimal path matching the in-band network telemetry message to be allocated according to the maximum message byte size allowed by each telemetry path currently detected, includes:
[0031] In response to the in-band network telemetry message to be allocated initiated by the user server at the current time node, triggering the starting switch to compare the maximum message byte size allowed by each detected telemetry path sent by the controller with the byte size of the in-band network telemetry message to be allocated;
[0032] If the byte size of the in-band network telemetry message to be allocated is less than or equal to the minimum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected, then determining the telemetry path corresponding to the minimum message byte size as the optimal path matching the in-band network telemetry message to be allocated;
[0033] If the byte size of the in-band network telemetry message to be allocated is within the numerical interval formed by the maximum message byte size allowed by each telemetry path detected, then the telemetry path corresponding to the maximum message byte size that matches the larger interval endpoint value of the numerical interval is determined as the optimal path that matches the in-band network telemetry message to be allocated.
[0034] In some embodiments, the method further comprises:
[0035] In response to the byte size of the in-band network telemetry message to be allocated being greater than the maximum message byte size of the maximum message byte size allowed by each telemetry path that has been detected, simplifying the metadata structure and selecting the telemetry path corresponding to the maximum message byte size as the optimal path matching the in-band network telemetry message to be allocated;
[0036] or,
[0037] In response to the byte size of the in-band network telemetry message to be allocated being greater than the maximum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected, the in-band network telemetry message to be allocated is randomly allocated to the telemetry path included in the network between the user server and the target server.
[0038] In a second aspect, the present application provides a path planning system for in-band network telemetry messages, the system comprising:
[0039] A data acquisition module, used to acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0040] A data processing module, used to calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0041] The path allocation module is used to determine the optimal path matching the in-band network telemetry message to be allocated based on the maximum message byte size allowed by each telemetry path currently detected in response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node.
[0042] In a third aspect, the present application provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0043] Acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0044] Calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0045] In response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, the optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
[0046] In a fourth aspect, the present application provides an electronic device, the electronic device comprising:
[0047] one or more processors;
[0048] and a memory associated with one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, perform the following operations:
[0049] Acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0050] Calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0051] In response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, the optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
[0052] In a fifth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program enables a computer to perform the following operations:
[0053] Acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0054] Calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0055] In response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, the optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
[0056] The beneficial effects achieved by this application are:
[0057] The present application provides a path planning method for in-band network telemetry messages, including obtaining telemetry information of at least one telemetry path contained in a network between a user server and a target server, wherein the telemetry information includes the total number of hops and the maximum transmission unit corresponding to each link constituting the telemetry path; calculating the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules; in response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, determining the optimal path matching the in-band network telemetry message to be allocated according to the maximum message byte size allowed by each currently detected telemetry path. The maximum transmission unit and the number of hops corresponding to each link are brought into the in-band network telemetry message, and after the controller collects and calculates the maximum message byte size corresponding to each telemetry path, the configuration is sent down to the starting switch, and the telemetry path is allocated according to the message size at the telemetry starting end, so as to achieve dynamic path diversion of the telemetry message and solve the telemetry problem of excessive metadata. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0059] Figure 1 It is a transmission flow chart of an in-band network telemetry message provided by an embodiment of the present application;
[0060] Figure 2 It is a schematic diagram of a path planning method for an in-band network telemetry message provided in an embodiment of the present application;
[0061] Figure 3This is a telemetry information configuration architecture diagram provided by an embodiment of the present application;
[0062] Figure 4 This is a minimum size telemetry message generation flow chart provided in an embodiment of the present application;
[0063] Figure 5 is a controller processing flow chart provided in an embodiment of the present application;
[0064] Figure 6 This is a schematic diagram of updating the maximum message byte size provided in an embodiment of the present application;
[0065] Figure 7 This is a schematic diagram of sending a maximum message byte size provided by an embodiment of the present application;
[0066] Figure 8 This is an architecture diagram of a path planning system for in-band network telemetry messages provided in an embodiment of the present application;
[0067] Fig. 9 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0069] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like in the entire specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, the meaning of "including but not limited to".
[0070] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.
[0071] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.
[0072] As mentioned in the background technology, different devices and protocols in the network usually have different maximum transmission unit size limits. For example, the standard maximum transmission unit size of Ethernet is usually 1500 bytes, but in some networks it may be increased to more than 9000 bytes to improve network performance and efficiency. Administrators can usually adjust the maximum transmission unit size according to actual network requirements and device characteristics to obtain the best network performance.
[0073] When using the telemetry mechanism to monitor network traffic, the size of the maximum transmission unit also affects whether the in-band network telemetry message can be transmitted normally. In a multi-path environment, since messages may be transmitted through different paths, and the number of hops on each path and the maximum transmission unit of the link may be different, messages on certain paths are more likely to exceed the maximum transmission unit due to the insertion of metadata, resulting in the message being discarded.
[0074] To solve this problem, there are currently two solutions. One existing solution sets Mflag in the message header, indicating that any subsequent metadata inserted into the telemetry message may exceed the maximum transmission unit, thereby preventing the telemetry message from being discarded due to the insertion of metadata causing the maximum transmission unit to exceed the maximum transmission unit. However, this solution may cause information loss on some telemetry paths, and only the telemetry information before the M flag is set can be obtained, and subsequent telemetry information cannot be recorded. The problem is more obvious in a multi-path environment. Since the values of the maximum transmission units on different paths may be different, the telemetry information on some telemetry paths is more likely to be abandoned due to reaching the maximum transmission unit upper limit. Another existing solution is that when the metadata inserted into the message exceeds the maximum transmission unit, all metadata collected in the previous jump is reported to the controller, and all metadata is deleted from the message, thereby reducing the message size, further ensuring that the message size does not exceed the maximum transmission unit, and the original message can continue to be transmitted to subsequent jumps and re-record the telemetry information; however, this solution will cause the telemetry information on the telemetry path to be reported in segments, and because there is no correlation between the reported information, the controller cannot integrate the segmented reported data and can only obtain segmented telemetry information, but cannot obtain complete telemetry path information; in a multi-path environment, since telemetry messages on different paths may be reported in segments multiple times, the problem will become more complicated, making it more difficult for the controller to integrate and analyze complete telemetry information.
[0075] Therefore, the present application provides a path planning method for in-band network telemetry messages, which allocates appropriate telemetry paths for in-band network telemetry messages, ensuring that the byte size of the message can still be transported normally on the corresponding telemetry path after any node inserts metadata, thereby realizing the collection of telemetry information of the entire telemetry path.
[0076] Specifically, Figure 1 In the transmission flow chart shown in the figure, the user server transmits the data packet to the target server through the starting switch, the intermediate switch and the terminating switch. Among them, the starting switch is responsible for inserting the INT Header in the data packet to generate the in-band network telemetry message. In order to use the telemetry mechanism to monitor network traffic, metadata is also inserted into the in-band network telemetry message to record the telemetry information of each jump. Each time the metadata is inserted, the byte size of the in-band network telemetry message will increase. In addition, each link in the network has a corresponding maximum transmission unit (MTU), which indicates the maximum message size that can be transmitted. If the insertion of metadata causes the message size to exceed the MTU of a certain link, the link will not be able to correctly process the in-band network telemetry message and may discard the in-band network telemetry message, resulting in the inability to obtain the telemetry information on the telemetry path.
[0077] Embodiment 1
[0078] The present application embodiment provides a path planning method for in-band network telemetry messages, which is applied in a multi-telemetry path environment. Specifically, Figure 2 As shown, the method disclosed in the embodiment of the present application is used to implement the diversion of in-band network telemetry messages, including the following contents:
[0079] S1. Obtain telemetry information of at least one telemetry path contained in a network between a user server and a target server.
[0080] In order to implement the path planning of in-band network telemetry messages, it is necessary to collect the telemetry information corresponding to multiple telemetry paths contained in the entire network in advance. Specifically, the telemetry information on the telemetry path is collected by the initial in-band network telemetry message that has been transmitted before the current time node. Any telemetry path includes a starting switch, a terminating switch, and at least one relay switch, such as Figure 3 The telemetry information configuration architecture diagram shown in the figure includes four parts: telemetry configuration module, telemetry information database, chip control module and switch chip. The telemetry configuration module is a configuration and delivery module for telemetry information, including a specified five-tuple (source ip, destination ip, sourceport, destinationport and ip protocol field). The telemetry configuration module is used to provide metadata content to be attached and the maximum transmission unit of the link and add it to the telemetry information database, thereby realizing the configuration of telemetry information on each switch. The chip control module is used to subscribe to database changes and deliver the configuration to the switch chip.
[0081] In a specific implementation scenario, obtaining telemetry information of at least one telemetry path included in the network between the user server and the target server includes: real-time monitoring of whether the terminating switch receives the initial in-band network telemetry message, wherein the initial in-band network telemetry message is an in-band network telemetry message generated by the starting switch according to the data packet sent by the user server; in response to monitoring that the terminating switch on the telemetry path receives the initial in-band network telemetry message, obtaining metadata in the initial in-band network telemetry message; uploading the metadata to a controller in the network, and parsing the metadata through the controller to obtain telemetry information of the telemetry path that matches the initial in-band network telemetry message. The present application realizes real-time updating of the telemetry information corresponding to the telemetry path by real-time monitoring of whether the initial in-band network telemetry message is received on the terminating switch, and further ensures the accuracy and reliability of the maximum message byte size allowed for the telemetry path calculated subsequently.
[0082] In a specific implementation scenario, the metadata in the in-band network telemetry message increases with the jumps, and in the telemetry information collection stage, the size of the in-band network telemetry message is likely to exceed the message size allowed by the telemetry path, resulting in the message being discarded; therefore, it may be impossible to obtain the telemetry information of all nodes on the complete telemetry path. Therefore, the embodiment of the present application also proposes a method for collecting telemetry information of at least one telemetry path contained in the network between the user server and the target server to improve the collection of telemetry information on the telemetry path, such as Figure 4 As shown, specifically including:
[0083] Detect whether the initial in-band network telemetry message transmitted on each telemetry path contains a size identifier (MFlag), the size identifier is used to indicate that the metadata in the initial in-band network telemetry message cannot be further increased; if it is detected that the initial in-band network telemetry message transmitted on the specified telemetry path contains the size identifier, parse the metadata in the initial in-band network telemetry message containing the size identifier; determine whether the specified telemetry information in the metadata in the initial in-band network telemetry message containing the size identifier is complete; if the specified telemetry information in the metadata in the initial in-band network telemetry message containing the size identifier is complete, determine that the specified telemetry information is the telemetry information that matches the specified telemetry path; if the specified telemetry information in the metadata in the initial in-band network telemetry message containing the size identifier is incomplete, notify the starting switch to generate a minimum size telemetry message; send the minimum size telemetry message to the terminating switch via the specified telemetry path to obtain the specified telemetry information that matches the specified telemetry path. The above-mentioned minimum-size telemetry message is usually set to a small packet of 64 bytes. It is not excluded that there will be smaller-byte-size packets after technological development, and this application does not limit this. If the specified telemetry information matching the specified telemetry path contained in the metadata of the initial in-band network telemetry message containing the size identifier is complete, then the specified telemetry information is determined to be the telemetry information matching the specified telemetry path. This application proposes that in the scenario where it is confirmed that the complete telemetry path cannot be collected, the starting switch is notified to generate a minimum-size detection message, and the information on the telemetry path is collected according to the minimum-size telemetry message. Due to its small size, the information on the entire path can be completely collected, thereby ensuring the integrity of the collected telemetry information.
[0084] S2. Calculate the maximum message byte size allowed by the currently detected telemetry path based on the telemetry information and preset rules.
[0085] Specifically, Figure 5As shown in the controller processing flow chart, the controller receives the metadata uploaded by the terminating switch and parses the metadata to obtain the target telemetry data, and calculates the maximum message byte size allowed by the detected telemetry path according to the preset formula based on the target telemetry data, and sends the calculated result, i.e., the maximum message byte size allowed by the telemetry path, to the starting switch. The target telemetry data is the total number of hops on the telemetry path corresponding to the metadata and the maximum transmission unit corresponding to each link constituting the telemetry path. The controller uploads the parsed target telemetry data to the telemetry information database, and additionally stores the minimum value of the maximum transmission unit in the maximum transmission units corresponding to multiple links, the metadata byte size, and the header byte size of the initial in-band network telemetry message.
[0086] Specifically, the above-mentioned calculation of the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules includes: the controller analyzes the uploaded metadata to obtain the minimum value of the maximum transmission unit in the maximum transmission units corresponding to multiple links on the telemetry path matching the metadata; the controller calculates the maximum message byte size allowed by the detected telemetry path according to the preset formula and uploads it to the telemetry information database, p = mhx*y; wherein p represents the maximum message byte size, m represents the minimum value of the maximum transmission unit in the maximum transmission units corresponding to multiple links on a telemetry path, x represents the metadata byte size, y represents the total number of jumps on the telemetry path; h represents the header byte size of the initial in-band network telemetry message. If there are multiple telemetry paths, the calculation is performed multiple times to obtain the maximum message byte size allowed by each telemetry path. After calculating the maximum message byte size allowed by each telemetry path, the controller sends it to the starting switch so that the starting switch can subsequently divert the message. While taking into account the impact of the maximum transmission unit on message transmission, the present application also takes into account the metadata byte size, the total number of hops, and the header byte size of the message to determine the bytes required for the message during transmission, thereby ensuring the referenceability of the maximum message byte size allowed by the telemetry path ultimately calculated. The telemetry message only needs to be controlled to be less than the maximum message byte size to be successfully transmitted on the telemetry path.
[0087] Since the switch configuration may change, in some specific implementation scenarios, such as Figure 6As shown, the present application also proposes that in response to detecting that there is an updated switch whose configuration has been updated among multiple relay switches included in the network, the controller calculates the pending maximum message byte size allowed by the telemetry path including the updated switch; the controller compares the pending maximum message byte size with the maximum message byte size currently stored in the telemetry information database that matches the telemetry path; if the pending maximum message byte size is inconsistent with the maximum message byte size currently stored in the telemetry information database that matches the telemetry path, the maximum message byte size allowed by the telemetry path in the controller update data is the pending maximum message byte size. Even if the maximum transmission unit of the relay switch changes, the maximum message byte size allowed by the path can be recalculated through the metadata collected from the latest telemetry message, and then the strategy of adjusting the path of the subsequent starting switch is adjusted to achieve the effect of dynamic diversion based on message size and reduce the situation of message discarding.
[0088] S3. In response to the in-band network telemetry message to be allocated initiated by the user server at the current time node, an optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
[0089] like Figure 7 As shown, the starting switch subscribes to the telemetry information database. If the database is updated, it will start after receiving the update notification. According to the maximum message byte size corresponding to the telemetry path machine recorded in the acquired telemetry information database, the telemetry path is planned for the subsequently initiated telemetry message according to the preset rules. Among them, the preset rules are sent from the controller to the starting switch, and need to rely on third-party software to achieve, such as: restful. The initiator diversion method needs to be able to distinguish between the message size and the message diversion function to be achieved, such as: Access Control List (ACL). Specific diversion rules can also be customized through the above method, and this application does not impose any restrictions on this. The following is a diversion rule for this embodiment, which responds to the in-band network telemetry message to be allocated initiated by the user server at the current time node, and determines the optimal path that matches the in-band network telemetry message to be allocated according to the maximum message byte size allowed by each telemetry path currently detected, including:
[0090] In response to the in-band network telemetry message to be allocated initiated by the user server at the current time node, the triggering starting switch compares the maximum message byte size allowed by each telemetry path that has been detected and sent by the controller with the byte size of the in-band network telemetry message to be allocated; if the byte size of the in-band network telemetry message to be allocated is less than or equal to the minimum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected, then the telemetry path corresponding to the minimum message byte size is determined to be the optimal path matching the in-band network telemetry message to be allocated; if the byte size of the in-band network telemetry message to be allocated is within the numerical interval formed by the maximum message byte size allowed by each telemetry path that has been detected, then the telemetry path corresponding to the maximum message byte size that matches the larger interval endpoint value of the numerical interval is determined to be the optimal path matching the in-band network telemetry message to be allocated. For example, the maximum message byte sizes corresponding to path 1, path 2 and path 3 are defined as size 1, size 2 and size 3 respectively, and size 1 is smaller than size 2, and size 2 is smaller than size 3; under this setting, if the byte size of the in-band network telemetry message to be allocated is smaller than size 1, it is diverted to path 1; if the byte size of the in-band network telemetry message to be allocated is smaller than size 1 but larger than size 2, it is diverted to path 2; if the byte size of the in-band network telemetry message to be allocated is larger than size 2 but smaller than size 3, it is diverted to path 3.
[0091] In addition, in response to the byte size of the in-band network telemetry message to be allocated being greater than the maximum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected, the telemetry path corresponding to the maximum message byte size is selected as the optimal path matching the in-band network telemetry message to be allocated after simplifying the metadata structure; or, in response to the byte size of the in-band network telemetry message to be allocated being greater than the maximum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected, the in-band network telemetry message to be allocated is randomly allocated to the telemetry path contained in the network between the user server and the target server.
[0092] Among them, simplifying the metadata structure can be to retain only the MTU and the number of jumps and necessary data recorded in the metadata structure, and delete the remaining data items; or before jumping to the next hop switch, the telemetry information stored in the metadata is extracted in advance into a pre-divided storage space and marked, and then after the message is transmitted to the termination switch, the corresponding telemetry information recorded in the storage space is integrated and uploaded to the controller. The above method also includes, after simplifying the metadata structure to reduce the size of the telemetry message, selecting the maximum value of the maximum message byte size allowed in multiple telemetry paths, comparing the telemetry message size after the metadata structure is simplified with the maximum value of the maximum message byte size allowed in the multiple telemetry paths currently obtained, if the telemetry message size after the metadata structure is simplified is less than or equal to the maximum value of the maximum message byte size allowed in the multiple telemetry paths currently obtained, then the path corresponding to the maximum value is used as the optimal path for the telemetry message; if the telemetry message size after the metadata structure is simplified is still larger than the maximum message byte size allowed in the multiple telemetry paths currently obtained, The in-band network telemetry message to be allocated is randomly allocated to the telemetry path included in the network between the user server and the target server; or an abnormal alarm is generated to prompt the user that the byte size of the message received by the current network is too large and whether to split the message. In response to the user's determination to split the message, the byte size of the message after segmentation is compared with the maximum value of the maximum message byte size allowed in the multiple telemetry paths currently obtained. If it is less than the maximum value, the path corresponding to the maximum value is used as the optimal path for the telemetry message. Otherwise, the in-band network telemetry message to be allocated is randomly allocated to the telemetry path included in the network between the user server and the target server.
[0093] In an environment where there are multiple telemetry paths, this application brings the maximum transmission unit and the number of jumps corresponding to each link into the in-band network telemetry message. After the controller collects and calculates the maximum message byte size corresponding to each telemetry path, it sends the configuration to the starting switch. At the telemetry starting end, the telemetry path is allocated according to the message size, so as to achieve dynamic path diversion of the telemetry message and solve the telemetry problem of excessive metadata.
[0094] Embodiment 2
[0095] Corresponding to the above-mentioned embodiment 1, the present application also provides a path planning system for in-band network telemetry messages, such as Figure 8 The flowchart shown specifically includes:
[0096] A data acquisition module 810 is used to acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0097] The data processing module 820 is used to calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0098] The path allocation module 830 is used to respond to the in-band network telemetry message to be allocated initiated by the user server at the current time node, and determine the optimal path matching the in-band network telemetry message to be allocated according to the maximum message byte size allowed by each telemetry path currently detected.
[0099] Preferably, the data acquisition module 810 is also used to monitor in real time whether the terminating switch receives the initial in-band network telemetry message, wherein the initial in-band network telemetry message is an in-band network telemetry message generated by the starting switch according to the data packet sent by the user server; in response to monitoring that the terminating switch on the telemetry path receives the initial in-band network telemetry message, obtain metadata in the initial in-band network telemetry message; upload the metadata to a controller in the network, and parse the metadata through the controller to obtain the telemetry information of the telemetry path that matches the initial in-band network telemetry message.
[0100] Preferably, the data acquisition module 810 is also used to detect whether the initial in-band network telemetry message transmitted on each telemetry path contains a size identifier, and the size identifier is used to indicate that the metadata in the initial in-band network telemetry message cannot be further increased; if it is detected that the initial in-band network telemetry message transmitted on the specified telemetry path contains the size identifier, parse the metadata in the initial in-band network telemetry message containing the size identifier; determine whether the specified telemetry information in the metadata in the initial in-band network telemetry message containing the size identifier is complete; if the specified telemetry information in the metadata in the initial in-band network telemetry message containing the size identifier is complete, determine that the specified telemetry information is the telemetry information matching the specified telemetry path; if the specified telemetry information in the metadata in the initial in-band network telemetry message containing the size identifier is incomplete, notify the starting switch to generate a minimum size telemetry message; send the minimum size telemetry message to the terminating switch via the specified telemetry path to obtain the specified telemetry information matching the specified telemetry path.
[0101] Preferably, the data processing module 820 is also used for the controller to analyze the uploaded metadata to obtain the minimum value of the maximum transmission unit among the maximum transmission units corresponding to multiple links on the telemetry path matching the metadata; the controller calculates the maximum message byte size allowed by the detected telemetry path according to a preset formula and uploads it to the telemetry information database, wherein the preset formula is: p=mhx*y; wherein p represents the maximum message byte size, m represents the minimum value of the maximum transmission unit among the maximum transmission units corresponding to multiple links on a telemetry path, x represents the metadata byte size, y represents the total number of hops on the telemetry path; h represents the header byte size of the initial in-band network telemetry message.
[0102] Preferably, the data processing module 820 is also used for, in response to detecting that there is an updated switch whose configuration has been updated among multiple relay switches included in the network, the controller calculates the pending maximum message byte size allowed for the telemetry path including the updated switch; the controller compares the pending maximum message byte size with the maximum message byte size currently stored in the telemetry information database that matches the telemetry path; if the pending maximum message byte size is inconsistent with the maximum message byte size currently stored in the telemetry information database that matches the telemetry path, the controller updates the maximum message byte size allowed for the telemetry path in the data to the pending maximum message byte size.
[0103] Preferably, the path allocation module 830 is further used to trigger the starting switch to compare the maximum message byte size allowed by each telemetry path detected and sent by the controller with the byte size of the inband network telemetry message to be allocated in response to the inband network telemetry message to be allocated initiated by the user server at the current time node; if the byte size of the inband network telemetry message to be allocated is less than or equal to the minimum message byte size among the maximum message byte sizes allowed by each telemetry path detected, then determine that the telemetry path corresponding to the minimum message byte size is the optimal path matching the inband network telemetry message to be allocated; if the byte size of the inband network telemetry message to be allocated is within the numerical interval formed by the maximum message byte size allowed by each telemetry path detected, then determine that the telemetry path corresponding to the maximum message byte size matching the larger interval endpoint value of the numerical interval is the optimal path matching the inband network telemetry message to be allocated.
[0104] Preferably, the path allocation module 830 is also used to select the telemetry path corresponding to the maximum message byte size as the optimal path matching the in-band network telemetry message to be allocated after simplifying the metadata structure in response to the byte size of the in-band network telemetry message to be allocated being larger than the maximum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected; or, in response to the byte size of the in-band network telemetry message to be allocated being larger than the maximum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected, randomly allocate the in-band network telemetry message to be allocated to the telemetry path contained in the network between the user server and the target server.
[0105] Embodiment 3
[0106] Corresponding to all the above embodiments, the present application further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0107] Acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0108] Calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0109] In response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, the optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
[0110] Embodiment 4
[0111] Corresponding to all the above embodiments, an embodiment of the present application provides an electronic device, including: one or more processors; and a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the following operations are performed:
[0112] Acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0113] Calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0114] In response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, the optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
[0115] in, Fig. 9 The electronic device architecture is shown as an example, which may include a processor 910, a video display adapter 911, a disk drive 912, an input / output interface 913, a network interface 914, and a memory 920. The processor 910, the video display adapter 911, the disk drive 912, the input / output interface 913, the network interface 914, and the memory 920 may be communicatively connected via a bus 930.
[0116] Among them, the processor 910 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.
[0117] The memory 920 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 920 can store an operating system 921 for controlling the execution of the electronic device 900, and a basic input and output system (BIOS) 922 for controlling the low-level operations of the electronic device 900. In addition, a web browser 923, a data storage management system 924, and an icon font processing system 925, etc. can also be stored. The above-mentioned icon font processing system 925 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 920 and is called and executed by the processor 910.
[0118] The input / output interface 913 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0119] The network interface 914 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0120] The bus 930 comprises a pathway for transmitting information between the various components of the device (eg, the processor 910, the video display adapter 911, the disk drive 912, the input / output interface 913, the network interface 914, and the memory 920).
[0121] In addition, the electronic device 900 can also obtain information on specific collection conditions from the virtual resource object collection condition information database for use in condition judgment, etc.
[0122] It should be noted that, although the above device only shows a processor 910, a video display adapter 911, a disk drive 912, an input / output interface 913, a network interface 914, a memory 920, a bus 930, etc., in the specific implementation process, the device may also include other components necessary for normal execution. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.
[0123] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for a computer device (which can be a personal computer, a cloud service end, or a network device, etc.) to execute the methods of various embodiments of the present application or certain parts of the embodiments.
[0124] Embodiment 5
[0125] Corresponding to all the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, characterized in that it stores a computer program, and the computer program enables a computer to perform the following operations:
[0126] Acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path;
[0127] Calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules;
[0128] In response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, the optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
[0129] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0130] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A path planning method for in-band network telemetry messages, applied in a multi-telemetry path environment, characterized in that: The method comprises: Acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path; Calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules; In response to receiving the in-band network telemetry message to be allocated initiated by the user server at the current time node, the optimal path matching the in-band network telemetry message to be allocated is determined according to the maximum message byte size allowed by each telemetry path currently detected.
2. The method according to claim 1, characterized in that Any telemetry path includes a starting switch, a terminating switch, and at least one relay switch, and the obtaining of telemetry information of at least one telemetry path included in the network between the user server and the target server includes: Real-time monitoring of whether the terminating switch receives an initial in-band network telemetry message, wherein the initial in-band network telemetry message is an in-band network telemetry message generated by the starting switch according to the data packet sent by the user server; In response to monitoring that the terminating switch on the telemetry path receives the initial in-band network telemetry message, acquiring metadata in the initial in-band network telemetry message; The metadata is uploaded to a controller in the network, and the metadata is parsed by the controller to obtain the telemetry information of the telemetry path that matches the initial in-band network telemetry message.
3. The method according to claim 2, characterized in that The step of obtaining telemetry information of at least one telemetry path included in the network between the user server and the target server further includes: Detecting whether the initial in-band network telemetry message transmitted on each telemetry path includes a size identifier, wherein the size identifier is used to indicate that metadata in the initial in-band network telemetry message cannot be further increased; If it is detected that the initial in-band network telemetry message transmitted on the designated telemetry path contains the size identifier, parsing metadata in the initial in-band network telemetry message containing the size identifier; determining whether specified telemetry information in metadata in an initial in-band network telemetry message including the size identifier is complete; If the specified telemetry information in the metadata of the initial in-band network telemetry message containing the size identifier is complete, then determining that the specified telemetry information is the telemetry information that matches the specified telemetry path If the specified telemetry information in the metadata of the initial in-band network telemetry message including the size identifier is incomplete, notifying the starting switch to generate a minimum size telemetry message; The minimum-sized telemetry message is sent to a terminating switch via the designated telemetry path to obtain designated telemetry information matching the designated telemetry path.
4. The method according to claim 1, characterized in that: The calculating the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and the preset rule includes: The controller analyzes the uploaded metadata to obtain a minimum maximum transmission unit value among maximum transmission units corresponding to a plurality of links on a telemetry path matching the metadata; The controller calculates the maximum message byte size allowed by the detected telemetry path according to a preset formula and uploads it to the telemetry information database, wherein the preset formula is: p = mhx*y; Among them, p represents the maximum message byte size, m represents the minimum value of the maximum transmission unit among the maximum transmission units corresponding to multiple links on a telemetry path, x represents the metadata byte size, y represents the total number of hops on the telemetry path; h represents the header byte size of the initial in-band network telemetry message.
5. The method according to claim 4, characterized in that The method further comprises: In response to detecting that there is an update switch whose configuration is updated among the plurality of relay switches included in the network, the controller calculates a to-be-determined maximum message byte size allowed by a telemetry path including the update switch; The controller compares the to-be-determined maximum message byte size with the maximum message byte size currently stored in the telemetry information database and matching the telemetry path; If the to-be-determined maximum message byte size is inconsistent with the maximum message byte size currently stored in the telemetry information database and matching the telemetry path, the controller updates the maximum message byte size allowed by the telemetry path in the data to the to-be-determined maximum message byte size.
6. The method according to any one of claims 1 to 5, characterized in that: The step of responding to the in-band network telemetry message to be allocated initiated by the user server at the current time node, and determining the optimal path matching the in-band network telemetry message to be allocated according to the maximum message byte size allowed by each telemetry path currently detected, comprises: In response to the in-band network telemetry message to be allocated initiated by the user server at the current time node, triggering the starting switch to compare the maximum message byte size allowed by each detected telemetry path sent by the controller with the byte size of the in-band network telemetry message to be allocated; If the byte size of the in-band network telemetry message to be allocated is less than or equal to the minimum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected, then determining the telemetry path corresponding to the minimum message byte size as the optimal path matching the in-band network telemetry message to be allocated; If the byte size of the in-band network telemetry message to be allocated is within the numerical interval formed by the maximum message byte size allowed by each telemetry path detected, then the telemetry path corresponding to the maximum message byte size that matches the larger interval endpoint value of the numerical interval is determined as the optimal path that matches the in-band network telemetry message to be allocated.
7. The method according to claim 6, characterized in that The method further comprises: In response to the byte size of the in-band network telemetry message to be allocated being greater than the maximum message byte size of the maximum message byte size allowed by each telemetry path that has been detected, simplifying the metadata structure and selecting the telemetry path corresponding to the maximum message byte size as the optimal path matching the in-band network telemetry message to be allocated; or, In response to the byte size of the in-band network telemetry message to be allocated being greater than the maximum message byte size among the maximum message byte sizes allowed by each telemetry path that has been detected, the in-band network telemetry message to be allocated is randomly allocated to the telemetry path included in the network between the user server and the target server.
8. A path planning system for in-band network telemetry messages, characterized in that: The system comprises: A data acquisition module, used to acquire telemetry information of at least one telemetry path included in a network between a user server and a target server, wherein the telemetry information includes a total number of hops and a maximum transmission unit corresponding to each link constituting the telemetry path; A data processing module, used to calculate the maximum message byte size allowed by the currently detected telemetry path according to the telemetry information and preset rules; The path allocation module is used to respond to the in-band network telemetry message to be allocated initiated by the user server at the current time node, and determine the optimal path matching the in-band network telemetry message to be allocated according to the maximum message byte size allowed by each telemetry path currently detected.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; And a memory associated with the one or more processors, the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method according to any one of claims 1-7 is executed.
10. A computer-readable storage medium, characterized in that: The computer program stores a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.
