Traffic processing method and device, routing equipment and storage medium

By using local forwarding tables and Color values ​​for service traffic identification and IFIT encapsulation in the SRv6 scenario, the problem of low flow detection efficiency in the prior art is solved, and more efficient service traffic identification and statistics are achieved.

CN119544610APending Publication Date: 2025-02-28MAIPU COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311125449.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the SRv6 scenario, existing IFIT solutions are difficult to quickly identify target service traffic, resulting in low flow detection efficiency and increasing the delay and detection error of message forwarding.

Method used

By matching the service traffic in the local forwarding table of the head node device and identifying it with the Color value, if the Color value of the forwarding table entry is the same as the target Color value, the service traffic is determined to be the target traffic, and IFIT encapsulation and statistics are performed.

Benefits of technology

It realizes rapid identification and statistics of service traffic, reduces the overhead and error of flow detection, improves detection efficiency, and avoids the problems of low matching efficiency and large forwarding delay in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544610A_ABST
    Figure CN119544610A_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of communications, and provides a traffic processing method and apparatus, a routing device and a storage medium, applied to a head node device of an SRv6 tunnel, the head node device being in communication connection with an access device, the method comprising: receiving a service traffic sent by the access device; and if the forwarding table item matched with the service flow exists in the local forwarding table and the Color value corresponding to the forwarding table item is the same as the target Color value, judging that the service flow is the target flow. According to the embodiment of the invention, the service flow characteristics can be quickly identified, so that more efficient flow detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a traffic processing method, device, routing equipment and storage medium. Background Art

[0002] With the rise and promotion of 5G technology, the cloud computing era has arrived, and a variety of emerging technologies have emerged. Segment Routing IPv6 (SRv6) based on the IPv6 forwarding plane is an important core technology supporting the implementation of the 5G cloud era. It is also a popular segment routing technology. It is based on the existing IPv6 forwarding plane to tunnel the traffic. By adding an IPv6 extension header, it can support flexible editing of path information in the message to achieve the purpose of network programmability. Since the 5G cloud network is very sensitive to network bandwidth, latency, and packet loss rate, it is necessary to detect the transmission quality of the service traffic in the SRv6 scenario in order to achieve timely optimization of service quality.

[0003] In-situ Flow Information Telemetry (IFIT) is a detection technology that directly detects network transmission quality indicators such as latency, packet loss, and jitter by marking the characteristics of real service flows in the network. Usually, SRv6 deployment scenarios are complex and there are many types of services. To achieve fine-grained in-situ flow detection of a certain service, the first step is to accurately and quickly identify specific target traffic among multiple service flows. At the same time, the overhead of the measurement itself should be reduced as much as possible, which will lead to a decrease in the transmission quality of the entire network and a large detection error.

[0004] The current existing IFIT solutions usually identify by directly matching the features of the message, for example, by matching the message IP quintuple (Source IP, Destnation IP, Source Port, Destnation Port, Protocol) information to determine the target traffic characteristics, or by binding the access control list (ACL) to match the target traffic characteristics. This will bring higher forwarding overhead to the forwarding of business messages, especially when there are many types of business, the search efficiency is significantly reduced, and the delay of message forwarding is increased. Summary of the invention

[0005] The object of the present invention is to provide a traffic processing method, apparatus, routing device and storage medium, which can quickly identify business traffic, thereby achieving more efficient flow detection.

[0006] The embodiments of the present invention can be implemented as follows:

[0007] In a first aspect, the present invention provides a traffic processing method, which is applied to a head node device of a segment routing SRv6 tunnel based on an IPv6 forwarding plane, wherein the head node device is communicatively connected to an access device, and the method comprises:

[0008] Receiving service traffic sent by the access device;

[0009] If there is a forwarding entry matching the service traffic in the local forwarding table, and the Color value corresponding to the forwarding entry is the same as the target Color value, the service traffic is determined to be the target traffic.

[0010] In an optional implementation manner, the head node device creates an IFIT measurement instance for flow detection, the IFIT measurement instance uses the target Color value as feature information for counting the target flow, and the method further includes:

[0011] According to the IFIT measurement instance whose characteristic information is the target Color value, the service flow is taken as the target flow to be counted.

[0012] In an optional implementation manner, the head node device is communicatively connected to the controller, and the method further includes:

[0013] receiving an IFIT measurement instance creation instruction sent by the controller, wherein the IFIT measurement instance creation instruction includes a target Color value;

[0014] Creating the IFIT measurement instance based on the IFIT measurement instance creation instruction, and generating a flow identifier FlowID of the IFIT measurement instance;

[0015] The target Color value is set as the feature information of the IFIT measurement instance.

[0016] In an optional implementation manner, the head node device communicates with other node devices through the SRv6 tunnel, and the method further includes:

[0017] If the Color value is the same as the target Color value, the service traffic is encapsulated by flow detection IFIT to obtain encapsulated service traffic, wherein the encapsulated service traffic includes an IFIT header, wherein the IFIT header includes a FlowID, and the FlowID is generated according to an identifier of the IFIT measurement instance and an identifier of the head node device;

