Forwarding message processing method, device, equipment and storage medium
By performing ACL matching and flow diagnosis based on the packet quintuple in network devices, collecting and encapsulating pipeline packet processing data, rapid fault point diagnosis is achieved, solving the problems of difficult diagnosis and bandwidth usage in the network, and improving processing speed and efficiency.
Patent Information
- Application Number
- CN202310553119.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-05-16
AI Technical Summary
When message processing in the network is abnormal, it is difficult to diagnose the fault point, a large amount of network bandwidth is occupied, and the chip processing performance is low.
After the forwarding data packet enters the device port, ACL matching is performed based on the packet quintuple to determine whether the flow diagnosis function is enabled. The pipeline packet processing data of the first site is collected and encapsulated along the flow. The data is processed by the intermediate site and forwarded to the tail site. Finally, a configuration search is performed at the tail site to obtain fault diagnosis information.
In the event of abnormal message processing in the network, fault point diagnosis can be quickly realized without occupying additional network bandwidth, reducing chip processing pressure, improving the speed and efficiency of forwarding message processing, and providing assistance for network fault location and performance diagnosis.
Smart Images

Figure CN116527476B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication network technology, and in particular to a forwarding message processing method, device, equipment and storage medium. Background Art
[0002] As network scale and business models expand, the types of business data packets in the network are increasing. All data packets need to be processed by network equipment. In the event of abnormal packet processing in the network, how to quickly diagnose the fault point becomes increasingly difficult. The existing mirroring method for diagnosing forwarding data failures not only consumes a large amount of network bandwidth and reduces chip processing performance, but also fails to obtain the data forwarded and processed internally by the network equipment, resulting in the inability to quickly diagnose the fault. Summary of the Invention
[0003] The main purpose of the present invention is to provide a forwarding message processing method, device, equipment and storage medium, aiming to solve the technical problems in the prior art of difficulty in diagnosing fault points, occupying a large amount of network bandwidth, and low chip processing performance under abnormal message processing conditions in the network.
[0004] In a first aspect, the present invention provides a forwarding message processing method, the forwarding message processing method comprising the following steps:
[0005] After the forwarding data message enters the device port, the forwarding data message is matched against the ACL based on the message quintuple, and whether to enable the flow diagnosis function is determined according to the matched forwarding data message;
[0006] When the flow-based diagnosis function is enabled, the pipeline message processing data of the first station is collected and encapsulated into the forwarding data message along with the flow;
[0007] Processing the forwarded data message through the intermediate site and forwarding the processed data message to the tail site;
[0008] The tail station performs configuration search on the processed data message to obtain fault diagnosis information, and sends the fault diagnosis information.
[0009] Optionally, after the forwarded data packet enters the device port, performing ACL matching on the forwarded data packet based on the packet quintuple, and determining whether to enable the flow diagnosis function according to the matched forwarded data packet, includes:
[0010] After the forwarding data message enters the device port, the forwarding data message is parsed based on the message quintuple, and the ACL table in the forwarding data message is read;
[0011] Performing message quintuple matching on the forwarded data message according to the ACL table, and obtaining a flow ID after a successful match;
[0012] It is determined whether the flow diagnosis function is currently enabled according to the flow ID.
[0013] Optionally, when the flow-based diagnosis function is enabled, the pipeline message processing data of the head station is collected and encapsulated into the forwarding data message along with the flow, including:
[0014] When the flow diagnosis function is turned on, the corresponding longest prefix match LPM table is read according to the ACL flow ID, the L3 next hop configuration is read according to the LPM table, VPN label encapsulation is performed, and the option header is reserved, the label forwarding path LSP next hop configuration is read, LSP tunnel label encapsulation is performed, the arp configuration is read, arp encapsulation is performed, and the pipeline message processing data of the first site is generated;
[0015] When the service type is IPv4, encapsulating the pipeline message processing data into the option private data of the IPv4 message;
[0016] When the service type is IPv6, the pipeline message processing data is encapsulated into a destination option header.
[0017] Optionally, when the service type is IPv4, encapsulating the pipeline message processing data into option private data of the IPv4 message includes:
[0018] When the service type is IPv4, the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index and the ARP hardware index corresponding to the pipeline message processing data are stored in the option private data of the IPv4 message.
[0019] Optionally, when the service type is IPv6, encapsulating the pipeline message processing data into a destination options header includes:
[0020] When the service type is IPv6, the chip forwarding data in the pipeline message processing data is encapsulated into a destination option header and forwarded along with the IPv6 service.
[0021] Optionally, the performing information processing on the forwarded data message by the intermediate site and forwarding the processed data message to the tail site includes:
[0022] When the intermediate site does not support option processing, the data message is forwarded according to normal IP forwarding;
[0023] When the intermediate site supports option processing, the forwarding data message is encapsulated according to a preset encapsulation format of the option, and the encapsulated data message is forwarded to the tail site.
[0024] Optionally, performing configuration search on the processed data message by the tail station to obtain fault diagnosis information, and issuing the fault diagnosis information includes:
[0025] Performing message parsing on the processed data message by the tail station to obtain a message parsing result;
[0026] When the LSP label is not popped, the non-tail station ISP action is eliminated;
[0027] When the LSP label is popped, determining whether the VPN label action is L3 service VPN;
[0028] When the VPN label action is not the L3 service VPN, the non-tail station label action is removed;
[0029] When the VPN label action is the L3 service VPN, read the LPM table, read the L3 service next hop configuration, perform VPN label encapsulation, and parse the option header to obtain option information;
[0030] Based on the ACL flow ID, the physical engine type, engine access node, logical engine type, logical engine ID and next engine indication flag in the option information are stored;
[0031] Read the arp configuration information, perform arp encapsulation according to the arp configuration information, encapsulate the internal forwarding header, obtain fault diagnosis information, and send the fault diagnosis information to the downlink for processing through the backplane.
[0032] In a second aspect, to achieve the above-mentioned object, the present invention further provides a forwarding message processing device, the forwarding message processing device comprising:
[0033] A matching module is used to perform ACL matching on the forwarded data message based on the message quintuple after the forwarded data message enters the device port, and determine whether to enable the flow diagnosis function according to the matched forwarded data message;
[0034] A collection and encapsulation module, configured to collect pipeline message processing data of the head station and encapsulate the data into the forwarding data message when the flow-by-flow diagnosis function is enabled;
[0035] A forwarding module, configured to process the forwarded data message through an intermediate station and forward the processed data message to a tail station;
[0036] The sending module is used to perform configuration search on the processed data message through the tail station, obtain fault diagnosis information, and send the fault diagnosis information.
[0037] In the third aspect, in order to achieve the above-mentioned purpose, the present invention also proposes a forwarding message processing device, which includes: a memory, a processor, and a forwarding message processing program stored on the memory and runnable on the processor, and the forwarding message processing program is configured to implement the steps of the forwarding message processing method as described above.
[0038] In a fourth aspect, in order to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a forwarding message processing program is stored, and when the forwarding message processing program is executed by a processor, the steps of the forwarding message processing method as described above are implemented.
[0039] The forwarding message processing method proposed in the present invention performs ACL matching on the forwarding data message based on the message quintuple after the forwarding data message enters the device port, and determines whether to enable the flow diagnosis function according to the matched forwarding data message; when the flow diagnosis function is enabled, the pipeline message processing data of the head station is collected and encapsulated into the forwarding data message along with the flow; the forwarding data message is processed by the intermediate station, and the processed data message is forwarded to the tail station; the processed data message is configured and searched by the tail station to obtain fault diagnosis information, and the fault diagnosis information is issued. The method can quickly realize fault point diagnosis in the case of abnormal message processing in the network, does not require additional network bandwidth, does not increase redundant copy messages, reduces chip processing pressure, realizes the measurement of performance parameters in the network, can provide great help for network fault location and performance diagnosis, can quickly locate the abnormal cause of the faulty service in scenarios with large business volume such as engineering live networks, provides strong support for rapid business recovery, and improves the speed and efficiency of forwarding message processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;
[0041] Figure 2 This is a flow chart of a first embodiment of a method for processing a forwarded message according to the present invention;
[0042] Figure 3 This is a flow chart of a second embodiment of a method for processing a forwarded message according to the present invention;
[0043] Figure 4 Schematic diagram of the flow of the third embodiment of the forwarding message processing method of the present invention;
[0044] Figure 5 Schematic diagram of the flow of a fourth embodiment of a method for processing forwarded messages according to the present invention;
[0045] Figure 6 Schematic diagram of the flow of a fifth embodiment of a method for processing forwarded messages according to the present invention;
[0046] Figure 7 This is a functional module diagram of the first embodiment of the forwarding message processing device of the present invention.
[0047] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0049] The solution of the embodiment of the present invention is mainly: after the forwarding data message enters the device port, the forwarding data message is matched with the ACL based on the message quintuple, and the flow-following diagnosis function is determined according to the matched forwarding data message; when the flow-following diagnosis function is turned on, the pipeline message processing data of the head site is collected and encapsulated into the forwarding data message along with the flow; the forwarding data message is processed by the intermediate site, and the processed data message is forwarded to the tail site; the processed data message is configured to be searched by the tail site to obtain fault diagnosis information, and the fault diagnosis information is sent down It can quickly diagnose fault points when message processing in the network is abnormal. It does not require additional network bandwidth, will not add redundant duplicate messages, reduces chip processing pressure, and realizes the measurement of performance parameters in the network. It can provide great help for network fault location and performance diagnosis. In scenarios with large business volume such as engineering live networks, it can quickly locate the abnormal cause of the faulty business, provide strong support for the rapid recovery of the business, improve the speed and efficiency of forwarding message processing, and solve the technical problems in the existing technology of abnormal message processing in the network, such as difficulty in diagnosing fault points, occupying a large amount of network bandwidth, and low chip processing performance.
[0050] Reference Figure 1 , Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0051] like Figure 1As shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (Non-Volatile Memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0052] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0053] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating device, a network communication module, a user interface module and a forwarding message processing program.
[0054] The device of the present invention calls the forwarding message processing program stored in the memory 1005 through the processor 1001 and performs the following operations:
[0055] After the forwarding data message enters the device port, the forwarding data message is matched against the ACL based on the message quintuple, and whether to enable the flow diagnosis function is determined according to the matched forwarding data message;
[0056] When the flow-based diagnosis function is enabled, the pipeline message processing data of the first station is collected and encapsulated into the forwarding data message along with the flow;
[0057] Processing the forwarded data message through the intermediate site and forwarding the processed data message to the tail site;
[0058] The tail station performs configuration search on the processed data message to obtain fault diagnosis information, and sends the fault diagnosis information.
[0059] The device of the present invention calls the forwarding message processing program stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0060] After the forwarding data message enters the device port, the forwarding data message is parsed based on the message quintuple, and the ACL table in the forwarding data message is read;
[0061] Performing message quintuple matching on the forwarded data message according to the ACL table, and obtaining a flow ID after a successful match;
[0062] It is determined whether the flow diagnosis function is currently enabled according to the flow ID.
[0063] The device of the present invention calls the forwarding message processing program stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0064] When the flow diagnosis function is turned on, the corresponding longest prefix match LPM table is read according to the ACL flow ID, the L3 next hop configuration is read according to the LPM table, VPN label encapsulation is performed, and the option header is reserved, the label forwarding path LSP next hop configuration is read, LSP tunnel label encapsulation is performed, the arp configuration is read, arp encapsulation is performed, and the pipeline message processing data of the first site is generated;
[0065] When the service type is IPv4, encapsulating the pipeline message processing data into the option private data of the IPv4 message;
[0066] When the service type is IPv6, the pipeline message processing data is encapsulated into a destination option header.
[0067] The device of the present invention calls the forwarding message processing program stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0068] When the service type is IPv4, the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index and the ARP hardware index corresponding to the pipeline message processing data are stored in the option private data of the IPv4 message.
[0069] The device of the present invention calls the forwarding message processing program stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0070] When the service type is IPv6, the chip forwarding data in the pipeline message processing data is encapsulated into a destination option header and forwarded along with the IPv6 service.
[0071] The device of the present invention calls the forwarding message processing program stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0072] When the intermediate site does not support option processing, the data message is forwarded according to normal IP forwarding;
[0073] When the intermediate site supports option processing, the forwarding data message is encapsulated according to a preset encapsulation format of the option, and the encapsulated data message is forwarded to the tail site.
[0074] The device of the present invention calls the forwarding message processing program stored in the memory 1005 through the processor 1001, and further performs the following operations:
[0075] Performing message parsing on the processed data message by the tail station to obtain a message parsing result;
[0076] When the LSP label is not popped, the non-tail station ISP action is eliminated;
[0077] When the LSP label is popped, determining whether the VPN label action is L3 service VPN;
[0078] When the VPN label action is not the L3 service VPN, the non-tail station label action is removed;
[0079] When the VPN label action is the L3 service VPN, read the LPM table, read the L3 service next hop configuration, perform VPN label encapsulation, and parse the option header to obtain option information;
[0080] Based on the ACL flow ID, the physical engine type, engine access node, logical engine type, logical engine ID and next engine indication flag in the option information are stored;
[0081] Read the arp configuration information, perform arp encapsulation according to the arp configuration information, encapsulate the internal forwarding header, obtain fault diagnosis information, and send the fault diagnosis information to the downlink for processing through the backplane.
[0082] Through the above scheme, this embodiment performs ACL matching on the forwarded data message based on the message quintuple after the forwarded data message enters the device port, and determines whether to enable the flow-following diagnosis function based on the matched forwarded data message; when the flow-following diagnosis function is enabled, the pipeline message processing data of the head site is collected and encapsulated into the forwarded data message along with the flow; the forwarded data message is processed by the intermediate site, and the processed data message is forwarded to the tail site; the processed data message is configured and searched by the tail site to obtain fault diagnosis information, and the fault diagnosis information is issued. In the case of abnormal message processing in the network, fault point diagnosis can be quickly realized without occupying additional network bandwidth, adding unnecessary duplicate messages, reducing chip processing pressure, and realizing the measurement of performance parameters in the network. It can provide great help for network fault location and performance diagnosis. In scenarios with large business volume such as live engineering networks, the abnormal cause of the faulty business can be quickly located, providing strong support for rapid business recovery, and improving the speed and efficiency of forwarding message processing.
[0083] Based on the above hardware structure, an embodiment of a forwarding message processing method of the present invention is proposed.
[0084] Reference Figure 2 , Figure 2 This is a flow chart of the first embodiment of the method for processing forwarding messages of the present invention.
[0085] In the first embodiment, the forwarding message processing method includes the following steps:
[0086] Step S10: After the forwarded data message enters the device port, ACL matching is performed on the forwarded data message based on the message quintuple, and whether to enable the flow diagnosis function is determined according to the matched forwarded data message.
[0087] It should be noted that the forwarding data message is a message corresponding to the forwarding data of the communication network chip pipeline service. Access Control Lists (ACL) matching is performed on the forwarding data message, and matching can be performed based on the message quintuple rule. ACL matching is a prerequisite for implementing the present invention, thereby determining whether to enable the flow diagnosis function.
[0088] In the specific implementation, ACL rules are configured by users. If a packet hits the forwarding plane, it is considered that the flow diagnosis function is enabled.
[0089] Step S20: When the flow-by-flow diagnosis function is enabled, the pipeline message processing data of the head station is collected and encapsulated into the forwarding data message along with the flow.
[0090] It is understandable that when the in-flow diagnosis function is enabled, pipeline message processing data of forwarded data messages passing through the head station can be collected and can be encapsulated in-flow.
[0091] Step S30: Process the forwarded data message through the intermediate site, and forward the processed data message to the tail site.
[0092] It should be understood that the forwarded data message may be processed by the intermediate site, and then the processed data message may be forwarded to the tail site.
[0093] Step S40: performing configuration search on the processed data message through the tail station to obtain fault diagnosis information, and sending the fault diagnosis information.
[0094] It should be understood that the tail station may perform a service configuration search on the message forwarded to the tail station, thereby obtaining a search result, ie, fault dispute information, and then issuing the fault diagnosis information.
[0095] Furthermore, the step S40 specifically includes the following steps:
[0096] Performing message parsing on the processed data message by the tail station to obtain a message parsing result;
[0097] When the LSP label is not popped, the non-tail station ISP action is eliminated;
[0098] When the LSP label is popped, determining whether the VPN label action is L3 service VPN;
[0099] When the VPN label action is not the L3 service VPN, the non-tail station label action is removed;
[0100] When the VPN label action is the L3 service VPN, read the LPM table, read the L3 service next hop configuration, perform VPN label encapsulation, and parse the option header to obtain option information;
[0101] Based on the ACL flow ID, the physical engine type, engine access node, logical engine type, logical engine ID and next engine indication flag in the option information are stored;
[0102] Read the arp configuration information, perform arp encapsulation according to the arp configuration information, encapsulate the internal forwarding header, obtain fault diagnosis information, and send the fault diagnosis information to the downlink for processing through the backplane.
[0103] It should be understood that the option information is used to carry pipeline diagnostic information, including physical engine type, engine access node, logical engine type, logical engine id, next engine indication flag, etc. The physical engine type may include SRAM / EM / TCAM / LPM / DRAM, engine access node: the AP point for accessing the engine in the pipeline; logical engine type: the type when each physical table is logically divided into multiple tables; logical engine id: the table id for forwarding specific access. Generally, next can be used to indicate whether the pipeline diagnosis is completed.
[0104] It should be noted that after receiving the message with option, the tail station completes the service configuration search, stores the option information based on flow_id, that is, the ACL flow ID, deletes the option, and then forwards the message.
[0105] In a specific implementation, the processed data packet is parsed by the tail site to obtain a packet parsing result; when the LSP label is not popped up, the non-tail site ISP action is eliminated; when the LSP label is popped up, it is determined whether the VPN label action is the L3 service VPN; when the VPN label action is not the L3 service VPN, the non-tail site label action is eliminated; when the VPN label action is the L3 service VPN, the LPM table is read, the L3 service next hop configuration is read, the VPN label is encapsulated, and the option header is parsed. The option header includes forwarding plane pipeline information collected by the head site and sites along the way that support option processing to obtain option information; the physical engine type, engine access node, logical engine type, logical engine ID and next engine indication flag in the option information are stored based on the ACL flow ID; the arp configuration information is read, arp encapsulation is performed according to the arp configuration information, and the internal forwarding header is encapsulated to obtain fault diagnosis information, and the fault diagnosis information is sent to the downlink for processing through the backplane.
[0106] Through the above scheme, this embodiment performs ACL matching on the forwarded data message based on the message quintuple after the forwarded data message enters the device port, and determines whether to enable the flow-following diagnosis function based on the matched forwarded data message; when the flow-following diagnosis function is enabled, the pipeline message processing data of the head site is collected and encapsulated into the forwarded data message along with the flow; the forwarded data message is processed at the intermediate site, and the processed data message is forwarded to the tail site; the processed data message is configured and searched by the tail site to obtain fault diagnosis information, and the fault diagnosis information is issued. In the case of abnormal message processing in the network, fault point diagnosis can be quickly realized without occupying additional network bandwidth, adding unnecessary duplicate messages, reducing chip processing pressure, and realizing the measurement of performance parameters in the network. It can provide great help for network fault location and performance diagnosis. In scenarios with large business volume such as live engineering networks, the abnormal cause of the faulty business can be quickly located, providing strong support for rapid business recovery, and improving the speed and efficiency of forwarding message processing.
[0107] Further, Figure 3 FIG. 1 is a flow chart of a second embodiment of a method for processing forwarding messages according to the present invention, as shown in FIG. Figure 3 As shown, a second embodiment of the forwarding message processing method of the present invention is proposed based on the first embodiment. In this embodiment, step S10 specifically includes the following steps:
[0108] Step S11: After the forwarded data message enters the device port, the forwarded data message is parsed based on the message quintuple, and the ACL table in the forwarded data message is read.
[0109] It should be noted that after the forwarded data message enters the device port, the forwarded data message is parsed based on the message quintuple, and the ACL table in the forwarded data message can be read out.
[0110] Step S12: performing message quintuple matching on the forwarded data message according to the ACL table, and obtaining a flow ID after a successful match.
[0111] It can be understood that according to the ACL table, the forwarded data message can be matched with the message five-tuple. After the interface matching is completed, the data message enters the L3 service processing, and the message five-tuple is matched in the ACL module. After the match is successful, the ACL flow ID is obtained. The matching is only performed in the ACL lookup stage. The subsequent processing of the message in the pipeline is based on the configuration in the pipeline design.
[0112] Step S13: Determine whether the flow diagnosis function is currently enabled based on the flow ID.
[0113] It is understandable that after the ACL matching is completed, it can be determined based on the flow ID whether the flow diagnosis function is currently enabled.
[0114] Through the above solution, this embodiment performs message parsing on the forwarded data message based on the message quintuple after the forwarded data message enters the device port, reads the ACL table in the forwarded data message, matches the message quintuple of the forwarded data message according to the ACL table, and obtains a flow ID after a successful match; and determines whether the flow diagnosis function is currently enabled based on the flow ID. This allows for rapid fault point diagnosis in the event of abnormal message processing in the network, without requiring additional network bandwidth, thereby improving the speed and efficiency of forwarded message processing.
[0115] Further, Figure 4 FIG. 1 is a flow chart of a third embodiment of a method for processing forwarding messages according to the present invention, as shown in FIG. Figure 4 As shown, a third embodiment of the forwarding message processing method of the present invention is proposed based on the first embodiment. In this embodiment, step S20 specifically includes the following steps:
[0116] Step S21: When the flow diagnosis function is turned on, the corresponding longest prefix match LPM table is read according to the ACL flow ID, the L3 next hop configuration is read according to the LPM table, VPN label encapsulation is performed, and the option header is reserved, the label forwarding path LSP next hop configuration is read, LSP tunnel label encapsulation is performed, the arp configuration is read, arp encapsulation is performed, and the pipeline message processing data of the first site is generated.
[0117] It should be noted that when the flow-following diagnostic function is turned on, the pipeline message processing data of the first site can be collected. Specifically, when the flow-following diagnostic function is turned on, the corresponding longest prefix match (LPM) table is read according to the ACL flow ID, the L3 next hop configuration is read according to the LPM table, VPN label encapsulation is performed, and the option header is reserved, the label forwarding path LSP next hop configuration is read, LSP tunnel label encapsulation is performed, the arp configuration is read, arp encapsulation is performed, and the pipeline message processing data of the first site is generated.
[0118] Step S22: When the service type is IPv4, encapsulate the pipeline message processing data into the option private data of the IPv4 message.
[0119] It can be understood that after obtaining the pipeline message processing data, the pipeline message processing data can be stored in the specified field of the forwarding data message, that is, when the service type is IPv4, the pipeline message processing data is encapsulated into the option private data of the IPv4 message.
[0120] Step S23: When the service type is IPv6, encapsulate the pipeline message processing data into a destination option header.
[0121] It is understandable that when the service type is IPv6, the pipeline message processing data can be encapsulated into the destination option header.
[0122] Furthermore, the step S23 specifically includes the following steps:
[0123] When the service type is IPv6, the chip forwarding data in the pipeline message processing data is encapsulated into a destination option header and forwarded along with the IPv6 service.
[0124] It can be understood that the first site pipeline message processing data collection and flow encapsulation, the first site of the IPv6 service is correspondingly encapsulated into the Destination Option Header destination option header (protocol type 60) and forwarded with the service.
[0125] This embodiment adopts the above scheme. When the flow diagnosis function is turned on, the corresponding longest prefix match LPM table is read according to the ACL flow ID, the L3 next hop configuration is read according to the LPM table, VPN label encapsulation is performed, and the option header is reserved. The label forwarding path LSP next hop configuration is read, LSP tunnel label encapsulation is performed, the arp configuration is read, arp encapsulation is performed, and the pipeline message processing data of the first site is generated; when the service type is IPv4, the pipeline message processing data is encapsulated into the option private data of the ipv4 message; when the service type is IPv6, the pipeline message processing data is encapsulated into the destination option header, which can reduce the processing pressure of the chip, realize the measurement of performance parameters in the network, and provide great help for network fault location and performance diagnosis.
[0126] Further, Figure 5 FIG. 4 is a flow chart of a fourth embodiment of a method for processing forwarded messages according to the present invention. Figure 5 As shown, a fourth embodiment of the forwarding message processing method of the present invention is proposed based on the third embodiment. In this embodiment, step S22 specifically includes the following steps:
[0127] Step S221: When the service type is IPv4, the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index and the ARP hardware index corresponding to the pipeline message processing data are stored in the option private data of the IPv4 message.
[0128] It should be noted that when the service type is IPv4, the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index and the ARP hardware index can be obtained and saved, that is, the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index and the ARP hardware index corresponding to the pipeline message processing data are stored in the option private data of the IPv4 message.
[0129] It can be understood that after reading the L3 next-hop configuration according to the longest prefix match LPM table, VPN label encapsulation can be performed, and the option header can be reserved. At the same time, the IPM hardware index can be saved, that is, the relevant data is stored in the option header; after reading the Internet service provider label forwarding path (Label Switched Path, LSP) next-hop configuration, ISP tunnel label encapsulation can be performed.
[0130] It can be understood that the forwarding plane hardware ARP index is read and written into the option field, that is, the ARP table hardware information is stored in the option private data of the IPv4 message, and the internal forwarding header is encapsulated and sent to the downstream processing through the backplane; at the same time, the ACL flow ID can be stored in the option header, the L3 next hop hardware index can be stored in the option header, the ISP next hop hardware index can be stored in the option header, and the ARP hardware index can be stored in the option header.
[0131] Through the above solution, this embodiment stores the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index, and the ARP hardware index corresponding to the pipeline message processing data in the option private data of the IPv4 message when the service type is IPv4. This can reduce the processing pressure of the chip, realize the measurement of performance parameters in the network, and provide great help for network fault location and performance diagnosis.
[0132] Further, Figure 6 FIG. 5 is a flow chart of a fifth embodiment of a method for processing forwarded messages according to the present invention. Figure 6 As shown, a fifth embodiment of the forwarding message processing method of the present invention is proposed based on the first embodiment. In this embodiment, step S30 specifically includes the following steps:
[0133] Step S31: When the intermediate site does not support option processing, the forwarding data message is forwarded according to normal IP forwarding.
[0134] It should be noted that the option header processing process of the intermediate site is that for devices that support option processing, they can continue to encapsulate the forwarding information of this site after receiving the message of option type 0b01101111 (223) which is not used in the newly added standard protocol. If it is not supported, no processing will be performed, that is, the unsupported site will not process the option information; for sites that do not support option processing, they can forward according to the normal IP, and the option information does not need to be concerned. It can be deployed in the entire network. When the intermediate site does not support option processing, the forwarding data message can be forwarded according to the normal IP.
[0135] Step S32: When the intermediate site supports option processing, the forwarding data message is encapsulated according to a preset encapsulation format of the option, and the encapsulated data message is forwarded to the tail site.
[0136] It can be understood that if the intermediate site supports option processing, it can continue to encapsulate according to the option's encapsulation format, and the original information will still be retained. That is, when the intermediate site supports option processing, it can encapsulate the forwarded data packet according to the preset encapsulation format of the option, and forward the encapsulated data packet to the tail site.
[0137] This embodiment adopts the above-mentioned scheme. When the intermediate site does not support option processing, the forwarding data message is forwarded according to the normal IP; when the intermediate site supports option processing, the forwarding data message is encapsulated according to the preset encapsulation format of the option, and the encapsulated data message is forwarded to the tail site. This can quickly realize fault point diagnosis in the case of abnormal message processing in the network, without the need to occupy additional network bandwidth, without adding unnecessary copy messages, reducing the chip processing pressure, realizing the measurement of performance parameters in the network, and can provide great help for network fault location and performance diagnosis.
[0138] Accordingly, the present invention further provides a forwarding message processing device.
[0139] Reference Figure 7 , Figure 7 This is a functional module diagram of the first embodiment of the forwarding message processing device of the present invention.
[0140] In a first embodiment of the forwarding message processing device of the present invention, the forwarding message processing device includes:
[0141] The matching module 10 is configured to perform ACL matching on the forwarded data message based on the message quintuple after the forwarded data message enters the device port, and determine whether to enable the flow diagnosis function according to the matched forwarded data message.
[0142] The collection and encapsulation module 20 is used to collect the pipeline message processing data of the head station when the flow-by-flow diagnosis function is enabled, and encapsulate the data into the forwarding data message along with the flow.
[0143] The forwarding module 30 is configured to process the forwarded data message through the intermediate station and forward the processed data message to the tail station.
[0144] The sending module 40 is configured to perform configuration search on the processed data message through the tail station, obtain fault diagnosis information, and send the fault diagnosis information.
[0145] The matching module 10 is further configured to, after the forwarded data message enters the device port, perform message parsing on the forwarded data message based on the message quintuple, and read the ACL table in the forwarded data message; perform message quintuple matching on the forwarded data message according to the ACL table, and obtain a flow ID after a successful match; and determine whether the flow diagnosis function is currently enabled based on the flow ID.
[0146] The collection and encapsulation module 20 is also used to read the corresponding longest prefix match LPM table according to the ACL flow ID when the flow diagnosis function is turned on, read the L3 next hop configuration according to the LPM table, perform VPN label encapsulation, and reserve the option header, read the label forwarding path LSP next hop configuration, perform LSP tunnel label encapsulation, read the ARP configuration, perform ARP encapsulation, and generate the pipeline message processing data of the first site; when the service type is IPv4, encapsulate the pipeline message processing data into the option private data of the IPv4 message; when the service type is IPv6, encapsulate the pipeline message processing data into the destination option header.
[0147] The collection and encapsulation module 20 is further configured to store the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index and the ARP hardware index corresponding to the pipeline message processing data into the option private data of the IPv4 message when the service type is IPv4.
[0148] The collection and encapsulation module 20 is further configured to encapsulate the chip forwarding data in the pipeline message processing data into a destination option header when the service type is IPv6, and forward the data along with the IPv6 service.
[0149] The forwarding module 30 is also used to forward the forwarding data message according to normal IP when the intermediate site does not support option processing; when the intermediate site supports option processing, encapsulate the forwarding data message according to the preset encapsulation format of the option, and forward the encapsulated data message to the tail site.
[0150] The sending module 40 is further configured to perform message parsing on the processed data message through the tail site to obtain a message parsing result; when the LSP label is not popped up, eliminate the non-tail site ISP action; when the LSP label is popped up, determine whether the VPN label action is the L3 service VPN; when the VPN label action is not the L3 service VPN, eliminate the non-tail site label action; when the VPN label action is the L3 service VPN, read the LPM table, read the L3 service next hop configuration, perform VPN label encapsulation, and parse the option header to obtain option information; store the physical engine type, engine access node, logical engine type, logical engine ID, and next engine indication flag in the option information based on the ACL flow ID; read the ARP configuration information, perform ARP encapsulation according to the ARP configuration information, encapsulate the internal forwarding header, obtain fault diagnosis information, and send the fault diagnosis information to the downlink for processing via the backplane.
[0151] Among them, the steps implemented by each functional module of the forwarding message processing device can refer to the various embodiments of the forwarding message processing method of the present invention, and will not be repeated here.
[0152] In addition, an embodiment of the present invention further provides a storage medium, on which a message forwarding processing program is stored. When the message forwarding processing program is executed by a processor, the following operations are implemented:
[0153] After the forwarding data message enters the device port, the forwarding data message is matched against the ACL based on the message quintuple, and whether to enable the flow diagnosis function is determined according to the matched forwarding data message;
[0154] When the flow-based diagnosis function is enabled, the pipeline message processing data of the first station is collected and encapsulated into the forwarding data message along with the flow;
[0155] Processing the forwarded data message at the intermediate site and forwarding the processed data message to the tail site;
[0156] The tail station performs configuration search on the processed data message to obtain fault diagnosis information, and sends the fault diagnosis information.
[0157] Furthermore, when the forwarding message processing program is executed by the processor, the following operations are also implemented:
[0158] After the forwarding data message enters the device port, the forwarding data message is parsed based on the message quintuple, and the ACL table in the forwarding data message is read;
[0159] Performing message quintuple matching on the forwarded data message according to the ACL table, and obtaining a flow ID after a successful match;
[0160] It is determined whether the flow diagnosis function is currently enabled according to the flow ID.
[0161] Furthermore, when the forwarding message processing program is executed by the processor, the following operations are also implemented:
[0162] When the flow diagnosis function is turned on, the corresponding longest prefix match LPM table is read according to the ACL flow ID, the L3 next hop configuration is read according to the LPM table, VPN label encapsulation is performed, and the option header is reserved, the label forwarding path LSP next hop configuration is read, LSP tunnel label encapsulation is performed, the arp configuration is read, arp encapsulation is performed, and the pipeline message processing data of the first site is generated;
[0163] When the service type is IPv4, encapsulating the pipeline message processing data into the option private data of the IPv4 message;
[0164] When the service type is IPv6, the pipeline message processing data is encapsulated into a destination option header.
[0165] Furthermore, when the forwarding message processing program is executed by the processor, the following operations are also implemented:
[0166] When the service type is IPv4, the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index and the ARP hardware index corresponding to the pipeline message processing data are stored in the option private data of the IPv4 message.
[0167] Furthermore, when the forwarding message processing program is executed by the processor, the following operations are also implemented:
[0168] When the service type is IPv6, the chip forwarding data in the pipeline message processing data is encapsulated into a destination option header and forwarded along with the IPv6 service.
[0169] Furthermore, when the forwarding message processing program is executed by the processor, the following operations are also implemented:
[0170] When the intermediate site does not support option processing, the data message is forwarded according to normal IP forwarding;
[0171] When the intermediate site supports option processing, the forwarding data message is encapsulated according to a preset encapsulation format of the option, and the encapsulated data message is forwarded to the tail site.
[0172] Furthermore, when the forwarding message processing program is executed by the processor, the following operations are also implemented:
[0173] Performing message parsing on the processed data message by the tail station to obtain a message parsing result;
[0174] When the LSP label is not popped, the non-tail station ISP action is eliminated;
[0175] When the LSP label is popped, determining whether the VPN label action is L3 service VPN;
[0176] When the VPN label action is not the L3 service VPN, the non-tail station label action is removed;
[0177] When the VPN label action is the L3 service VPN, read the LPM table, read the L3 service next hop configuration, perform VPN label encapsulation, and parse the option header to obtain option information;
[0178] Based on the ACL flow ID, the physical engine type, engine access node, logical engine type, logical engine ID and next engine indication flag in the option information are stored;
[0179] Read the arp configuration information, perform arp encapsulation according to the arp configuration information, encapsulate the internal forwarding header, obtain fault diagnosis information, and send the fault diagnosis information to the downlink for processing through the backplane.
[0180] Through the above scheme, this embodiment performs ACL matching on the forwarded data message based on the message quintuple after the forwarded data message enters the device port, and determines whether to enable the flow-following diagnosis function based on the matched forwarded data message; when the flow-following diagnosis function is enabled, the pipeline message processing data of the head site is collected and encapsulated into the forwarded data message along with the flow; the forwarded data message is processed at the intermediate site, and the processed data message is forwarded to the tail site; the processed data message is configured and searched by the tail site to obtain fault diagnosis information, and the fault diagnosis information is issued. In the case of abnormal message processing in the network, fault point diagnosis can be quickly realized without occupying additional network bandwidth, adding unnecessary duplicate messages, reducing chip processing pressure, and realizing the measurement of performance parameters in the network. It can provide great help for network fault location and performance diagnosis. In scenarios with large business volume such as live engineering networks, the abnormal cause of the faulty business can be quickly located, providing strong support for rapid business recovery, and improving the speed and efficiency of forwarding message processing.
[0181] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0182] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0183] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for processing forwarded messages, characterized in that: The forwarding message processing method includes: After the forwarding data message enters the device port, the forwarding data message is matched against the ACL based on the message quintuple, and whether to enable the flow diagnosis function is determined according to the matched forwarding data message; When the flow-based diagnosis function is enabled, the pipeline message processing data of the first station is collected and encapsulated into the forwarding data message along with the flow; Processing the forwarded data message through the intermediate site and forwarding the processed data message to the tail site; Performing configuration lookup on the processed data message through the tail station to obtain fault diagnosis information, and issuing the fault diagnosis information; Wherein, when the flow-by-flow diagnosis function is enabled, the pipeline message processing data of the first site is collected and encapsulated into the forwarding data message along with the flow, including: When the flow diagnosis function is turned on, the corresponding longest prefix match LPM table is read according to the ACL flow ID, the L3 next hop configuration is read according to the LPM table, VPN label encapsulation is performed, and the option header is reserved, the label forwarding path LSP next hop configuration is read, LSP tunnel label encapsulation is performed, the arp configuration is read, arp encapsulation is performed, and the pipeline message processing data of the first site is generated; When the service type is IPv4, the pipeline message processing data is encapsulated into the option private data of the IPv4 message; When the service type is IPv6, the pipeline message processing data is encapsulated into a destination option header.
2. The method for processing forwarded messages according to claim 1, wherein: After the forwarding data message enters the device port, the forwarding data message is matched with the ACL based on the message quintuple, and whether to enable the flow diagnosis function is determined according to the matched forwarding data message, including: After the forwarding data message enters the device port, the forwarding data message is parsed based on the message quintuple, and the ACL table in the forwarding data message is read; Performing message quintuple matching on the forwarded data message according to the ACL table, and obtaining a flow ID after a successful match; It is determined whether the flow diagnosis function is currently enabled according to the flow ID.
3. The method for processing forwarded messages according to claim 1, wherein: When the service type is IPv4, encapsulating the pipeline message processing data into the option private data of the IPv4 message includes: When the service type is IPv4, the LPM hardware index, the ACL flow ID, the L3 service next hop hardware index, the LSP next hop hardware index and the ARP hardware index corresponding to the pipeline message processing data are stored in the option private data of the IPv4 message.
4. The method for processing forwarded messages according to claim 1, wherein: When the service type is IPv6, encapsulating the pipeline message processing data into a destination option header includes: When the service type is IPv6, the chip forwarding data in the pipeline message processing data is encapsulated into a destination option header and forwarded along with the IPv6 service.
5. The method for processing forwarded messages according to claim 1, wherein: The step of processing the forwarded data message through the intermediate station and forwarding the processed data message to the tail station includes: When the intermediate site does not support option processing, the data message is forwarded according to normal IP forwarding; When the intermediate site supports option processing, the forwarding data message is encapsulated according to a preset encapsulation format of the option, and the encapsulated data message is forwarded to the tail site.
6. The method for processing forwarded messages according to claim 1, wherein: The performing configuration search on the processed data message by the tail station to obtain fault diagnosis information, and issuing the fault diagnosis information includes: Performing message parsing on the processed data message by the tail station to obtain a message parsing result; When the LSP label is not popped, the non-tail station ISP action is eliminated; When the LSP label is popped, determining whether the VPN label action is L3 service VPN; When the VPN label action is not the L3 service VPN, the non-tail station label action is removed; When the VPN label action is the L3 service VPN, read the LPM table, read the L3 service next hop configuration, perform VPN label encapsulation, and parse the option header to obtain option information; Based on the ACL flow ID, the physical engine type, engine access node, logical engine type, logical engine ID and next engine indication flag in the option information are stored; Read the arp configuration information, perform arp encapsulation according to the arp configuration information, encapsulate the internal forwarding header, obtain fault diagnosis information, and send the fault diagnosis information to the downlink for processing through the backplane.
7. A forwarding message processing device, characterized in that: The forwarding message processing device includes: A matching module is used to perform ACL matching on the forwarded data message based on the message quintuple after the forwarded data message enters the device port, and determine whether to enable the flow diagnosis function according to the matched forwarded data message; A collection and encapsulation module, configured to collect pipeline message processing data of the head station and encapsulate the data into the forwarding data message when the flow-by-flow diagnosis function is enabled; A forwarding module, configured to process the forwarded data message through an intermediate station and forward the processed data message to a tail station; a sending module, configured to perform configuration search on the processed data message through the tail station, obtain fault diagnosis information, and send the fault diagnosis information; The collection and encapsulation module is also used to read the corresponding longest prefix match LPM table according to the ACL flow ID when the flow diagnosis function is turned on, read the L3 next hop configuration according to the LPM table, perform VPN label encapsulation, and reserve the option header, read the label forwarding path LSP next hop configuration, perform LSP tunnel label encapsulation, read the ARP configuration, perform ARP encapsulation, and generate the pipeline message processing data of the first site; when the service type is IPv4, encapsulate the pipeline message processing data into the option private data of the IPv4 message; when the service type is IPv6, encapsulate the pipeline message processing data into the destination option header.
8. A forwarding message processing device, characterized in that: The forwarding message processing device includes: a memory, a processor, and a forwarding message processing program stored in the memory and executable on the processor, wherein the forwarding message processing program is configured to implement the steps of the forwarding message processing method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores a forwarding message processing program, which, when executed by the processor, implements the steps of the forwarding message processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Flow identifier acquisition method and device, equipment and medium
CN115242892A