A routing protocol message processing method, apparatus, electronic device, and storage medium

By fragmenting, reconstructing, and reassembling routing protocol messages at the IP layer, the problem of routing protocol message length exceeding the MTU in complex network topologies is solved, ensuring normal network communication and reducing the reassembly burden on downstream devices.

CN115550277BActive Publication Date: 2026-03-06北京东土军悦科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211275442.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2026-03-06
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

In network topologies with a large number of network elements, the complexity of the network topology and the large amount of link state data can cause the length of routing protocol messages to be insufficient to meet communication requirements, thus affecting network communication.

Method used

By receiving routing protocol messages at the IP layer of the network protocol stack, and when the fragmentation processing conditions are met, the routing protocol messages are fragmented and reconstructed to generate multiple target routing protocol messages. Specifically, this includes splitting and reassembling the Link State Broadcast Data Packet (LSA) of the OSPF protocol message to generate target OSPF protocol messages that conform to the MTU, and generating IP packets based on the target messages.

Benefits of technology

It implements fragmentation processing of routing protocol messages to meet transmission requirements, ensure normal network communication, reduce the reassembly requirements of downstream devices, and avoid device load and message out-of-order problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550277B_ABST
    Figure CN115550277B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, electronic device, and storage medium for processing routing protocol messages. The method is applied to the IP layer of a network protocol stack and includes: receiving routing protocol messages; when a routing protocol message is detected to meet fragmentation processing conditions, fragmenting and reconstructing the routing protocol message to obtain multiple target routing protocol messages; and generating IP packets based on the multiple target routing protocol messages. This method can fragment routing protocol messages, enabling them to meet transmission requirements and ensuring normal network communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a routing protocol message processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] An Autonomous System (AS) is a group of networks that exchange routing information with each other through a unified routing policy or routing protocol. An AS can be considered a routing domain. Routing protocols typically transmit link-state data to routers within a routing domain. In network topologies with many network elements, the complexity of the topology can lead to a very large amount of link-state data, making it impossible for routing protocol message lengths to meet communication requirements.

[0003] Therefore, there is an urgent need to propose a routing protocol message processing method to ensure that routing protocol messages can meet transmission requirements and guarantee normal network communication. Summary of the Invention

[0004] This invention provides a routing protocol message processing method, apparatus, electronic device, and storage medium to enable routing protocol messages to meet transmission requirements and ensure normal network communication.

[0005] According to one aspect of the present invention, a routing protocol message processing method is provided, the method being applied to the IP layer of a network protocol stack, comprising:

[0006] Receive routing protocol messages;

[0007] When the routing protocol message is detected to meet the fragmentation processing conditions, the routing protocol message is fragmented and reconstructed to obtain multiple target routing protocol messages;

[0008] IP packets are generated based on multiple target routing protocol messages.

[0009] Optionally, when the routing protocol message is detected to meet the fragmentation processing conditions, the routing protocol message is fragmented and reconstructed to obtain multiple target routing protocol messages, including:

[0010] Obtain the message length of the routing protocol message and the maximum transmission unit (MTU) of the link;

[0011] When the length of the routing protocol message is detected to be greater than the MTU, the routing protocol message is fragmented and reconstructed to obtain multiple target routing protocol messages.

[0012] Optionally, when the packet length of the routing protocol message is detected to be greater than the MTU, the routing protocol message is fragmented and reconstructed to obtain multiple target routing protocol messages, including:

[0013] When the packet length of the routing protocol message is detected to be greater than the MTU, the type of the routing protocol message is determined;

[0014] When the routing protocol message is detected to be an Open Shortest Path First (OSPF) protocol message, the OSPF protocol message is fragmented and reconstructed to obtain multiple target OSPF protocol messages.

[0015] Optionally, the OSPF protocol message is fragmented and reconstructed to obtain multiple target OSPF protocol messages, including:

[0016] The Link State Broadcast (LSA) data packets in the OSPF protocol message are split;