[0018] The encapsulated service traffic is sent to the other node devices through the SRv6 tunnel, so that the other node devices perform statistics on the service traffic according to the IFIT measurement instance corresponding to the FlowID.

[0019] In a second aspect, the present invention provides a traffic processing method, which is applied to an intermediate node device of a segment routing SRv6 tunnel based on an IPv6 forwarding plane, wherein the intermediate node device communicates with a head node device of the SRv6 tunnel, and the head node device is connected to an access device in communication, and the method comprises:

[0020] Receive the encapsulated service traffic sent by the head node device, the encapsulated service traffic is obtained by the head node device performing IFIT encapsulation on the service traffic when there is a forwarding entry in the local forwarding table of the head node device that matches the service traffic sent by the access device to the head node device, and the Color value corresponding to the forwarding entry is the same as the target Color value, the encapsulated service traffic includes an IFIT header, and the IFIT header includes a flow identifier FlowID;

[0021] The encapsulated business traffic is parsed to obtain the FlowID, and a corresponding IFIT measurement instance is searched locally based on the FlowID. If so, the business traffic is counted based on the found IFIT measurement instance. If not, a new IFIT measurement instance is dynamically created based on the FlowID to realize the statistics of the business traffic.

[0022] In a third aspect, the present invention provides a traffic processing device, which is applied to a head node device of a segment routing SRv6 tunnel based on an IPv6 forwarding plane, wherein the head node device is communicatively connected to an access device, and the device comprises:

[0023] A service traffic receiving module, used to receive the service traffic sent by the access device;

[0024] The processing module is used to determine that the business flow is the target flow if there is a forwarding table entry matching the business flow in the local forwarding table and the Color value corresponding to the forwarding table entry is the same as the target Color value.

[0025] In a fourth aspect, the present invention provides a traffic processing device, which is applied to an intermediate node device of a segment routing SRv6 tunnel based on an IPv6 forwarding plane, wherein the intermediate node device communicates with a head node device of the SRv6 tunnel, and the head node device is communicatively connected with an access device, and the device comprises:

[0026] An encapsulated service traffic receiving module is used to receive the encapsulated service traffic sent by the head node device, the encapsulated service traffic is obtained by the head node device performing IFIT encapsulation on the service traffic when there is a forwarding entry matching the service traffic sent by the access device to the head node device in the local forwarding table of the head node device, and the Color value corresponding to the forwarding entry is the same as the target Color value, the encapsulated service traffic includes an IFIT header, and the IFIT header includes a flow identifier FlowID;

[0027] The statistical module is used to parse the encapsulated business traffic to obtain the FlowID, and search locally for a corresponding IFIT measurement instance based on the FlowID. If so, the business traffic is counted based on the found IFIT measurement instance. If not, a new IFIT measurement instance is dynamically created based on the FlowID to realize the statistics of the business traffic.

[0028] In a fifth aspect, the present invention provides a controller, comprising: an instruction sending module, configured to send an IFIT measurement instance creation instruction to a head node device of a segment routing SRv6 tunnel based on an IPv6 forwarding plane, so that the head node device creates an IFIT measurement instance and generates a flow identifier FlowID of the IFIT measurement instance, and sets a target Color value as characteristic information of the IFIT measurement instance; wherein the IFIT measurement instance creation instruction includes a target Color value;

[0029] Configuration module, used to configure the corresponding target Color value for the target traffic.

[0030] In a sixth aspect, the present invention provides a routing device, comprising a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the traffic processing method described in the first aspect, or implement the traffic processing method described in the second aspect when executing the program.

[0031] In a seventh aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the traffic processing method described in the first aspect is implemented, or the traffic processing method described in the second aspect is implemented.

[0032] Compared with the prior art, the traffic processing method, device, routing device and storage medium provided by the embodiments of the present invention, when the head node device of the SRv6 tunnel receives the service traffic sent by the access device, if there is a forwarding table entry matching the service traffic in the local forwarding table, and the Color value corresponding to the forwarding table entry is the same as the target Color value, then the service traffic is determined to be the target traffic, thereby realizing rapid identification of the service traffic. At the same time, the embodiments of the present invention avoid the low matching efficiency of directly matching messages or binding ACL rules in the prior art by reusing the Color value used for Color diversion, increasing the delay of message forwarding, and reducing the efficiency of flow detection, thereby realizing more efficient flow detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 This is an example diagram of an application scenario provided by an embodiment of the present invention.

[0035] Figure 2 An exemplary block diagram of a routing device provided in an embodiment of the present invention.

[0036] Figure 3 An example flow chart of a traffic processing method for a head node device applied to an SRv6 tunnel provided in an embodiment of the present invention.

[0037] Figure 4 An example flow chart of a traffic processing method for an intermediate node device applied to an SRv6 tunnel provided in an embodiment of the present invention.

[0038] Figure 5 An exemplary diagram of the entire process of in-flow detection provided by an embodiment of the present invention.

[0039] Figure 6 A block diagram of an example of a first traffic processing device applied to a head node device of an SRv6 tunnel provided in an embodiment of the present invention.

