Network routing and forwarding device protocol stack transformation processing method and system
By monitoring and encapsulating packet protocol types in network routing and forwarding devices, and using counters to count the number of data packets, the problem of packet loss when the IP protocol is unavailable is solved, thus achieving reliability and stability in network communication.
Patent Information
- Application Number
- CN202411654085.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-19
AI Technical Summary
In existing network communications, when the IP protocol cannot be used, there is a problem of data packet loss during conversion between the network and the terminal.
This invention provides a method and system for protocol stack transformation processing in network routing and forwarding devices. By monitoring the protocol transformation commands issued by the control plane, the method checks the protocol type of data packets, re-encapsulates old protocol data packets into new protocol data packets, and uses a counter to count the number of data packets to ensure that no packets are lost during the transformation process, thereby achieving reliable transmission of data packets.
In situations where the IP protocol is unavailable, lossless conversion of network protocol data packets is achieved, improving the reliability and stability of network communication.
Smart Images

Figure CN119583669B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of network communication technology, in particular to a network routing and forwarding device protocol stack conversion processing method and system. BACKGROUND
[0002] The existing network communication usually adopts IP protocol, however, with the continuous increase of network service types, the single IP addressing routing mechanism of the existing network has many disadvantages such as simple and weak capability, poor security and mobility. In recent years, the addressing routing technology centered on service content, spatial coordinates and identity has developed rapidly, and has been preliminarily applied in real networks and achieved good results, providing alternative protocols for replacing IP protocol. These addressing routing protocols are completely different from the data packet format of IP protocol. In the extreme case, when IP network protocol cannot be used, how to convert all IP protocol data packets in the network and terminal into another network protocol data packet and ensure that all communication data is not lost is a problem that must be solved for reliable communication of the current network. SUMMARY
[0003] Therefore, the present application provides a network routing and forwarding device protocol stack conversion processing method and system to solve the problem of network protocol data packet conversion between the network and the terminal when the IP network protocol cannot be used.
[0004] According to the design scheme provided by the present application, on the one hand, a network routing and forwarding device protocol stack conversion processing method is provided, which comprises:
[0005] Monitoring a protocol conversion command issued by a control plane, the protocol conversion command being used to instruct the network routing and forwarding device to convert an old protocol data packet format into a new protocol data packet format;
[0006] Checking and obtaining the protocol type of the data packet sent by each ingress port of the network routing and forwarding device based on the protocol conversion command;
[0007] If the protocol type of the data packet is the old protocol data packet type, then the old protocol data packet is re-encapsulated into a new protocol data packet, and the new protocol data packet is sent to a sending queue based on a new protocol pipeline, so as to be sent to a next hop network device through the egress port of the network routing and forwarding device;
[0008] And the number of new protocol data packets is counted by a counter at each ingress port, and a protocol conversion completion flag bit is set according to the counting result of the number of new protocol data packets, and the ingress port after the setting operation is recorded as a new protocol port.
[0009] As the network routing and forwarding device protocol stack conversion processing method of the present application, further, monitoring the protocol conversion command issued by the control plane further comprises:
[0010] The old protocol data packet is still sent to the next hop network device in the old protocol pipeline and the sending queue of the network routing forwarding device, so as to re-encapsulate the old protocol data packet into a new protocol data packet in the next hop network device.
[0011] As the network routing forwarding device protocol stack conversion processing method, further, the protocol conversion completion flag is set according to the new protocol data packet quantity statistical result, comprising:
[0012] When the counter counts the new protocol data packet quantity to reach twice of the length of the corresponding ingress port receiving queue, the protocol conversion completion flag is set, and the counter counting behavior is stopped;
[0013] If the old protocol data packet format appears during the counter counting the new protocol data packet quantity, the counter is reset, and the new protocol data packet quantity of the ingress port is counted again.
[0014] As the network routing forwarding device protocol stack conversion processing method, further, the protocol conversion completion flag is set according to the new protocol data packet quantity statistical result, further comprising:
[0015] If the protocol conversion completion flags of all ingress ports of the network routing forwarding device are set, it is indicated that the current network routing forwarding device and the upstream and downstream devices connected with the current network routing forwarding device have completed the protocol conversion.
[0016] In another aspect, the application further provides a network routing forwarding device protocol stack conversion processing system, comprising: a data packet selector, a protocol inspection component, a protocol conversion component and a counter, wherein,
[0017] The data packet selector is used for monitoring a protocol conversion command issued by a control plane, and the protocol conversion command is used for instructing the network routing forwarding device to convert the old protocol data packet format into the new protocol data packet format.
[0018] The protocol inspection component is used for checking and obtaining the protocol type of the data packet sent by each ingress port of the network routing forwarding device based on the protocol conversion command.
[0019] The protocol conversion component is used for re-encapsulating the old protocol data packet into the new protocol data packet according to the protocol type of the data packet obtained by the protocol inspection component, and sending the new protocol data packet to the sending queue based on the new protocol pipeline, so as to send the new protocol data packet to the next hop network device through the egress port of the network routing forwarding device.
[0020] The counter is used for counting the new protocol data packet quantity of each ingress port, setting the protocol conversion completion flag according to the new protocol data packet quantity statistical result, and recording the ingress port after the setting operation as a new protocol port.
[0021] Advantages of the present application:
[0022] When the protocol conversion command issued by the centralized control plane is received, the old protocol data packet is converted into a new protocol data packet through protocol inspection and conversion, and is handed over to the new protocol pipeline for processing. The counter is used to determine whether the data packet received by each port is already a new protocol data packet, to ensure that no packet is lost during conversion and to improve the reliable communication performance of the network. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 The figure shows the protocol stack conversion processing flow of the network routing forwarding device in the embodiment. DETAILED DESCRIPTION
[0024] To make the purpose, technical solutions and advantages of the present application clearer and more apparent, the present application will be further described in detail below with reference to the drawings and technical solutions.
[0025] Through protocol conversion, the data packet can be smoothly transmitted in the network of different protocols, which realizes network interconnection and intercommunication. In the extreme case where the IP network protocol cannot be used, the embodiment of the present application provides a network routing forwarding device protocol stack conversion processing method, which comprises:
[0026] Monitoring the protocol conversion command issued by the control plane, the protocol conversion command being used to instruct the network routing forwarding device to convert the format of the old protocol data packet into the format of the new protocol data packet;
[0027] Based on the protocol conversion command, the protocol type of the data packet sent by each ingress port of the network routing forwarding device is checked and acquired;
[0028] If the protocol type of the data packet is the old protocol data packet type, the old protocol data packet is re-encapsulated into a new protocol data packet, and the new protocol data packet is sent to the sending queue based on the new protocol pipeline, so as to be sent to the next hop network device through the egress port of the network routing forwarding device;
[0029] And the number of new protocol data packets is counted at each ingress port by using a counter, the protocol conversion completion flag bit is set according to the counting result of the number of new protocol data packets, and the ingress port after the setting operation is recorded as a new protocol port.
[0030] For example, Figure 1As shown, by adding a protocol inspection component, a protocol conversion component and a new protocol pipeline in the forwarding plane device, when a protocol conversion command issued by the centralized control plane is received, the protocol inspection component checks the protocol type of the data packet sent by each port, sends the old protocol data packet to the protocol conversion component, re-encapsulates it as a new protocol data packet, and sends it out after processing by the new protocol pipeline. By setting a receiving port counter, it is determined whether the data packet received by each port is a new protocol data packet, ensuring that no packets are lost during conversion.
[0031] Figure 1 In the device, the data packets are divided into three types: received queue data packets, data packets in the pipeline, and data packets in the sending queue. Compared with traditional network devices, the device adds a data packet selector, a protocol inspection component, a protocol conversion component, a port counter, a DONE flag and a new protocol pipeline. The data packet selector is used to receive the protocol conversion command issued by the control plane; the protocol inspection component is used to check whether the data packet in the receiving queue is a new protocol data packet when protocol conversion is performed; the protocol conversion component is used to convert the old protocol data packet to a new protocol data packet, which is sent to the new protocol pipeline; the port counter is used to count the new protocol data packets received by the port and determine whether the conversion is complete; when the conversion is complete, the DONE flag is set from 0 to 1. Subsequent data packets are directly sent from the receiving queue to the new protocol pipeline for processing. Through protocol inspection and conversion processing, the device can support network protocol stack conversion and realize reliable data transmission for network communication.
[0032] Before protocol conversion, the data packet is sent from the receiving queue to the old protocol pipeline by the data packet selector for processing and forwarding. When protocol conversion is needed, the control plane sends a protocol conversion command to the device. After receiving the conversion command, the device continues to send the old protocol data packet in the old protocol pipeline and the sending queue to the next hop device according to the old protocol, which is converted to a new protocol data packet by the next hop device. On the other hand, the data packet selector sends the data packet to the protocol inspection component, which checks the protocol type of the data packet. If it is an old protocol data packet, it is sent to the protocol conversion component for protocol conversion. If it is a new protocol data packet, it is directly sent to the new protocol pipeline for processing. After protocol conversion, the data packet is sent from the receiving queue to the new protocol pipeline by the data packet selector for processing and forwarding.
[0033] When the protocol is converted, because the time for each device to complete the protocol conversion is different, the data packets received by the current device from other devices include old protocol data packets and new protocol data packets. In order to identify whether the upstream and downstream devices connected with the port have completed the protocol conversion, a counter and a DONE flag are set for each port, which are used to count the number of new protocol data packets of the port. When the value of the counter reaches twice the length of the receiving queue, it is indicated that the conversion of the old data packets in the receiving queue of the device and the old data packets in the sending queue and the pipeline of the device connected with the port is completed, the DONE flag is set, the port is recorded as a new protocol port, and the counter stops counting. If the old protocol port appears during the counting of the number of new protocol data packets by the counter, the counter is reset to 0 and starts counting again.
[0034] When the DONE flags of all ports are set, it is indicated that the protocol conversion of all devices and the devices connected with them is completed, and the protocol checking component and the protocol conversion component stop working, and the subsequent receiving queue data packets are directly sent to the new protocol pipeline.
[0035] Further, based on the above method, the embodiment of the present application also provides a network routing forwarding device protocol stack conversion processing system, which comprises: a data packet selector, a protocol checking component, a protocol conversion component and a counter, wherein,
[0036] The data packet selector is used to monitor the protocol conversion command issued by the control plane, and the protocol conversion command is used to instruct the network routing forwarding device to convert the old protocol data packet format into the new protocol data packet format.
[0037] The protocol checking component is used to check and acquire the protocol type of the data packets sent by each ingress port of the network routing forwarding device based on the protocol conversion command.
[0038] The protocol conversion component is used to re-encapsulate the old protocol data packets into new protocol data packets according to the protocol type of the data packets acquired by the protocol checking component, and send the new protocol data packets to the sending queue based on the new protocol pipeline, so as to send the new protocol data packets to the next hop network device through the egress port of the network routing forwarding device.
[0039] The counter is used to count the number of new protocol data packets of each ingress port, set the protocol conversion completion flag according to the counting result of the number of new protocol data packets, and record the ingress port after the setting operation as a new protocol port.
[0040] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0041] The various embodiments are described in the specification in a progressive manner, each embodiment focusing on different aspects of the other embodiments, and the same or similar parts between the embodiments can be mutually referred to. For the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method.
[0042] The units and method steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been described in the above description in general terms. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation does not exceed the scope of the present application.
[0043] Those skilled in the art can understand that all or part of the steps in the above method can be instructed by a program to complete the relevant hardware, and the program can be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk or an optical disk, etc. Alternatively, all or part of the steps of the above embodiments can also be implemented using one or more integrated circuits, and accordingly, each module / unit in the above embodiments can be implemented in the form of hardware or in the form of a software function module. The present application is not limited to any specific form of combination of hardware and software.
[0044] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present application, which are used to illustrate the technical solutions of the present application, and are not limiting. The protection scope of the present application is not limited thereto, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily think of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed by the present application, or make equivalent replacements to some of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A network routing and forwarding device protocol stack conversion processing method, characterized in that: Include: Monitoring a protocol conversion command issued by a control plane, wherein the protocol conversion command is used to instruct a network routing and forwarding device to convert an old protocol data packet format into a new protocol data packet format; Check and obtain the protocol type of the data packets sent by each ingress port of the network routing and forwarding device based on the protocol conversion command; If the data packet protocol type is an old protocol data packet type, the old protocol data packet is re-encapsulated into a new protocol data packet, and the new protocol data packet is sent to a sending queue based on the new protocol pipeline, so as to be sent to a next-hop network device through an egress port of a network routing forwarding device; A counter is used at each ingress port to count the number of new protocol data packets, a protocol conversion completion flag is set according to the statistical result of the number of new protocol data packets, and the ingress port after the setting operation is recorded as the new protocol port.
2. The network routing and forwarding device protocol stack conversion processing method according to claim 1, characterized in that: The protocol conversion command issued by the monitoring control plane also includes: The old protocol data packets in the old protocol pipeline and the sending queue in the network routing forwarding device are still sent to the next-hop network device in the old protocol data format, so that the old protocol data packets are re-encapsulated into new protocol data packets in the next-hop network device.
3. The network routing and forwarding device protocol stack conversion processing method according to claim 1, characterized in that: The protocol conversion completion flag is set based on the statistical result of the number of new protocol data packets, including: When the number of new protocol packets counted by the counter reaches twice the length of the corresponding inbound port receive queue, the protocol conversion completion flag is set and the counter stops counting. If an old protocol data packet format appears during the period when the counter is counting the number of new protocol data packets, the counter is reset and the number of new protocol data packets of the ingress port is counted again.
4. The network routing and forwarding device protocol stack conversion processing method according to claim 1 or 3, characterized in that: The protocol conversion completion flag is set according to the statistical result of the number of new protocol data packets, which also includes: If the protocol conversion completion flags of all ingress ports of the network routing and forwarding device are set, it indicates that the current network routing and forwarding device and the upstream and downstream devices connected to the current network routing and forwarding device have completed the protocol conversion.
5. A network routing and forwarding device protocol stack conversion processing system, characterized in that: Contains: data packet selector, protocol inspection component, protocol conversion component and counter, among which, A data packet selector is configured to monitor a protocol conversion command issued by the control plane, wherein the protocol conversion command is configured to instruct the network routing and forwarding device to convert an old protocol data packet format into a new protocol data packet format; The protocol inspection component is used to inspect and obtain the protocol type of the data packet sent by each ingress port of the network routing and forwarding device based on the protocol conversion command; A protocol conversion component is used to re-encapsulate the old protocol data packet into a new protocol data packet based on the data packet protocol type obtained by the protocol inspection component, and send the new protocol data packet to the sending queue based on the new protocol pipeline, so as to send the new protocol data packet to the next-hop network device through the network routing forwarding device output port; The counter is used to count the number of new protocol data packets at each ingress port, set a protocol conversion completion flag according to the statistical result of the number of new protocol data packets, and record the ingress port after the setting operation as the new protocol port.
6. An electronic device, characterized in that: include: at least one processor, and a memory coupled to the at least one processor; The memory stores a computer program, and the computer program can be executed by the at least one processor to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 4 can be implemented.
Citation Information
Patent Citations
Method and system for converting IPv6 (Internet Protocol Version 6) protocol and IPv4 (Internet Protocol Version 4) protocol
CN102148773A
System for controlling OpenFlow exchanger based on ForCES control element and protocol conversion method
CN105516116A