[0017] Based on the MTU, the split LSAs are reassembled to obtain multiple target OSPF protocol messages.

[0018] Optionally, an IP packet is generated based on multiple target routing protocol packets, including:

[0019] Based on the multiple target OSPF protocol messages, construct the corresponding IP header information to generate multiple IP packets.

[0020] Optionally, the method further includes:

[0021] When the routing protocol message is detected to be a non-OSPF protocol message, IP packet fragmentation is performed on the non-OSPF protocol message.

[0022] Optionally, the non-OSPF protocol packets are subjected to IP packet fragmentation processing, including:

[0023] Generate a first target IP packet based on the non-OSPF protocol message;

[0024] The first target IP packet is split according to the MTU and reconstructed into multiple second target IP packets.

[0025] According to another aspect of the present invention, a routing protocol message processing apparatus is provided, the apparatus being applied to the IP layer of a network protocol stack, comprising:

[0026] The message receiving module is used to receive routing protocol messages;

[0027] The target routing protocol message generation module is used to fragment and reconstruct the routing protocol message when it is detected that the routing protocol message meets the fragmentation processing conditions, so as to obtain multiple target routing protocol messages.

[0028] The IP packet generation module is used to generate IP packets based on multiple target routing protocol packets.

[0029] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0030] At least one processor; and

[0031] A memory communicatively connected to the at least one processor; wherein,

[0032] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the routing protocol message processing method according to any embodiment of the present invention.

[0033] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the routing protocol message processing method according to any embodiment of the present invention.

[0034] The technical solution of this invention involves receiving routing protocol messages; when the routing protocol messages meet the fragmentation processing conditions, fragmenting and reconstructing the routing protocol messages to obtain multiple target routing protocol messages; and generating IP packets based on the multiple target routing protocol messages. This solves the problem of processing routing protocol messages, enables fragmentation processing of routing protocol messages, ensures that the routing protocol messages meet transmission requirements, and guarantees normal network communication.

[0035] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart of a routing protocol message processing method provided in Embodiment 1 of the present invention;

[0038] Figure 2 This is a flowchart of another routing protocol message processing method provided in Embodiment 1 of the present invention;

[0039] Figure 3 This is a network topology diagram provided in Embodiment 1 of the present invention;

[0040] Figure 4 This is a schematic diagram of the structure of a routing protocol message processing device according to Embodiment 2 of the present invention;

[0041] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the routing protocol message processing method of this invention. Detailed Implementation

[0042] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0044] Example 1

[0045] Figure 1 This is a flowchart of a routing protocol message processing method according to Embodiment 1 of the present invention. This embodiment is applicable to situations where the network structure is complex and there is a large amount of communication link information, causing routing protocol messages to be unable to meet communication requirements. This method is applied to the IP layer of the network protocol stack and can be executed by a routing protocol message processing device. This device can be implemented in hardware and / or software and can be configured in electronic devices such as routers. Figure 1 As shown, the method includes:

[0046] Step 110: Receive routing protocol messages.

[0047] The routing protocol message processing method provided in this embodiment of the invention can be executed by the IP layer of the network protocol stack. The network device's TCP / IP protocol stack is divided into the application layer, transport layer, IP layer, and network interface layer. Routing protocol messages belong to the application layer. Message fragmentation processing in this embodiment of the invention occurs at the IP layer.

[0048] The routing protocol message can be a protocol that enables communication between network elements within an AS. For example, the routing protocol message can be Open Shortest Path First (OSPF), User Datagram Protocol (UDP), Border Gateway Protocol (BGP), or Routing Information Protocol (RIP), etc.

[0049] Step 120: When the routing protocol message is detected to meet the fragmentation processing conditions, the routing protocol message is fragmented and reconstructed to obtain multiple target routing protocol messages.

