CN114666681B - A stateful in-band network telemetry method and system - Google Patents
A stateful in-band network telemetry method and system Download PDFInfo
- Publication number
- CN114666681B CN114666681B CN202210277734.9A CN202210277734A CN114666681B CN 114666681 B CN114666681 B CN 114666681B CN 202210277734 A CN202210277734 A CN 202210277734A CN 114666681 B CN114666681 B CN 114666681B
- Authority
- CN
- China
- Prior art keywords
- int
- valid header
- header
- metadata
- field
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q9/00—Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/12—Network monitoring probes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing 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
本发明公开了一种有状态的带内网络遥测方法及系统(Stateful In‑band Network Telemetry,SF‑INT),包括:定义了SF‑INT的指令头,其中包含了SF‑INT特有的新字段;网络节点使用自身寄存器分布式地存储INT状态信息,并结合到达的INT报头信息进行处理和转发,其正常转发的元数据堆栈大小是不变的;网络监控系统(NMS)计算所收到的多个INT报头,可获得完整的网络遥测结果;网络节点在紧急情况下可即时无缝地切换到现行INT协议,NMS能正确识别此情况并做相应计算。与无状态的现行INT协议相比,本发明的有状态INT既能满足网络遥测需求,又通过大幅度减少业务包所携带的INT元数据来节约互联网带宽。
The present invention discloses a stateful in-band network telemetry method and system (Stateful In-band Network Telemetry, SF-INT), including: defining an instruction header of SF-INT, which includes a new field unique to SF-INT; network nodes use their own registers to store INT state information in a distributed manner, and process and forward it in combination with the arrived INT header information, and the size of the metadata stack of its normal forwarding is unchanged; a network monitoring system (NMS) calculates multiple INT headers received to obtain a complete network telemetry result; the network node can instantly and seamlessly switch to the current INT protocol in an emergency, and the NMS can correctly identify this situation and make corresponding calculations. Compared with the stateless current INT protocol, the stateful INT of the present invention can not only meet the network telemetry requirements, but also save Internet bandwidth by significantly reducing the INT metadata carried by the service packet.
Description
技术领域Technical Field
本发明涉及网络通信技术领域,具体涉及一种有状态(Stateful)的带内网络遥测(Inband Network Telemetry,INT)方法及系统,简称SF-INT。The present invention relates to the field of network communication technology, and in particular to a stateful in-band network telemetry (INT) method and system, referred to as SF-INT.
背景技术Background technique
带内网络遥测(In-band Network Telemetry,INT)是一种新型网络测量技术。传统的网络测量方法大多关注终端与终端之间的网络性能,其测量结果常常基于丢包和延时信息;而INT则关注各网络节点的实时网络状态。INT现行协议在业务报文的报头中嵌入包含遥测指令的INT指令头,各网络节点根据遥测指令把对应的网络状态信息(也就是元数据)添加到INT报头中,使网络测量不再面对“黑盒子”。网络监控系统(Network MonitoringSystem,NMS)收到INT报头后,可以动态地感知网络质量的细节,提高分析能力。In-band Network Telemetry (INT) is a new network measurement technology. Traditional network measurement methods mostly focus on the network performance between terminals, and their measurement results are often based on packet loss and delay information; INT, on the other hand, focuses on the real-time network status of each network node. The current INT protocol embeds an INT command header containing telemetry instructions in the header of the service message. Each network node adds the corresponding network status information (that is, metadata) to the INT header according to the telemetry instructions, so that network measurement is no longer a "black box". After receiving the INT header, the Network Monitoring System (NMS) can dynamically perceive the details of the network quality and improve its analysis capabilities.
INT虽然能提供遥测路径上的各网络设备的状态信息,但测量开销过大的问题亟待解决。在INT的普通工作模式下,数据包每经过一个网络节点,该节点都会添加上自己的元数据,因此INT报头所占用的位数会随着数据包路经的节点个数的增加而增加,INT报头开销过大会导致带宽利用率的严重下降。另外由于遥测路径是动态变化的,难以估测和预留出INT报头需要的空间,这会使得部分节点的网络状态信息因为空间不足而被丢弃,或者形成大量数据分片以致影响网络性能。另一种“明信片”工作模式只在业务数据包的头部插入含有遥测指令的INT指令头,每个网络节点执行数据包报头中的遥测指令并把表示自身当前网络状态的元数据以独立的数据包形式发送出去。这虽然固定了INT报头的开销,但所引发的遥测数据包的数量会是正常业务包的数倍,这会严重影响网络测量的准确性。另外网络节点的处理负担也大大增加了。Although INT can provide status information of each network device on the telemetry path, the problem of excessive measurement overhead needs to be solved urgently. In the normal working mode of INT, each time a data packet passes through a network node, the node will add its own metadata. Therefore, the number of bits occupied by the INT header will increase with the increase in the number of nodes passed by the data packet. Excessive INT header overhead will lead to a serious decrease in bandwidth utilization. In addition, since the telemetry path is dynamically changing, it is difficult to estimate and reserve the space required for the INT header, which will cause the network status information of some nodes to be discarded due to insufficient space, or form a large number of data fragments, thereby affecting network performance. Another "postcard" working mode only inserts an INT instruction header containing telemetry instructions into the header of the business data packet. Each network node executes the telemetry instructions in the data packet header and sends out the metadata representing its current network status in the form of an independent data packet. Although this fixes the overhead of the INT header, the number of telemetry data packets caused will be several times that of normal business packets, which will seriously affect the accuracy of network measurement. In addition, the processing burden of network nodes is also greatly increased.
为了减小INT报头的开销,有些研究针对需要收集的网络状态的特性对INT报头进行压缩。例如,对于数据包输出端口上的缓冲区占用比,不再记录每个节点的占用比而只保留最大值;对于节点上的驻留处理时间,不再记录每个节点的时间,只记录累计时间总和或者保留单节点上的最长时间。可惜这样的压缩处理牺牲了节点的状态细节,失去了网络遥测的全局可视化和通用性。还有些研究工作采用抽样策略(基于概率预测等)只让一部分业务数据包携带INT元数据,以减小INT报头的平均开销。但这不能彻底解决INT开销过大的问题,携带INT元数据的数据包的有效载荷仍然难以估计。In order to reduce the overhead of the INT header, some studies compress the INT header according to the characteristics of the network status that need to be collected. For example, for the buffer occupancy ratio on the packet output port, the occupancy ratio of each node is no longer recorded and only the maximum value is retained; for the resident processing time on the node, the time of each node is no longer recorded, only the cumulative time sum is recorded or the longest time on a single node is retained. Unfortunately, such compression processing sacrifices the state details of the node and loses the global visualization and versatility of network telemetry. Some research works also use sampling strategies (based on probability prediction, etc.) to only allow a part of the business data packets to carry INT metadata to reduce the average overhead of the INT header. However, this cannot completely solve the problem of excessive INT overhead, and the payload of the data packet carrying INT metadata is still difficult to estimate.
如今网络物理接口的带宽不断提升,达到10G、100G乃至更高,数据包到达的间隔时间变得很短。再加上INT的随包检测特性,高速持续产生的INT报告会在NMS形成数据湖,而且大量INT报告中携带的网络状态是重复的或者差异极小,造成信息冗余。如何处理海量的INT报头,高效地记录网络状态变化,都是INT面对的新挑战。Nowadays, the bandwidth of network physical interfaces is constantly increasing, reaching 10G, 100G and even higher, and the interval between the arrival of data packets has become very short. Coupled with the packet detection feature of INT, the high-speed and continuous generation of INT reports will form a data lake in the NMS, and the network status carried in a large number of INT reports is repeated or has very little difference, resulting in information redundancy. How to handle massive INT headers and efficiently record changes in network status are new challenges facing INT.
发明内容Summary of the invention
本发明提供了一种有状态的带内网络遥测方法及系统,基于网络节点的状态寄存器和状态信息的SF-INT转发规则,高效地完成网络遥测任务;在网络遥测的标准模式中,INT报头长度保持为设定常数而且不会产生额外数据包;在紧急模式下,可与现行INT实现无缝切换;状态寄存的“抽样”属性使NMS避免保存间隔极短和信息冗余的INT报告,较好地解决海量数据问题。The present invention provides a stateful in-band network telemetry method and system, which efficiently completes the network telemetry task based on the state register of the network node and the SF-INT forwarding rule of the state information; in the standard mode of the network telemetry, the INT header length is kept as a set constant and no additional data packet is generated; in the emergency mode, seamless switching with the current INT can be achieved; the "sampling" attribute of the state register enables the NMS to avoid saving INT reports with extremely short intervals and redundant information, and better solves the problem of massive data.
本发明采用如下技术方案:The present invention adopts the following technical solution:
一方面,一种有状态的带内网络遥测方法,包括:In one aspect, a stateful in-band network telemetry method includes:
INT源节点处理步骤:INT源节点接收需要执行网络遥测的数据包,进行解析后插入INT报头,重新封装后发送至下一节点;所述INT报头包括INT有效头部;所述INT有效头部包括INT指令头和元数据堆栈;所述INT指令头包括C字段、U字段、ST字段和packetID字段;所述C字段设置为是否采用SF-INT;所述U字段设置为紧急模式或标准模式;所述ST字段设置为X,用于向后续INT转发节点表明本INT报头中携带了需要进行异或操作的元数据段;所述packetID字段设置为数据包ID;所述元数据堆栈用于插入INT源节点自身的元数据段;INT source node processing steps: the INT source node receives the data packet that needs to perform network telemetry, inserts the INT header after parsing, and sends it to the next node after repackaging; the INT header includes the INT valid header; the INT valid header includes the INT instruction header and the metadata stack; the INT instruction header includes the C field, the U field, the ST field and the packetID field; the C field is set to whether to use SF-INT; the U field is set to emergency mode or standard mode; the ST field is set to X, which is used to indicate to the subsequent INT forwarding node that the INT header carries the metadata segment that needs to be XORed; the packetID field is set to the data packet ID; the metadata stack is used to insert the metadata segment of the INT source node itself;
INT转发节点处理步骤:当所述U字段设置为标准模式时,INT转发节点收到来自于前一节点的数据包后,解析出到达的数据包中携带的有效INT头部;将到达的INT有效头部与寄存器中的INT有效头部进行比对,基于SF-INT转发规则,获取待发送的INT有效头部和待存储于寄存器的INT有效头部;待发送的INT有效头部封装后发送至下一节点;待存储的数据包存储于寄存器;INT forwarding node processing steps: when the U field is set to the standard mode, after the INT forwarding node receives the data packet from the previous node, it parses the valid INT header carried in the arrived data packet; compares the arrived INT valid header with the INT valid header in the register, and obtains the INT valid header to be sent and the INT valid header to be stored in the register based on the SF-INT forwarding rule; the INT valid header to be sent is encapsulated and sent to the next node; the data packet to be stored is stored in the register;
INT末端节点处理步骤:INT末端节点收到前一节点的数据包后,解析出数据包中的INT报头,直接在元数据堆栈中添加自身的元数据段,生成INT报告,并把INT报告封装在独立的报文中发送给NMS;INT end node processing steps: After receiving the data packet from the previous node, the INT end node parses the INT header in the data packet, directly adds its own metadata segment to the metadata stack, generates an INT report, and encapsulates the INT report in an independent message and sends it to the NMS;
NMS处理步骤:NMS收到SF-INT的INT报告后,结合前后收到的多个相同packetID的INT报告进行处理,获得各节点的裸元数据段。NMS processing steps: After receiving the INT report from SF-INT, NMS combines the multiple INT reports with the same packetID received before and after to obtain the raw metadata segment of each node.
优选的,所述INT转发节点处理步骤,还包括:Preferably, the INT forwarding node processing step further includes:
当所述U字段设置为紧急模式,或者,节点检测到网络事件或收到相关网络事件通告时,直接切换到紧急模式,实现即时无缝切换;判断寄存器中是否有存储INT有效头部,如果有,把寄存器中存储的INT有效头部封装成INT报告,以独立的数据包发送给NMS;此后,该节点不再利用寄存器存储历史网络状态信息,而是直接在到达的数据包携带的元数据堆栈中,添加自身的元数据段。When the U field is set to emergency mode, or when the node detects a network event or receives a related network event notification, it directly switches to emergency mode to achieve instant seamless switching; it is determined whether there is an INT valid header stored in the register, and if so, the INT valid header stored in the register is encapsulated into an INT report and sent to the NMS in an independent data packet; thereafter, the node no longer uses the register to store historical network status information, but directly adds its own metadata segment to the metadata stack carried by the arriving data packet.
优选的,所述INT源节点处理步骤之前,还包括遥测控制步骤,具体如下:Preferably, before the INT source node processing step, a telemetry control step is also included, which is as follows:
基于配置数据,终端APP或SDN北向APP发送消息给INT源节点;所述消息包括需要进行遥测的数据包、遥测指令、遥测节点的最大数目和是否启用SF-INT。Based on the configuration data, the terminal APP or the SDN northbound APP sends a message to the INT source node; the message includes the data packet that needs to be telemetered, the telemetry instruction, the maximum number of telemetry nodes, and whether to enable SF-INT.
优选的,所述方法还包括:Preferably, the method further comprises:
当INT源节点、INT转发节点或INT末端节点在元数据堆栈插入或异或自身的元数据段时,将INT指令头中的“RemainingHop Cnt”字段中的值减1。When an INT source node, an INT forwarding node, or an INT end node inserts or XORs its own metadata segment in the metadata stack, the value in the "RemainingHop Cnt" field in the INT instruction header is reduced by 1.
优选的,所述ST字段的值还能够设置为H、L和E;H表示高优先级;L表示低优先级;E表示元数据堆栈中不包含元数据段。Preferably, the value of the ST field can also be set to H, L and E; H indicates high priority; L indicates low priority; E indicates that the metadata stack does not contain the metadata segment.
优选的,将到达的INT有效头部与寄存器中的INT有效头部进行比对,根据SF-INT转发规则,获取待发送的INT有效头部和待存储于寄存器的INT有效头部,具体规则包括:Preferably, the arriving INT valid header is compared with the INT valid header in the register, and the INT valid header to be sent and the INT valid header to be stored in the register are obtained according to the SF-INT forwarding rule. The specific rules include:
如果到达的INT有效头部的ST字段为X,寄存器中的INT有效头部的ST字段为H,则待发送的INT有效头部设置为寄存器中的INT有效头部,将待存储于寄存器的INT有效头部的元数据段设置为到达的INT有效头部的元数据段,并将待存储于寄存器的INT有效头部的ST字段设置为L;If the ST field of the arriving INT valid header is X and the ST field of the INT valid header in the register is H, the INT valid header to be sent is set to the INT valid header in the register, the metadata segment of the INT valid header to be stored in the register is set to the metadata segment of the arriving INT valid header, and the ST field of the INT valid header to be stored in the register is set to L;
如果到达的INT有效头部的ST字段为X,寄存器中的INT有效头部的ST字段为L,则待发送的INT有效头部的元数据段设置为到达的INT有效头部的元数据段与当前节点的元数据段进行异或后生成的数据段,对应的ST字段设置为X;将待存储于寄存器的INT有效头部的元数据段设置为到达的INT有效头部的元数据段,对应的ST字段设置为H;If the ST field of the INT valid header that arrives is X, and the ST field of the INT valid header in the register is L, the metadata segment of the INT valid header to be sent is set to the data segment generated by XORing the metadata segment of the INT valid header that arrives and the metadata segment of the current node, and the corresponding ST field is set to X; the metadata segment of the INT valid header to be stored in the register is set to the metadata segment of the INT valid header that arrives, and the corresponding ST field is set to H;
如果到达的INT有效头部的ST字段为X,寄存器中没有存储INT有效头部,则待发送的INT有效头部的元数据段设置为到达的INT有效头部的元数据段与当前节点的元数据段进行异或后生成的数据段,对应的ST字段设置为X;将待存储于寄存器的INT有效头部的元数据段设置为到达的INT有效头部的元数据段,对应的ST字段设置为H;If the ST field of the arriving INT valid header is X, and there is no INT valid header stored in the register, the metadata segment of the INT valid header to be sent is set to the data segment generated by XORing the metadata segment of the arriving INT valid header and the metadata segment of the current node, and the corresponding ST field is set to X; the metadata segment of the INT valid header to be stored in the register is set to the metadata segment of the arriving INT valid header, and the corresponding ST field is set to H;
如果到达的INT有效头部的ST字段为H,寄存器中的INT有效头部的ST字段为H,则待发送的INT有效头部设置为寄存器中的INT有效头部;将待存储于寄存器的INT有效头部设置为到达的INT有效头部;If the ST field of the arriving INT valid header is H and the ST field of the INT valid header in the register is H, the INT valid header to be sent is set to the INT valid header in the register; the INT valid header to be stored in the register is set to the arriving INT valid header;
如果到达的INT有效头部的ST字段为H,寄存器中的INT有效头部的ST字段为L,且到达的INT有效头部和寄存器中的INT有效头部包括相同的数据包ID,则待发送的INT有效头部设置为寄存器中的INT有效头部;将待存储于寄存器中的INT有效头部的元数据段设置为到达的INT有效头部的元数据段,并将待存储到寄存器中的INT有效头部的ST字段设置为L;If the ST field of the arriving INT valid header is H, the ST field of the INT valid header in the register is L, and the arriving INT valid header and the INT valid header in the register include the same data packet ID, the INT valid header to be sent is set to the INT valid header in the register; the metadata segment of the INT valid header to be stored in the register is set to the metadata segment of the arriving INT valid header, and the ST field of the INT valid header to be stored in the register is set to L;
如果到达的INT有效头部的ST字段为H,寄存器中的INT有效头部的ST字段为L,且到达的INT有效头部和寄存器中的INT有效头部包括不同的数据包ID,则待发送的INT有效头部设置为到达的INT有效头部;而寄存器中的INT有效头部不变;If the ST field of the arriving INT valid header is H, the ST field of the INT valid header in the register is L, and the arriving INT valid header and the INT valid header in the register include different packet IDs, the INT valid header to be sent is set to the arriving INT valid header; and the INT valid header in the register remains unchanged;
如果到达的INT有效头部的ST字段为H,寄存器中没有存储INT有效头部,则待发送的INT有效头部设置为到达的INT有效头部,寄存器中依旧为空;If the ST field of the arriving INT valid header is H and there is no INT valid header stored in the register, the INT valid header to be sent is set to the arriving INT valid header and the register remains empty;
如果到达的INT有效头部的ST字段为L,寄存器中的INT有效头部的ST字段为H,则待发送的INT有效头部设置为寄存器中的INT有效头部;将待存储于寄存器的INT有效头部设置为到达的INT有效头部;If the ST field of the arriving INT valid header is L and the ST field of the INT valid header in the register is H, the INT valid header to be sent is set to the INT valid header in the register; the INT valid header to be stored in the register is set to the arriving INT valid header;
如果到达的INT有效头部的ST字段为L,寄存器中的INT有效头部的ST字段为L,则待发送的INT有效头部设置为寄存器中的INT有效头部;将待存储于寄存器的INT有效头部设置为到达的INT有效头部;If the ST field of the arriving INT valid header is L and the ST field of the INT valid header in the register is L, the INT valid header to be sent is set to the INT valid header in the register; the INT valid header to be stored in the register is set to the arriving INT valid header;
如果到达的INT有效头部的ST字段为L,寄存器中没有存储INT有效头部,则待发送的INT有效头部设置为到达的INT有效头部,寄存器中依旧为空。If the ST field of the arriving INT valid header is L and the register does not store the INT valid header, the INT valid header to be sent is set to the arriving INT valid header, and the register remains empty.
优选的,所述NMS处理步骤,具体包括:Preferably, the NMS processing step specifically includes:
如果当前数据包ID等于255时,判断元数据堆栈的底部元数据段中包含的节点个数是否大于1,如果大于1,丢弃底部元数据段,读取非底部裸元数据段,并整理所有的裸元数据段,结束当前数据包ID的处理;否则,读取底部裸元数据段和非底部裸元数据段,并整理所有的裸元数据段,结束当前数据包ID的处理;If the current data packet ID is equal to 255, determine whether the number of nodes contained in the bottom metadata segment of the metadata stack is greater than 1. If it is greater than 1, discard the bottom metadata segment, read the non-bottom bare metadata segment, and sort out all the bare metadata segments, and end the processing of the current data packet ID; otherwise, read the bottom bare metadata segment and the non-bottom bare metadata segment, and sort out all the bare metadata segments, and end the processing of the current data packet ID;
如果当前数据包ID不等于255,且数据包中的ST字段等于X时,判断元数据堆栈的底部元数据段中包含的节点个数是否大于1,如果大于1,读取底部异或元数据段,与来自其他数据包的同packetID的元数据段进行异或还原,再读取非底部裸元数据段,并整理所有同packetID的裸元数据段;否则,读取底部裸元数据段和非底部裸元数据段,并整理所有同packetID的裸元数据段,结束当前数据包ID的处理;If the current data packet ID is not equal to 255, and the ST field in the data packet is equal to X, determine whether the number of nodes contained in the bottom metadata segment of the metadata stack is greater than 1. If it is greater than 1, read the bottom XOR metadata segment, perform XOR restoration with the metadata segments with the same packetID from other data packets, then read the non-bottom bare metadata segment, and sort out all the bare metadata segments with the same packetID; otherwise, read the bottom bare metadata segment and the non-bottom bare metadata segment, and sort out all the bare metadata segments with the same packetID, and end the processing of the current data packet ID;
如果当前数据包ID不等于255,且数据包中的ST字段不等于X时,判断元数据堆栈的底部元数据段中包含的节点个数是否大于1,如果大于1,读取底部异或元数据段,与来自其他数据包的同packetID的元数据段进行异或还原,并整理所有同packetID的裸元数据段,结束当前数据包ID的处理;否则,读取底部裸元数据段,并整理所有同packetID的裸元数据段,结束当前数据包ID的处理;If the current data packet ID is not equal to 255, and the ST field in the data packet is not equal to X, determine whether the number of nodes contained in the bottom metadata segment of the metadata stack is greater than 1. If it is greater than 1, read the bottom XOR metadata segment, perform XOR restoration with the metadata segments with the same packetID from other data packets, and sort out all the bare metadata segments with the same packetID, and end the processing of the current data packet ID; otherwise, read the bottom bare metadata segment, sort out all the bare metadata segments with the same packetID, and end the processing of the current data packet ID;
如果当前数据包ID不等于255,且数据包中的ST字段不等于X时,处理还包括:读取非底部裸元数据段,并整理所有的裸元数据段,结束当前数据包ID的处理。If the current data packet ID is not equal to 255, and the ST field in the data packet is not equal to X, the processing also includes: reading non-bottom bare data segments, and arranging all bare data segments, and ending the processing of the current data packet ID.
优选的,元数据堆栈的底部元数据段中包含的节点个数的获取方法如下:Preferably, the method for obtaining the number of nodes contained in the bottom metadata segment of the metadata stack is as follows:
N3=N1-(N2-1)=N1+1-N2N3=N1-(N2-1)=N1+1-N2
其中,N1表示元数据堆栈中包含了N1个节点的网络状态信息;N1=MAX-R,MAX是遥测允许的最大节点数目,R表示INT指令头的“RemainingHop Cnt”字段中的值;N2表示元数据堆栈中包含的元数据段的数量,N2=(L2-12)/L0,其中L0表示元数据段的长度,L2是INT有效头部的长度。Among them, N1 indicates that the metadata stack contains the network status information of N1 nodes; N1=MAX-R, MAX is the maximum number of nodes allowed by telemetry, and R represents the value in the "RemainingHop Cnt" field of the INT instruction header; N2 represents the number of metadata segments contained in the metadata stack, N2=(L2-12)/L0, where L0 represents the length of the metadata segment, and L2 is the length of the INT effective header.
优选的,所述NMS处理步骤,还包括:Preferably, the NMS processing step further includes:
如果所述U字段为紧急模式,则执行紧急报文的相关处理。If the U field is in emergency mode, relevant processing of the emergency message is performed.
另一方面,一种有状态的带内网络遥测系统,包括:In another aspect, a stateful in-band network telemetry system includes:
遥测控制模块,用于将配置数据发送消息给INT源节点;所述配置数据包括要进行遥测的数据包、遥测指令、遥测节点的最大数目和是否启用SF-INT;A telemetry control module, used to send configuration data to the INT source node; the configuration data includes a data packet to be telemetered, a telemetry instruction, a maximum number of telemetry nodes, and whether to enable SF-INT;
遥测数据包处理模块,包括源节点处理子模块、转发节点处理子模块和末端节点处理子模块;A telemetry data packet processing module, including a source node processing submodule, a forwarding node processing submodule and an end node processing submodule;
所述源节点处理子模块,用于接收需要执行网络遥测的数据包,进行解析后插入INT报头,重新封装后发送至下一节点;所述INT报头包括INT有效头部,所述INT有效头部包括INT指令头和元数据堆栈;所述INT指令头包括C字段、U字段、ST字段和packetID字段;所述C字段设置为是否采用SF-INT;所述U字段设置为紧急模式或标准模式;所述ST字段设置为X,用于向后续INT转发节点表明本INT报头中携带了需要进行异或操作的元数据段;所述packetID字段设置为数据包ID;所述元数据堆栈用于插入INT源节点自身的元数据段;The source node processing submodule is used to receive data packets that need to perform network telemetry, insert an INT header after parsing, and re-encapsulate and send it to the next node; the INT header includes an INT valid header, and the INT valid header includes an INT instruction header and a metadata stack; the INT instruction header includes a C field, a U field, an ST field and a packetID field; the C field is set to indicate whether SF-INT is adopted; the U field is set to emergency mode or standard mode; the ST field is set to X, which is used to indicate to subsequent INT forwarding nodes that the INT header carries a metadata segment that needs to be XORed; the packetID field is set to the data packet ID; the metadata stack is used to insert the metadata segment of the INT source node itself;
所述转发节点处理子模块,用于当所述U字段设置为采用标准模式时,INT转发节点收到来自于前一节点的数据包后,解析出到达的数据包中携带的有效INT头部;将到达的INT有效头部与寄存器中的INT有效头部进行比对,基于SF-INT转发规则,获取待发送的INT有效头部和待存储于寄存器的INT有效头部;待发送的INT有效头部封装后发送至下一节点;待存储的数据包存储于寄存器;The forwarding node processing submodule is used for, when the U field is set to adopt the standard mode, after the INT forwarding node receives the data packet from the previous node, parsing out the valid INT header carried in the arrived data packet; comparing the arrived INT valid header with the INT valid header in the register, and obtaining the INT valid header to be sent and the INT valid header to be stored in the register based on the SF-INT forwarding rule; encapsulating the INT valid header to be sent and sending it to the next node; and storing the data packet to be stored in the register;
所述末端节点处理子模块,用于收到前一节点的数据包后,解析出数据包中的INT报头,直接在元数据堆栈中添加自身的元数据段,生成INT报告,并把INT报告封装在独立的报文中发送给NMS;The end node processing submodule is used to parse the INT header in the data packet after receiving the data packet from the previous node, directly add its own metadata segment in the metadata stack, generate an INT report, and encapsulate the INT report in an independent message and send it to the NMS;
NMS收集和计算模块,用于在收到SF-INT的INT报告后,结合前后收到的多个相同packetID的INT报告进行处理,获得各节点的裸元数据段。The NMS collection and calculation module is used to process the INT report received from SF-INT in combination with multiple INT reports with the same packetID received before and after to obtain the raw metadata segment of each node.
本发明的有益效果如下:The beneficial effects of the present invention are as follows:
(1)现行INT中,INT报头占用的空间随着遥测路径上节点数而增加;而本发明SF-INT不管历经多少个节点,INT报头的开销都是固定的,因此SF-INT对遥测路径上的节点数不敏感,可以在更大的范围内实施遥测;(1) In the existing INT, the space occupied by the INT header increases with the number of nodes on the telemetry path; however, in the SF-INT of the present invention, the overhead of the INT header is fixed regardless of how many nodes it passes through. Therefore, SF-INT is not sensitive to the number of nodes on the telemetry path and can implement telemetry in a larger range;
(2)现行INT部署后,INT报头的大量开销将不可避免地减少有效业务载荷;而本发明SF-INT报头中的元数据堆栈通常只有一个元数据段,这使得INT报头的开销急剧下降,带宽的有效利用率大幅提高;(2) After the current INT deployment, the large amount of INT header overhead will inevitably reduce the effective service load; however, the metadata stack in the SF-INT header of the present invention usually has only one metadata segment, which makes the INT header overhead drop sharply and greatly improves the effective utilization of bandwidth;
(3)本发明的SF-INT引入了很多改进,包括利用节点寄存器进行分布式存储来实现有状态的INT,改进NMS的计算能力,还能完全兼容现行INT的工作模式,并实现即时无缝切换;(3) The SF-INT of the present invention introduces many improvements, including using node registers for distributed storage to implement stateful INT, improving the computing power of NMS, and being fully compatible with the current INT working mode and achieving instant seamless switching;
(4)现有的INT对丢包缺乏足够的处理能力,考虑遥测路径为R1->R2->R3->R4->R5->R6的情形,当在R3出现丢包时,在现有的INT下的NMS无法得知出现了丢包(因为携带有R1、R2网络状态信息的业务数据包已经丢失了,无法到达NMS);但在本发明SF-INT下,尽管在R3出现了丢包,但是历史状态信息还被前面的节点所存储,因此NMS依旧有机会获取丢包前的转发节点(R1和R2)的网络状态信息;(4) The existing INT lacks sufficient processing capability for packet loss. Consider the case where the telemetry path is R1->R2->R3->R4->R5->R6. When packet loss occurs at R3, the NMS under the existing INT cannot know that packet loss has occurred (because the service data packet carrying the network status information of R1 and R2 has been lost and cannot reach the NMS). However, under the SF-INT of the present invention, although packet loss occurs at R3, the historical status information is still stored by the previous node, so the NMS still has the opportunity to obtain the network status information of the forwarding nodes (R1 and R2) before the packet loss.
以下结合附图及实施例对本发明作进一步详细说明,但本发明的一种有状态的带内网络遥测方法及系统不局限于实施例。The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments, but the stateful in-band network telemetry method and system of the present invention are not limited to the embodiments.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为现行带内网络遥测(INT)的过程示意图;FIG1 is a schematic diagram of the current process of in-band network telemetry (INT);
图2为本发明的有状态的带内网络遥测(SF-INT)过程示意图;FIG2 is a schematic diagram of a stateful in-band network telemetry (SF-INT) process of the present invention;
图3为现行INT的有效头部的格式图;FIG3 is a diagram showing the format of a valid header of a current INT;
图4为本发明的SF-INT的INT有效头部的格式图;FIG4 is a format diagram of an INT valid header of SF-INT of the present invention;
图5为本发明的有状态的带内网络遥测方法的流程图;FIG5 is a flow chart of a stateful in-band network telemetry method of the present invention;
图6为本发明的INT转发节点的遥测处理基本过程图;FIG6 is a diagram showing the basic process of telemetry processing of an INT forwarding node of the present invention;
图7为本发明的NMS处理流程图;FIG7 is a NMS processing flow chart of the present invention;
图8为本发明的6个节点的SF-INT过程图;FIG8 is a diagram of the SF-INT process of six nodes of the present invention;
图9为本发明的SF-INT在紧急模式下的两个实例处理示意图;FIG9 is a schematic diagram of two example processes of SF-INT in the emergency mode of the present invention;
图10为本发明的有状态的带内网络遥测系统的模块示意图。FIG. 10 is a module diagram of a stateful in-band network telemetry system of the present invention.
具体实施方式Detailed ways
以下通过具体实施方式对本发明作进一步的描述。应当说明的是,此处所述具体实施例仅用于方便说明和解释本发明的具体实施方式,并不用于限定本发明。The present invention is further described below by way of specific implementation methods. It should be noted that the specific embodiments described herein are only used to facilitate description and explanation of the specific implementation methods of the present invention and are not used to limit the present invention.
为了使本发明的目的、技术方案更加清晰明了,以下结合附图以及案例,对本发明进行进一步说明。应当理解,此处所描述的案例仅用于解释本发明,并不用于限定本发明。In order to make the purpose and technical solution of the present invention clearer, the present invention is further described below in conjunction with the accompanying drawings and examples. It should be understood that the examples described herein are only used to explain the present invention and are not used to limit the present invention.
首先,对本发明中用到的一些术语进行列表说明,以便于本领域人员的理解以避免歧义。First, some terms used in the present invention are listed and explained to facilitate understanding by those skilled in the art and to avoid ambiguity.
元数据(metadata):遥测控制模块会下发遥测指令。对每个遥测指令,网络节点都需要提供自身的网络状态信息,这个信息称为元数据。Metadata: The telemetry control module will issue telemetry instructions. For each telemetry instruction, the network node needs to provide its own network status information, which is called metadata.
元数据段:在一次遥测过程中,遥测控制模块会下达遥测指令集合;而网络节点对不同指令提供不同的元数据。全部元数据的总和称为元数据段。Metadata segment: During a telemetry process, the telemetry control module will issue a set of telemetry instructions; and the network node provides different metadata for different instructions. The sum of all metadata is called the metadata segment.
元数据段的长度:元数据段所占的位数,单位为字节。本发明用L0表示。The length of the metadata segment: the number of bits occupied by the metadata segment, in bytes. The present invention uses L0 to represent this.
裸元数据段:若一个元数据段的内容来自于某个节点的原始网络状态信息,则称为裸元数据段。Bare metadata segment: If the content of a metadata segment comes from the original network status information of a node, it is called a bare metadata segment.
异或元数据段:多个元数据段进行异或计算所生成的新的元数据段,被称为异或元数据段。这也是SF-INT的创新定义。XOR metadata segment: A new metadata segment generated by XOR calculation of multiple metadata segments is called an XOR metadata segment. This is also an innovative definition of SF-INT.
元数据堆栈:在元数据堆栈中会包含零到多个的元数据段,这些元数据段来自于不同的网络节点。SF-INT规定,一个元数据堆栈中最多只能有一个异或元数据段(位于堆栈中的最底部),而非底部的元数据段都是裸元数据段。而现行INT中,元数据堆栈中全都是裸元数据段。Metadata stack: The metadata stack contains zero or more metadata segments, which come from different network nodes. SF-INT stipulates that there can be at most one XOR metadata segment in a metadata stack (located at the bottom of the stack), and metadata segments other than the bottom are all bare metadata segments. In the current INT, the metadata stack is full of bare metadata segments.
INT指令头(INT metadata header):包含了遥测指令集、SF-INT自定义的4个字段、路经的节点数目、元数据段的长度等信息。INT metadata header: contains the telemetry instruction set, four fields customized by SF-INT, the number of nodes passed through, the length of the metadata segment, and other information.
INT有效头部:由INT指令头和元数据堆栈组成。INT valid header: consists of the INT instruction header and metadata stack.
INT有效头部的长度:本发明用L2表示,单位为字节。假设元数据堆栈中的元数据段的数量为N,则L2=12+L0×N。The length of the INT effective header: the present invention uses L2 to represent it, and the unit is byte. Assuming that the number of metadata segments in the metadata stack is N, then L2=12+L0×N.
INT夹层头(INT shim header):INT夹层头在不同的场景下会有不同定义,例如INT over GRE和INT over TCP/UDP场景下的INT夹层头定义是不同的。INT夹层头中“长度”字段非常重要,用于计算INT有效头部的占用长度。INT shim header: The INT shim header has different definitions in different scenarios. For example, the INT shim header in INT over GRE and INT over TCP/UDP scenarios has different definitions. The "length" field in the INT shim header is very important and is used to calculate the occupied length of the INT effective header.
INT报头:包含了INT夹层头、INT指令头和元数据堆栈。INT header: Contains the INT mezzanine header, INT command header and metadata stack.
INT源节点:指的是INT source node。INT source node: refers to INT source node.
INT转发节点:指的是INT transit node。INT forwarding node: refers to INT transit node.
INT末端节点:指的是INT sink node。INT end node: refers to the INT sink node.
网络监控系统NMS:NMS接收INT末端节点发送来的INT报告,并通过解析和计算得出遥测路径上各节点的INT元数据段。这些计算结果被存储,且可用于网络测量和网络管理。Network Monitoring System NMS: NMS receives INT reports sent by INT end nodes and parses and calculates INT metadata segments of each node on the telemetry path. These calculation results are stored and can be used for network measurement and network management.
感兴趣的数据包:遥测控制模块通常明确要对哪些类型的数据包进行采样,获取其转发路径上的网络状态信息。这些被要求采集信息的数据包被称为感兴趣的数据包。Interested packets: The telemetry control module usually specifies which types of packets to sample to obtain network status information on their forwarding path. These packets that are required to collect information are called interested packets.
P4-INT:指的是P4工作组制定的INT标准,最新的是INT v2.1标准(https://p4.org/specs/)。INT的实现目前主要依赖于可编程数据平面,而可编程语言的事实标准是P4,因此P4-INT标准被学术界和工业界广泛接受,成为现行的INT技术标准。P4-INT: refers to the INT standard developed by the P4 working group. The latest one is the INT v2.1 standard (https://p4.org/specs/). The implementation of INT currently relies mainly on the programmable data plane, and the de facto standard of programmable language is P4. Therefore, the P4-INT standard is widely accepted by academia and industry and has become the current INT technical standard.
网络节点的ID:指的是网络节点在遥测路径中出现的次序数字。简便起见,本发明对于网络节点的名称以“R+网络节点的ID”命名。例如,遥测路径的第一个网络节点的ID为1,名称为R1。R1也是INT源节点,其后的网络转发节点依次记为R2,R3,……The ID of the network node: refers to the order in which the network node appears in the telemetry path. For simplicity, the present invention names the network node as "R+the ID of the network node". For example, the ID of the first network node in the telemetry path is 1, and the name is R1. R1 is also the INT source node, and the subsequent network forwarding nodes are successively recorded as R2, R3, ...
参见图1所示,在现有的INT的遥测过程中,每个转发节点都会生成INT元数据,因此元数据堆栈的长度随着转发次数而增加,整个INT报头长度也会越来越长。参见图2所示,本发明SF-INT的遥测过程中,网络节点(INT源节点、INT转发节点和INT末端节点)的元数据堆栈中始终只有一个元数据段,因此INT报头不会随着数据包路经的节点数的增多而增长。INT转发节点寄存器中的网络信息和发送的元数据都通过SF-INT转发规则(表1)计算获得,因此也称为有状态的(stateful);相对地,现行INT被认为是无状态的。具体的,图2表示的是SF-INT在标准模式下的情况;在紧急模式下,节点会自动切换到现行INT的模式。As shown in FIG1 , in the existing INT telemetry process, each forwarding node will generate INT metadata, so the length of the metadata stack increases with the number of forwarding times, and the length of the entire INT header will also become longer and longer. As shown in FIG2 , in the SF-INT telemetry process of the present invention, there is always only one metadata segment in the metadata stack of the network node (INT source node, INT forwarding node, and INT end node), so the INT header will not grow as the number of nodes passed by the data packet increases. The network information in the INT forwarding node register and the sent metadata are calculated and obtained through the SF-INT forwarding rules (Table 1), so it is also called stateful; in contrast, the current INT is considered to be stateless. Specifically, FIG2 shows the situation of SF-INT in standard mode; in emergency mode, the node will automatically switch to the current INT mode.
为了实现单元数据段的传输,SF-INT在INT指令头中定义新字段以实现有状态的网络遥测。具体地,参见图3和图4所示,用现行INT协议中的INT头部预留字段(Reserved字段共12位,如图3)来定义SF-INT所需的4个新字段(如图4)。由于SF-INT不改变现行INT指令头中的其它字段的含义与位置,因此可与之兼容。In order to realize the transmission of unit data segments, SF-INT defines new fields in the INT instruction header to realize stateful network telemetry. Specifically, as shown in Figures 3 and 4, the INT header reserved field (the Reserved field has 12 bits in total, as shown in Figure 3) in the current INT protocol is used to define the four new fields required by SF-INT (as shown in Figure 4). Since SF-INT does not change the meaning and position of other fields in the current INT instruction header, it is compatible with it.
SF-INT的四个新字段为:The four new fields of SF-INT are:
(1)第1个C字段,占一个比特位。如果数值为1,表示是SF-INT报头;否则是现行INT报头。(1) The first C field occupies one bit. If the value is 1, it indicates that it is a SF-INT header; otherwise, it is a current INT header.
(2)第2个U字段/紧急字段,占一个比特位。如果数值为1,表示处于SF-INT紧急模式(urgency);0代表SF-INT标准模式。(2) The second U field/urgent field occupies one bit. If the value is 1, it indicates that the SF-INT is in urgency mode; 0 indicates that the SF-INT is in standard mode.
(3)第3个ST状态字段,占2个比特位,可表示以下四个INT状态:(3) The third ST status field occupies 2 bits and can represent the following four INT states:
00:代表Empty(缩写E),说明元数据堆栈中不包含元数据段。00: stands for Empty (abbreviated E), indicating that the metadata stack does not contain a metadata segment.
01:代表High(缩写H),是高优先级的含义,也代表历史(History)信息。01: stands for High (abbreviated as H), which means high priority and also represents history information.
10:代表Low(缩写L),意味着低优先级。10: stands for Low (abbreviated L), which means low priority.
11:代表XOR(缩写X),即异或。11: Represents XOR (abbreviated as X), which means exclusive OR.
元数据堆栈中的底部元数据段与状态字段有关,可用其缩写来标记。例如,状态字段的值为11时,元数据堆栈中的底部元数据段被称为X元数据段。The bottom metadata segment in the metadata stack is related to the status field and can be labeled with its abbreviation. For example, when the value of the status field is 11, the bottom metadata segment in the metadata stack is called the X metadata segment.
(4)第4个“packetID”字段,占8个比特位,用来表示数据包ID。INT源节点生成的数据包ID从0到254,可循环使用;而255是个保留号,用以表示当前的数据包的ID。设立这一字段的目的是为了让INT转发节点和NMS可以用来区分邻近的数据包。一个元数据堆栈中可能会有多个元数据段。元数据堆栈中的底部元数据段所属的数据包的packetID就是“packetID”字段中的数值。元数据堆栈中的非底部元数据段所属的数据包就是当前数据包,此处packetID=255。如果NMS收到两个INT报告,即便报告中的INT指令头中的数据包ID都是255,NMS也会认为这两个INT包头中报告的是两个独立的数据包的遥测信息。(4) The fourth "packetID" field occupies 8 bits and is used to indicate the packet ID. The packet ID generated by the INT source node ranges from 0 to 254 and can be used cyclically; 255 is a reserved number used to indicate the ID of the current packet. The purpose of establishing this field is to allow INT forwarding nodes and NMS to distinguish adjacent packets. There may be multiple metadata segments in a metadata stack. The packetID of the packet to which the bottom metadata segment in the metadata stack belongs is the value in the "packetID" field. The packet to which the non-bottom metadata segment in the metadata stack belongs is the current packet, where packetID = 255. If the NMS receives two INT reports, even if the packet ID in the INT command header in the report is 255, the NMS will assume that the two INT packet headers report telemetry information of two independent packets.
显然,SF-INT中的元数据段需要与INT转发节点、INT状态、packetID关联起来。为了便于描述,本发明设计了一种SF-INT元数据段的记号,其形式为:Obviously, the metadata segment in SF-INT needs to be associated with the INT forwarding node, INT status, and packetID. For ease of description, the present invention designs a notation for the SF-INT metadata segment, which is in the form of:
状态符号 Status Symbols
其中,M代表Metadata,右侧的“状态符号”代表的是INT指令头中的“状态字段”。此处考虑三种状态,即X,H和L。只有元数据堆栈中的底部元数据段才需要标上状态符号,而非底部元数据段与状态无关,不需要标识。M上角标的packetID,代表的是该元数据段所属的数据包的packetID;下角标的IDs代表一个到多个节点的ID。IDs表示该元数据段是某个数据包经过哪些节点后采集到的网络状态信息。IDs的标准写法的规定包括:Among them, M stands for Metadata, and the "status symbol" on the right represents the "status field" in the INT instruction header. Three states are considered here, namely X, H and L. Only the bottom metadata segment in the metadata stack needs to be marked with a status symbol, and the non-bottom metadata segment is irrelevant to the state and does not need to be identified. The packetID in the superscript of M represents the packetID of the data packet to which the metadata segment belongs; the IDs in the subscript represent the IDs of one to multiple nodes. IDs indicates that this metadata segment is the network status information collected after a certain data packet passes through which nodes. The standard writing regulations for IDs include:
一、如果有逗号存在,那么两个逗号之间的数字代表一个ID;1. If there is a comma, the number between the two commas represents an ID;
二、不在两个逗号之间的每个数字位代表一个节点ID;Second, each digit not between two commas represents a node ID;
三、逗号是节点之间的区隔。3. Commas separate nodes.
例如,IDs=“1,2”代表的是R1和R2;IDs=“12”也代表R1和R2;IDs=“12,12,”代表的是R1,R2和R12;IDs=“,12,13,”代表的是R12和R13。又例如,记号代表本元数据段是packetID=1的数据包经过节点R1和R2时采集到的元数据段的异或的结果。中间下方的1,2代表的是节点的ID,也就是该元数据包含了数据包通过节点R1和R2时获取的网络状态信息。因为有标记了两个节点,说明该元数据段是异或元数据段,是由节点R1的裸元数据段和R2的裸元数据段经过异或而成的。如果只有一个节点ID,那么该元数据段是裸元数据段。中间上方的1代表的是packetID,由INT源节点分配的ID值。For example, IDs="1,2" represents R1 and R2; IDs="12" also represents R1 and R2; IDs="12,12," represents R1, R2, and R12; IDs=",12,13," represents R12 and R13. Indicates that this metadata segment is the XOR result of the metadata segments collected when the data packet with packetID=1 passes through nodes R1 and R2. The 1 and 2 in the middle and lower part represent the node ID, that is, the metadata contains the network status information obtained when the data packet passes through nodes R1 and R2. Because two nodes are marked, it means that this metadata segment is an XOR metadata segment, which is formed by the XOR of the raw metadata segment of nodes R1 and the raw metadata segment of R2. If there is only one node ID, then this metadata segment is a raw metadata segment. The 1 in the middle and upper part represents the packetID, which is the ID value assigned by the INT source node.
参见图5所示,本实施例中,一种有状态的带内网络遥测方法,包括:遥测控制步骤S51、网络节点处理步骤S52和NMS处理步骤S53。As shown in FIG. 5 , in this embodiment, a stateful in-band network telemetry method includes: a telemetry control step S51 , a network node processing step S52 , and an NMS processing step S53 .
所述遥测控制步骤S51包括:基于配置数据,终端APP发送消息给INT源节点;所述消息包括需要进行遥测的数据包、遥测指令、遥测节点的最大数目和是否启用SF-INT。The telemetry control step S51 includes: based on the configuration data, the terminal APP sends a message to the INT source node; the message includes a data packet that needs to be telemetered, a telemetry instruction, a maximum number of telemetry nodes, and whether to enable SF-INT.
具体的,遥测控制步骤的执行主体可以是安装在终端上的独立程序,还可以是SDN(软件定义网络,Software Define Network)控制器上的一个北向应用。Specifically, the execution subject of the telemetry control step can be an independent program installed on the terminal, or it can be a northbound application on an SDN (Software Define Network) controller.
通过遥测控制步骤,告知INT源节点要对哪些数据包进行遥测(即哪些是感兴趣的数据包);下发遥测指令(要收集哪些网络状态)、遥测节点数目的最大值、指示是否启动SF-INT等。遥测控制步骤属于控制平面,仅在网络遥测启动时执行,而遥测过程则完全由数据平面完成。Through the telemetry control step, the INT source node is informed of which data packets to telemeter (i.e., which data packets are of interest); telemetry instructions are issued (which network status to collect), the maximum number of telemetry nodes, whether to start SF-INT, etc. The telemetry control step belongs to the control plane and is only executed when network telemetry is started, while the telemetry process is completely completed by the data plane.
网络节点处理步骤S52,包括:INT源节点处理步骤S521、INT转发节点处理步骤S522和INT末端节点处理步骤S523。The network node processing step S52 includes: an INT source node processing step S521, an INT forwarding node processing step S522 and an INT end node processing step S523.
所述INT源节点处理步骤S521,包括:INT源节点接收需要执行网络遥测的数据包,进行解析后插入INT报头,重新封装后发送至下一节点;所述INT报头包括INT有效头部,所述INT有效头部包括INT指令头和INT元数据堆栈。The INT source node processing step S521 includes: the INT source node receives the data packet that needs to perform network telemetry, parses it and inserts the INT header, re-encapsulates it and sends it to the next node; the INT header includes an INT valid header, and the INT valid header includes an INT instruction header and an INT metadata stack.
具体的,INT源节点接收到需要执行网络遥测的数据包后,插入INT报头。根据下发的遥测指令,INT源节点对Instruction Bitmap字段进行设置;计算一个元数据段所需要的长度,并据此设置HopML字段;把INT夹层头中的长度字段的值设置为L0+12字节(等于INT有效头部的长度),其中的12字节是INT指令头的固定长度。INT源节点也要设置SF-INT的特有字段:把C字段设置为1,向后续转发节点和NMS表明这是SF-INT报头;把ST字段设置为X,向后续转发节点表明本INT报头中携带了需要进行异或操作的元数据段;在packeID字段,插入一个数据包顺序的ID(取值范围为0~254,自动递增,可循环使用);遇到网络事件时,U字段设置为1,否则设置为0。Specifically, after receiving the data packet that needs to perform network telemetry, the INT source node inserts the INT header. According to the telemetry instruction issued, the INT source node sets the Instruction Bitmap field; calculates the required length of a metadata segment and sets the HopML field accordingly; sets the value of the length field in the INT mezzanine header to L0+12 bytes (equal to the length of the INT effective header), where 12 bytes are the fixed length of the INT instruction header. The INT source node also needs to set the SF-INT specific fields: set the C field to 1 to indicate to subsequent forwarding nodes and NMS that this is an SF-INT header; set the ST field to X to indicate to subsequent forwarding nodes that this INT header carries a metadata segment that needs to be XORed; insert a data packet sequence ID in the packeID field (the value range is 0 to 254, automatically incremented, and can be used cyclically); when encountering a network event, the U field is set to 1, otherwise it is set to 0.
同时,INT源节点根据遥测指令的要求,在元数据堆栈中插入自己的元数据段,也是第一个元数据段,并更新INT报头中的相关字段,包括把“RemainingHop Cnt”字段里的值减去1。INT源节点发送的元数据段可以参考实施例1中图8所示的R1向R2发送的元数据段。At the same time, the INT source node inserts its own metadata segment, which is also the first metadata segment, into the metadata stack according to the requirements of the telemetry instruction, and updates the relevant fields in the INT header, including subtracting 1 from the value in the "RemainingHop Cnt" field. The metadata segment sent by the INT source node can refer to the metadata segment sent by R1 to R2 shown in Figure 8 in Example 1.
所述INT转发节点处理步骤S522,包括:The INT forwarding node processes step S522, including:
S5221,当所述U字段设置为采用标准模式时(U字段中值为0,且没有遇到网络事件或收到网络事件的通知的时候,转发节点处于SF-INT的标准模式),INT转发节点收到来自于前一节点的数据包后,解析出到达的数据包中携带的有效INT头部;将到达的INT有效头部与寄存器中的INT有效头部进行比对,基于SF-INT转发规则,获取到待发送的INT有效头部和待存储于寄存器的INT有效头部;待发送的INT有效头部封装后发送至下一节点;待存储的数据包存储到寄存器中;S5221, when the U field is set to adopt the standard mode (the value in the U field is 0, and when no network event is encountered or notification of a network event is received, the forwarding node is in the standard mode of SF-INT), after the INT forwarding node receives the data packet from the previous node, it parses the valid INT header carried in the arriving data packet; compares the arriving INT valid header with the INT valid header in the register, and based on the SF-INT forwarding rule, obtains the INT valid header to be sent and the INT valid header to be stored in the register; the INT valid header to be sent is encapsulated and sent to the next node; the data packet to be stored is stored in the register;
INT转发节点在收到来自于前一节点的SF-INT报头后(即C字段中值为1),按照SF-INT转发规则处理数据包。After receiving the SF-INT header from the previous node (ie, the value in the C field is 1), the INT forwarding node processes the data packet according to the SF-INT forwarding rule.
参见图6所示,SF-INT转发节点会利用寄存器来存储历史网络状态信息,其数据包处理方法涉及INT状态的变迁。节点解析收到的数据包中携带的INT报头的信息,与寄存器中的INT有效头部中的信息进行对比,最后根据INT转发节点的SF-INT转发规则表(如表1)决定发送出去的数据包中应该携带什么样的INT报头,以及要新存储在寄存器中的INT有效头部的内容。本地寄存器中存储的元数据段要么是H元数据段,要么是L元数据段。As shown in Figure 6, the SF-INT forwarding node uses a register to store historical network status information, and its packet processing method involves the change of INT status. The node parses the information of the INT header carried in the received data packet, compares it with the information in the INT valid header in the register, and finally determines what kind of INT header should be carried in the sent data packet and the content of the INT valid header to be newly stored in the register according to the SF-INT forwarding rule table of the INT forwarding node (such as Table 1). The metadata segment stored in the local register is either an H metadata segment or an L metadata segment.
表1的规则表中采用的符号M(N),其中N∈{Arrival(简写为A),Storage(简写S)},INT状态集合M∈{X,H,L,E}。具体地,A代表的是到达的数据包中携带的INT有效头部;S代表的是各节点在寄存器中存储的INT有效头部。例如,X(A)代表的是到达的INT数据报头中“状态”字段为X;特别地,E()代表节点中没有存储的INT有效头部。此外,C元数据段(C代表Current),用于表示节点的当前网络状态信息。The symbol M(N) used in the rule table of Table 1, where N∈{Arrival (abbreviated as A), Storage (abbreviated as S)}, and the INT state set M∈{X,H,L,E}. Specifically, A represents the INT valid header carried in the arriving data packet; S represents the INT valid header stored in the register of each node. For example, X(A) represents that the "status" field in the arriving INT datagram header is X; in particular, E() represents that the INT valid header is not stored in the node. In addition, the C metadata segment (C stands for Current) is used to represent the current network status information of the node.
以转发规则1、5和6为例,说明表1中的规则在转发节点上如何应用。Taking forwarding rules 1, 5 and 6 as examples, how the rules in Table 1 are applied on the forwarding node is described.
规则1:规则1中到达的是X(A),意味着到达的数据包中包含有X元数据段;到达之时节点中存储的是H元数据段。遇到该情形,节点会把存储中的H元数据段发送出去,状态保持为H;而到达的X元数据段会被存储起来,状态为L,也就是到达的X元数据段会被转换为L元数据段进行存储。这里可以看到H元数据段的优先级高于X元数据段。举例:假设在某转发节点上,收到的数据包中携带有这时寄存器中存储着/>那么就该适用规则1,因此数据包处理的结果是:寄存器中的存储的元数据段是/>发送出去的数据包中携带元数据段/>(参考实施例1)Rule 1: In Rule 1, the data packet that arrives contains the X metadata segment; when it arrives, the node stores the H metadata segment. In this case, the node will send out the H metadata segment in storage, and the state will remain H; while the X metadata segment that arrives will be stored, and the state will be L, that is, the X metadata segment that arrives will be converted to the L metadata segment for storage. Here we can see that the H metadata segment has a higher priority than the X metadata segment. For example: Suppose on a forwarding node, the received data packet carries At this time, the register stores /> Then rule 1 applies, so the result of packet processing is: the metadata segment stored in the register is/> The data packet sent out carries the metadata segment/> (Reference Example 1)
表1 INT转发节点的SF-INT转发规则表Table 1 SF-INT forwarding rules of INT forwarding nodes
表1 INT转发节点的SF-INT转发规则表Table 1 SF-INT forwarding rules of INT forwarding nodes
*表示在INT转发节点上遇到E(),意味着数据包的路径可能发生了变化。*Indicates that E() is encountered on the INT forwarding node, which means that the path of the data packet may have changed.
再看规则5。规则5中到达的是H(A),意味着到达的数据包中携带有H元数据段;到达之时节点中存储的是L元数据段。收到的元数据段和存储的元数据段属于同一个数据包,那么意味着该数据包的“异或”过程已经被阻断了。这时候会把存储的元数据段发送出去。举例:假设在R3节点上存储中的元数据段是这时收到的数据包中携带了元数据段收到和存储的元数据段都属于packetID为2的数据包,因此适用规则5,按规则5进行数据包处理之后,在寄存器中存储的元数据段是/>发送出去的数据包中携带的元数据段是/>(参考实施例1)Let's look at rule 5. In rule 5, H(A) arrives, which means that the arriving data packet carries H metadata segment; when it arrives, L metadata segment is stored in the node. The received metadata segment and the stored metadata segment belong to the same data packet, which means that the "XOR" process of the data packet has been blocked. At this time, the stored metadata segment will be sent out. For example: Assume that the metadata segment stored on the R3 node is The received data packet carries the metadata segment The received and stored metadata segments all belong to the packet with packetID 2, so rule 5 applies. After the packet is processed according to rule 5, the metadata segment stored in the register is/> The metadata segment carried in the data packet sent out is/> (Reference Example 1)
规则6和规则5不同之处在于,规则6应用在收到的元数据段和存储的元数据段不属于同一个数据包的场景。举例:假设在R3节点上存储着元数据段这时收到的数据包中携带有元数据段/>之后的存储的元数据段是/>发送出去的数据包中携带的元数据段是/> The difference between Rule 6 and Rule 5 is that Rule 6 applies to scenarios where the received metadata segment and the stored metadata segment do not belong to the same data packet. Example: Assume that the metadata segment is stored on the R3 node. The received data packet carries a metadata segment /> The metadata segment stored afterwards is/> The metadata segment carried in the data packet sent out is/>
表1设计了十个转发规则,包含了INT转发节点所有可能遇到的情形。这些规则清晰明确,便于编写在交换机上的相关代码。其基本思想是如果某个数据包没能在某节点处获得新的网络状态,那就把状态设置为低优先级L,这样NMS就能尽快获得其它数据包的全程的元数据。因此遵循的优先级顺序是:H高于X,X高于L。NMS需要后续到达的H元数据段才能还原出各节点的裸元数据段,因此H元数据段需要优先通过;L意味着该元数据所属的数据包在某节点处没能获得该节点网络状态,因此L要为H和X让行。Table 1 designs ten forwarding rules, covering all possible situations that the INT forwarding node may encounter. These rules are clear and unambiguous, making it easy to write relevant codes on the switch. The basic idea is that if a data packet fails to obtain a new network state at a certain node, the state is set to a low priority L, so that the NMS can obtain the metadata of the entire process of other data packets as soon as possible. Therefore, the priority order is: H is higher than X, and X is higher than L. The NMS needs the H metadata segment that arrives later to restore the raw metadata segment of each node, so the H metadata segment needs to pass first; L means that the data packet to which the metadata belongs fails to obtain the network state of the node at a certain node, so L must give way to H and X.
需要注意的是,在规则2和规则3中,节点把自身的元数据段的网络状态信息添加到元数据堆栈中,此时需要把“RemainingHop Cnt”字段里的值减去1。其它的规则中,仅仅是传递历史的网络状态信息,并未增加上自身当前的网络状态信息,因此不修改“RemainingHop Cnt”字段里的值。It should be noted that in rules 2 and 3, the node adds the network status information of its own metadata segment to the metadata stack, and at this time, the value in the "RemainingHop Cnt" field needs to be subtracted by 1. In other rules, only the historical network status information is transmitted, and the current network status information is not added, so the value in the "RemainingHop Cnt" field is not modified.
S5222:当U字段中值为1,或者检测到网络事件或收到相关网络事件的通告的时候,SF-INT切换到紧急模式,尽快传递足够多的网络状态信息。如果触发紧急模式的节点寄存器中有INT有效头部,就把寄存器中存储的INT有效头部封装成INT报告,以独立的数据包发送给NMS(即只产生一个独立的“明信片”报文)。此后,该节点不会再利用寄存器存储历史网络状态信息,而是直接把网络状态信息发送出去,也就是在到达的数据包携带的元数据堆栈中,直接添加上自身的元数据段,并且更新INT报头中的相关字段。S5222: When the value in the U field is 1, or a network event is detected or a notification of a related network event is received, SF-INT switches to emergency mode and transmits enough network status information as quickly as possible. If there is an INT valid header in the register of the node that triggers the emergency mode, the INT valid header stored in the register is encapsulated into an INT report and sent to the NMS in an independent data packet (that is, only one independent "postcard" message is generated). After that, the node will no longer use the register to store historical network status information, but directly send the network status information, that is, directly add its own metadata segment to the metadata stack carried by the arriving data packet, and update the relevant fields in the INT header.
所述INT末端节点处理步骤S523,包括:INT末端节点收到前一节点的数据包后,解析出数据包中的INT报头,直接在INT元数据堆栈中添加自身的元数据段,生成INT报告,并把INT报告封装在独立的报文中发送给NMS。The INT end node processing step S523 includes: after receiving the data packet from the previous node, the INT end node parses the INT header in the data packet, directly adds its own metadata segment in the INT metadata stack, generates an INT report, and encapsulates the INT report in an independent message and sends it to the NMS.
具体的,INT末端节点收到带有遥测报头的数据包后,把INT报头从数据包中分离出来,然后直接在元数据堆栈中添加上自身的元数据段,并更新INT报头中的相关字段(例如把“RemainingHop Cnt”字段里的值减去1),然后生成INT报告(INT report),并把INT报告封装在独立的报文中发送给NMS。INT末端节点还对数据包中的其他报头的相关字段进行更新,然后把不带有INT报头的数据包按目的地进行发送。为了方便NMS的处理,SF-INT要求末端节点在元数据堆栈中添加上自己的元数据段。现行的INT允许末端节点把自身元数据段和收到的元数据堆栈分开,但还是在同一个INT报告。Specifically, after receiving a data packet with a telemetry header, the INT end node separates the INT header from the data packet, then directly adds its own metadata segment to the metadata stack, and updates the relevant fields in the INT header (for example, subtract 1 from the value in the "RemainingHop Cnt" field), then generates an INT report (INT report), and encapsulates the INT report in a separate message and sends it to the NMS. The INT end node also updates the relevant fields of other headers in the data packet, and then sends the data packet without the INT header to the destination. In order to facilitate NMS processing, SF-INT requires the end node to add its own metadata segment to the metadata stack. The current INT allows the end node to separate its own metadata segment from the received metadata stack, but still in the same INT report.
所述NMS处理步骤S53,包括:NMS收到SF-INT的INT报告后,结合前后收到的多个相同packetID的INT报告进行处理,获得各节点的裸元数据段。The NMS processing step S53 includes: after receiving the INT report of SF-INT, the NMS combines the multiple INT reports with the same packetID received before and after to process and obtain the raw data segment of each node.
具体的,NMS在收到SF-INT的INT报告时,需要结合前后收到的多个packetID相同的INT报告进行计算才能获得各节点的原始元数据段,SF-INT上的处理流程参见图7所示。Specifically, when NMS receives the INT report of SF-INT, it needs to combine multiple INT reports with the same packetID received before and after to calculate in order to obtain the original metadata segment of each node. The processing flow on SF-INT is shown in Figure 7.
NMS首先要确认INT报告的元数据堆栈中有多少个元数据段。INT指令头的长度固定为12个字节,一个元数据堆栈中包含的元数据段的数量记为N2:NMS must first confirm how many metadata segments are in the metadata stack reported by INT. The length of the INT instruction header is fixed at 12 bytes, and the number of metadata segments contained in a metadata stack is recorded as N2:
N2=(L2-12)/L0N2=(L2-12)/L0
接下来,NMS需要确认元数据堆栈中包含了多少个节点的信息。当“RemainingHopCnt”字段中的值为R字节时,计算出元数据堆栈中包含了N1个节点的网络状态信息,即N1=MAX-R,其中MAX是遥测系统允许的最大节点数目。在SF-INT里,转发节点只有往元数据堆栈中添加上自己的网络状态信息,才会把“RemainingHop Cnt”字段里的值减去1。Next, the NMS needs to confirm how many nodes are included in the metadata stack. When the value in the "RemainingHopCnt" field is R bytes, it is calculated that the metadata stack contains the network status information of N1 nodes, that is, N1 = MAX-R, where MAX is the maximum number of nodes allowed by the telemetry system. In SF-INT, the forwarding node will only subtract 1 from the value in the "RemainingHop Cnt" field after adding its own network status information to the metadata stack.
最后,NMS要计算出SF-元数据堆栈中的底部元数据段中包含了多少个节点的网络状态:Finally, NMS needs to calculate how many nodes' network status is contained in the bottom metadata segment in the SF-metadata stack:
N3=N1-(N2-1)=N1+1-N2N3=N1-(N2-1)=N1+1-N2
如果N3=1,那么底部的元数据段就不是异或元数据段。如果N3>1,那么底部的元数据段就是异或元数据段。If N3=1, then the bottom metadata segment is not an XOR metadata segment. If N3>1, then the bottom metadata segment is an XOR metadata segment.
图7中的“与来自其他数据包的同packetID的元数据段进行异或还原”指的是下述的方法:NMS在收到报告后,会根据INT报头中的“状态”字段进行分析。当状态位为X的时候,所有元数据段属于同一个数据包。但状态位是H或者L的时候,底部的元数据段属于INT指令头中的packetID,而其它的非底部元数据段则属于当前数据包(即packetID=255)。The "XOR restoration with metadata segments with the same packetID from other packets" in Figure 7 refers to the following method: After receiving the report, the NMS will analyze it according to the "status" field in the INT header. When the status bit is X, all metadata segments belong to the same packet. But when the status bit is H or L, the bottom metadata segment belongs to the packetID in the INT instruction header, and the other non-bottom metadata segments belong to the current packet (i.e. packetID = 255).
假设NMS收到某一个数据包的包含4个节点的异或元数据段,另外又收到包含了3个节点的同一个数据包(根据packetID来区分)中的异或元数据段,那么NMS对这2个异或元数据段进行再次异或,就可以获得第4个节点的元数据段。因而通过比较前后的INT报告,NMS最终可以把路径上的各节点的裸元数据段逐步恢复出来。Assume that NMS receives a data packet containing XOR metadata segments of 4 nodes, and also receives another XOR metadata segment of the same data packet containing 3 nodes (distinguished by packetID), then NMS XORs these two XOR metadata segments again to obtain the metadata segment of the 4th node. Therefore, by comparing the previous and next INT reports, NMS can eventually gradually recover the raw metadata segments of each node on the path.
实施例1:图8中给出的是一个有6个节点的SF-INT遥测过程,这是SF-INT在标准模式下的过程,期间没有检测到网络事件,也没有切换到紧急模式下。R1是遥测路径中的第一个节点,因此是INT源节点。R2、R3、R4、R5是INT转发节点;R6是INT末端节点。图中最左侧的数字代表数据包的顺序ID。INT源节点会在SF-INT指令头中插入该ID。Example 1: Figure 8 shows a SF-INT telemetry process with 6 nodes. This is the process of SF-INT in standard mode, during which no network events are detected and no switch to emergency mode is made. R1 is the first node in the telemetry path and is therefore the INT source node. R2, R3, R4, and R5 are INT forwarding nodes; R6 is the INT terminal node. The leftmost number in the figure represents the sequence ID of the data packet. The INT source node inserts the ID in the SF-INT instruction header.
以顺序号为3的数据包为例。R1发送出来的该数据包中携带的SF-INT报头的packetID字段为3,和该数据包的顺序号一致;但是该数据包离开R2的时候,携带的元数据段被表示为说明此时该数据包携带的SF-INT报头中的packetID字段的值为2,意味着此时该数据包携带的元数据段的信息是顺序号为2的数据包通过网络时的网络状态信息。Take the data packet with sequence number 3 as an example. The packetID field of the SF-INT header carried by R1 is 3, which is consistent with the sequence number of the data packet; however, when the data packet leaves R2, the metadata segment carried by it is represented as This indicates that the value of the packetID field in the SF-INT header carried by the data packet is 2, which means that the information in the metadata segment carried by the data packet is the network status information when the data packet with sequence number 2 passes through the network.
再来观察R3转发节点相关的灰色部分。R3的左侧是代表到达的数据包所携带的元数据段;R3的上方是/>代表的是数据包到达时R3节点中存储的INT有效头部中的元数据段;因此R3会根据表1中的转发规则进行遥测报头的处理,节点判断适用规则2。因此被发送出来的数据包中携带的元数据段为/>(表示在R3的右侧)、遥测处理后R3寄存器中存储的是/>(表示在节点的下方)。Now let's look at the gray part related to the R3 forwarding node. Represents the metadata segment carried by the arriving data packet; above R3 is/> It represents the metadata segment in the INT valid header stored in the R3 node when the data packet arrives; therefore, R3 will process the telemetry header according to the forwarding rules in Table 1, and the node determines the applicable rule 2. Therefore, the metadata segment carried in the sent data packet is/> (indicated on the right side of R3), after telemetry processing, what is stored in the R3 register is/> (Indicates below the node).
接着观察INT末端节点R6。图中第一行,R6收到后,在元数据堆栈中添加上自身的元数据段/>之所以packetID是255,是因为只要是非底部元数据段,它的packetID都被看成是255,也就代表着该元数据段属于携带该INT报头的数据包。因为SF-INT报头中是X状态,说明SF-INT指令头中的packetID就是INT源节点分配给本数据包的packetID,所以在这个场景下NMS也会把/>看成/>图中第2行,R6收到/>会在元数据堆栈中添加上自身的元数据段/>因为SF-INT报头中是H状态,所以NMS会把底部元数据段和非底部元数据段归属于不同的数据包。Next, observe the INT end node R6. In the first row of the figure, R6 receives Finally, add its own metadata segment to the metadata stack/> The reason why packetID is 255 is that as long as it is not the bottom metadata segment, its packetID is considered to be 255, which means that the metadata segment belongs to the data packet carrying the INT header. Because the SF-INT header is in the X state, it means that the packetID in the SF-INT instruction header is the packetID assigned to this data packet by the INT source node, so in this scenario, NMS will also treat it as/> See as/> In the second row of the figure, R6 receives /> Will add its own metadata segment to the metadata stack/> Because the SF-INT header is in the H state, the NMS will attribute the bottom metadata segment and the non-bottom metadata segment to different data packets.
NMS会在多个连续的INT报告中接收到元数据段 因此NMS可以恢复出packetID为0的数据包通过R1,R2,R3,R4,R5和R6的全程遥测信息。事实上,NMS在收到/>并不知道位于堆栈底部的元数据段是由哪5个节点的元数据段异或而成的,只是通过计算N3得出其中包含了5个节点的网络状态信息。The NMS receives the metadata segment in multiple consecutive INT reports. Therefore, NMS can recover the telemetry information of the data packet with packetID 0 passing through R1, R2, R3, R4, R5 and R6. In fact, NMS receives /> It is not known which five nodes' metadata segments are XORed into the metadata segment at the bottom of the stack. It is only calculated by N3 that it contains the network status information of the five nodes.
NMS会收到多个因为packetID为255,所以会把这些元数据段看成是来自于不同的数据包通过节点时产生的元数据段。NMS will receive multiple Because the packetID is 255, these metadata segments are considered to be metadata segments generated when different data packets pass through the node.
如图8所示,网络节点之间的链路上的INT报头中的元数据堆栈里都只有一个元数据段,INT报头的开销是固定的。对于这8个数据包,NMS能获取第0号数据包的全程遥测信息,同时能获取4号数据包的部分遥测信息,另外还能获取其他数据包在末端节点上的遥测信息。As shown in Figure 8, there is only one metadata segment in the metadata stack in the INT header on the link between network nodes, and the overhead of the INT header is fixed. For these 8 data packets, the NMS can obtain the full telemetry information of data packet No. 0, and partial telemetry information of data packet No. 4, as well as the telemetry information of other data packets at the end node.
定义一个包收敛周期,指的是在没有丢包或数据包乱序的情况下,NMS每经历多少个数据包能获得一个数据包的全程遥测信息。SF-INT中的包收敛周期总是为2a,与遥测路径上的节点数F有关,且满足2a-1≤F-2≤2a,a为正整数。A packet convergence period is defined as the number of packets that the NMS needs to go through to obtain the full telemetry information of a packet without packet loss or packet disorder. The packet convergence period in SF-INT is always 2a , which is related to the number of nodes F on the telemetry path and satisfies 2a -1 ≤F- 2≤2a , where a is a positive integer.
如果一个遥测路径上有5个节点,那么它的周期是4;If there are 5 nodes on a telemetry path, then its period is 4;
如果一个遥测路径上有6个节点,那么它的周期是8;If there are 6 nodes on a telemetry path, then its period is 8;
如果一个遥测路径上有9个节点,那么它的周期是8。If there are 9 nodes on a telemetry path, then its period is 8.
实施例2:一个实际的SF-INT的过程(紧急模式):节点检测到网络异常事件或者收到通知,转入紧急状态。Embodiment 2: An actual SF-INT process (emergency mode): A node detects a network abnormality event or receives a notification and enters an emergency state.
当顺序ID为6的数据包到达R3的时候,R3检测到了网络事件或者收到了有网络事件的通知,R3将切换到紧急模式下。如图9所示,R3会把存储中的以独立的报告发送给NMS,并于紧急模式结束之前,不再利用寄存器存储历史状态消息。因此可以看到图中的R3、R4、R5的下方都是空白的,没有元数据段的记号,也意味着没有任何新的存储。R3及此后的节点会把表示自身当前网络状态的元数据段直接添加到元数据堆栈中。When the data packet with sequence ID 6 reaches R3, R3 detects a network event or receives a notification of a network event, and R3 switches to emergency mode. As shown in Figure 9, R3 will store the It is sent to NMS as an independent report, and the register is no longer used to store historical status messages before the emergency mode ends. Therefore, you can see that the bottom of R3, R4, and R5 in the figure are blank, without the mark of the metadata segment, which also means that there is no new storage. R3 and subsequent nodes will directly add the metadata segment representing their current network status to the metadata stack.
当顺序ID为7的数据包到达R3的时候,R3检测到了网络事件或者收到了有网络事件的通知,R3将切换到紧急模式下。如图9所示,R3会把存储中的以独立的报告发送给NMS,并于紧急模式结束之前,不再利用寄存器存储历史状态消息。R3会把表示自身的当前的网络状态的元数据段直接添加到元数据堆栈中。When the data packet with sequence ID 7 reaches R3, R3 detects a network event or receives a notification of a network event, and R3 switches to emergency mode. As shown in Figure 9, R3 will store the It is sent to NMS as an independent report, and no longer uses the register to store historical status messages before the emergency mode ends. R3 will directly add the metadata segment representing its current network status to the metadata stack.
需要注意的是,无论触发紧急模式的转发节点收到X状态的元数据段,还是H/L状态的元数据段,NMS都能根据图7准确分辨和恢复出数据包通过网络时获得的裸元数据段。It should be noted that no matter whether the forwarding node that triggers the emergency mode receives the metadata segment in the X state or the metadata segment in the H/L state, the NMS can accurately distinguish and recover the raw metadata segment obtained when the data packet passes through the network according to Figure 7.
该实施例说明,SF-INT能在紧急模式下即时无缝切换到现行的INT技术。另外,如果是在INT源节点的位置就检测到网络事件,那么整个遥测过程将会和现行的INT工作过程一致。所谓的即时无缝切换,指的是任意节点检测到网络事件或者收到网络事件发生的通知,都可以直接切换到紧急模式,并不需要等到下一个感兴趣数据包到达INT源节点的时候才开始切换。This embodiment illustrates that SF-INT can switch to the current INT technology instantly and seamlessly in emergency mode. In addition, if the network event is detected at the location of the INT source node, the entire telemetry process will be consistent with the current INT working process. The so-called instant seamless switching means that any node can directly switch to emergency mode when it detects a network event or receives a notification of a network event, and does not need to wait until the next interesting data packet arrives at the INT source node to start switching.
由此可见,有状态的SF-INT兼容了无状态的现行INT,现行INT可视作有状态的SF-INT的一个特例。It can be seen that the stateful SF-INT is compatible with the stateless current INT, and the current INT can be regarded as a special case of the stateful SF-INT.
参见图10所示,根据本发明的另一方面,一种有状态的带内网络遥测系统,包括:Referring to FIG. 10 , according to another aspect of the present invention, a stateful in-band network telemetry system includes:
遥测控制模块101,用于将配置数据发送消息给INT源节点;所述配置数据包括要进行遥测的数据包、遥测指令、遥测节点的最大数目和是否启用SF-INT;Telemetry control module 101, used to send configuration data to the INT source node; the configuration data includes the data packet to be telemetered, telemetry instructions, the maximum number of telemetry nodes and whether to enable SF-INT;
遥测数据包处理模块102,包括源节点处理子模块1021、转发节点处理子模块1022和末端节点处理子模块1023;The telemetry data packet processing module 102 includes a source node processing submodule 1021, a forwarding node processing submodule 1022 and an end node processing submodule 1023;
所述源节点处理子模块1021,用于接收需要执行网络遥测的数据包,进行解析后插入INT报头,重新封装后发送至下一节点;所述INT报头包括INT有效头部,所述INT有效头部包括INT指令头和INT元数据堆栈;所述INT指令头包括C字段、U字段、ST字段和packetID字段;所述C字段设置为采用SF-INT;所述U字段设置为紧急模式或标准模式;所述ST字段设置为X,用于向后续INT转发节点表明本INT报头中携带了需要进行异或操作的元数据段;所述packetID字段设置为数据包ID;所述INT元数据堆栈用于插入INT源节点自身的元数据段;The source node processing submodule 1021 is used to receive a data packet that needs to perform network telemetry, insert an INT header after parsing, and re-encapsulate and send it to the next node; the INT header includes an INT valid header, and the INT valid header includes an INT instruction header and an INT metadata stack; the INT instruction header includes a C field, a U field, an ST field and a packetID field; the C field is set to use SF-INT; the U field is set to emergency mode or standard mode; the ST field is set to X, which is used to indicate to subsequent INT forwarding nodes that the INT header carries a metadata segment that needs to be XORed; the packetID field is set to the data packet ID; the INT metadata stack is used to insert the metadata segment of the INT source node itself;
所述转发节点处理子模块1022,用于当所述U字段设置为采用标准模式时,INT转发节点收到来自于前一节点的数据包后,解析出到达的数据包中携带的有效INT头部;将到达的INT有效头部与寄存器中的INT有效头部进行比对,基于SF-INT转发规则,获取到待发送的INT有效头部和待存储到寄存器中的INT有效头部;将待发送的INT有效头部插入INT报头,重新封装后发送至下一节点;还用于当所述U字段设置为采用紧急模式时,将即时无缝切换到现行INT协议;The forwarding node processing submodule 1022 is used for, when the U field is set to adopt the standard mode, after the INT forwarding node receives the data packet from the previous node, parsing the valid INT header carried in the arrived data packet; comparing the arrived INT valid header with the INT valid header in the register, and obtaining the INT valid header to be sent and the INT valid header to be stored in the register based on the SF-INT forwarding rule; inserting the INT valid header to be sent into the INT header, re-encapsulating and sending it to the next node; and also for switching to the current INT protocol instantly and seamlessly when the U field is set to adopt the emergency mode;
所述末端节点处理子模块1023,用于收到前一节点的数据包后,解析出数据包中的INT报头,直接在INT元数据堆栈中添加自身的元数据段,生成INT报告,并把INT报告封装在独立的报文中发送给NMS;The end node processing submodule 1023 is used to parse the INT header in the data packet after receiving the data packet from the previous node, directly add its own metadata segment in the INT metadata stack, generate an INT report, and encapsulate the INT report in an independent message and send it to the NMS;
NMS收集和计算模块103,用于在收到SF-INT的INT报告后,结合前后收到的多个相同packetID的INT报告进行处理,获得各节点的裸元数据段。The NMS collection and calculation module 103 is used to process, after receiving the INT report of SF-INT, a plurality of INT reports with the same packetID received before and after, to obtain the raw metadata segment of each node.
一种有状态的带内网络遥测系统各模块的具体实现参见一种有状态的带内网络遥测方法,此处不再重复说明。The specific implementation of each module of a stateful in-band network telemetry system can be found in a stateful in-band network telemetry method, which will not be repeated here.
应当理解的是,对本领域普通技术人员来说,可以根据上述说明加以改进与变换,而所有这些改进与变化都应属于本发明所附权利要求的保护范围。It should be understood that those skilled in the art can make improvements and changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210277734.9A CN114666681B (en) | 2022-03-21 | 2022-03-21 | A stateful in-band network telemetry method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210277734.9A CN114666681B (en) | 2022-03-21 | 2022-03-21 | A stateful in-band network telemetry method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114666681A CN114666681A (en) | 2022-06-24 |
CN114666681B true CN114666681B (en) | 2024-05-10 |
Family
ID=82032116
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210277734.9A Active CN114666681B (en) | 2022-03-21 | 2022-03-21 | A stateful in-band network telemetry method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114666681B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115051959B (en) * | 2022-08-16 | 2022-10-21 | 广东省新一代通信与网络创新研究院 | A method and system for telemetry based on user content |
CN115442282B (en) * | 2022-08-31 | 2023-08-29 | 深圳市风云实业有限公司 | Data acquisition system and method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1574789A (en) * | 1999-06-30 | 2005-02-02 | 倾向探测公司 | Method and apparatus for monitoring traffic in a network |
CN112422498A (en) * | 2020-09-04 | 2021-02-26 | 网络通信与安全紫金山实验室 | In-band network telemetry method, system and computer-readable storage medium |
CN113422707A (en) * | 2021-06-18 | 2021-09-21 | 新华三技术有限公司 | In-band network remote measuring method and equipment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11343261B2 (en) * | 2019-04-05 | 2022-05-24 | Cisco Technology, Inc. | Technologies for proving packet transit through uncompromised nodes |
US11563771B2 (en) * | 2019-11-25 | 2023-01-24 | Cisco Technology, Inc. | Network telemetry collection with packet metadata filtering |
-
2022
- 2022-03-21 CN CN202210277734.9A patent/CN114666681B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1574789A (en) * | 1999-06-30 | 2005-02-02 | 倾向探测公司 | Method and apparatus for monitoring traffic in a network |
CN112422498A (en) * | 2020-09-04 | 2021-02-26 | 网络通信与安全紫金山实验室 | In-band network telemetry method, system and computer-readable storage medium |
CN113422707A (en) * | 2021-06-18 | 2021-09-21 | 新华三技术有限公司 | In-band network remote measuring method and equipment |
Non-Patent Citations (1)
Title |
---|
基于P4的主动网络遥测机制;刘争争;毕军;周禹;王旸旸;林耘森箫;;通信学报;20180930(第S1期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114666681A (en) | 2022-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114666681B (en) | A stateful in-band network telemetry method and system | |
CN116208524B (en) | Method, equipment and system for detecting data message | |
US8243757B2 (en) | MAC header compression using a pointer | |
CN114050994B (en) | A Network Telemetry Method Based on SRv6 | |
EP2724505A1 (en) | Header compression with a code book | |
CN114338509B (en) | A real-time detection system and detection method for data packet forwarding loop based on in-band network telemetry technology | |
US9270367B2 (en) | Method and system for automatically discovering ODUflex bandwith lossless adjustment capability | |
CN110505112B (en) | Network performance monitoring method, device and storage medium | |
CN115766552B (en) | Network measurement method and device based on SRv and INT | |
CN111277480B (en) | Method and system for discarding high-availability seamless redundant looped network repeat frame | |
CN105577405A (en) | Method, device and system for reducing centralized protection switching time of POTN system | |
CN113542148B (en) | Message aggregation method and device, network card and readable storage medium | |
CN102447530A (en) | Data frame aggregation method with fault-tolerant function | |
CN107896141B (en) | FC-AE-ASM network data redundancy method | |
US20060098686A1 (en) | Frame transmitting apparatus and frame receiving apparatus | |
CN115118663B (en) | Method to obtain network congestion information combined with in-band network telemetry | |
JP5060057B2 (en) | Communication line monitoring system, relay device, and communication line monitoring method | |
CN113556290B (en) | FC frame redundancy receiving method, system, equipment and medium based on frame characteristic symbol | |
JP2005512462A (en) | System for transmitting additional information over a network | |
CN109391605B (en) | Data transmission method, device and system | |
RU2730390C1 (en) | Method and apparatus for automatic determination of inter-node communication topology in shared backup ring of transoceanic multiplex section | |
CN111682966B (en) | Network communication device with fault active reporting function, system and method thereof | |
CN116319468B (en) | Network telemetry method, device, switch, network, electronic equipment and medium | |
JP5817387B2 (en) | Communication apparatus and communication method | |
EP4064633B1 (en) | Data compression method and apparatus, network device, 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 |