CN116938777B - Network telemetry method and device, electronic equipment and storage medium - Google Patents

Network telemetry method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116938777B
CN116938777B CN202311185300.7A CN202311185300A CN116938777B CN 116938777 B CN116938777 B CN 116938777B CN 202311185300 A CN202311185300 A CN 202311185300A CN 116938777 B CN116938777 B CN 116938777B
Authority
CN
China
Prior art keywords
telemetry
target
header
message
headers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311185300.7A
Other languages
Chinese (zh)
Other versions
CN116938777A (en
Inventor
赵�怡
钱岭
张鹏飞
贾玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202311185300.7A priority Critical patent/CN116938777B/en
Publication of CN116938777A publication Critical patent/CN116938777A/en
Application granted granted Critical
Publication of CN116938777B publication Critical patent/CN116938777B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/20Arrangements for monitoring or testing data switching networks the monitoring system or the monitored elements being virtualised, abstracted or software-defined entities, e.g. SDN or NFV
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for network telemetry, electronic equipment and a storage medium, which relate to the technical field of data processing, respond to telemetry instructions, add telemetry headers for telemetry messages based on target nodes in a target network, wherein the telemetry headers comprise target telemetry data; when the survival time of the telemetry message in the target network reaches the preset survival time, forwarding the telemetry message added with the telemetry header to the target controller; and stripping the telemetry header from the telemetry message based on the target controller, and analyzing the telemetry header obtained by stripping to obtain target telemetry data. Compared with the related art, the remote measurement message header carrying the target remote measurement data is added for the remote measurement message based on the target node, the remote measurement message with the remote measurement header added reaching the preset survival time is forwarded to the target controller, and finally the target remote measurement data is obtained through analysis.

Description

Network telemetry method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a method and device for network telemetry, electronic equipment and a storage medium.
Background
Cloud computing, by means of Software defined networking (Software-defined Networking, SDN) and virtual extensible local area network technology (Virtual eXtensible Local Area Network, VXLAN), can provide various services to users around the world at any time, and has become a core infrastructure of modern society. Currently, the ultra-large network scale and the ultra-high link load bring great challenges to flow monitoring, so that the detection of the data flow in the cloud computing network through network telemetry becomes a key for ensuring the stable operation of the cloud computing network.
In order to realize network telemetry of a cloud computing network at present, one mode is to realize network telemetry of the cloud computing network by adopting a switch chip and a special telemetry message which are specially supported for telemetry; in addition, another way is to use a special POF switch supporting segment routing to implement network telemetry to the cloud computing network, however, the two ways are limited by hardware at present, and have the problem of low universality.
Disclosure of Invention
The present disclosure provides a method, apparatus, electronic device, and storage medium for network telemetry. The method mainly aims to solve the problem that network telemetry realized by the prior art is poor in universality.
According to a first aspect of the present disclosure, there is provided a method of network telemetry, comprising:
adding a telemetry header to a telemetry message based on a target node within a target network in response to telemetry instructions, the telemetry header including target telemetry data, the target network including at least one of the target nodes;
when the survival time of the telemetry message in the target network reaches the preset survival time, forwarding the telemetry message added with the telemetry header to a target controller;
and stripping the telemetry header from the telemetry message based on the target controller, and analyzing the stripped telemetry header to obtain the target telemetry data.
Optionally, after responding to the telemetry instruction, the method further comprises:
performing time synchronization on each target node in the target network;
receiving message data sent by a target initiating terminal, and judging whether the message data is a telemetry message or not according to a DSCP field of the message data;
and when the message data is determined to be the telemetry message, adding the telemetry header to the telemetry message based on the target node in the target network.
Optionally, the determining whether the message is a telemetry message according to the DSCP field of the message data includes:
matching the DSCP field with an OpenFlow flow table in the target node;
and when the value of the DSCP field is determined to be the target value corresponding to the telemetry message, determining that the message data is the telemetry message.
Optionally, the adding a telemetry header to the telemetry message based on the target node within the target network includes:
and adding the telemetry header in a standard format or the telemetry header in an extended format to the telemetry message based on the target node, wherein the telemetry header in the standard format comprises the target node ID and an entry port identifier of the target node, a time stamp and a survival time, and the telemetry header in the extended format comprises a telemetry type and telemetry results corresponding to the telemetry type.
Optionally, the adding a telemetry header to the telemetry message based on the target node within the target network includes:
adding one or more telemetry headers to the telemetry message based on the target node;
when the target node adds a plurality of telemetry headers to the telemetry message, each telemetry header in the plurality of telemetry headers is selected to be in a standard format or an extended format, wherein the value of a stack bottom identifier of the last telemetry header in the plurality of telemetry headers is different from the values of stack bottom identifiers of other telemetry headers, and the other telemetry headers are the remaining telemetry headers in the plurality of telemetry headers except the last telemetry header.
Optionally, when determining that the survival time of the telemetry message in the target network reaches a preset survival time, forwarding the telemetry message added with the telemetry header to a target controller includes:
setting the survival time of the telemetry message as a preset value;
subtracting one from the preset value after the telemetry message is forwarded by one target node;
and when the preset value is zero, determining that the survival time of the telemetry message in the target network reaches the preset survival time, and forwarding the telemetry message added with the telemetry header to a target controller.
Optionally, the forwarding the telemetry message with the telemetry header added thereto to a target controller includes:
and when the telemetry message is determined to be forwarded to an external network gateway outlet, directly forwarding the telemetry message added with the telemetry header to a target controller through OpenFlow.
According to a second aspect of the present disclosure there is provided an apparatus for network telemetry, comprising:
an adding unit, configured to add a telemetry header to a telemetry message based on a target node within a target network in response to a telemetry instruction, where the telemetry header includes target telemetry data, and where the target network includes at least one of the target nodes;
A forwarding unit, configured to forward, when it is determined that a lifetime of the telemetry message in the target network reaches a preset lifetime, the telemetry message added with the telemetry header to a target controller;
and the analysis unit is used for stripping the telemetry header from the telemetry message based on the target controller and analyzing the telemetry header obtained by stripping to obtain the target telemetry data.
Optionally, the apparatus further includes:
a synchronization unit, configured to perform time synchronization on each target node in the target network;
the judging unit is used for receiving the message data sent by the target initiating terminal and judging whether the message data is a telemetry message or not according to the DSCP field of the message data;
and the adding unit is used for adding the telemetry header to the telemetry message based on the target node in the target network when the message data is determined to be the telemetry message.
Optionally, the judging unit includes:
the matching module is used for matching the DSCP field with an OpenFlow flow table in the target node;
and the determining module is used for determining that the message data is the telemetry message when the value of the DSCP field is determined to be the target value corresponding to the telemetry message.
Optionally, the adding unit is further configured to:
and adding the telemetry header in a standard format or the telemetry header in an extended format to the telemetry message based on the target node, wherein the telemetry header in the standard format comprises the target node ID and an entry port identifier of the target node, a time stamp and a survival time, and the telemetry header in the extended format comprises a telemetry type and telemetry results corresponding to the telemetry type.
Optionally, the adding unit includes:
an adding module, configured to add one or more telemetry headers to the telemetry message based on the target node;
a selecting module, configured to select, when the target node adds a plurality of telemetry headers to the telemetry message, each telemetry header of the plurality of telemetry headers to be in a standard format or an extended format, where a value of a stack bottom identifier of a last one of the plurality of telemetry headers is different from a value of a stack bottom identifier of other telemetry headers, and the other telemetry headers are telemetry headers remaining after the last one of the plurality of telemetry headers is removed.
Optionally, the forwarding unit includes:
The setting module is used for setting the survival time of the telemetry message to be a preset value;
the reduction module is used for reducing the preset value by one after the telemetry message is forwarded by one target node;
and the determining module is used for determining that the survival time of the telemetry message in the target network reaches the preset survival time when the preset value is zero, and forwarding the telemetry message added with the telemetry header to a target controller.
Optionally, the forwarding unit is further configured to:
and when the telemetry message is determined to be forwarded to an external network gateway outlet, directly forwarding the telemetry message added with the telemetry header to a target controller through OpenFlow.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the preceding first aspect.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect described above.
The method, the device, the electronic equipment and the storage medium for network telemetry provided by the disclosure are used for adding a telemetry header to a telemetry message based on a target node in a target network in response to telemetry instructions, wherein the telemetry header comprises target telemetry data, and the target network comprises at least one target node; when the survival time of the telemetry message in the target network reaches the preset survival time, forwarding the telemetry message added with the telemetry header to a target controller; and stripping the telemetry header from the telemetry message based on the target controller, and analyzing the stripped telemetry header to obtain the target telemetry data. Compared with the related art, the method has the advantages that the telemetry message header carrying the target telemetry data is added for the telemetry message based on the target node in response to the telemetry command, the telemetry message added with the telemetry header reaching the preset survival time is finally forwarded to the target controller, the target telemetry data is finally obtained through analysis, hardware equipment for supporting telemetry is not added in the network telemetry process, the method only needs to be operated in an application program layer, and good universality is achieved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a method of network telemetry provided in an embodiment of the present disclosure;
fig. 2 is a schematic illustration of MPLS label addition provided in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a multi-layer MPLS telemetry header BOS provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a network telemetry device according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of another network telemetry device according to an embodiment of the present disclosure;
fig. 6 is a schematic block diagram of an example electronic device 300 provided by an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Methods, apparatus, electronic devices, and storage media for network telemetry of embodiments of the present disclosure are described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for network telemetry according to an embodiment of the present disclosure.
As shown in fig. 1, the method comprises the steps of:
step 101, in response to a telemetry instruction, adding a telemetry header to a telemetry message based on a target node within a target network, the telemetry header including target telemetry data, the target network including at least one of the target nodes.
As a refinement of the above step 101, in order to implement forwarding of target telemetry data, the target telemetry data is added to the telemetry message based on the target node, and then the telemetry message is forwarded based on the telemetry message carrying the target telemetry data, where the telemetry command is a start command of a network telemetry function in a cloud computing network, the cloud computing network is the target network, the target node is a computing node, a network element, a gateway, a switch device, and the like in the target network, where the telemetry data includes, but is not limited to, information including, but not limited to, a virtual switch ID, an ingress port identifier, timestamp information, a telemetry type, a telemetry value, and the like, and the telemetry message includes, but is not limited to, an MPLS label.
Step 102, when it is determined that the survival time of the telemetry message in the target network reaches a preset survival time, forwarding the telemetry message added with the telemetry header to a target controller.
As a refinement of the step 102, when it is determined that the survival time of the telemetry message in the target network reaches a preset survival time, the telemetry message added with the telemetry header is forwarded to a target controller, where the target controller is a telemetry controller, and the preset survival time is the set survival time of the telemetry message in the target network, that is, when the survival time of the telemetry message in the target network meets the preset survival time, the telemetry message is forwarded to the target controller.
And 103, stripping the telemetry header from the telemetry message based on the target controller, and analyzing the stripped telemetry header to obtain the target telemetry data.
As a refinement of the step 103, in order to finally obtain the target telemetry data, after the target controller receives the telemetry message, the telemetry header is stripped from the telemetry message, and the telemetry header obtained by stripping is parsed to obtain the target telemetry data for subsequent analysis, where the time stamp included in the target data is subtracted from the local time to determine the delay information of the telemetry message.
The method for network telemetry provided by the present disclosure, in response to telemetry instructions, adds a telemetry header to a telemetry message based on a target node within a target network, the telemetry header including target telemetry data, the target network including at least one of the target nodes; when the survival time of the telemetry message in the target network reaches the preset survival time, forwarding the telemetry message added with the telemetry header to a target controller; and stripping the telemetry header from the telemetry message based on the target controller, and analyzing the stripped telemetry header to obtain the target telemetry data. Compared with the related art, the method has the advantages that the telemetry message header carrying the target telemetry data is added for the telemetry message based on the target node in response to the telemetry command, the telemetry message added with the telemetry header reaching the preset survival time is finally forwarded to the target controller, the target telemetry data is finally obtained through analysis, hardware equipment for supporting telemetry is not added in the network telemetry process, the method only needs to be operated in an application program layer, and good universality is achieved.
As a refinement of the above embodiment, after the response to telemetry instructions, the method may also employ, but is not limited to, the following implementations, such as: performing time synchronization on each target node in the target network; receiving message data sent by a target initiating terminal, and judging whether the message data is a telemetry message or not according to a DSCP field of the message data; and when the message data is determined to be the telemetry message, adding the telemetry header to the telemetry message based on the target node in the target network.
In order to ensure that the system time error of all the target nodes through which the telemetry message passes is within 0.1ms, all the target nodes need to run a time synchronization program to perform time synchronization, and save the current time stamp to a time register in real time. Before explaining that whether the message data is a telemetry message according to the DSCP field, it should be understood that, different values are added to the DSCP field of the message data, and the assignment rule may be, but is not limited to, the following implementation manner, for example: using DSCP last two reserved fields to judge whether the message data is a telemetry message; the first position being 1 indicates that all incoming direction traffic information passing through the node needs to be reported, in which case the message data is the telemetry message; the second position is 1, which indicates that all the outgoing direction flow information passing through the node needs to be reported, and in this case, the message data is the telemetry message; two bit positions are configured with 1 to indicate that two-way telemetry is needed, and in this case, the message data is the telemetry message; a configuration of 0 indicates that telemetry is not required, in which case the message data is not the telemetry message. After the judgment rule is known, when the message data is determined to be the telemetry message based on the rule, adding the telemetry header to the telemetry message based on the target node in the target network.
In some embodiments, the telemetry message simulates normal and real message traffic, and is sent from the virtual machine and forwarded according to the path of the common message.
As a refinement of the foregoing embodiment, when executing the above-mentioned determination of whether it is a telemetry message according to the DSCP field of the message data, the following implementation manner may be adopted, but is not limited to, for example: matching the DSCP field with an OpenFlow flow table in the target node; and when the value of the DSCP field is determined to be the target value corresponding to the telemetry message, determining that the message data is the telemetry message.
Before the OpenFlow table matching is described, it is to be understood that the target node issues 1 special OpenFlow table for telemetry in the exit and entrance directions, and the telemetry flow table is used for matching the DSCP field, inserting the telemetry header into the telemetry message after the matching is completed, and then forwarding the telemetry message in one step. The OpenFlow flow table has a mapping relation table of whether the DSCP field and the message data are telemetry messages, when determining that the value of the DSCP field is a target value corresponding to the telemetry messages, the OpenFlow flow table determines that the message data are telemetry messages, the target value is a corresponding value assigned to the DSCP field mentioned in the above embodiment, and when the target value is a value assigned to the DSCP field of the message data when the message data are telemetry messages, namely when the value assigned to the DSCP field is the same as the target value, the message data are determined to be telemetry messages.
As a refinement of the foregoing embodiment, in performing step 101, when adding a telemetry header to a telemetry message based on a target node in a target network, the following implementation may be used, for example, but not limited to: and adding the telemetry header in a standard format or the telemetry header in an extended format to the telemetry message based on the target node, wherein the telemetry header in the standard format comprises the target node ID and an entry port identifier of the target node, a time stamp and a survival time, and the telemetry header in the extended format comprises a telemetry type and telemetry results corresponding to the telemetry type.
When the telemetry message adds the telemetry header, two format choices exist for the telemetry header; in order to more clearly illustrate the process of adding the telemetry header to the telemetry message, fig. 2 is a schematic diagram of MPLS label addition provided in an embodiment of the present disclosure; the MPLS label in the standard format and the MPLS label in the extended format are shown in fig. 2, to be a detailed description of fig. 2, including:
standard format: when the EXP field of the MPLS label is configured to be 0, as for the standard format, the operations that need to be performed are: configuring the front 7 bits of the MPLS label as identifiers of the ID and the ingress port of the current virtual switch for subsequent identification of the port; configuring 13 bits after MPLS label to store current time stamp, the time stamp value can copy and intercept 13 bits from time register; the source of 13bit delay time stamp: typically, the end-to-end telemetry message transmission delay does not exceed 10 seconds, and the telemetry accuracy is on the order of milliseconds, so a field of about 10000 (calculated by 10 seconds/0.001 seconds) is required to store the delay information, and the delay information is converted into an approximation of 2-ary system of 2≡13. I.e., a 13bit field is required to store a telemetry header delay field having a maximum delay of 8192 milliseconds. And configuring a life time field to store the hop count range of a virtual switch which is expected by a user and is remotely measured, wherein the maximum hop count range is 256 hops (8 bits), and the virtual switch is the target node.
Extension format: when the EXP field of the MPLS label is configured to be 1, as an extension format, more custom telemetry information can be conveniently extended later, and operations to be performed include: configuring the front 7 bits of the MPLS label as a telemetry type, wherein the telemetry type can be bandwidth, congestion parameters, an outlet port identifier, a user, a network and the like; 13 bits after the MPLS label is configured as a telemetry result value corresponding to the telemetry type.
As a refinement of the foregoing embodiment, in performing step 101, when adding a telemetry header to a telemetry message based on a target node in a target network, the following implementation may be used, for example, but not limited to: adding one or more telemetry headers to the telemetry message based on the target node; when the target node adds a plurality of telemetry headers to the telemetry message, each telemetry header in the plurality of telemetry headers is selected to be in a standard format or an extended format, wherein the value of a stack bottom identifier of the last telemetry header in the plurality of telemetry headers is different from the values of stack bottom identifiers of other telemetry headers, and the other telemetry headers are the remaining telemetry headers in the plurality of telemetry headers except the last telemetry header.
To more clearly illustrate the steps involved in the above embodiments, fig. 3 is a schematic diagram of a multi-layer MPLS telemetry header BOS provided in an embodiment of the present disclosure; the above steps are described in detail below in conjunction with fig. 3, for example:
the single virtual switch can report one or more pieces of telemetry data, each piece of telemetry data is an MPLS label, and the purpose can be achieved by adding the multi-layer MPLS label and an MPLS stack bottom identifier (BOS), wherein the single virtual switch is the target node, and the telemetry data is the target telemetry data, namely the telemetry header; each layer of MPLS labels may be in a standard format or an extended format. To facilitate the telemetry controller determining whether the multi-layer MPLS belongs to the same virtual switch node, a MPLS bottom of stack identifier, or BOS, may be configured. When the stack bottom identifier is 0, the same virtual machine port is telemetered, and more telemetering data are further arranged, and when the stack bottom identifier is 1, the last telemetering data of the virtual machine port are indicated; when the multi-layer MPLS label is inserted, the TTL value of the MPLS can copy the TTL value of the previous layer, wherein the TTL is the preset life time.
As a refinement of the foregoing embodiment, when step 102 is performed to determine that the lifetime of the telemetry message in the target network reaches the preset lifetime, the telemetry message added with the telemetry header is forwarded to the target controller, which may be implemented, for example, but not limited to: setting the survival time of the telemetry message as a preset value; subtracting one from the preset value after the telemetry message is forwarded by one target node; and when the preset value is zero, determining that the survival time of the telemetry message in the target network reaches the preset survival time, and forwarding the telemetry message added with the telemetry header to a target controller. The preset value may be, but is not limited to, 256.
In some embodiments, the top MPLS TTL value needs to be decremented by 1 for each pass through a virtual switch, i.e., the target node; when MPLS TTL is 0, the virtual switch matches MPLS ttl=0 through the flow table and uploads the telemetry controller, i.e., the target controller.
As a refinement of the foregoing embodiment, in performing step 102, forwarding the telemetry message with the telemetry header added to the telemetry header to a target controller may be implemented, for example, but not limited to: and when the telemetry message is determined to be forwarded to an external network gateway outlet, directly forwarding the telemetry message added with the telemetry header to a target controller through OpenFlow.
When the telemetry message reaches the gateway outlet of the external network, the telemetry message is required to be directly sent to a telemetry controller through OpenFlow; because the external gateway is the boundary location of the cloud computing network that telemetry can reach, networks other than those that do not belong to telemetry ranges.
In some embodiments, the delay information is obtained by subtracting the timestamp information in the telemetry message from the local timestamp; since the timestamp in the MPLS label is the truncated 13bit and the local timestamp is the full timestamp, if the difference is greater than 8192 milliseconds, only the 13bit time difference after the truncation is taken as the final delay value.
In some embodiments, if the switch does not support MPLS label processing capabilities, the MPLS label is added to the header of the virtual machine internal message based on the virtual switch, stripped before entering the virtual machine.
In summary, the following effects can be achieved in this embodiment:
1. the telemetry method has the advantages that hardware equipment supporting telemetry is not added in the telemetry process of the network disclosed by the invention, and the telemetry method only needs to run on an application program level, so that the telemetry method has good universality.
2. The embodiment of the disclosure is simple and effective, realizes the telemetry function by directly utilizing the MPLS protocol, can greatly reduce the cost and improve the stability.
Corresponding to the method for network telemetry, the invention also provides a device for network telemetry. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment may refer to the above-mentioned method embodiment, and details are not described in detail in the present invention.
Fig. 4 is a schematic structural diagram of a device for network telemetry according to an embodiment of the disclosure, as shown in fig. 4, including:
an adding unit 21, configured to add a telemetry header to a telemetry message based on a target node in a target network in response to a telemetry instruction, where the telemetry header includes target telemetry data, and where the target network includes at least one of the target nodes;
A forwarding unit 22, configured to forward the telemetry message with the telemetry header added to a target controller when it is determined that the lifetime of the telemetry message in the target network reaches a preset lifetime;
and the analysis unit 23 is configured to strip the telemetry header from the telemetry message based on the target controller, and parse the telemetry header obtained by stripping to obtain the target telemetry data.
The network telemetry device provided by the disclosure responds to telemetry instructions, and telemetry headers are added to telemetry messages based on target nodes in a target network, wherein the telemetry headers comprise target telemetry data, and the target network comprises at least one target node; when the survival time of the telemetry message in the target network reaches the preset survival time, forwarding the telemetry message added with the telemetry header to a target controller; and stripping the telemetry header from the telemetry message based on the target controller, and analyzing the stripped telemetry header to obtain the target telemetry data. Compared with the related art, the method has the advantages that the telemetry message header carrying the target telemetry data is added for the telemetry message based on the target node in response to the telemetry command, the telemetry message added with the telemetry header reaching the preset survival time is finally forwarded to the target controller, the target telemetry data is finally obtained through analysis, hardware equipment for supporting telemetry is not added in the network telemetry process, the method only needs to be operated in an application program layer, and good universality is achieved.
Fig. 5 is a schematic structural diagram of another device for network telemetry according to an embodiment of the disclosure, as shown in fig. 5, where the device further includes:
a synchronization unit 24, configured to time synchronize each of the target nodes in the target network;
a judging unit 25, configured to receive the message data sent by the target initiator, and judge whether the message data is a telemetry message according to the DSCP field of the message data;
the adding unit 21 is configured to, when determining that the packet data is the telemetry packet, add the telemetry header to the telemetry packet based on the target node in the target network.
Further, in one possible implementation manner of this embodiment, as shown in fig. 5, the determining unit 25 includes:
a matching module 251, configured to match the DSCP field with an OpenFlow flow table in the target node;
and the determining module 252 is configured to determine that the message data is a telemetry message when it is determined that the value of the DSCP field is the target value corresponding to the telemetry message.
Further, in a possible implementation manner of this embodiment, the adding unit 21 is further configured to:
and adding the telemetry header in a standard format or the telemetry header in an extended format to the telemetry message based on the target node, wherein the telemetry header in the standard format comprises the target node ID and an entry port identifier of the target node, a time stamp and a survival time, and the telemetry header in the extended format comprises a telemetry type and telemetry results corresponding to the telemetry type.
Further, in one possible implementation manner of this embodiment, as shown in fig. 5, the adding unit 21 includes:
an adding module 211, configured to add one or more telemetry headers to the telemetry message based on the target node;
a selecting module 212, configured to select, when the target node adds a plurality of telemetry headers to the telemetry message, each telemetry header of the plurality of telemetry headers to be in a standard format or an extended format, where a value of a stack bottom identifier of a last one of the plurality of telemetry headers is different from a value of a stack bottom identifier of other telemetry headers, where the other telemetry headers are the telemetry headers remaining after the last one of the plurality of telemetry headers is removed.
Further, in one possible implementation manner of this embodiment, as shown in fig. 5, the forwarding unit 22 includes:
a setting module 221, configured to set a lifetime of the telemetry message to a preset value;
a reducing module 222, configured to reduce the preset value by one after the telemetry message is forwarded by one of the target nodes;
and the determining module 223 is configured to determine that the lifetime of the telemetry message in the target network reaches the preset lifetime when the preset value is zero, and forward the telemetry message with the telemetry header added to a target controller.
Further, in a possible implementation manner of this embodiment, as shown in fig. 5, the forwarding unit 22 is further configured to:
and when the telemetry message is determined to be forwarded to an external network gateway outlet, directly forwarding the telemetry message added with the telemetry header to a target controller through OpenFlow.
The foregoing explanation of the method embodiment is also applicable to the apparatus of this embodiment, and the principle is the same, and this embodiment is not limited thereto.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 300 includes a computing unit 301 that can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 302 or a computer program loaded from a storage unit 308 into a RAM (Random Access Memory ) 303. In the RAM 303, various programs and data required for the operation of the device 300 may also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other by a bus 304. An I/O (Input/Output) interface 305 is also connected to bus 304.
Various components in device 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, etc.; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, an optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 301 include, but are not limited to, a CPU (Central Processing Unit ), a GPU (Graphic Processing Units, graphics processing unit), various dedicated AI (Artificial Intelligence ) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor ), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as the method of network telemetry. For example, in some embodiments, the method of network telemetry may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 300 via the ROM 302 and/or the communication unit 309. When the computer program is loaded into RAM 303 and executed by computing unit 301, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the aforementioned method of network telemetry in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit System, FPGA (Field Programmable Gate Array ), ASIC (Application-Specific Integrated Circuit, application-specific integrated circuit), ASSP (Application Specific Standard Product, special-purpose standard product), SOC (System On Chip ), CPLD (Complex Programmable Logic Device, complex programmable logic device), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory, erasable programmable read-Only Memory) or flash Memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display ) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network ), WAN (Wide Area Network, wide area network), internet and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be noted that, artificial intelligence is a subject of studying a certain thought process and intelligent behavior (such as learning, reasoning, thinking, planning, etc.) of a computer to simulate a person, and has a technology at both hardware and software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (8)