[0050] When the IP layer protocol stack receives a routing protocol message, it can inspect the message to determine if it meets the fragmentation processing conditions. Fragmentation processing conditions can exist in various ways. For example, a fragmentation processing condition could be a length limit on the routing protocol message. When the length of the routing protocol message exceeds a preset length value, it can be determined that the message meets the fragmentation processing conditions. Another example is a restriction on the type of routing protocol message. When the routing protocol message is detected as a specific type of protocol message, it can be determined that the message meets the fragmentation processing conditions. Yet another example is a combination of length and type restrictions on the routing protocol message. When the length of the routing protocol message exceeds a preset length value and the message is a specific type of protocol message, it can be determined that the message meets the fragmentation processing conditions.

[0051] Specifically, in an optional embodiment of the present invention, when a routing protocol packet is detected to meet the fragmentation processing conditions, the routing protocol packet is fragmented and reconstructed to obtain multiple target routing protocol packets, including: obtaining the packet length and MTU of the routing protocol packet; when the packet length of the routing protocol packet is detected to be greater than the MTU, the routing protocol packet is fragmented and reconstructed to obtain multiple target routing protocol packets.

[0052] The Maximum Transmission Unit (MTU) represents the range of data that a link can handle. When the message length of a routing protocol exceeds the MTU, the message cannot be transmitted normally, causing network communication to fail. Therefore, when the message length of a routing protocol exceeds the MTU, the message can be fragmented and reconstructed.

[0053] In another specific embodiment of the present invention, when the packet length of a routing protocol packet is detected to be greater than the MTU, the routing protocol packet is fragmented and reconstructed to obtain multiple target routing protocol packets, including: when the packet length of a routing protocol packet is detected to be greater than the MTU, determining the type of the routing protocol packet; when the type of the routing protocol packet is detected to be an OSPF protocol packet, fragmenting and reconstructing the OSPF protocol packet to obtain multiple target OSPF protocol packets.

[0054] OSPF messages are Interior Gateway Protocol (IGP) messages. OSPF messages can be used to make route decisions within a single AS. OSPF is a typical link-state routing protocol, generally used within the same routing domain. A routing domain can refer to an AS. Within an AS, all OSPF routers maintain the same database describing the AS structure. This database stores the state information of the corresponding links in the routing domain, and OSPF routers use this database to calculate their OSPF routing tables. As a link-state routing protocol, OSPF transmits Link State Advertisements (LSAs) to all routers within a certain area. When there are many network elements and a complex network topology, the number of LSAs can be very large. The message length of an OSPF message composed of LSAs may exceed the link's capacity.

[0055] Therefore, when the length of a routing protocol message exceeds the MTU, it can be determined whether the routing protocol message is an OSPF message. If the routing protocol message is an OSPF message, it can be fragmented and reconstructed to obtain multiple target OSPF messages.

[0056] In an optional embodiment of the present invention, OSPF protocol messages are fragmented and reconstructed to obtain multiple target OSPF protocol messages, including: splitting the LSAs in the OSPF protocol messages; and reassembling the split LSAs according to the MTU to obtain multiple target OSPF protocol messages.

[0057] OSPF packets consist of LSAs and an OSPF header. There are four common LSA types: Type 1: ROUTER LSA, generated only within the local area, including link and interface states; every router generates this. Type 2: NETWORK LSA, generated only by the DR (Designated Router) and flooded within the area. Type 3: Network Summary LSA, generated by the ABR (Area Border Router), describing routes to a specific network segment within the area and propagated to the relevant area. Type 4: Asbr-Summary-LSA, generated by the ABR, describing routes to the ASBR (Autonomous System Border Router) and propagated to the relevant area. All types of LSAs are packaged into OSPF packets.

[0058] In this embodiment of the invention, splitting LSAs in an OSPF protocol message can be understood as splitting a first number of LSA segments into multiple LSA segments smaller than the first number. For example, if an OSPF protocol message contains 10 LSA segments and the message length exceeds the MTU, the LSAs in the OSPF protocol message can be split into 8 LSA segments and 2 LSA segments to satisfy the MTU. The split LSAs can then be reassembled according to the MTU value so that the message length of the resulting target OSPF protocol message is less than or equal to the MTU.