[0040] Figure 7 A block diagram of an example of a second traffic processing device applied to an intermediate node device of an SRv6 tunnel provided in an embodiment of the present invention.

[0041] Icons: 10-PE device; 20-CE device; 30-controller; 40-data analysis server; 50-P device; 60-routing device; 61-processor; 62-memory; 63-bus; 64-communication interface; 100-first traffic processing device; 110-service traffic receiving module; 120-processing module; 200-second traffic processing device; 210-encapsulated service traffic receiving module; 220-statistical module. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0043] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0045] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0046] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.

[0047] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0048] Please refer to Figure 1 , Figure 1 This is an example diagram of an application scenario provided by an embodiment of the present invention. Figure 1The application scenario is an example of the Segment Routing IPv6 Traffic Engineering Policy (SRv6 TE Policy) scenario based on the IPv6 forwarding plane. Figure 1 In the figure, the PE device 10 has two devices: a PE1 device and a PE2 device; the CE device 20 has two devices: a CE1 device and a CE2 device. The CE1 device and the PE1 device are communicatively connected, and the CE2 device and the PE2 device are communicatively connected. There is an SRv6 tunnel between the PE1 device and the PE2 device, and there is a P device 50 on the SRv6 tunnel. The PE1 device and the PE2 device are also communicatively connected to the controller 30 and the data analysis server 40, and the controller 30 is communicatively connected to the data analysis server 40.

[0049] In the SRv6 TE Policy scenario, the important attribute Color is introduced. Color can be used as an extended community attribute carried by the Border Gateway Protocol (BGP). When network devices forward traffic, they can introduce traffic into the SRv6 tunnel based on Color, and the control granularity can be accurate to each route. Users can plan Color on demand according to different types of services, or plan Color according to different service transmission quality requirements, such as low latency, high bandwidth, and high reliability, to achieve decoupling of tunnels and services.

[0050] In order to implement color-based traffic introduction, there are currently two color-based traffic introduction methods:

[0051] Method 1: The remote network device CE2 uses route mapping to issue corresponding policy routing according to service requirements. The policy routing sets the color value for the service, and then the BGP protocol notifies the remote routing entry RT1 carrying the color value X to the local device CE1. When the service traffic enters the interface of the CE1 device, it is searched for a route and hits the routing entry RT1. Then, based on the color value X, the traffic is introduced into the corresponding SRv6 TE Policy tunnel.

[0052] Method 2: Policy-Based Routing (PBR) is configured on the local device CE1, and the color value X is set for the route entry RT1 corresponding to the service traffic. When the service traffic enters the interface of the CE1 device, it is matched with the route entry RT1 after route lookup. Then, the traffic is directed to the corresponding SRv6 TE Policy tunnel based on the color value X.

[0053] The PE2 device notifies the routing table entries RT1 and RT2 of the CE2 device to the PE1 device through the BGP protocol. The service message is sent from the CE1 device, enters the SRv6 tunnel on the PE1 device, is forwarded through the SRv6 tunnel, reaches the P device 50 through the SRv6 tunnel, and is sent to the PE2 device through the P device 50. The PE2 device decapsulates the inner message and forwards it to the CE2 device.

[0054] The user can set the Color value through the controller 30 according to different business needs. In order to realize the IFIT function, the flow detection point is usually set on the head node device or the tail node device of the SRv6 tunnel. The flow detection point here refers to the device that needs to do IFIT statistics and is determined in combination with the direction of traffic flow. The head node device of the SRv6 tunnel is the device entering the SRv6 tunnel, and the tail node device of the SRv6 tunnel is the device exiting the SRv6 tunnel. The device located between the head node device and the tail node device on the SRv6 tunnel is the intermediate node device. Of course, the flow detection point can also be set on the intermediate node device between the head node device and the tail node device according to actual needs. Figure 1 In the example, the service traffic is sent from the CE1 device. The CE1 device is a type of access device, the PE1 device is the head node device of the SRv6 tunnel, the PE2 device is the tail node device of the SRv6 tunnel, and the P device is the intermediate node device. If there is a forwarding entry matching the service traffic in the local forwarding table of the head node device, by comparing the Color value corresponding to the forwarding entry with the target Color value, it is determined whether the service traffic is the target traffic, and then the statistics of the target traffic are realized.

[0055] Each device with a flow detection point completes the statistics of the target traffic passing through itself, and then sends the statistical results to the data analysis server 40, which performs a unified analysis on the statistical results to obtain quality indicators such as packet loss rate, delay, bandwidth, etc. of the target traffic.

[0056] The data analysis server 40 may also send the analysis results to the controller 30 so that the controller 30 can display the analysis results after visualization, so that the user can more intuitively understand the current network status based on the analysis results.

[0057] The PE device 10 refers to a Provider Edge device, also known as a border router, which is a key device that connects the network of the service provider and the network between the enterprise and the service provider. It can achieve isolation between different users through virtual routing and forwarding technology. The PE device can provide enterprises with various services, such as Internet access, virtual private network (VPN), multi-protocol label switching (MPLS), traffic engineering, etc., to optimize service quality and improve network performance.