1. A method of network telemetry, comprising:
adding a telemetry header to a telemetry message based on a target node within a target network in response to telemetry instructions, the telemetry header including target telemetry data, the target network including at least one of the target nodes;
when the survival time of the telemetry message in the target network reaches the preset survival time, forwarding the telemetry message added with the telemetry header to a target controller;
stripping the telemetry header from the telemetry message based on the target controller, and analyzing the stripped telemetry header to obtain the target telemetry data;
the adding a telemetry header to a telemetry message based on a target node within a target network includes:
adding a telemetry header in a standard format or a telemetry header in an extended format to the telemetry message based on the target node, wherein the telemetry header in the standard format comprises the target node ID and an entry port identifier of the target node, a time stamp and a survival time, and the telemetry header in the extended format comprises a telemetry type and telemetry results corresponding to the telemetry type;
The adding a telemetry header to a telemetry message based on a target node within a target network includes:
adding one or more telemetry headers to the telemetry message based on the target node;
when the target node adds a plurality of telemetry headers to the telemetry message, each telemetry header in the plurality of telemetry headers is selected to be in a standard format or an extended format, wherein the value of a stack bottom identifier of the last telemetry header in the plurality of telemetry headers is different from the values of stack bottom identifiers of other telemetry headers, and the other telemetry headers are the remaining telemetry headers in the plurality of telemetry headers except the last telemetry header.
2. The method of claim 1, wherein after responding to telemetry instructions, the method further comprises:
performing time synchronization on each target node in the target network;
receiving message data sent by a target initiating terminal, and judging whether the message data is a telemetry message or not according to a DSCP field of the message data;
and when the message data is determined to be the telemetry message, adding the telemetry header to the telemetry message based on the target node in the target network.
3. The method of claim 2, wherein determining whether the message data is a telemetry message based on the DSCP field of the message data comprises:
matching the DSCP field with an OpenFlow flow table in the target node;
and when the value of the DSCP field is determined to be the target value corresponding to the telemetry message, determining that the message data is the telemetry message.
4. The method of claim 1, wherein forwarding the telemetry message with the telemetry header added thereto to a target controller upon determining that a time to live of the telemetry message within the target network reaches a preset time to live comprises:
setting the survival time of the telemetry message as a preset value;
subtracting one from the preset value after the telemetry message is forwarded by one target node;
and when the preset value is zero, determining that the survival time of the telemetry message in the target network reaches the preset survival time, and forwarding the telemetry message added with the telemetry header to a target controller.
5. The method of claim 1, wherein forwarding the telemetry message with the telemetry header added thereto to a target controller comprises:
And when the telemetry message is determined to be forwarded to an external network gateway outlet, directly forwarding the telemetry message added with the telemetry header to a target controller through OpenFlow.
6. An apparatus for network telemetry, comprising:
an adding unit, configured to add a telemetry header to a telemetry message based on a target node within a target network in response to a telemetry instruction, where the telemetry header includes target telemetry data, and where the target network includes at least one of the target nodes;
a forwarding unit, configured to forward, when it is determined that a lifetime of the telemetry message in the target network reaches a preset lifetime, the telemetry message added with the telemetry header to a target controller;
the analysis unit is used for stripping the telemetry header from the telemetry message based on the target controller and analyzing the telemetry header obtained by stripping to obtain the target telemetry data;
the adding unit is further configured to:
adding a telemetry header in a standard format or a telemetry header in an extended format to the telemetry message based on the target node, wherein the telemetry header in the standard format comprises the target node ID and an entry port identifier of the target node, a time stamp and a survival time, and the telemetry header in the extended format comprises a telemetry type and telemetry results corresponding to the telemetry type;
The adding unit includes:
an adding module, configured to add one or more telemetry headers to the telemetry message based on the target node;
a selecting module, configured to select, when the target node adds a plurality of telemetry headers to the telemetry message, each telemetry header of the plurality of telemetry headers to be in a standard format or an extended format, where a value of a stack bottom identifier of a last one of the plurality of telemetry headers is different from a value of a stack bottom identifier of other telemetry headers, and the other telemetry headers are telemetry headers remaining after the last one of the plurality of telemetry headers is removed.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
8. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
CN202311185300.7A 2023-09-14 2023-09-14 Network telemetry method and device, electronic equipment and storage medium Active CN116938777B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311185300.7A CN116938777B (en) 2023-09-14 2023-09-14 Network telemetry method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311185300.7A CN116938777B (en) 2023-09-14 2023-09-14 Network telemetry method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116938777A CN116938777A (en) 2023-10-24
CN116938777B true CN116938777B (en) 2023-11-21

