PACKET TRANSMISSION METHOD AND COMMUNICATION DEVICE
20230047971 ยท 2023-02-16
Inventors
Cpc classification
H04L47/32
ELECTRICITY
H04L45/306
ELECTRICITY
International classification
Abstract
A packet transmission method is applied to a communication device including a first MPU, a second MPU, and an LPU. The first MPU is connected to the LPU through a first transmission channel. The second MPU is connected to the LPU through a second transmission channel. During packet transmission, a service flow packet is transmitted through the first transmission channel, and a non-service flow packet is transmitted through the second transmission channel. Therefore, the service flow packet and the non-service flow packet are processed by different MPUs, so that the service flow packet and the non-service flow packet do not compete with each other. In this way, transmission efficiency of the non-service flow packet is improved. In addition, when the first MPU is attacked by an abnormal service flow packet, the second MPU is not affected, and may normally perform operation and maintenance management.
Claims
1. A packet transmission method of a communication device, wherein the communication device comprises a first main processing unit (MPU), a second MPU, and a line processing unit (LPU), the first MPU is connected to the LPU through a first transmission channel, the second MPU is connected to the LPU through a second transmission channel, and the method comprises: determining, by the LPU, a type of a to-be-transmitted first packet; and if the first packet belongs to a service flow packet, sending, by the LPU, the first packet to the first MPU through the first transmission channel; or if the first packet belongs to a non-service flow packet, sending, by the LPU, the first packet to the second MPU through the second transmission channel.
2. The method according to claim 1, wherein the non-service flow packet comprises one or more of an operation and maintenance task type packet or a configuration management type packet, or a packet of an unknown type, wherein the operation and maintenance task type packet comprises one or more of a Google remote procedure call (gRPC) packet, a secure shell (ssh) packet, or a simple network management protocol (snmp) packet, and wherein the configuration management type packet comprises one or more of a packet carried by an entry delivery task, an entry configuration task, an entry deletion task, or an entry reconciliation task.
3. The method according to claim 2, wherein after the sending, by the LPU, the first packet to the second MPU through the second transmission channel, the method further comprises: determining, by the second MPU, that the first packet belongs to the packet of the unknown type, and performing discarding or rate limiting processing on the first packet.
4. The method according to claim 2, wherein the first packet belongs to the operation and maintenance task type packet, and before the sending, by the LPU, the first packet to the second MPU through the second transmission channel, the method further comprises: receiving, by the LPU, a second packet from the second MPU through the second transmission channel, wherein the second packet belongs to the operation and maintenance task type packet, and the second packet comprises a device information collection indication; and collecting, by the LPU, device information of the communication device based on the device information collection indication, and wherein the sending, by the LPU, the first packet to the second MPU through the second transmission channel comprises: sending, by the LPU, the device information to the second MPU through the second transmission channel, wherein the device information is comprised in the first packet.
5. The method according to claim 1, wherein the first MPU is a primary MPU, and the second MPU is a secondary MPU.
6. The method according to claim 1, wherein the method further comprises: in response to the first MPU being in a failed state, sending, by the LPU, both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the second MPU through the second transmission channel.
7. The method according to claim 1, wherein the method further comprises: in response to the second MPU being in a failed state, sending, by the LPU, both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the first MPU through the first transmission channel.
8. The method according to claim 1, wherein the service flow packet comprises one or more of a border gateway protocol (BGP) packet, an open shortest path first (OSPF) packet, an intermediate system to intermediate system (IS-IS) packet, or a routing information protocol (RIP) packet.
9. A packet transmission method of a communication device, wherein the communication device comprises a first main processing unit (MPU), a second MPU, and a line processing unit (LPU), the first MPU is connected to the LPU through a first transmission channel, the second MPU is connected to the LPU through a second transmission channel, the first transmission channel is used to transmit a service flow packet between the LPU and the first MPU, and the method comprises: sending, by the second MPU, a second packet to the LPU through the second transmission channel, wherein the second packet belongs to a non-service flow packet.
10. The method according to claim 9, wherein the non-service flow packet comprises one or more of an operation and maintenance task type packet, a configuration management type packet, or a packet of an unknown type, wherein the operation and maintenance task type packet comprises one or more of a Google remote procedure call (gRPC) packet, a secure shell (ssh) packet, or a simple network management protocol (snmp) packet, and wherein the configuration management type packet comprises one or more of a packet carried by an entry delivery task, an entry configuration task, an entry deletion task, or an entry reconciliation task.
11. The method according to claim 10, wherein the method further comprises: performing, by the second MPU, discarding or rate limiting processing on a first packet that is received from the LPU through the second transmission channel, wherein the first packet belongs to the packet of the unknown type.
12. The method according to claim 10, wherein the second packet belongs to the operation and maintenance task type packet, and the sending, by the second MPU, the second packet to the LPU through the second transmission channel comprises: sending, by the second MPU, a device information collection indication to the LPU through the second transmission channel, wherein the device information collection indication is comprised in the second packet, and the device information collection indication is used to indicate the LPU to collect device information of the communication device, and wherein after the second MPU sends the non-service flow packet to the LPU through the second transmission channel, the method further comprises: receiving, by the second MPU, a first packet that is sent by the LPU through the second transmission channel, wherein the first packet belongs to the operation and maintenance task type packet, and the device information is comprised in the first packet.
13. The method according to claim 10, wherein the first MPU is connected to the second MPU through a third transmission channel, the second packet belongs to the configuration management type packet, and before the sending, by the second MPU, the second packet to the LPU through the second transmission channel, the method further comprises: obtaining, by the second MPU through the third transmission channel, an entry synchronized by the first MPU, and wherein the sending, by the second MPU, the second packet to the LPU through the second transmission channel comprises: sending, by the second MPU, the entry to the LPU through the second transmission channel, wherein the entry is comprised in the second packet, and the entry is a routing entry or a forwarding entry.
14. The method according to claim 9, wherein the first MPU is a primary MPU, and the second MPU is a secondary MPU.
15. The method according to claim 9, wherein the method further comprises: in response to the first MPU being in a failed state, sending, by the second MPU, both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the LPU through the second transmission channel.
16. The method according to claim 9, wherein the method further comprises: in response to the second MPU being in a failed state, sending, by the first MPU, both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the LPU through the first transmission channel.
17. The method according to claim 9, wherein the service flow packet comprises one or more of a border gateway protocol (BGP) packet, an open shortest path first (OSPF) packet, an intermediate system to intermediate system IS-IS packet, or a routing information protocol (RIP) packet.
18. A communication device comprising: a first main processing unit (MPU); a second MPU; and a line processing unit (LPU), wherein the first MPU is connected to the LPU through a first transmission channel, and the second MPU is connected to the LPU through a second transmission channel, and wherein the LPU is configured to: determine a type of a to-be-transmitted first packet; and if the first packet belongs to a service flow packet, send the first packet to the first MPU through the first transmission channel; or if the first packet belongs to a non-service flow packet, send the first packet to the second MPU through the second transmission channel.
19. The communication device according to claim 18, wherein the first packet belongs to an operation and maintenance task type packet, and the LPU is further configured to: receive a second packet from the second MPU through the second transmission channel, wherein the second packet belongs to the operation and maintenance task type packet, and the second packet comprises a device information collection indication; collect device information of the communication device based on the device information collection indication; and send the device information to the second MPU through the second transmission channel, wherein the device information is comprised in the first packet.
20. The communication device according to claim 18, wherein the LPU is further configured to: in response to the first MPU being in a failed state, send both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the second MPU through the second transmission channel.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
DESCRIPTION OF EMBODIMENTS
[0113] Embodiments of this application provide a packet transmission method and a frame-shaped communication device. The packet transmission method may be applied to the frame-shaped communication device. The frame-shaped communication device may be a modular switch, a modular router, or the like. As shown in
[0114] The MPU (the first MPU or the second MPU) which may also be referred to as a main processing unit, integrates a main control unit and a system maintenance unit, and is responsible for centralized control and management, and data exchange of the frame-shaped communication device. As shown in
[0115] The LPU may also be referred to as a line interface processing unit or a service board. An IP (Internet Protocol) data packet outside the frame-shaped communication device is input to the frame-shaped communication device from a physical interface of the LPU. One frame-shaped communication device may include a plurality of LPUs.
[0116] The first MPU is connected to the LPU through a first transmission channel, and the second MPU is connected to the LPU through a second transmission channel. The first transmission channel is used to transmit the service flow packet, and the second transmission channel is used to transmit the non-service flow packet. Therefore, the service flow packet and the non-service flow packet are transmitted through different transmission channels, the service flow packet and the non-service flow packet do not compete with each other, and both transmission efficiency of the service flow packet and transmission efficiency of the non-service flow packet are high. In addition, the first MPU is responsible for processing the service flow packet, and the second MPU is responsible for processing the non-service flow packet, so that when the first MPU is attacked by an abnormal service flow packet, the second MPU is not affected, and the second MPU can further normally perform operation and maintenance management on the device. The first transmission channel may be a 100 M, 1 G, or 10 G transmission channel. The second transmission channel may also be a 100 M, 1 G, or 10 G transmission channel. The first transmission channel and the second transmission channel may be the same or may be different in bandwidth. This is not limited in this application. In addition, the first MPU and the second MPU may be connected through a third transmission channel, so that data synchronization, for example, entry synchronization may be performed, for example, synchronization of a routing entry or a forwarding entry, may be performed between the first MPU and the second MPU. The third transmission channel may be a 1 GE or 10 GE transmission channel.
[0117] It should be additionally noted that, as shown in
[0118] To facilitate understanding of the service flow packet and the non-service flow packet, the following separately describes the service flow packet and the non-service flow packet.
[0119] The service flow packet may also be referred to as a protocol packet. The service flow packet includes a border gateway protocol (BGP) packet, an open shortest path first (OSPF) packet, an intermediate system to intermediate system (IS-IS) packet, and a routing information protocol (RIP) packet, but is not limited thereto.
[0120] The non-service flow packet may include one or more of an operation and maintenance task type packet, a configuration management type packet, or a packet of an unknown type. The operation and maintenance task type packet includes, but is not limited to, a Google remote procedure call (gRPC) packet, a secure shell (ssh) packet, and a simple network management protocol (snmp) packet. The configuration management type packet includes, but is not limited to, a packet carried by an entry delivery task, an entry configuration task, an entry deletion task, and an entry reconciliation task. The packet of the unknown type may also be referred to as an unknown packet.
[0121] An embodiment of this application provides a packet transmission method. As shown in
[0122] Operation 401: The LPU determines a type of a to-be-transmitted first packet.
[0123] In the solution shown in this embodiment of this application, when sending a packet to an MPU, the LPU may first determine the type of the to-be-transmitted first packet, then determine a target MPU based on a specific type, and then send the first packet to the target MPU through a corresponding transmission channel. Specifically, if the first packet belongs to a service flow packet, Operation 402a is performed; or if the first packet belongs to a non-service flow packet, Operation 402b is performed.
[0124] Operation 402a: If the first packet belongs to the service flow packet, the LPU sends the first packet to a first MPU through a first transmission channel.
[0125] In the solution shown in this embodiment of this application, when determining that the first packet belongs to the service flow packet, the LPU sends the first packet to the first MPU through the first transmission channel, and the first MPU performs corresponding processing on the service flow packet.
[0126] Operation 402b: If the second packet belongs to the non-service flow packet, the LPU sends the first packet to a second MPU through a second transmission channel.
[0127] In the solution shown in this embodiment of this application, when determining that the first packet belongs to the non-service flow packet, the LPU sends the first packet to the second MPU through the second transmission channel, and the second MPU performs corresponding processing on the non-service flow packet.
[0128] In addition, to reduce impact on a normal operation and maintenance task and a configuration management task, after receiving the first packet, the second MPU may perform filtering processing on the received first packet. First, the second MPU determines a type of the received first packet. If it is determined that the first packet belongs to a packet of an unknown type, discarding or rate limiting processing is performed on the first packet.
[0129] In the solution shown in this embodiment of this application, an LSW in the second MPU may perform the filtering processing. Specifically, the LSW determines a type to which the received first packet belongs. If determining that the first packet belongs to the packet of the unknown type, the LSW performs the discarding or rate limiting processing on the first packet, and sends a first packet obtained after the rate limiting processing to a CPU in the second MPU for processing. If the LSW determines that the received first packet belongs to an operation and maintenance task type packet or a configuration management type packet, the LSW directly sends the first packet to a CPU in the second MPU for processing. That the first packet is sent to the CPU for processing may be that the first packet is sent to a protocol stack in the CPU for processing.
[0130] As shown in
[0131] Operation 501: The LPU starts to send the packet to the MPU.
[0132] Operation 502: The LPU determines whether a frame-shaped communication device has two MPUs, that is, determines whether the frame-shaped communication device has the first MPU and the second MPU.
[0133] Operation 503: After determining that the frame-shaped communication device has the two MPUs (that is, has the first MPU and the second MPU), the LPU determines the type of the to-be-transmitted first packet.
[0134] Operation 504a: If determining that the first packet does not belong to the service flow packet, the LPU sends the first packet to the LSW in the second MPU.
[0135] Operation 504b: If determining that the first packet belongs to the service flow packet, the LPU sends the first packet to the first MPU. Alternatively, if determining that the frame-shaped communication device has only the first MPU, the LPU directly sends the first packet to the first MPU.
[0136] Operation 505: The LSW in the second MPU determines a packet type of the received first packet, and determines whether the first packet belongs to the packet of the unknown type.
[0137] Operation 506: If determining that the received first packet belongs to the packet of the unknown type, the LSW performs discarding or rate limiting processing on the first packet.
[0138] Operation 507: If determining that the received first packet does not belong to the packet of the unknown type, the LSW sends the first packet to the CPU in the second MPU for processing, or sends a first packet obtained after the rate limiting processing to the CPU in the second MPU for processing.
[0139] An embodiment of this application further provides a packet transmission method. The packet transmission method may be implemented by a second MPU in a frame-shaped communication device. In the frame-shaped communication device, a first MPU is connected to an LPU through a first transmission channel, the second MPU is connected to the LPU through a second transmission channel, and the first transmission channel is used to transmit a service flow packet between the LPU and the first MPU. The method includes:
[0140] the second MPU sends a second packet to the LPU through the second transmission channel. The second packet belongs to a non-service flow packet.
[0141] In the solution shown in this embodiment of this application, the first MPU is connected to the LPU through the first transmission channel, and the first transmission channel is used to transmit the service flow packet between the first MPU and the LPU. The second MPU is connected to the LPU through the second transmission channel, and the second transmission channel is used to transmit the non-service flow packet.
[0142] Therefore, the service flow packet and the non-service flow packet are transmitted through different transmission channels, the service flow packet and the non-service flow packet do not compete with each other, and both transmission efficiency of the service flow packet and transmission efficiency of the non-service flow packet are high. In addition, when the first MPU is attacked by an abnormal service flow packet, the second MPU is not affected, and the second MPU can further normally perform operation and maintenance management on the device.
[0143] The following describes this application in more detail with reference to the foregoing two packet transmission methods and examples.
[0144] (1) Process an operation and maintenance task. The operation and maintenance task mainly involves collection of device information of the frame-shaped communication device. An example processing procedure may be described as follows.
[0145] First, the second MPU sends a device information collection indication to the LPU through the second transmission channel. Then, the LPU receives the device information collection indication through the second transmission channel, and collects the device information of the frame-shaped communication device based on the device information collection indication. Then, the LPU sends the collected device information to the second MPU through the second transmission channel. Finally, the second MPU receives the device information through the second transmission channel.
[0146] Packets carried in the device information and the device information collection indication are both operation and maintenance task type packets.
[0147] As shown in
[0148] Operation 601: An ESPM (Telemetry task decomposition center) module in the second MPU delivers a subscription collection task to a telemetry agent in the LPU.
[0149] Operation 602: The telemetry agent collects data of various types based on the delivered collection task, and sends the collected data to a gRPC module of the second MPU.
[0150] Operation 603: The gRPC module performs model conversion on the collected data, and reports converted collected data to a collector.
[0151] (2) Process a configuration management task. The configuration management task mainly involves entry delivery, entry configuration, entry deletion, entry reconciliation, and the like. An example procedure may be described as follows.
[0152] First, the second MPU obtains, through a third transmission channel, an entry synchronized by the first MPU. Then, the second MPU sends the entry to the LPU through the second transmission channel. The entry is a routing entry or a forwarding entry.
[0153] In the solution shown in this embodiment of this application, the second MPU obtains, through the third transmission channel, the entry synchronized by the first MPU. An existing synchronization mechanism may be used as a synchronization mechanism, and details are not described herein again. After obtaining the entry, the second MPU sends the entry to the LPU through the second transmission channel.
[0154] As shown in
[0155] Operation 1: A routing protocol module (which includes a BGP module and an OSPF module) of the first MPU synchronizes an entry to a routing protocol module of the second MPU.
[0156] Operation 2: The routing protocol module of the second MPU sends an entry to a forwarding engine of the second MPU.
[0157] Operation 3: The forwarding engine of the second MPU sends an entry to a forwarding engine of the LPU.
[0158] Operation 4: The forwarding engine of the LPU sends an entry to a forwarding chip of the LPU for processing.
[0159] Operation 5: After processing the entry, the LPU responds to entry delivery, and sends an entry to the forwarding engine of the second MPU.
[0160] It should be additionally noted that the first MPU and the second MPU may be in a mutual primary/secondary relationship, so that when one MPU fails, another MPU may bear processing of all packets, and transmit all types of packets through a transmission channel corresponding to the MPU. Therefore, working reliability of the frame-shaped communication device is improved. An example processing process may be described as follows.
[0161] In a possible embodiment, when the first MPU is in a failed state, the LPU sends both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the second MPU through the second transmission channel. Correspondingly, the second MPU sends both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the LPU through the second transmission channel.
[0162] In another possible embodiment, when the second MPU is in a failed state, the LPU sends both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the first MPU through the first transmission channel. Correspondingly, the first MPU sends both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the LPU through the first transmission channel.
[0163] An embodiment of this application further provides a frame-shaped communication device. As shown in
[0164] The LPU is configured to:
[0165] determine a type of a to-be-transmitted first packet; and
[0166] if the first packet belongs to a service flow packet, send the first packet to the first MPU through the first transmission channel; or
[0167] if the first packet belongs to a non-service flow packet, send the first packet to the second MPU through the second transmission channel.
[0168] In a possible embodiment, the second MPU is configured to:
[0169] determine that the received first packet belongs to a packet of an unknown type, and perform discarding or rate limiting processing on the first packet.
[0170] In a possible embodiment, the first packet belongs to an operation and maintenance task type packet, and the LPU is further configured to:
[0171] receive a second packet from the second MPU through the second transmission channel, where the second packet belongs to the operation and maintenance task type packet, and the second packet includes a device information collection indication;
[0172] collect device information of the frame-shaped communication device based on the device information collection indication; and
[0173] send the device information to the second MPU through the second transmission channel, where the device information is included in the first packet.
[0174] In a possible embodiment, the LPU is further configured to:
[0175] when the first MPU is in a failed state, send both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the second MPU through the second transmission channel.
[0176] In a possible embodiment, the LPU is further configured to:
[0177] when the second MPU is in a failed state, send both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the first MPU through the first transmission channel.
[0178] In a possible embodiment, the non-service flow packet includes one or more of an operation and maintenance task type packet, a configuration management type packet, or a packet of an unknown type.
[0179] The operation and maintenance task type packet includes a gRPC packet, an ssh packet, and an snmp packet.
[0180] The configuration management type packet includes a packet carried by an entry delivery task, an entry configuration task, an entry deletion task, and an entry reconciliation task.
[0181] In a possible embodiment, the first MPU is a primary MPU, and the second MPU is a secondary MPU.
[0182] In a possible embodiment, the service flow packet includes a BGP packet, an OSPF packet, an IS-IS packet, and a RIP packet.
[0183] In a possible embodiment, the second MPU is further connected to an NCE.
[0184] An embodiment of this application further provides another frame-shaped communication device. As shown in
[0185] The second MPU is configured to:
[0186] send a second packet to the LPU through the second transmission channel. The second packet belongs to a non-service flow packet.
[0187] In a possible embodiment, the second MPU is further configured to:
[0188] perform discarding or rate limiting processing on a first packet that is received from the LPU through the second transmission channel. The first packet belongs to a packet of an unknown type.
[0189] In a possible embodiment, the second packet belongs to an operation and maintenance task type packet, and the second MPU is further configured to:
[0190] send a device information collection indication to the LPU through the second transmission channel, where the device information collection indication is included in the second packet, and the device collection information indication is used to indicate the LPU to collect device information of the frame-shaped communication device; and
[0191] receive a first packet that is sent by the LPU through the second transmission channel, where the first packet belongs to the operation and maintenance task type packet, and the device information is included in the first packet.
[0192] In a possible embodiment, the first MPU is connected to the second MPU through a third transmission channel, the second packet belongs to a configuration management type packet, and the second MPU is configured to:
[0193] obtain, through the third transmission channel, an entry synchronized by the first MPU; and
[0194] send the entry to the LPU through the second transmission channel, where the entry is included in the second packet, and the entry is a routing entry or a forwarding entry.
[0195] In a possible embodiment, the second MPU is further configured to:
[0196] when the first MPU is in a failed state, send both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the LPU through the second transmission channel.
[0197] In a possible embodiment, the first MPU is further configured to:
[0198] when the second MPU is in a failed state, send both a packet belonging to the service flow packet and a packet belonging to the non-service flow packet to the LPU through the first transmission channel.
[0199] In a possible embodiment, the non-service flow packet includes one or more of an operation and maintenance task type packet, a configuration management type packet, or a packet of an unknown type.
[0200] The operation and maintenance task type packet includes a gRPC packet, an ssh packet, and an snmp packet.
[0201] The configuration management type packet includes a packet carried by an entry delivery task, an entry configuration task, an entry deletion task, and an entry reconciliation task.
[0202] In a possible embodiment, the first MPU is a primary MPU, and the second MPU is a secondary MPU.
[0203] In a possible embodiment, the service flow packet includes a BGP packet, an OSPF packet, an IS-IS packet, and a RIP packet.
[0204] In a possible embodiment, the second MPU is further connected to an NCE.