[0058] CE device 20 refers to Customer Edge device, which is a type of access device and refers to a device directly used for the user end in computer communication. It can be a non-network endpoint device such as a PC, server, router, etc. CE device is connected to the network of the service provider (SP) through a physical or logical interface and is configured according to specific needs to ensure normal interconnection between the enterprise network and the service provider network.

[0059] The controller 30 is used to manage network devices and issue network configuration and service configuration, such as configuring Color values ​​for different service flows.

[0060] The data analysis server 40 is a server that analyzes and calculates traffic statistics results. The server may be a single server or a cluster of multiple servers, and may be a physical server or a virtual server.

[0061] The P device 50 is a core layer device, equivalent to a label switching router (LSR), has a powerful switching capability, and has a relatively simple interface type. The P device 50 and the PE device 10 communicate through a tunnel.

[0062] It should be noted that Figure 1 This is just an example of an application scenario. In actual deployment, the controller 30 and the data analysis server 40 can be combined into one device to perform the functions of the two devices.

[0063] based on Figure 1 This embodiment also provides a block diagram of a routing device, please refer to Figure 2 , Figure 2 A block diagram of a routing device according to an embodiment of the present invention is provided. Figure 2 The routing device 60 in may be Figure 1 The PE device 10 in the Figure 1 The P device 50 in the embodiment. The routing device 60 includes a processor 61, a memory 62, a bus 63 and a communication interface 64. The processor 61, the memory 62 and the communication interface 64 are connected via the bus 63.

[0064] Processor 61 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the traffic processing method applied to the head node device of the SRv6 tunnel or the traffic processing method applied to the intermediate node device of the SRv6 tunnel can be completed by the hardware integrated logic circuit in the processor 61 or the instructions in the form of software. The above-mentioned processor 61 can be a general-purpose processor, including CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field Programmable Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0065] The memory 62 is used to store programs, such as the first traffic processing device 100 or the second traffic processing device 200 in the following embodiments. The first traffic processing device 100 or the second traffic processing device 200 includes at least one software function module that can be stored in the memory 62 in the form of software or firmware or fixed in the OS (Operating System) of the routing device 60. After receiving the execution instruction, the processor 61 executes the program to implement the traffic processing method for the head node device of the SRv6 tunnel or the traffic processing method for the intermediate node device of the SRv6 tunnel disclosed in this embodiment.

[0066] When the routing device is a PE device 10 , it communicates with the CE device 20 and the P device 50 through the communication interface 64 . When the routing device is a P device 50 , it communicates with the PE device 10 through the communication interface 64 .

[0067] based on Figure 1 and Figure 2 This embodiment also provides a traffic processing method for a head node device applied to an SRv6 tunnel. Please refer to Figure 3 , Figure 3 The flow chart of the traffic processing method of the head node device applied to the SRv6 tunnel provided in the embodiment of the present invention is an example. The head node device 10 may be a device located at the entrance of the SRv6 tunnel. The method includes the following steps:

[0068] Step S101: receiving service traffic sent by an access device.

[0069] Step S102: If there is a forwarding entry matching the service traffic in the local forwarding table, and the Color value corresponding to the forwarding entry is the same as the target Color value, the service traffic is determined to be the target traffic.

[0070] In this embodiment, different Color values ​​can be set for different types of service flows according to specific detection requirements. For example, taking the access device as a CE device, the Color value of the video service is set to 10, and the Color value of the voice service is set to 20. If the service traffic sent by the CE device is a video service, the Color value of the video service is determined to be 10. If the service traffic sent by the CE device is a voice service, the Color value of the voice service is determined to be 20. Of course, the Color value can also be set according to the service delay instead of the service type. For example, a low-latency service is set to one Color value, and a high-latency service is set to another Color value, and so on.

[0071] In this embodiment, the Color drainage configuration can be Figure 1 The controller 30 in is configured.

[0072] In this embodiment, the target Color value may be a Color value set for Color diversion of the target traffic, or a Color value configured in other forms. If there is a forwarding entry matching the service traffic in the local forwarding table, by comparing the Color value corresponding to the forwarding entry with the target Color value, it is possible to determine whether the service traffic is the target traffic, thereby realizing the identification of the service traffic, so as to facilitate the subsequent statistics of the identified target traffic.

[0073] In the above method provided in this embodiment, if the target Color value adopts the Color value set for Color diversion of the target traffic, by reusing the Color value used for Color diversion, the problems of low matching efficiency, increased message forwarding delay, reduced efficiency of flow detection, etc. in the prior art of directly matching messages or binding ACL rules are avoided, and the business traffic is quickly identified, thereby achieving more efficient flow detection.

[0074] In an optional implementation, in order to facilitate the statistics of the identified target traffic, this embodiment also provides a method for implementing the statistics of the target traffic through an IFIT measurement instance. First, before the target traffic is counted, an IFIT measurement instance is created in the head node device. One method of creating an IFIT measurement instance is:

[0075] First, an IFIT measurement instance creation instruction sent by the controller is received;