Family

ID=88379304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311185300.7A Active CN116938777B (en) 2023-09-14 2023-09-14 Network telemetry method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116938777B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117176839B (en) * 2023-10-26 2024-02-09 苏州元脑智能科技有限公司 Remote measurement message transmission method, device, communication equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491661A (en) * 2020-12-11 2021-03-12 苏州浪潮智能科技有限公司 Time delay detection method, device, equipment and medium for data center switch
CN113439420A (en) * 2019-03-08 2021-09-24 华为技术有限公司 MPLS extension header in hybrid networks
CN113676376A (en) * 2021-08-20 2021-11-19 北京交通大学 In-band network telemetering method based on clustering
CN113783745A (en) * 2020-06-10 2021-12-10 中国电信股份有限公司 Network telemetry information acquisition method and system and BIER domain entry node
WO2023039375A1 (en) * 2021-09-10 2023-03-16 Cisco Technology, Inc. Multiprotocol label switching (mpls) data plane header extensions
CN116545936A (en) * 2023-07-05 2023-08-04 苏州浪潮智能科技有限公司 Congestion control method, system, device, communication equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11716268B2 (en) * 2020-12-01 2023-08-01 Cisco Technology, Inc. Telemetry data optimization for path tracing and delay measurement
WO2023069394A1 (en) * 2021-10-18 2023-04-27 Cisco Technology, Inc. Collection of segment routing ipv6 (srv6) network telemetry information

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113439420A (en) * 2019-03-08 2021-09-24 华为技术有限公司 MPLS extension header in hybrid networks
CN113783745A (en) * 2020-06-10 2021-12-10 中国电信股份有限公司 Network telemetry information acquisition method and system and BIER domain entry node
CN112491661A (en) * 2020-12-11 2021-03-12 苏州浪潮智能科技有限公司 Time delay detection method, device, equipment and medium for data center switch
CN113676376A (en) * 2021-08-20 2021-11-19 北京交通大学 In-band network telemetering method based on clustering
WO2023039375A1 (en) * 2021-09-10 2023-03-16 Cisco Technology, Inc. Multiprotocol label switching (mpls) data plane header extensions
CN116545936A (en) * 2023-07-05 2023-08-04 苏州浪潮智能科技有限公司 Congestion control method, system, device, communication equipment and storage medium