[0059] Step 130: Generate IP packets based on multiple target routing protocol messages.

[0060] The IP layer protocol stack can reconstruct IP packets based on the target routing protocol message. The reconstructed IP packets can take various forms.

[0061] Specifically, in an optional embodiment of the present invention, generating IP packets based on multiple target routing protocol packets includes: constructing corresponding IP header information for each of the multiple target OSPF protocol packets, and generating multiple IP packets.

[0062] In this embodiment, the IP header information constructed by the IP layer protocol stack based on the target OSPF protocol message can be in the same format as the IP message generated from the original routing protocol message. The only difference is that the IP message generated from the target OSPF protocol message is different in size from the IP message generated from the original routing protocol message. In other words, based on multiple target OSPF protocol messages, corresponding IP header information is constructed separately, and the resulting multiple IP messages do not contain fragmentation markers. The IP messages received by the downstream router can be multiple unfragmented messages. It is understood that although the packet fragmentation and reassembly provided in this embodiment of the invention occurs at the IP layer, it is not fragmentation and reassembly of IP messages, but rather fragmentation and reassembly of OSPF protocol messages. Therefore, OSPF protocol messages can meet the communication link requirements; and the IP messages received by the downstream device are also unfragmented messages, reducing the requirements on the downstream device, i.e., the downstream device does not need to have the ability to reassemble messages; in addition, since the downstream device does not need to perform message reassembly, the device load problem and message out-of-order problem caused by message reassembly can be avoided.

[0063] It should be noted that because OSPF protocol messages are composed of various types of LSAs and OSPF headers, the LSAs in multiple target OSPF protocol messages do not affect each other after being split. Therefore, IP packets generated from target OSPF protocol messages do not need to be fragmented.

[0064] Based on the above implementation method, optionally, the method further includes: when the type of the routing protocol message is detected to be a non-OSPF protocol message, performing IP packet fragmentation processing on the non-OSPF protocol message.

[0065] Non-OSPF protocol messages can be UDP messages, BGP messages, and RIP messages, etc. IP packet fragmentation can be performed by generating corresponding IP addresses from the non-OSPF protocol messages and then performing fragmentation.

[0066] Specifically, in an optional embodiment of the present invention, IP packet fragmentation processing is performed on non-OSPF protocol packets, including: generating a first target IP packet based on the non-OSPF protocol packet; splitting the first target IP packet according to the MTU and reconstructing it into multiple second target IP packets.

[0067] The first destination IP packet can be generated directly from a non-OSPF protocol packet. During transmission, the length of the first destination IP packet does not meet the MTU. Therefore, the first destination IP packet is fragmented and reassembled. The second destination IP packet can have a length that meets the MTU. In IP packet fragmentation, the fragments are IP packets; therefore, the header information of the second destination IP packet is different from that of the first destination IP packet. For example, the header information of the first destination IP packet may not contain a fragmentation marker. The header information of the second destination IP packet may contain a fragmentation marker. For example, the header information of the first destination IP packet may indicate the identifier of the first IP packet, the number of subsequent fragments, and the length of each fragment. The header information of the second destination IP packet may indicate the identifier of the second IP packet. Subsequent IP packet fragments can have header information similar to that of the second destination IP packet. By fragmenting and reassembling the first destination IP packet, the packet can meet the communication requirements.

[0068] The technical solution of this embodiment receives routing protocol messages; when the routing protocol messages meet the fragmentation processing conditions, the routing protocol messages are fragmented and reconstructed to obtain multiple target routing protocol messages; based on the multiple target routing protocol messages, IP packets are generated, which solves the problem of routing protocol message processing. It can fragment the routing protocol messages so that the routing protocol messages can meet the transmission requirements and ensure normal network communication. Specifically, OSPF protocol messages can be fragmented and reconstructed to avoid the high requirements on downstream devices caused by fragmenting IP packets, and at the same time avoid the device load problem and packet out-of-order problem caused by reassembling messages.

[0069] Figure 2 This is a flowchart of another routing protocol message processing method provided according to Embodiment 1 of the present invention. Figure 2 As shown, one usage process of the routing protocol message processing method provided in this embodiment of the invention is as follows: The IP protocol stack receives routing protocol messages; when the message length of the routing protocol message does not exceed the MTU, the routing protocol message is directly sent to the downstream device; when the message length of the routing protocol message exceeds the MTU, it determines whether the routing protocol message is an OSPF protocol message. When the IP protocol stack determines that the routing protocol message is a non-OSPF protocol message, it can perform IP packet fragmentation processing on the non-OSPF protocol message. When the IP protocol stack determines that the routing protocol message is an OSPF protocol message, it can split the LSA in the OSPF protocol message; and reassemble the LSA according to the MTU to construct and generate the target OSPF protocol message and the IP header information corresponding to the target OSPF protocol message, thereby generating the corresponding IP message. The IP protocol stack can then send the IP message to the downstream device.

[0070] Figure 3 This is a network topology diagram provided according to Embodiment 1 of the present invention. Figure 3 As shown, device B has many downstream devices connected to it. Device B generates many LSAs and sends them to device C. When the OSPF protocol packets generated by device B exceed the link MTU, before the OSPF protocol packets are sent to device B, the routing protocol packet processing method provided in this embodiment of the invention can be used to fragment and reassemble the LSAs in the OSPF protocol packets; multiple new OSPF protocol packets are generated, and multiple corresponding IP packets are generated based on each new OSPF protocol packet; thus, device B can send IP packets that meet the communication requirements to device C. Therefore, the IP packets received by device C have not undergone fragmentation processing, and device C does not need to reassemble the received IP packets, reducing the requirements on device C.

[0071] Example 2

[0072] Figure 4 This is a schematic diagram of the structure of a routing protocol message processing device according to Embodiment 2 of the present invention. Figure 4 As shown, the device includes: a message receiving module 410, a target routing protocol message generation module 420, and an IP message generation module 430. Wherein:

[0073] Message receiving module 410 is used to receive routing protocol messages;

[0074] The target routing protocol message generation module 420 is used to fragment and reconstruct the routing protocol message when it is detected that the routing protocol message meets the fragmentation processing conditions, so as to obtain multiple target routing protocol messages.

[0075] IP packet generation module 430 is used to generate IP packets based on multiple target routing protocol packets.

[0076] Optionally, the target routing protocol message generation module 420 includes:

[0077] The data acquisition unit is used to acquire the message length of the routing protocol message and the maximum transmission unit (MTU) of the link;

[0078] The target routing protocol message generation unit is used to fragment and reconstruct the routing protocol message when the message length of the detected routing protocol message is greater than the MTU, so as to obtain multiple target routing protocol messages.

[0079] Optionally, the target routing protocol message generation unit includes:

[0080] The message type determination subunit is used to determine the type of routing protocol message when the message length of the detected routing protocol message is greater than the MTU;

[0081] The target OSPF protocol message generation sub-unit is used to fragment and reconstruct OSPF protocol messages when the type of routing protocol message detected is Open Shortest Path First (OSPF) protocol message, so as to obtain multiple target OSPF protocol messages.

[0082] Optionally, the target OSPF protocol message generation subunit is specifically used for:

[0083] Split the Link State Broadcast (LSA) data packets in the OSPF protocol message;

[0084] Based on the MTU, the split LSAs are reassembled to obtain multiple target OSPF protocol messages.

[0085] Optionally, the IP packet generation module 430 includes:

[0086] The IP packet generation unit is used to construct corresponding IP header information based on multiple target OSPF protocol packets and generate multiple IP packets.

[0087] Optionally, the device may also include:

[0088] The IP packet fragmentation processing module is used to perform IP packet fragmentation processing on non-OSPF protocol packets when the type of the routing protocol packet is detected to be a non-OSPF protocol packet.