[0076] In this embodiment, the IFIT measurement instance creation instruction may include a target Color value.

[0077] Secondly, based on the IFIT measurement instance creation instruction, an IFIT measurement instance is created and a flow identifier FlowID of the IFIT measurement instance is generated;

[0078] In this embodiment, the IFIT measurement instance is a carrier pre-created by the head node device based on the IFIT measurement instance creation instruction for counting the service traffic whose Color value is the target Color value. As many IFIT measurement instances as the service traffic of the number of Color values ​​needs to be counted, for example, there are two target Color values: 10 and 20, representing video service and voice service respectively, and correspondingly, two IFIT measurement instances are created.

[0079] Third, the target Color value is set as the feature information of the IFIT measurement instance.

[0080] In this embodiment, business traffic with the same characteristic information is counted in the same IFIT measurement instance. For example, the business traffic sends 5 messages between t1 and t2: message 1 to message 5, whose Color values ​​are 1, 2, 2, 2, and 1, respectively. IFIT measurement instance 1 counts messages with a Color value of 1, so the number of messages counted is 2. IFIT measurement instance 2 counts messages with a Color value of 2, so the number of messages counted is 3.

[0081] After the head node device creates an IFIT measurement instance, the head node device can count the received business traffic based on the IFIT measurement instance when the received business traffic hits the forwarding table item and determines that the Color value corresponding to the forwarding table item is the same as the target Color value. The specific implementation method is: according to the IFIT measurement instance with the characteristic information as the target Color value, the business traffic is counted as the target traffic.

[0082] In an optional implementation, the service traffic will be sent to the intermediate node device via the head node device. In order to implement statistics on the service traffic on the intermediate node device, after the head node device receives the service traffic and hits the forwarding table item, if it determines that the Color value corresponding to the forwarding table item is the same as the target Color value, the service traffic will be encapsulated with flow detection IFIT to obtain the encapsulated service traffic. The encapsulated service traffic includes an IFIT header, wherein the IFIT header includes the flow identifier FlowID of the IFIT measurement instance, and the FlowID is generated based on the identifier of the IFIT measurement instance and the identifier of the head node device.

[0083] In this embodiment, the identifier of the IFIT measurement instance is unique on the same device, but the identifiers of the IFIT measurement instances on different devices may be the same. In order to facilitate the data analysis server to analyze the measurement data of the IFIT measurement instance corresponding to the identifier of the same IFIT measurement instance on different head node devices, it is also necessary to associate the statistical measurement data, the identifier of the IFIT measurement instance and the device that created the IFIT measurement instance. Therefore, based on the identifier of the IFIT measurement instance and the identifier of the head node device, a FlowID representing the target traffic is generated. In this way, different devices send the FlowID and the corresponding statistical information to the data analysis server 40, and the data analysis server 40 can distinguish the target traffic from different devices based on the FlowID.

[0084] The head node device sends the encapsulated service traffic to the intermediate node device through the SRv6 tunnel, so that the intermediate node device counts the service traffic according to the FlowID.

[0085] In this embodiment, the intermediate node device can be a P device located on the SRv6 tunnel. It should be noted that if the tail node device located at the SRv6 tunnel needs to count the service traffic according to the FlowID, its implementation method is similar to that of the intermediate node device, that is, the intermediate node device will send the encapsulated service traffic to the tail node device of the SRv6 tunnel, so that the tail node of the SRv6 tunnel can count the service traffic according to the FlowID.

[0086] In this embodiment, the head node device performs IFIT encapsulation on the service traffic, which actually adds an IFIT header to the service message and fills the FlowID in the IFIT header.

[0087] In this embodiment, in order to realize the statistics of target traffic on the intermediate node device, this embodiment also provides a traffic processing method applied to the intermediate node device of the SRv6 tunnel. Figure 4 , Figure 4 A flow chart of an example of a traffic processing method for an intermediate node device applied to an SRv6 tunnel provided in an embodiment of the present invention, the method comprising the following steps:

[0088] Step S201, receiving the encapsulated service traffic sent by the head node device, the encapsulated service traffic is obtained by the head node device performing IFIT encapsulation on the service traffic when there is a forwarding entry matching the service traffic sent by the access device to the head node device in the local forwarding table of the head node device, and the Color value corresponding to the forwarding entry is the same as the target Color value, the encapsulated service traffic includes an IFIT header, and the IFIT header includes a FlowID;

[0089] Step S202, parse the encapsulated business traffic to obtain FlowID, and search the corresponding IFIT measurement instance locally based on the FlowID. If it exists, the business traffic is counted based on the found IFIT measurement instance. If it does not exist, a new IFIT measurement instance is dynamically created based on the FlowID to realize the statistics of the business traffic.

[0090] It should also be noted that, whether it is a head node device, an intermediate node device, or even a tail node device, the statistical items for the target traffic include but are not limited to the number of packets, timestamps, and packet bytes.

[0091] It should also be noted that in order to meet the detection requirements according to the preset detection cycle and facilitate the analysis of the measurement data of the same cycle, whether it is a head node device, an intermediate node device, or even a tail node device, when statistics are performed on the target traffic, it is also necessary to record the cycle number, and when sending the measurement data to the data analysis server 40, the measurement data and the cycle number are sent together.