Also Published As

Publication number Publication date
CN116938777A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
US11876883B2 (en) Packet processing method, network node, and system
US20220086073A1 (en) Data packet detection method, device, and system
CN116938777B (en) Network telemetry method and device, electronic equipment and storage medium
CN105024985A (en) Message processing method and apparatus
US10616106B2 (en) Establishing virtual network routes in a computer network
CN112887217B (en) Control data packet sending method, model training method, device and system
CN109756521B (en) NSH message processing method, device and system
US20100094994A1 (en) Network structure information acquiring method and device
EP4044529A1 (en) Detnet data packet processing method and apparatus
CN114500633B (en) Data forwarding method, related device, program product and data transmission system
US10250477B2 (en) Method and controller for announcing bandwidth of cluster system
CN113132479A (en) Traffic switching method, traffic switching apparatus, traffic model generating method, traffic model generating apparatus, traffic model generating
CN108989311A (en) Generate the method and apparatus of input parameter
CN115277504A (en) Network traffic monitoring method, device and system
CN107409088B (en) Data packet forwarding method and network equipment
US11362928B2 (en) Method, electronic device and computer program product for generating network topology
CN115484210B (en) Congestion window determining method, device and system
CN116915709B (en) Load balancing method and device, electronic equipment and storage medium
CN113949651B (en) Network transmission method, device, equipment and storage medium
CN114827055B (en) Data mirroring method and device, electronic equipment and switch cluster
CN114567687B (en) Message forwarding method, device, equipment, medium and program product
CN116647497A (en) Network path generation method and device, electronic equipment and storage medium
CN116599838A (en) Substation equipment information configuration management method, device, equipment and storage medium
CN116599839A (en) Cloud gateway system, data processing method, device and storage medium
CN116684313A (en) Deterministic service transmission method, deterministic service transmission device, controller and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant