A method and apparatus for processing in-band network telemetry messages
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]然而,这两种方案均存在着自身的不足,方案一中该交换机之后的遥测信息由于封包已达上限,所以不会再附加新的Metadata到封包上,因此控制器虽然可从M bit判断出有超过MTU上限的Metadata,但关键的Metadata信息却已丢失了
Smart Images

Figure CN117240941B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of in-band network telemetry technology, and in particular to a method and apparatus for processing in-band network telemetry messages. Background Technology
[0002] In-band network telemetry (INT) is a novel network monitoring technology that enables comprehensive monitoring and analysis of data flows by adding special metadata to network packets. This metadata provides rich network performance information, such as network congestion, latency, and packet loss, and can also be used to identify network attacks and abnormal behavior.
[0003] When monitoring network traffic using telemetry, metadata needs to be inserted into packets to record telemetry information for each hop. Each metadata insertion increases the packet size. However, each link and node in the network has an MTU (Maximum Transmission Unit) value, representing the maximum packet size that can be transmitted. If the inserted metadata causes the packet size to exceed the MTU value of a link or node, that link or node will be unable to process the packet correctly and may discard it.
[0004] To address the above situation, the relevant technologies offer the following two solutions: First, do not insert any metadata, and set the M bit (Metadata bit) in the INT header (Inband network telemetry header) to indicate that the telemetry packet size exceeds the outgoing port MTU. Second, report the metadata collected in the previous hops and delete the reported metadata from the data packet, thereby freeing up space.
[0005] However, both solutions have their own shortcomings. In Solution 1, the telemetry information after the switch will not have new metadata added to the packets because the packet size has reached the limit. Therefore, although the controller can determine from the M-bits that there is metadata exceeding the MTU limit, the critical metadata information has been lost. In Solution 2, the same packet is reported to the controller multiple times, which causes the controller to be unable to integrate the multiple reported metadata (the metadata information is not related to each other). It can only obtain segmented metadata information, rather than the full-link metadata information. Summary of the Invention
[0006] In view of the above problems, a method and apparatus for processing in-band network telemetry messages are proposed to overcome or at least partially solve the above problems, including:
[0007] A method for processing in-band network telemetry messages, characterized in that it is applied to a switch, the method comprising:
[0008] Receive in-band network telemetry messages;
[0009] If the size of the in-band network telemetry message exceeds the maximum transmission unit value, the target metadata is determined from the metadata carried in the in-band network telemetry message.
[0010] In the in-band network telemetry message, metadata other than the target metadata is removed to obtain an updated in-band network telemetry message;
[0011] Determine whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value;
[0012] If the size of the updated in-band network telemetry message exceeds the maximum transmission unit value, the target metadata is sent to the controller;
[0013] If the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value, the updated in-band network telemetry message is sent to the next-hop device.
[0014] Optionally, the in-band network telemetry message header contains a high-priority field, and determining the target metadata from the metadata carried in the in-band network telemetry message includes:
[0015] Based on the high priority field, the target metadata is determined from the metadata carried in the in-band network telemetry message.
[0016] Optionally, determining the target metadata from the metadata carried in the in-band network telemetry message based on the high-priority field includes:
[0017] The metadata whose corresponding high-priority field is 1 is identified as the target metadata.
[0018] Optionally, the in-band network telemetry message header contains a high-priority field, and before determining the target metadata from the metadata carried in the in-band network telemetry message, the method further includes:
[0019] The in-band network telemetry messages are identified and parsed to detect whether there are any anomalies in the in-band network telemetry messages;
[0020] If an exception is found, the corresponding exception handling operation will be performed;
[0021] If no anomalies are found, the instruction field in the in-band network telemetry packet header is extracted, and the metadata required for the in-band network telemetry packet received by the local hop switch is collected according to the instruction field; wherein, the instruction field is used to indicate the metadata information that needs to be added to the in-band network telemetry packet.
[0022] The collected metadata is added to the metadata carried in the in-band network telemetry message;
[0023] All metadata carried in the in-band network telemetry message with the collected metadata added is stripped from the in-band network telemetry message.
[0024] Extract the high-priority fields from the in-band network telemetry packet header; filter the metadata carried by the extracted in-band network telemetry packets based on the high-priority fields.
[0025] Optionally, before sending the updated in-band network telemetry message to the next-hop device, the method further includes:
[0026] Update the transport layer checksum of the in-band network telemetry message, and verify the data integrity within the in-band network telemetry message based on the transport layer checksum.
[0027] Optionally, the in-band network telemetry header contains a priority bit flag, which is used to indicate whether the high-priority field extension is used.
[0028] Optionally, the high priority field is placed in a reserved field after the instruction field or in a reserved field after the priority bit flag.
[0029] An in-band network telemetry message processing device, the device comprising:
[0030] The telemetry message receiving module is used to receive in-band network telemetry messages;
[0031] The target metadata determination module is used to determine target metadata from the metadata carried in the in-band network telemetry message when the size of the in-band network telemetry message exceeds the maximum transmission unit value.
[0032] The telemetry message update module is used to remove metadata other than the target metadata from the in-band network telemetry message to obtain an updated in-band network telemetry message.
[0033] The telemetry message size determination module is used to determine whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value;
[0034] The target metadata sending module is used to send the target metadata to the controller when the size of the updated in-band network telemetry message exceeds the maximum transmission unit value;
[0035] The telemetry message sending module is used to send the updated in-band network telemetry message to the next-hop device when the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value.
[0036] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the in-band network telemetry message processing method described above.
[0037] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the in-band network telemetry message processing method described above.
[0038] The embodiments of the present invention have the following advantages:
[0039] In this embodiment of the invention, an in-band network telemetry message is received; if the size of the in-band network telemetry message exceeds the maximum transmission unit (MTU) value, target metadata is determined from the metadata carried in the in-band network telemetry message; metadata other than the target metadata is removed from the in-band network telemetry message to obtain an updated in-band network telemetry message; it is determined whether the size of the updated in-band network telemetry message exceeds the MTU value; if the size of the updated in-band network telemetry message exceeds the MTU value, the target metadata is sent to the controller; if the size of the updated in-band network telemetry message does not exceed the MTU value, the updated in-band network telemetry message is sent to the next-hop device. This achieves control over the size of metadata in the in-band network telemetry message, improves the integrity of data during in-band network telemetry message transmission, avoids the loss of key metadata information, and solves the problem of needing to report metadata information in segments, as detailed below:
[0040] 1. By using the high-priority fields in the INT header as priority judgment fields, telemetry messages exceeding the MTU size can filter metadata information based on the user-specified priority in the INT header to reduce the overall packet size, and high-priority telemetry fields on the telemetry path can be retained and integrated for reporting to the controller.
[0041] 2. By filtering metadata information, the problem of discarding the last few hops of telemetry message information or requiring segmented reporting when the size of the message exceeds the MTU is solved. The most important key information is retained so that network administrators can grasp the necessary key information for location when network anomalies occur. Attached Figure Description
[0042] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating the transmission process of in-band network telemetry messages in the related technologies provided by this invention.
[0044] Figure 2 This is a flowchart of the steps in the in-band network telemetry message processing method provided by the present invention.
[0045] Figure 3 This is the overall architecture diagram of the present invention provided by the present invention;
[0046] Figure 4 This is a flowchart of the steps of a method for processing in-band network telemetry messages according to an embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram of the V1 format of the in-band network telemetry message header in the related technologies provided by this invention;
[0048] Figure 6 This is a schematic diagram of the modified in-band network telemetry header V1 format provided by the present invention;
[0049] Figure 7 This is a schematic diagram of the V2 format of the in-band network telemetry message header in the related technologies provided by this invention;
[0050] Figure 8 This is a schematic diagram of the modified in-band network telemetry header V2 format provided by the present invention;
[0051] Figure 9 This is a flowchart of another method for processing in-band network telemetry messages provided in an embodiment of the present invention;
[0052] Figure 10 This is a schematic diagram of the structure of an in-band network telemetry message processing device provided by the present invention. Detailed Implementation
[0053] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0054] To enable those skilled in the art to better understand the embodiments of the present invention, some terms involved in the present invention are described below:
[0055] INT (Intrusion Detection) is a new type of network monitoring technology that enables comprehensive monitoring and analysis of data flows by adding special metadata to network packets. This metadata can provide rich network performance information, such as network congestion, latency, and packet loss, and can also be used to identify network attacks and abnormal behavior.
[0056] Compared to traditional network monitoring technologies, INT (Integrated Data) can provide more granular data, helping network administrators better understand network conditions and quickly locate and resolve problems. The core of INT technology is embedding metadata within data packets. This metadata is captured and recorded as the packets pass through network devices and then sent to the data center for processing and analysis.
[0057] Controller: The controller occupies a central position in the network, controlling the collection, storage, and transmission of data packets, and generating INT reports to provide network performance information. The controller can interact with the data plane, sending configuration information and control commands through the data plane's API, as well as collecting INT reports and network traffic information. The controller also manages the collection and storage of INT data, providing data for analysis and monitoring.
[0058] ACL (Access Control List): ACL is a network security technology used to restrict access permissions for network devices and applications. In practice, we can configure ACL rules based on conditions such as source address, destination address, protocol, and port, and define the actions to be taken for flows that meet the conditions, including dropping, forwarding, reporting to the CPU, etc. In this embodiment of the invention, its purpose is that the first switch can match flows of interest through the ACL and add INT headers to these flows of interest, allowing subsequent switches to append metadata based on the INT headers.
[0059] MTU: MTU defines the maximum size of a data packet that can be transmitted in a network. Network devices may discard data packets that exceed the MTU, or they may fragment the packets and reassemble them at the receiving end. However, in telemetry networks, the telemetry information becomes unusable after fragmentation, so the usual choice is to discard the packets.
[0060] like Figure 1 The diagram illustrates the transmission flow of in-band network telemetry messages in related technologies. When a tenant server transmits a telemetry message to a target server, it passes through an initiating switch, a relay switch, and a termination switch. The controller monitors the switches in real time and receives relevant message information for analysis. When using telemetry to monitor network traffic, metadata needs to be inserted into the telemetry message to record telemetry information for each hop. Each time metadata is inserted, the message size increases. However, each link and node in the network has an MTU value, representing the maximum message size that can be transmitted. If the inserted metadata causes the message size to exceed the MTU value of a link or node, that link or node will be unable to process the message correctly and may discard it.
[0061] and Figure 2 This illustrates a flowchart of the in-band network telemetry message processing method in related technologies. The telemetry message processing flow from the ingress port to the egress port mainly includes two parts: ingress port processing and egress port processing, as detailed below:
[0062] Ingress port processing:
[0063] First, the INT message is identified and parsed. This process checks the message header to determine if it is an INT message and then parses it to extract relevant information.
[0064] If a packet exception is encountered, such as an incorrect message format or an unexpected field value, the handler will perform the appropriate exception handling operation. This may include reporting the error, discarding the message, or taking other appropriate measures to handle the exception.
[0065] Extract the instruction bitmap from the message. The instruction bitmap is a field in the telemetry message that indicates the metadata information that needs to be added to the telemetry message. Extracting the instruction bitmap at this stage is for use in subsequent processing steps.
[0066] Output port processing:
[0067] The processor updates the E bit (Exceeded bit, used to determine if the maximum number of hops has been exceeded) and the M bit, as well as the Remaining Hop Count.
[0068] Based on the instruction bitmap, the processor will collect the telemetry information required for this hop.
[0069] If the M bit is not 1 (meaning there is still space in the packet to add metadata), the processor will add the metadata of this hop to the message.
[0070] The processing program updates the L4 (Layer 4) checksum of the message. The L4 checksum is a checksum used to verify whether errors have occurred during message transmission. The processing program updates the L4 checksum based on message modifications to ensure data integrity.
[0071] Based on this, for situations where the inserted metadata causes the packet size to exceed the MTU value of a certain link or node, and that link or node will be unable to process the packet correctly and may discard the metadata, the following two solutions exist in related technologies: First, do not insert any metadata, and set the M bit in the INT header to indicate that the telemetry packet size exceeds the outgoing port MTU. Second, report the metadata collected in the previous few hops and delete the reported metadata from the data packet, thereby freeing up space.
[0072] However, both solutions have their own shortcomings. In Solution 1, the telemetry information after the switch will not have new metadata added to the packets because the packet size has reached the limit. Therefore, although the controller can determine from the M-bits that there is metadata exceeding the MTU limit, the critical metadata information has been lost. In Solution 2, the same packet is reported to the controller multiple times, which causes the controller to be unable to integrate the multiple reported metadata (the metadata information is not related to each other). It can only obtain segmented metadata information, rather than the full-link metadata information.
[0073] In view of this, refer to Figure 3This diagram illustrates the overall architecture of an embodiment of the present invention, which includes four parts: a user telemetry configuration module, a telemetry information database, a chip control module, and a switch chip. The user telemetry configuration module is a telemetry information configuration distribution module, containing a specified five-tuple (source IP, destination IP, source port, destination port, and IP protocol fields). This module provides the additional metadata content and metadata priority fields and adds them to the telemetry information database. The chip control module subscribes to database changes and distributes the configuration to the switch chip.
[0074] The present invention will be further described below:
[0075] Reference Figure 4 The diagram illustrates a flowchart of a method for processing in-band network telemetry messages according to an embodiment of the present invention, applied to a switch, and specifically includes the following steps:
[0076] Step 401: Receive in-band network telemetry messages.
[0077] In network communication, such as in a switch scenario, after receiving in-band network telemetry messages, the message can be identified and parsed. The message header is checked to determine if it is indeed an in-band network telemetry message, and then parsed to extract relevant information. If packet anomalies are encountered, such as incorrect message format or unexpected field values, the handler can perform corresponding exception handling operations. This may include reporting errors, discarding messages, or taking other appropriate measures to handle the anomaly.
[0078] Step 402: If the size of the in-band network telemetry message exceeds the maximum transmission unit value, determine the target metadata from the metadata carried in the in-band network telemetry message.
[0079] In specific implementations, the processing program can update the E bit, M bit, and Remaining Hop Count, and determine whether the size of the in-band network telemetry message exceeds the maximum transmission unit value based on whether the M bit value is 1. In the step of determining the target metadata from the metadata carried by the in-band network telemetry message, either all the metadata carried by the in-band network telemetry message can be extracted first, and then the target metadata can be confirmed from it, or the target metadata can be directly determined from the metadata carried by the in-band network telemetry message.
[0080] In one embodiment of the present invention, the in-band network telemetry header contains a priority bit flag, which is used to indicate whether the high priority field extension is used.
[0081] In practical applications, a priority bit flag can be added to the in-band network telemetry message header. For example, a P bit flag can be added after the M bit to indicate whether the priority bitmap extension is used.
[0082] In one embodiment of the present invention, the high priority field is placed in a reserved field after the instruction field or in a reserved field after the priority bit flag.
[0083] In practical applications, since the current standard INT header has two packet formats, V1 and V2, the INT header containing the priority bitmap will also be discussed in two formats below:
[0084] Insert the INT header V1 format of the priority bitmap:
[0085] like Figure 5 The image shows the INT header V1 format in related technologies. This invention, by adding a priority bitmap to this format, results in... Figure 6 As shown, a priority bitmap of 9 bits can be added after the instruction bitmap. The reason for using only 9 bits is that only the first 9 bits are used in the instruction bitmap in related technologies. Currently, only bits 0 to 8 of the instruction bitmap are used in related technologies. However, in practical applications, more bits of priority bitmap can be added according to the actual needs to meet the corresponding requirements.
[0086] Insert the INT header V2 format of the priority bitmap:
[0087] like Figure 7 The image shows the INT header V2 format in related technologies. This invention, by adding a priority bitmap to this format, results in... Figure 8 As shown, instead of adding a priority bitmap after the Instruction bitmap, you can use the reserved field after the P bit flag. The rest of the processing can be the same as the V1 format.
[0088] Furthermore, considering that the reserved field currently has only 11 bits after deducting the P bit flag, but the instruction bit can be expanded to a maximum of 15 bits, this means that in the future, when the instruction bitmap is larger than 9 bits, there may be a problem of insufficient bits in the INTheader V2 format. Therefore, an alternative priority bitmap encoding method can be adopted based on the following two considerations:
[0089] 1. Considering the correlation between the various fields in the metadata in the application, for example, if the ingress port timestamp is taken, the port timestamp must also be taken. Both must be taken to calculate the latency, so there is no case where only one timestamp is taken.
[0090] 2. Some fields are always required, such as Node ID, so this part does not need to be included in the priority bitmap and will always be included.
[0091] Based on the above two points, the priority bitmap does not need to be set one-to-one with the instruction bitmap. For related bits, a single bit can be used to represent them when mapping to the priority bitmap. For important fields, the priority bitmap does not need to be specified (meaning it should always be included).
[0092] In one embodiment of the present invention, the in-band network telemetry message header contains a high-priority field, and determining the target metadata from the metadata carried in the in-band network telemetry message includes:
[0093] Based on the high priority field, the target metadata is determined from the metadata carried in the in-band network telemetry message.
[0094] Since a high-priority field is preset in the in-band network telemetry message header, the processing program can first extract the priority_bitmap (high-priority field), and then filter all the metadata carried in the in-band network telemetry message according to the priority_bitmap, thereby determining the target metadata.
[0095] In one embodiment of the present invention, determining the target metadata from the metadata carried in the in-band network telemetry message based on the high-priority field includes:
[0096] The metadata whose corresponding high-priority field is 1 is identified as the target metadata.
[0097] In practical applications, when the processing program filters all metadata carried in the in-band network telemetry message according to the priority_bitmap and then determines the target metadata, it can retain the metadata at the corresponding position only when the corresponding position of priority_bitmap is 1, and use it as the target metadata.
[0098] In one embodiment of the present invention, before determining the target metadata from the metadata carried in the in-band network telemetry message, the method further includes:
[0099] The in-band network telemetry messages are identified and parsed to detect whether there are any anomalies in the in-band network telemetry messages;
[0100] If an exception is found, the corresponding exception handling operation will be performed;
[0101] If no anomalies are found, the instruction field in the in-band network telemetry packet header is extracted, and the metadata required for the in-band network telemetry packet received by the local hop switch is collected according to the instruction field; wherein, the instruction field is used to indicate the metadata information that needs to be added to the in-band network telemetry packet.
[0102] The collected metadata is added to the metadata carried in the in-band network telemetry message;
[0103] All metadata carried in the in-band network telemetry message with the collected metadata added is stripped from the in-band network telemetry message.
[0104] Extract the high-priority fields from the in-band network telemetry packet header; filter the metadata carried by the extracted in-band network telemetry packets based on the high-priority fields.
[0105] In practical implementation, after receiving in-band network telemetry messages, the messages can be identified and parsed. The message header is checked to determine if it is an in-band network telemetry message, and then parsed to extract relevant information. If packet anomalies are encountered, such as incorrect message format or unexpected field values, the processing program can perform corresponding exception handling operations, such as reporting errors or discarding messages, to handle the abnormal situation and improve the stability of the processing flow.
[0106] Since the metadata required by the in-band network telemetry messages received by the local hop switch should also be filtered according to priority to avoid losing critical data, the instruction field in the header of the in-band network telemetry message can be extracted. Based on the instruction field, the metadata required by the in-band network telemetry messages received by the local hop switch can be collected, and the collected metadata can be added to the metadata carried in the in-band network telemetry messages, thus ensuring the integrity of the data in the in-band network telemetry messages.
[0107] Before confirming the target metadata, all the metadata carried in the in-band network telemetry messages can be extracted first, and the extracted metadata carried in the in-band network telemetry messages can be filtered according to the high priority fields, thereby optimizing the processing steps, using an efficient method to filter metadata, and improving the efficiency and accuracy of target metadata acquisition.
[0108] Step 403: Remove metadata other than the target metadata from the in-band network telemetry message to obtain an updated in-band network telemetry message.
[0109] In practical implementation, the metadata carried by the in-band network telemetry message can be extracted first.
[0110] Then, the target metadata is confirmed, and metadata other than the target metadata is removed. The target metadata is then written back into the in-band network telemetry message to obtain an updated in-band network telemetry message. Alternatively, the target metadata can be directly determined from the metadata carried in the in-band network telemetry message, and metadata other than the target metadata can be removed to directly obtain an updated in-band network telemetry message without the need for stripping or other steps, thus optimizing the processing flow.
[0111] Step 404: Determine whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value.
[0112] After receiving the updated in-band network telemetry message, it can be determined whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value, so as to take appropriate action as needed.
[0113] Step 405: If the size of the updated in-band network telemetry message exceeds the maximum transmission unit value, the target metadata is sent to the controller.
[0114] Since data loss will occur when the size of the in-band network telemetry message exceeds the maximum transmission unit value, if the size of the updated in-band network telemetry message still exceeds the maximum transmission unit value, the target metadata can be sent to the controller to reduce the size of the in-band network telemetry message while avoiding data loss.
[0115] Step 406: If the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value, the updated in-band network telemetry message is sent to the next-hop device.
[0116] In a specific implementation, if the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value, the updated in-band network telemetry message can be sent to the next-hop device.
[0117] In one embodiment of the present invention, before sending the updated in-band network telemetry message to the next-hop device, the method further includes:
[0118] Update the transport layer checksum of the in-band network telemetry message, and verify the data integrity within the in-band network telemetry message based on the transport layer checksum.
[0119] In practical applications, the processing program can update the L4 checksum of the message. The L4 checksum (i.e., transport layer checksum) is a check value used to verify whether errors have occurred in the message during transmission. The processing program updates the L4 checksum according to the modifications made to the message to ensure data integrity.
[0120] In this embodiment of the invention, an in-band network telemetry message is received; if the size of the in-band network telemetry message exceeds the maximum transmission unit (MTU) value, target metadata is determined from the metadata carried in the in-band network telemetry message; metadata other than the target metadata is removed from the in-band network telemetry message to obtain an updated in-band network telemetry message; it is determined whether the size of the updated in-band network telemetry message exceeds the MTU value; if the size of the updated in-band network telemetry message exceeds the MTU value, the target metadata is sent to the controller; if the size of the updated in-band network telemetry message does not exceed the MTU value, the updated in-band network telemetry message is sent to the next-hop device. This optimizes the in-band network telemetry message processing method, improves the integrity of data during in-band network telemetry message transmission, avoids the loss of critical metadata information, and solves the problem of needing to report metadata information in segments.
[0121] Reference Figure 9 This diagram illustrates a flowchart of another method for processing in-band network telemetry messages according to an embodiment of the present invention, applied to a switch, and specifically includes the following steps:
[0122] Step 901: Receive in-band network telemetry messages; wherein the header of the in-band network telemetry message contains a high priority field.
[0123] Specifically, a high-priority field can be pre-set in the in-band network telemetry message header to filter the metadata carried by the in-band network telemetry message.
[0124] Step 902: If the size of the in-band network telemetry message exceeds the maximum transmission unit value, extract the instruction field from the header of the in-band network telemetry message, and collect the metadata required by the local hop switch for the in-band network telemetry message based on the instruction field.
[0125] Specifically, the instruction field in the in-band network telemetry message header can be extracted, and the metadata required by the in-band network telemetry message received by the local hop switch can be collected based on the instruction field.
[0126] Step 903: Add the collected metadata to the metadata carried in the in-band network telemetry message.
[0127] Specifically, since the metadata required by the in-band network telemetry messages received by this hop switch should also be filtered according to priority to avoid losing critical data, the collected metadata can be added to the metadata carried by the in-band network telemetry messages for further filtering.
[0128] Step 904: Determine the target metadata from the metadata carried in the in-band network telemetry message based on the high priority field.
[0129] Specifically, the processing program can first extract the priority_bitmap (high priority field), and then filter all the metadata carried in the in-band network telemetry message according to the priority_bitmap to determine the target metadata.
[0130] Step 905: Remove metadata other than the target metadata from the in-band network telemetry message to obtain an updated in-band network telemetry message.
[0131] Specifically, one approach is to first extract all metadata carried in the in-band network telemetry message, then identify the target metadata, remove all metadata other than the target metadata, and finally write the target metadata back into the in-band network telemetry message to obtain an updated in-band network telemetry message. Alternatively, one can directly identify the target metadata from the metadata carried in the in-band network telemetry message, remove all metadata other than the target metadata, and directly obtain an updated in-band network telemetry message without needing to perform extraction or other steps, thus optimizing the processing flow.
[0132] Step 906: Determine whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value.
[0133] Specifically, it can be determined whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value, so as to take appropriate action as needed.
[0134] Step 907: If the size of the updated in-band network telemetry message exceeds the maximum transmission unit value, the target metadata is sent to the controller.
[0135] In a specific implementation, if the size of the updated in-band network telemetry message still exceeds the maximum transmission unit value, the target metadata can be sent to the controller to reduce the size of the in-band network telemetry message while avoiding data loss.
[0136] Step 908: If the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value, update the transport layer checksum of the in-band network telemetry message, and verify the data integrity within the in-band network telemetry message based on the transport layer checksum.
[0137] In practical applications, if the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value, the L4 checksum of the message can be updated to ensure the integrity of the data in the updated in-band network telemetry message.
[0138] Step 909: Send the updated in-band network telemetry message to the next-hop device.
[0139] Since the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value, the simplified in-band network telemetry message can be sent to the next-hop device to achieve normal data transmission.
[0140] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0141] Reference Figure 10 The diagram illustrates a structural schematic of an in-band network telemetry message processing apparatus according to an embodiment of the present invention, which may specifically include the following modules:
[0142] Telemetry message receiving module 1101 is used to receive in-band network telemetry messages;
[0143] The target metadata determination module 1102 is used to determine target metadata from the metadata carried in the in-band network telemetry message when the size of the in-band network telemetry message exceeds the maximum transmission unit value;
[0144] The telemetry message update module 1103 is used to remove metadata other than the target metadata from the in-band network telemetry message to obtain an updated in-band network telemetry message.
[0145] The telemetry message size determination module 1104 is used to determine whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value.
[0146] The target metadata sending module 1105 is used to send the target metadata to the controller when the size of the updated in-band network telemetry message exceeds the maximum transmission unit value;
[0147] The telemetry message sending module 1106 is used to send the updated in-band network telemetry message to the next-hop device when the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value.
[0148] In another embodiment of the present invention, the in-band network telemetry header contains a high-priority field, and the target metadata determination module 1102 includes:
[0149] The high-priority field calling submodule is used to determine the target metadata from the metadata carried in the in-band network telemetry message based on the high-priority field.
[0150] In another embodiment of the present invention, the high-priority field invocation submodule includes:
[0151] Metadata confirmation unit, used to confirm the metadata whose corresponding high priority field is 1 as the target metadata.
[0152] In one embodiment of the present invention, the device further includes:
[0153] The instruction field invocation module is used to extract the instruction field from the in-band network telemetry packet header and collect the metadata required by the in-band network telemetry packet received by the local hop switch based on the instruction field.
[0154] The metadata adding module is used to add the collected metadata to the metadata carried in the in-band network telemetry message.
[0155] In one embodiment of the present invention, the device further includes:
[0156] The transport layer check and call module is used to update the transport layer check and call of the in-band network telemetry message, and to check the data integrity in the in-band network telemetry message based on the transport layer check and call.
[0157] An embodiment of the present invention also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the above-described method for processing in-band network telemetry messages.
[0158] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for processing in-band network telemetry messages.
[0159] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0160] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0161] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0162] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0163] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0165] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0166] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.
[0167] The above provides a detailed description of the method and apparatus for processing in-band network telemetry messages. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for processing in-band network telemetry messages, characterized in that, Applied to a switch, the method includes: Receive in-band network telemetry messages, the in-band network telemetry message header contains a high priority field; If the size of the in-band network telemetry message exceeds the maximum transmission unit value, the target metadata is determined from the metadata carried in the in-band network telemetry message. In the in-band network telemetry message, metadata other than the target metadata is removed to obtain an updated in-band network telemetry message; Determine whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value; If the size of the updated in-band network telemetry message exceeds the maximum transmission unit value, the target metadata is sent to the controller; If the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value, the updated in-band network telemetry message is sent to the next-hop device. Determining the target metadata from the metadata carried in the in-band network telemetry message includes: Based on the high priority field, the target metadata is determined from the metadata carried in the in-band network telemetry message.
2. The method according to claim 1, characterized in that, The step of determining the target metadata from the metadata carried in the in-band network telemetry message based on the high-priority field includes: The metadata whose corresponding high-priority field is 1 is identified as the target metadata.
3. The method according to claim 1, characterized in that, The in-band network telemetry message header contains a high-priority field. Before determining the target metadata from the metadata carried in the in-band network telemetry message, the process further includes: The in-band network telemetry messages are identified and parsed to detect whether there are any anomalies in the in-band network telemetry messages; If an exception is found, the corresponding exception handling operation will be performed; If no anomalies are found, the instruction field in the in-band network telemetry packet header is extracted, and the metadata required for the in-band network telemetry packet received by the local hop switch is collected according to the instruction field; wherein, the instruction field is used to indicate the metadata information that needs to be added to the in-band network telemetry packet. The collected metadata is added to the metadata carried in the in-band network telemetry message; All metadata carried in the in-band network telemetry message with the collected metadata added is stripped from the in-band network telemetry message. Extract the high-priority fields from the in-band network telemetry packet header; filter the metadata carried by the extracted in-band network telemetry packets based on the high-priority fields.
4. The method according to any one of claims 1 to 3, characterized in that, Before sending the updated in-band network telemetry message to the next-hop device, the method further includes: Update the transport layer checksum of the in-band network telemetry message, and verify the data integrity within the in-band network telemetry message based on the transport layer checksum.
5. The method according to claim 1, characterized in that, The in-band network telemetry header contains a priority bit flag, which is used to indicate whether the high-priority field expansion is used.
6. The method according to claim 5, characterized in that, The high priority field is placed in a reserved field after the instruction field or in a reserved field after the priority bit flag.
7. A network telemetry message processing device with in-band coverage, characterized in that, The device includes: The telemetry message receiving module is used to receive in-band network telemetry messages, and the in-band network telemetry message header contains a high priority field. The target metadata determination module is used to determine target metadata from the metadata carried in the in-band network telemetry message when the size of the in-band network telemetry message exceeds the maximum transmission unit value. The telemetry message update module is used to remove metadata other than the target metadata from the in-band network telemetry message to obtain an updated in-band network telemetry message. The telemetry message size determination module is used to determine whether the size of the updated in-band network telemetry message exceeds the maximum transmission unit value; The target metadata sending module is used to send the target metadata to the controller when the size of the updated in-band network telemetry message exceeds the maximum transmission unit value; The telemetry message sending module is used to send the updated in-band network telemetry message to the next-hop device when the size of the updated in-band network telemetry message does not exceed the maximum transmission unit value. The target metadata determination module includes: The high-priority field calling submodule is used to determine the target metadata from the metadata carried in the in-band network telemetry message based on the high-priority field.
8. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method for processing in-band network telemetry messages as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the method for processing in-band network telemetry messages as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Network telemetering method and device, switch, network, electronic equipment and medium
CN116319468A
Apparatus and method for transmitting / receiving multimedia data delivery characteristics information in multimedia communication system
US20140105132A1