[0092] In this embodiment, in order to explain the whole process of the flow detection as a whole, please refer to Figure 5 , Figure 5 An example diagram of the entire process of flow detection provided by an embodiment of the present invention, Figure 5 In this example, the controller and data analyzer are combined into one. PE1 is the entrance of the SRv6 tunnel, and PE2 is the exit of the SRv6 tunnel. Two IFIT measurement instances are created on PE1, and their target feature Color values ​​are configured as 10 and 20 respectively. Figure 5 The following example uses the example that CE1 sends service traffic to PE1, uses the target color value of 10 to identify the video service, and uses the target color value of 20 to identify the voice service.

[0093] The video service and voice service traffic are color-guided using route mapping on PE1 and PE2 devices, and the routing table entries RT1 and RT2 are announced to the PE1 device through the BGP protocol. Then the controller 30 deploys the IFIT end-to-end transmission quality detection of the video service and voice service on the PE1 and PE2 devices. The PE1 device creates two IFIT measurement instances and assigns unique FlowIDs, such as 141999 for the video service and 142000 for the voice service, to identify the two service flows. At the same time, the respective target flow features are set in the two IFIT measurement instances, and the feature information is the Color value of the video service is 10 and the Color value of the voice service is 20.

[0094] The two types of service traffic are sent from the CE1 device, and the traffic destination is the CE2 device. The message completes the route search in the inbound direction of the PE1 device. The video service traffic hits the routing table entry RT1, and the voice service traffic hits the routing table entry RT2. Then, according to the Color attribute carried on the routing table entry, it enters the SRv6 tunnel for forwarding. When the service traffic enters the PE1 device, the service traffic enters the IFIT detection stage. The video service traffic passes the Color value of 10 and matches the target traffic feature, which is the IFIT measurement instance with a Color value of 10. The voice service traffic passes the Color value of 20 and matches the target traffic feature, which is the IFIT measurement instance with a Color value of 20. In this way, there is no need to identify the target traffic according to the content of the IP quintuple of the original message during the IFIT detection stage as in the prior art, so as to achieve the purpose of quickly identifying the target traffic without paying attention to the content of the original message, and avoid the forwarding overhead caused by the secondary matching of message information.

[0095] After completing the measurement data statistics (including the number of statistical messages, message timestamps, and message bytes), the PE1 device encapsulates the IFIT header, mainly encapsulating the FlowID into the message, and the message continues to be forwarded. When the message is forwarded to the P device and PE2 device through the SRv6 tunnel, the message header is parsed to identify the IFIT message header, and the FlowID is parsed. If it is the first time to receive the service traffic of the FlowID, it is necessary to dynamically create an IFIT measurement instance for the FlowID, and then perform IFIT measurement to achieve measurement data statistics for the service traffic. When subsequent messages come to the P device and PE2 device again, if the dynamically created IFIT measurement instance has not aged and been deleted, there is no need to dynamically create the IFIT measurement instance again, but directly perform IFIT measurement to achieve measurement data statistics for the service traffic.

[0096] It should be noted that since PE2 is an end-node device, after completing the IFIT measurement on PE2, it is necessary to remove the IFIT header in the service message and restore the original message for continued forwarding.

[0097] When a measurement cycle (for example, cycle number is 1000) ends, PE1 device, P device and PE2 device each send the measurement data to the data analysis server 40 through Telemetry message. Taking the video service of PE1 device as an example, the Telemetry message needs to carry Color (10), FlowID (141999), cycle number (1000), and measurement data (number of messages, timestamp, number of message bytes) so that the data analysis server 40 can perform data analysis and calculation on the measurement data with the same cycle number and the same FlowID when performing data analysis and calculation to obtain measurement results such as packet loss rate, delay, and bandwidth, and send the measurement results and the corresponding Color value to the controller 30. The controller 30 then matches the Color value with the service Color value previously planned by the controller. The detection result with a Color value of 10 corresponds to the transmission quality of the video service, and the detection result with a Color value of 20 corresponds to the transmission quality of the voice service.

[0098] In order to execute the corresponding steps in the above embodiment and each possible implementation method, the following is an implementation method of a block diagram of a first traffic processing device applied to a head node device of an SRv6 tunnel. Figure 6 , Figure 6 The block diagram of the block diagram of the first traffic processing device 100 applied to the head node device of the SRv6 tunnel provided by the embodiment of the present invention is shown. It should be noted that the basic principle and technical effect of the first traffic processing device 100 provided in this embodiment are the same as those in the above embodiment, and for the sake of brief description, they are not mentioned in this embodiment.

[0099] The first traffic processing device 100 includes a service traffic receiving module 110 and a processing module 120 .

[0100] The first traffic processing device 100 is applied to a head node device of an SRv6 tunnel, the head node device is communicatively connected with an access device, and the device includes:

[0101] The service traffic receiving module 110 is used to receive the service traffic sent by the access device;