[0089] Optional, the IP packet fragmentation processing module includes:

[0090] The first destination IP packet generation unit is used to generate a first destination IP packet based on a non-OSPF protocol packet.

[0091] The second destination IP packet generation unit is used to split the first destination IP packet according to the MTU and reconstruct multiple second destination IP packets.

[0092] The routing protocol message processing apparatus provided in this embodiment of the invention can execute the routing protocol message processing method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0093] Example 3

[0094] Figure 5A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0095] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0096] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0097] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as routing protocol message processing methods.

[0098] In some embodiments, the routing protocol message processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the routing protocol message processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the routing protocol message processing method by any other suitable means (e.g., by means of firmware).

[0099] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0101] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0103] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0104] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0105] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0106] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for processing routing protocol messages, characterized in that, The application is applied to an IP layer of a network protocol stack, and includes the following steps: receiving a routing protocol packet; obtaining a packet length of the routing protocol packet and a link maximum transmission unit (MTU); when it is detected that the packet length of the routing protocol packet is greater than the MTU, performing fragmentation reconstruction on the routing protocol packet to obtain a plurality of target routing protocol packets; wherein, when it is detected that the packet length of the routing protocol packet is greater than the MTU, performing fragmentation reconstruction on the routing protocol packet to obtain a plurality of target routing protocol packets includes: when it is detected that the packet length of the routing protocol packet is greater than the MTU, determining a type of the routing protocol packet; when it is detected that the type of the routing protocol packet is an open shortest path first (OSPF) protocol packet, performing fragmentation reconstruction on the OSPF protocol packet to obtain a plurality of target OSPF protocol packets; generating an IP packet according to the plurality of target routing protocol packets.

2. The method of claim 1, wherein, performing fragmentation reconstruction on the OSPF protocol packet to obtain a plurality of target OSPF protocol packets includes: splitting a link state advertisement (LSA) in the OSPF protocol packet; re-assembling the split LSA according to the MTU to obtain a plurality of target OSPF protocol packets.

3. The method of claim 2, wherein, generating an IP packet according to the plurality of target routing protocol packets includes: respectively constructing corresponding IP header information according to the plurality of target OSPF protocol packets to generate a plurality of IP packets.

4. The method of claim 1, wherein, The application further includes: when it is detected that the type of the routing protocol packet is a non-OSPF protocol packet, performing IP packet fragmentation processing on the non-OSPF protocol packet.

5. The method of claim 4, wherein, performing IP packet fragmentation processing on the non-OSPF protocol packet includes: generating a first target IP packet according to the non-OSPF protocol packet; splitting the first target IP packet according to the MTU and reconstructing a plurality of second target IP packets.

6. A routing protocol packet processing apparatus, characterized by, The application is applied to an IP layer of a network protocol stack, and includes the following steps: a packet receiving module configured to receive a routing protocol packet; a target routing protocol packet generating module including: a data obtaining unit configured to obtain a packet length of the routing protocol packet and a link maximum transmission unit (MTU); and a target routing protocol packet generating unit configured to, when it is detected that the packet length of the routing protocol packet is greater than the MTU, perform fragmentation reconstruction on the routing protocol packet to obtain a plurality of target routing protocol packets; wherein, the target routing protocol packet generating unit includes: a packet type determining sub-unit configured to, when it is detected that the packet length of the routing protocol packet is greater than the MTU, determine a type of the routing protocol packet; and a target OSPF protocol packet generating sub-unit configured to, when it is detected that the type of the routing protocol packet is an open shortest path first (OSPF) protocol packet, perform fragmentation reconstruction on the OSPF protocol packet to obtain a plurality of target OSPF protocol packets; an IP packet generating module configured to generate an IP packet according to the plurality of target routing protocol packets.

7. An electronic device, comprising: The electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; and The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the routing protocol packet processing method in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to implement the routing protocol packet processing method in any one of claims 1-5 when executed.

Citation Information

Patent Citations

  • A method and a device for transmitting a protocol message

    CN109039945A