[0102] The processing module 120 is used to determine that the business traffic is the target traffic if there is a forwarding entry matching the business traffic in the local forwarding table and the Color value corresponding to the forwarding entry is the same as the target Color value. In an optional implementation, the head node device creates an IFIT measurement instance, and the IFIT measurement instance uses the target Color value as characteristic information to count the target traffic;

[0103] The processing module 120 is further configured to: perform statistics on the service flow as the target flow according to the IFIT measurement instance whose characteristic information is the target Color value.

[0104] In an optional implementation, the head node device is communicatively connected to the controller, and the processing module 120 is further used to: receive an IFIT measurement instance creation instruction sent by the controller; create an IFIT measurement instance based on the IFIT measurement instance creation instruction and generate an identifier of the IFIT measurement instance; and set the target Color value as characteristic information of the IFIT measurement instance.

[0105] In an optional implementation, the head node device communicates with the intermediate node device via an SRv6 tunnel, and the processing module 120 is also used to: if the Color value is the same as the target Color value, perform IFIT encapsulation on the service traffic to obtain encapsulated service traffic, the encapsulated service traffic includes an IFIT header, wherein the IFIT header includes a FlowID, and the FlowID is generated based on the identifier of the IFIT measurement instance and the identifier of the head node device; send the encapsulated service traffic to the intermediate node device via the SRv6 tunnel, so that the intermediate node device performs statistics on the service traffic according to the IFIT measurement instance corresponding to the FlowID.

[0106] In order to execute the corresponding steps in the above embodiment and each possible implementation method, an implementation method of a second traffic processing device 200 applied to a node device of an SRv6 tunnel is given below. Figure 7 , Figure 7 A block diagram of a second traffic processing device 200 for an intermediate node device of an SRv6 tunnel provided in an embodiment of the present invention is shown. The second traffic processing device 200 includes an encapsulated service traffic receiving module 210 and a statistical module 220. It should be noted that the basic principle and technical effect of the second traffic processing device 200 provided in this embodiment are the same as those in the above embodiment, and for the sake of brief description, they are not mentioned in this embodiment.

[0107] The second traffic processing device 200 is applied to the intermediate node device of the SRv6 tunnel. The intermediate node device communicates with the head node device of the SRv6 tunnel. The head node device is communicated with the access device. The second traffic processing device 200 includes an encapsulated service traffic receiving module 210 and a statistical module 220.

[0108] The encapsulated service traffic receiving module 210 is used to receive the encapsulated service traffic sent by the head node device. The encapsulated service traffic is obtained after the node device performs IFIT encapsulation on the service traffic when there is a forwarding table entry in the local forwarding table of the head node device that matches the service traffic sent by the access device to the head node device, and the Color value corresponding to the forwarding table entry is the same as the target Color value. The encapsulated service traffic includes an IFIT header, and the IFIT header includes a FlowID.

[0109] The statistical module 220 is used to parse the encapsulated business traffic, obtain the FlowID, and search locally based on the FlowID to see if there is a corresponding IFIT measurement instance. If so, the business traffic is counted based on the found IFIT measurement instance. If not, a new IFIT measurement instance is dynamically created based on the FlowID to realize business traffic statistics.

[0110] An embodiment of the present invention provides a controller, including an instruction sending module and a configuration module.

[0111] An instruction sending module is used to send an IFIT measurement instance creation instruction to a head node device of a segment routing SRv6 tunnel based on an IPv6 forwarding plane, so that the head node device creates an IFIT measurement instance and generates a flow identifier FlowID of the IFIT measurement instance, and sets a target Color value as characteristic information of the IFIT measurement instance; wherein the IFIT measurement instance creation instruction includes the target Color value;

[0112] Configuration module, used to configure the corresponding target Color value for the target traffic.

[0113] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements any one of the aforementioned embodiments for a traffic processing method applied to a head node device of an SRv6 tunnel, or implements any one of the aforementioned embodiments for a traffic processing method applied to an intermediate node device of an SRv6 tunnel.

[0114] In summary, the embodiment of the present invention provides a traffic processing method, device, routing device and storage medium, which are applied to the head node device of the segment routing SRv6 tunnel based on the IPv6 forwarding plane, and the head node device is connected to the access device in communication, and the method includes: receiving the service traffic sent by the access device; if there is a forwarding table item matching the service traffic in the local forwarding table, and the Color value corresponding to the forwarding table item is the same as the target Color value, then the service traffic is determined to be the target traffic. Compared with the prior art, this embodiment has at least the following advantages: (1) By reusing the Color value used for Color diversion, the problems of low matching efficiency, increased message forwarding delay, and reduced flow detection efficiency in the prior art of directly matching messages or binding ACL rules can be avoided, and the service traffic can be quickly identified, thereby achieving more efficient flow detection; (2) The IFIT function can be flexibly deployed based on different measurement requirements or services. For example, if some services only need to ensure low latency, the same Color value can be planned for them. When configuring the IFIT measurement instance, only the delay detection function is enabled and the packet loss detection function is disabled, which can achieve the purpose of reducing the processing pressure of the device and the measurement result is more accurate.

[0115] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A traffic processing method, characterized in that: A head node device applied to a segment routing SRv6 tunnel based on an IPv6 forwarding plane, wherein the head node device is communicatively connected with an access device, and the method comprises: Receiving service traffic sent by the access device; If there is a forwarding entry matching the service flow in the local forwarding table, and the Color value corresponding to the forwarding entry is the same as the target Color value, the service flow is determined to be the target flow.

2. The flow processing method according to claim 1, characterized in that: The head node device creates an IFIT measurement instance for flow detection, the IFIT measurement instance uses the target Color value as feature information for counting the target flow, and the method further includes: According to the IFIT measurement instance whose characteristic information is the target Color value, the service flow is taken as the target flow to be counted.

3. The flow processing method according to claim 2, characterized in that: The head node device is communicatively connected with the controller, and the method further comprises: receiving an IFIT measurement instance creation instruction sent by the controller, wherein the IFIT measurement instance creation instruction includes a target Color value; Creating the IFIT measurement instance based on the IFIT measurement instance creation instruction, and generating a flow identifier FlowID of the IFIT measurement instance; The target Color value is set as the feature information of the IFIT measurement instance.

4. The traffic processing method according to claim 3, characterized in that: The head node device communicates with other node devices through the SRv6 tunnel, and the method further includes: If the Color value is the same as the target Color value, the service traffic is encapsulated by flow detection IFIT to obtain encapsulated service traffic, wherein the encapsulated service traffic includes an IFIT header, wherein the IFIT header includes a FlowID, and the FlowID is generated according to an identifier of the IFIT measurement instance and an identifier of the head node device; The encapsulated service traffic is sent to the other node devices through the SRv6 tunnel, so that the other node devices perform statistics on the service traffic according to the IFIT measurement instance corresponding to the FlowID.

5. A traffic processing method, characterized in that: An intermediate node device applied to a segment routing SRv6 tunnel based on an IPv6 forwarding plane, the intermediate node device communicates with a head node device of the SRv6 tunnel, the head node device is communicatively connected with an access device, and the method includes: Receive the encapsulated service traffic sent by the head node device, the encapsulated service traffic is obtained by the head node device performing IFIT encapsulation on the service traffic when there is a forwarding entry in the local forwarding table of the head node device that matches the service traffic sent by the access device to the head node device, and the Color value corresponding to the forwarding entry is the same as the target Color value, the encapsulated service traffic includes an IFIT header, and the IFIT header includes a flow identifier FlowID; The encapsulated business traffic is parsed to obtain the FlowID, and a corresponding IFIT measurement instance is searched locally based on the FlowID. If so, the business traffic is counted based on the found IFIT measurement instance. If not, a new IFIT measurement instance is dynamically created based on the FlowID to realize the statistics of the business traffic.

6. A flow processing device, characterized in that: A head node device applied to a segment routing SRv6 tunnel based on an IPv6 forwarding plane, wherein the head node device is communicatively connected with an access device, and the device comprises: A service traffic receiving module, used to receive the service traffic sent by the access device; The processing module is used to determine that the business flow is the target flow if there is a forwarding table entry matching the business flow in the local forwarding table and the Color value corresponding to the forwarding table entry is the same as the target Color value.

7. A flow processing device, characterized in that: An intermediate node device applied to a segment routing SRv6 tunnel based on an IPv6 forwarding plane, the intermediate node device communicates with a head node device of the SRv6 tunnel, the head node device is communicatively connected with an access device, and the device comprises: An encapsulated service traffic receiving module is used to receive the encapsulated service traffic sent by the head node device, the encapsulated service traffic is obtained by the head node device performing IFIT encapsulation on the service traffic when there is a forwarding entry matching the service traffic sent by the access device to the head node device in the local forwarding table of the head node device, and the Color value corresponding to the forwarding entry is the same as the target Color value, the encapsulated service traffic includes an IFIT header, and the IFIT header includes a flow identifier FlowID; The statistical module is used to parse the encapsulated business traffic to obtain the FlowID, and search locally for a corresponding IFIT measurement instance based on the FlowID. If so, the business traffic is counted based on the found IFIT measurement instance. If not, a new IFIT measurement instance is dynamically created based on the FlowID to realize the statistics of the business traffic.

8. A controller, characterized in that: include: An instruction sending module is used to send an IFIT measurement instance creation instruction to a head node device of a segment routing SRv6 tunnel based on an IPv6 forwarding plane, so that the head node device creates an IFIT measurement instance and generates a flow identifier FlowID of the IFIT measurement instance, and sets a target Color value as characteristic information of the IFIT measurement instance; wherein the IFIT measurement instance creation instruction includes a target Color value; Configuration module, used to configure the corresponding target Color value for the target traffic.

9. A routing device, characterized in that: It includes a processor and a memory, the memory is used to store a program, and the processor is used to implement the traffic processing method described in any one of claims 1 to 4, or the traffic processing method described in claim 5 when executing the program.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the traffic processing method described in any one of claims 1 to 4 is implemented, or the traffic processing method described in claim 5 is implemented.