WO2016095345A1 - Method and network device for forwarding message - Google Patents

Method and network device for forwarding message Download PDF

Info

Publication number
WO2016095345A1
WO2016095345A1 PCT/CN2015/073971 CN2015073971W WO2016095345A1 WO 2016095345 A1 WO2016095345 A1 WO 2016095345A1 CN 2015073971 W CN2015073971 W CN 2015073971W WO 2016095345 A1 WO2016095345 A1 WO 2016095345A1
Authority
WO
WIPO (PCT)
Prior art keywords
forwarding
entry
chip
routing
layer
Prior art date
Application number
PCT/CN2015/073971
Other languages
French (fr)
Chinese (zh)
Inventor
魏立军
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016095345A1 publication Critical patent/WO2016095345A1/en

Links

Images

Definitions

  • the present invention relates to the field of computer network data communication technologies, and in particular, to a packet forwarding method and a network device.
  • Network devices such as low-end routers and switches are indispensable devices in the field of data communication.
  • the embodiment of the invention provides a packet forwarding method and a network device, which adopts a combination of a multi-core CPU soft forwarding and a Layer 2 switching chip hard forwarding.
  • the number of forwarding tables configured and learned on the network device is less than or equal to the Layer 2 switching.
  • the forwarding traffic is forwarded by the Layer 2 switching chip, which improves the forwarding efficiency.
  • the number of forwarding tables configured and learned on the network device is greater than the number of on-chip forwarding tables of the Layer 2 switching chip, The forwarding traffic corresponding to the routing forwarding entry exceeding the number of on-chip forwarding tables is sent to the multi-core CPU, and is forwarded by the multi-core CPU, which expands the forwarding table capacity.
  • the embodiment of the present invention adopts the following technical solutions:
  • a method for packet forwarding comprising:
  • forwarding traffic corresponding to the routing forwarding entries of the one or more hard forwarding tables that exceed the number of the on-chip forwarding tables is sent Forwarded to the multi-core CPU.
  • the forwarding traffic corresponding to the routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table is forwarded to the multi-core CPU for forwarding, including:
  • the multi-core CPU Transmitting the forwarding traffic corresponding to the routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table to the multi-core CPU, and the multi-core CPU correlates the forwarding traffic sent by the multi-core CPU After the service is processed, the processed forwarding traffic is sent to the Layer 2 switch chip, and the processed forwarding traffic is forwarded by the Layer 2 switch chip.
  • the method further includes:
  • the route forwarding entry covers the routing forwarding entry corresponding to the short mask.
  • the method further includes:
  • the routing forwarding entry to be deleted After deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the routing forwarding entry to be deleted in the on-chip forwarding table of the Layer 2 switching chip, if yes, the The route forwarding entry to be deleted is deleted, and a mask shorter than the mask of the deleted routing forwarding entry with the same IP address as the deleted routing forwarding entry is searched from the soft forwarding table, and the mask is selected from the found mask.
  • the longest mask writes the route forwarding entry corresponding to the longest mask to the on-chip forwarding table of the layer 2 switch chip.
  • the route forwarding entry corresponding to the service forwarding information is sent to the sending flag, and the forwarding traffic corresponding to the routing forwarding entry is sent to the The multi-core CPU forwards.
  • the route forwarding entry when the route forwarding entry is added, if the Layer 2 encapsulation information of the destination egress does not exist, the route forwarding entry needs to be set to an uplink sending flag, and the multi-core CPU forwards the forwarding corresponding to the routing forwarding entry. flow.
  • routing forwarding entry when the routing forwarding entry is added, if the route is a route that needs to be directly sent, the routing entry needs to be sent to the multi-core CPU for forwarding.
  • a network device for packet forwarding includes:
  • the service protocol module is configured to obtain one or more service forwarding information on the network device, process the one or more service forwarding information, and deliver the processed one or more service forwarding information to the forwarding table management.
  • a forwarding table management module configured to receive the one or more service forwarding information, and integrate the one or more service forwarding information into one or more soft forwarding tables required for multi-core CPU soft forwarding to write to the shared memory Reading for soft forwarding; and integrating the one or more service forwarding information into one or more hard forwarding tables required for hard forwarding by the layer 2 switching chip, and the one or more The hard forwarding table is delivered to the service driver module.
  • a service driving module configured to write, in the one or more hard forwarding tables, a routing forwarding entry that needs to be forwarded by the Layer 2 switching chip to an on-chip forwarding table of the Layer 2 switching chip, where the Layer 2 switching is performed.
  • the chip forwards the forwarding traffic corresponding to the routing forwarding entry after performing related service processing;
  • the soft forwarding module is configured to process the forwarding traffic sent to the multi-core CPU according to the packet information and the soft forwarding table information in the shared memory, and deliver the processed forwarding traffic to the layer 2 Switch chip.
  • the soft forwarding module further includes:
  • a soft forwarding unit configured to send, to the multi-core CPU, forwarding traffic corresponding to a routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table, sent by the multi-core CPU
  • the processed forwarding traffic is delivered to the Layer 2 switching chip, and the processed forwarding traffic is forwarded by the Layer 2 switching chip.
  • the network device further includes:
  • Obtaining a routing module configured to obtain service forwarding information related to a routing forwarding entry to be added
  • Adding a route soft forwarding table generating module configured to integrate the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU;
  • Adding a forwarding entry module configured to determine whether a routing forwarding entry in the on-chip forwarding table of the Layer 2 switching chip is full, and if not, integrating the service forwarding information into the Layer 2 switching chip hard forwarding station a hard forwarding table is required, and the routing forwarding entry in the hard forwarding table is written into the on-chip forwarding table; if it is full, it is determined whether a mask exists in the on-chip forwarding table than the required addition
  • the routing forwarding entry of the same IP address with a short mask of the routing forwarding entry if yes, overwrites the routing forwarding entry corresponding to the short mask with the routing forwarding entry to be added.
  • the network device further includes:
  • the soft forwarding table routing entry deletion module is configured to search for the routing forwarding entry to be deleted in the soft forwarding table, and if yes, delete the routing forwarding entry to be deleted;
  • the on-chip forwarding table routing entry deletion module is configured to: after deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the presence of the on-chip forwarding table of the layer 2 switching chip Deleting the routing forwarding entry to be deleted, if yes, deleting the routing forwarding entry to be deleted, and searching for the routing forwarding entry of the same IP address as the deleted routing forwarding entry from the soft forwarding table
  • the mask has a short mask, and the longest mask is selected from the found mask, and the route forwarding entry corresponding to the longest mask is written into the on-chip forwarding table of the layer 2 switch chip.
  • the network device further includes:
  • the routing entry is sent to the module, and is configured to: when the network device is configured with the complex service forwarding information that cannot be processed by the Layer 2 switch chip, or the Layer 2 encapsulation information of the destination egress does not exist, or the route is a route that needs to be directly sent, The corresponding route forwarding entry is placed on the upload flag, and sent to the multi-core CPU for forwarding.
  • the embodiment of the present invention further provides a computer readable storage medium, where the storage medium stores a computer program, where the computer program includes program instructions, when the program instruction is executed by the message forwarding device, enabling the device to execute the message. Forwarding method.
  • the beneficial effects of the embodiments of the present invention are: a packet forwarding method and a network device provided by the present invention, which adopts a combination of multi-core CPU soft forwarding and Layer 2 switching chip hard forwarding, and firstly forwards service information of the network device.
  • the number of hard forwarding tables is less than or equal to the number of on-chip forwarding tables of the Layer 2 switching chip, the forwarding traffic is Forwarded by the Layer 2 switch chip.
  • the forwarding traffic corresponding to the route forwarding entries exceeding the number of on-chip forwarding tables is sent to the multi-core CPU. After the relevant service processing is performed, it is sent to the Layer 2 switching chip for forwarding.
  • the method and the network device provided by the embodiments of the present invention not only utilize the hard forwarding of the Layer 2 switching chip to improve the packet forwarding efficiency, but also realize the line speed, meet the capacity requirement of the routing forwarding entries of some networks, and expand the rotation by using the multi-core CPU soft forwarding. Published capacity, basically meets most commercial network applications.
  • FIG. 1 is a flow chart showing the steps of a packet forwarding method according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a hardware connection provided by an embodiment of the present invention.
  • FIG. 3 is a flow chart showing the steps of adding a route forwarding entry according to an embodiment of the present invention
  • FIG. 4 is a flow chart showing the steps of adding a 1.1.1.1/24 route forwarding entry in an example provided by an embodiment of the present invention
  • FIG. 5 is a flow chart showing the steps of deleting a 1.1.1.1/24 route forwarding entry according to an embodiment of the present invention
  • FIG. 6 is a flow chart showing the steps of deleting a route forwarding entry in an example provided by an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of a network device according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram of adding a route forwarding entry in a network device according to an embodiment of the present invention.
  • FIG. 9 is a structural block diagram of deleting a route forwarding entry in a network device according to an embodiment of the present invention.
  • the embodiment of the invention provides a method for packet forwarding. As shown in FIG. 1 , the method includes:
  • Step S101 Acquire one or more service forwarding information on the network device.
  • the service forwarding information After the service forwarding information is obtained from the network device, the service forwarding information needs to be further processed because the service forwarding information obtained from the network device is in a disorderly and disorderly state and cannot be directly used in the subsequent forwarding process. .
  • Step S102 Integrating the service forwarding information into one or more soft forwarding tables required for soft forwarding of the multi-core CPU, storing the information in the shared memory, and integrating the service forwarding information into a hard forwarding of the layer 2 switching chip.
  • One or more hard forwarding tables are one or more hard forwarding tables;
  • the multi-core CPU is the control center, which carries the operation of the entire software system.
  • the Layer 2 switch chip is connected to the multi-core CPU.
  • the cascading interface bandwidth is N 10G.
  • the cascading interface includes the data packet channel XAUI, the protocol packet channel SGMI, and the chip configuration channel.
  • the PCIE the multi-core CPU receives the traffic that cannot be processed by all the Layer 2 switch chips from the three channels, including the forwarding traffic corresponding to the routing forwarding entries exceeding the number of the on-chip forwarding tables of the Layer 2 switching chip, and the forwarding traffic without the Layer 2 encapsulation information.
  • Some special routes need to send traffic, as well as some complex traffic, while the multi-core CPU is also connected to the shared memory, reading the soft forwarding table required for soft forwarding from the shared memory;
  • Each interface board is connected to the Layer 2 switch chip. All external interfaces of the network device are connected to the Layer 2 switch chip.
  • the Layer 2 switch chip is responsible for the line-speed forwarding of network traffic and the mutual conversion of physical link traffic. Statistics, etc.
  • the shared memory is an accessible storage area, and includes a storage unit such as a SRAM (Static Random Access Memory), a DRAM (Dynamic Random Access Memory), and a DDR (Double Data Rate Memory). Used for forwarding traffic information exchanges, packet buffers, etc.
  • a storage unit such as a SRAM (Static Random Access Memory), a DRAM (Dynamic Random Access Memory), and a DDR (Double Data Rate Memory). Used for forwarding traffic information exchanges, packet buffers, etc.
  • Step S103 When the number of the hard forwarding table is less than or equal to the number of the on-chip forwarding tables of the Layer 2 switching chip, write the routing forwarding entry in the hard forwarding table to the on-chip forwarding table, where The Layer 2 switch chip performs related service processing on the forwarding traffic corresponding to the route forwarding entry, and then forwards the packet;
  • the forwarding traffic corresponding to the forwarding entry is forwarded by the Layer 2 switching chip, and the forwarding is performed by the Layer 2 switching chip. Line speed, forwarding efficiency is faster.
  • Step S104 When the number of the hard forwarding table is greater than the number of the on-chip forwarding table, send the forwarding traffic corresponding to the routing forwarding entry of the hard forwarding table that exceeds the number of the on-chip forwarding table to the multi-core CPU. Forward.
  • the forwarding traffic corresponding to the routing forwarding entries of the hard forwarding table that exceeds the number of on-chip forwarding tables cannot be forwarded by the Layer 2 switching chip, and needs to be sent to the multi-core CPU.
  • the CPU performs related service processing on the forwarded traffic.
  • the multi-core CPU does not have an external interface. Therefore, the forwarding traffic is sent to the Layer 2 switch chip through the cascade interface.
  • the Layer 2 switch chip sends the forwarding traffic.
  • FIG. 3 is a flowchart of a step of adding a route forwarding entry according to an embodiment of the present invention, including:
  • Step S301 Obtain service forwarding information related to a route forwarding entry to be added.
  • Step S302 integrating the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU;
  • Step S303 determining whether the routing forwarding entry in the on-chip forwarding table of the Layer 2 switching chip is full, and if not, integrating the service forwarding information into the hard required for the hard forwarding of the Layer 2 switching chip. Forwarding the table, and writing the routing forwarding entry in the hard forwarding table into the on-chip forwarding table;
  • Step S304 If it is full, determine whether there is a routing forwarding entry in the on-chip forwarding table with the same IP address that is shorter than the mask of the routing forwarding entry to be added, if yes, use the required The added route forwarding entry covers the route forwarding entry corresponding to the short mask.
  • Step S401 Configure a route that adds 1.1.1.1/24, and perform related service processing on the route 1.1.1.1/24 to generate forwarding information of the route.
  • Step S402 After the forwarding information of the route 1.1.1.1/24 is integrated, the shared memory is written in the form of a soft forwarding table required for soft forwarding with the multi-core CPU;
  • Step S403 determining whether the on-chip routing forwarding table entry of the layer 2 switch chip is full.
  • Step S404 If not, the forwarding information of the route 1.1.1.1/24 is integrated with the hard forwarding table required for the hard forwarding of the Layer 2 switching chip, and the routing forwarding entry in the hard forwarding table is written into the on-chip forwarding table. In the middle, the process ends.
  • Step S405 If it is full, determine whether there is a route forwarding entry in the on-chip forwarding table of the Layer 2 switch chip that is shorter than the 24-bit mask in 1.1.1.1. If not, the process ends.
  • Step S406 If the on-chip forwarding table of the Layer 2 switch chip has a shorter masked route entry, for example, 16 bits, the 1.1.1.1/16 is overwritten with 1.1.1.1/16, and the route forwarding entry is successfully added, and the process ends.
  • FIG. 5 is a flowchart of a process for deleting a route forwarding entry according to an embodiment of the present invention. include:
  • Step S501 Search for the routing forwarding entry to be deleted in the soft forwarding table, and if yes, delete the routing forwarding entry to be deleted.
  • Step S502 after deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the routing forwarding entry to be deleted in the on-chip forwarding table of the Layer 2 switching chip, if yes, And deleting the route forwarding entry to be deleted, and searching for the same IP address of the deleted routing entry from the soft forwarding table, and a mask shorter than the mask of the deleted routing forwarding entry, from the found The longest mask is selected in the mask, and the route forwarding entry corresponding to the longest mask is written into the on-chip forwarding table of the layer 2 switch chip.
  • Step S601 configuring to delete the route of 1.1.1.1/24;
  • Step S602 Search for a route forwarding entry of 1.1.1.1/24 in the soft forwarding table.
  • Step S603 if yes, deleting the routing forwarding entry
  • Step S604 Search for a route forwarding entry of 1.1.1.1/24 in the on-chip forwarding table of the layer 2 switch chip.
  • Step S605 if yes, deleting the routing forwarding entry
  • Step S606 searching for a mask having a shorter 1.1.1.1 address than the deleted 24-bit mask in the soft forwarding table in the shared memory;
  • Step S607 If yes, select the longest mask from the found mask, for example, a 23-bit mask, and write the route forwarding entry of 1.1.1.1/23 to the on-chip forwarding table of the layer 2 switch chip. If the process does not exist, the process ends;
  • the route forwarding entry corresponding to the service forwarding information is set to an uplink sending flag, and the routing forwarding entry is forwarded correspondingly.
  • the traffic is sent to the multi-core CPU for forwarding.
  • a complex service that cannot be processed by a Layer 2 chip such as a network address translation NAT or a broadband remote access protocol BRAS is configured on the network device, and the access control list ACL entry of “entering the service binding port and sending the action” needs to be written.
  • the three-state content address memory TCAM in the two-layer chip is sent to the multi-core CPU for processing.
  • the route forwarding entry when the route forwarding entry is added, if the Layer 2 encapsulation information of the destination egress does not exist, the route forwarding entry needs to be set to an uplink sending flag, and the multi-core CPU forwards the forwarding corresponding to the routing forwarding entry. flow.
  • the destination exit has no media access control MAC address and virtual LAN VLAN and other Layer 2 encapsulation information.
  • the forwarding traffic corresponding to the routing forwarding entry cannot be forwarded in the Layer 2 chip. In this case, the routing forwarding entry needs to be sent to the sending flag to ensure entry.
  • the corresponding traffic of the Layer 2 chip can be sent to the multi-core CPU and forwarded by the multi-core CPU.
  • the route entry is sent to an uplink sending flag, and sent to the multi-core CPU for forwarding.
  • the Layer 2 chip cannot forward the local route.
  • the route entry needs to be sent to the upper route to ensure that the corresponding traffic entering the Layer 2 chip can be sent to the multi-core CPU and forwarded by the multi-core CPU.
  • the embodiment of the present invention further provides a network device for packet forwarding, including a processor and a program storage device, as shown in FIG. 7 , wherein a thin arrow in the figure indicates forwarding table information, and a thick arrow indicates forwarding traffic, and the network
  • the equipment also includes:
  • the service protocol module 701 is configured to obtain one or more service forwarding information on the network device, process the service forwarding information, and deliver the processed service forwarding information to the forwarding table management module.
  • the service protocol module 701 is responsible for parsing the configuration command, learning the service protocol, and the like, and the forwarding information required for generating the service is sent to the forwarding table management module through the multiplexer MUX message mechanism, and the service protocol module 701 belongs to the control plane and does not participate. Forwarding of service packets.
  • the forwarding table management module 702 is adapted to receive the service forwarding information, and integrate the service forwarding information into one or more soft forwarding tables required for soft forwarding of the multi-core CPU to be written into the shared memory for soft Read when forwarding; and integrate the service forwarding information into the layer 2 switch core One or more hard forwarding tables required for hard forwarding, and the hard forwarding table is sent to the service driving module;
  • the forwarding table management module 702 mainly receives the forwarding information of the control plane, and integrates the received MUX message into a forwarding table format required by the soft forwarding module, that is, integrates into a soft forwarding table, writes into the shared memory, and integrates as needed.
  • the software development kit and the application interface SDK API interface provided by the layer 2 switch chip are sent to the service driver module in the form of input parameters.
  • the forwarding table management module 702 also receives some real-time information such as aging and statistics of the soft forwarding module and the service driving module during the forwarding process, and feeds back to the control plane.
  • the service driver module 703 is configured to write, in the on-chip forwarding table, a routing forwarding entry that needs to be forwarded by the Layer 2 switching chip in the hard forwarding table, where the Layer 2 switching chip corresponds to the routing forwarding entry. Forwarding traffic is forwarded after relevant business processing;
  • the service driver module 703 directly operates the SDK API interface of the Layer 2 switch chip to process the registers of the on-chip forwarding table and the Layer 2 switch chip, and encapsulates the SDK API interface and provides the drive interface to the forwarding table management module 702.
  • the soft forwarding module 704 is configured to process the forwarding traffic sent to the multi-core CPU according to the packet information and the soft forwarding table information in the shared memory, and send the forwarding traffic to the device after the processing is completed.
  • the second layer switching chip is described.
  • the soft forwarding module 704 writes the forwarding table information in the shared memory according to the packet information and the forwarding table management module 702, and performs related service processing on the service forwarding traffic that enters the multi-core CPU. After the processing is completed, the service forwarding traffic is delivered to the A Layer 2 switch chip that transmits traffic through a Layer 2 switch chip.
  • the soft forwarding module 704 further includes:
  • the soft forwarding unit 714 is configured to send the forwarding traffic corresponding to the routing forwarding entry of the hard forwarding table that exceeds the number of the on-chip forwarding table to the multi-core CPU, where the multi-core CPU sends the After forwarding the traffic for related service processing, the forwarding traffic is sent to the Layer 2 switching chip, and the forwarding traffic is sent by the Layer 2 switching chip.
  • the network device further includes:
  • the obtaining routing module 801 is adapted to obtain the industry related to the routing forwarding entry to be added. Transmitting information;
  • the routing forwarding entry of the same IP address with a short mask of the routing forwarding entry if yes, overwrites the routing forwarding entry corresponding to the short mask with the routing forwarding entry to be added.
  • the network device shown in FIG. 9 further includes:
  • the soft forwarding table routing entry deletion module 901 is configured to search for the routing forwarding entry that needs to be deleted in the soft forwarding table, and if yes, delete the routing forwarding entry that needs to be deleted;
  • the on-chip forwarding table routing entry deleting module 902 is configured to: after deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the need for the in-chip forwarding table of the layer 2 switching chip The deleted routing forwarding entry, if yes, deletes the routing forwarding entry to be deleted, and searches for the same IP address of the deleted routing forwarding entry from the soft forwarding table than the deleted routing forwarding entry mask The short mask is used to select the longest mask from the found mask, and the route forwarding entry corresponding to the longest mask is written into the on-chip forwarding table of the layer 2 switch chip.
  • the network device further includes:
  • the routing entry is sent to the module, and is applicable to when the network device is configured with the service forwarding information that cannot be processed by the Layer 2 switch chip, or the Layer 2 encapsulation information of the destination egress does not exist, or the route is a route that needs to be sent directly,
  • the corresponding route forwarding entry is placed on the sending flag and sent to the multi-core CPU for forwarding.
  • the service protocol module 701 sends the MUX information of the service binding port to the forwarding table management.
  • the module 702, the forwarding table management module 702 needs to write the ACL entry of the "incoming service binding port, the action is sent" to the TCAM in the layer 2 chip;
  • the forwarding table management module 702 finds that the route does not have the MAC address and the Layer 2 information of the VLAN, and the forwarding traffic corresponding to the route cannot be forwarded in the Layer 2 switch chip.
  • the publishing management module 702 needs to put the routing entry of 1.1.1.1/24 on the sending flag to ensure that the corresponding traffic entering the Layer 2 switching chip can be sent to the multi-core CPU;
  • the forwarding table management module 702 needs to deeply parse the routing MUX information, and the uplink routing flag should be set for a route that cannot be forwarded by the Layer 2 switching chip, such as a local route.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the method for forwarding a packet and the network device provided by the embodiment of the present invention first integrate the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU and a hard forwarding table required for hard forwarding of the layer 2 switching chip; If the number of on-chip forwarding tables of the Layer 2 switch chip is less than or equal to the number of on-chip forwarding tables of the Layer 2 switch chip, the forwarding entries in the hard forwarding table are written to the on-chip forwarding table, and the Layer 2 switch chip performs forwarding processing on the forwarding traffic corresponding to the forwarding entry.
  • the forwarding traffic corresponding to the forwarding entries of the hard forwarding table exceeding the number of on-chip forwarding tables is sent to the multi-core CPU for forwarding, and the hard forwarding of the Layer 2 switching chip is fully utilized.
  • the packet forwarding efficiency is extended by the multi-core CPU soft forwarding.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A method and network device for forwarding a message. The method comprises: acquiring service forwarding information on a network device; integrating the service forwarding information into soft forwarding tables required for soft forwarding of a multi-core CPU and storing same in a shared memory, and integrating the service forwarding information into hard forwarding tables required for hard forwarding of a layer-two switching chip; when the number of hardware forwarding tables is less than or equal to that of in-chip forwarding tables of the layer-two switching chip, writing routing forwarding entries in the hard forwarding tables into the in-chip forwarding tables, and the layer-two switching chip performing relevant service processing on forwarding traffic corresponding to the routing forwarding entries and then forwarding same; and when the number of hard forwarding tables is greater than that of in-chip forwarding tables, uploading the forwarding traffic corresponding to the routing forwarding entries of the hard forwarding tables, with the number of which exceeding that of the in-chip forwarding tables, to the multi-core CPU for forwarding. The method and network device provided in the embodiments of the present invention make full use of the hard forwarding of the layer-two switching chip to improve the message forwarding efficiency, and adopt the soft forwarding of the multi-core CPU to expand the capacity of the forwarding tables.

Description

报文转发的方法及网络设备Message forwarding method and network device 技术领域Technical field
本发明涉及计算机网络数据通信技术领域,尤其涉及一种报文转发的方法及网络设备。The present invention relates to the field of computer network data communication technologies, and in particular, to a packet forwarding method and a network device.
背景技术Background technique
中低端路由器、交换机等网络设备是数据通信领域不可缺少的重要设备,目前在各种网络中商用的设备对转发报文的处理基本上存在两个主要问题:一是转发效率比较低,难以实现线速;二是转发容量低,达不到现网设备的容量指标,例如:Network devices such as low-end routers and switches are indispensable devices in the field of data communication. At present, there are basically two main problems in the processing of forwarding packets in commercial devices in various networks: First, the forwarding efficiency is relatively low, which is difficult. The line speed is achieved; the second is that the forwarding capacity is low, which does not reach the capacity index of the existing network equipment, for example:
1、基于通用CPU软转发的处理方法,这种依靠CPU的转发,转发性能比较差,当网络中业务不断叠加后,端口线速困难,应用场景比较窄;1. Based on the processing method of general CPU soft forwarding, this kind of CPU-based forwarding has poor forwarding performance. When the services in the network are continuously superimposed, the port line speed is difficult and the application scenario is relatively narrow;
2、基于FPGA转发或二层交换芯片硬转发的处理方法,这种方法虽然转发性能很高,但是局限于片内转发表项数量,且二层交换芯片对于复杂灵活的应用业务,例如网络地址转换NAT、宽带远程接入服务器BRAS等无法处理。2, based on FPGA forwarding or Layer 2 switching chip hard forwarding processing method, although this method has high forwarding performance, but is limited to the number of on-chip forwarding entries, and the Layer 2 switching chip for complex and flexible application services, such as network addresses Conversion NAT, broadband remote access server BRAS, etc. cannot be processed.
因此有必要提供一种报文转发的方法及网络设备,既能够提高转发效率,实现线速,又能够扩充转发容量,满足现网设备的容量指标。Therefore, it is necessary to provide a packet forwarding method and a network device, which can improve forwarding efficiency, achieve line speed, and expand forwarding capacity to meet the capacity index of the existing network device.
发明内容Summary of the invention
本发明实施例提供一种报文转发的方法及网络设备,采用多核CPU软转发与二层交换芯片硬转发相结合的方法,当网络设备上配置和学习到的转发表数量小于等于二层交换芯片的片内转发表数量时,转发流量都由二层交换芯片来转发,提高了转发效率,当网络设备上配置和学习到的转发表数量大于二层交换芯片的片内转发表数量时,对于超出片内转发表数量的路由转发条目对应的转发流量上送到多核CPU,由多核CPU来转发,扩充了转发表容量。 The embodiment of the invention provides a packet forwarding method and a network device, which adopts a combination of a multi-core CPU soft forwarding and a Layer 2 switching chip hard forwarding. The number of forwarding tables configured and learned on the network device is less than or equal to the Layer 2 switching. When the number of on-chip forwarding tables of the chip is forwarded, the forwarding traffic is forwarded by the Layer 2 switching chip, which improves the forwarding efficiency. When the number of forwarding tables configured and learned on the network device is greater than the number of on-chip forwarding tables of the Layer 2 switching chip, The forwarding traffic corresponding to the routing forwarding entry exceeding the number of on-chip forwarding tables is sent to the multi-core CPU, and is forwarded by the multi-core CPU, which expands the forwarding table capacity.
为了解决上述技术问题,本发明实施例采用如下技术方案:In order to solve the above technical problem, the embodiment of the present invention adopts the following technical solutions:
依据本发明的一个方面,提供了一种报文转发的方法,所述方法包括:According to an aspect of the present invention, a method for packet forwarding is provided, the method comprising:
获取网络设备上的一个或多个业务转发信息;Obtaining one or more service forwarding information on the network device;
将所述一个或多个业务转发信息整合成多核CPU软转发时所需的一个或多个软转发表存储在共享内存中,以及将所述一个或多个业务转发信息整合成二层交换芯片硬转发所需的一个或多个硬转发表;Integrating the one or more service forwarding information into one or more soft forwarding tables required for multi-core CPU soft forwarding to be stored in the shared memory, and integrating the one or more service forwarding information into a layer 2 switching chip Hard forwarding one or more hard forwarding tables required;
当所述一个或多个硬转发表的数量小于或等于所述二层交换芯片的片内转发表数量时,将所述一个或多个硬转发表中的路由转发条目写到所述片内转发表中,由所述二层交换芯片对所述路由转发条目对应的转发流量进行相关业务处理后转发;Writing a routing forwarding entry in the one or more hard forwarding tables to the slice when the number of the one or more hard forwarding tables is less than or equal to the number of on-chip forwarding tables of the Layer 2 switching chip In the forwarding table, the forwarding traffic corresponding to the routing forwarding entry is processed by the Layer 2 switching chip and then forwarded;
当所述一个或多个硬转发表数量大于所述片内转发表数量时,将所述一个或多个硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU转发。When the number of the one or more hard forwarding tables is greater than the number of the on-chip forwarding tables, forwarding traffic corresponding to the routing forwarding entries of the one or more hard forwarding tables that exceed the number of the on-chip forwarding tables is sent Forwarded to the multi-core CPU.
可选地,所述将所述一个或多个硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU转发,包括:Optionally, the forwarding traffic corresponding to the routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table is forwarded to the multi-core CPU for forwarding, including:
将所述一个或多个硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU,由所述多核CPU对上送的所述转发流量进行相关业务处理后,再将处理后的所述转发流量下发至所述二层交换芯片,由所述二层交换芯片转发所述处理后的转发流量发送出去。Transmitting the forwarding traffic corresponding to the routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table to the multi-core CPU, and the multi-core CPU correlates the forwarding traffic sent by the multi-core CPU After the service is processed, the processed forwarding traffic is sent to the Layer 2 switch chip, and the processed forwarding traffic is forwarded by the Layer 2 switch chip.
可选地,所述方法还包括:Optionally, the method further includes:
获取与需添加的路由转发条目相关的业务转发信息;Obtaining service forwarding information related to the route forwarding entry to be added;
将所述业务转发信息整合成所述多核CPU软转发时所需的软转发表;Integrating the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU;
判断所述二层交换芯片的片内转发表中的路由转发条目是否已满,若未满,则将所述业务转发信息整合成所述二层交换芯片硬转发时所需的硬转发表,并将所述硬转发表中的路由转发条目写入所述片内转发表中;Determining whether the routing forwarding entry in the on-chip forwarding table of the Layer 2 switching chip is full, and if not, integrating the service forwarding information into a hard forwarding table required for hard forwarding of the Layer 2 switching chip. And writing the routing forwarding entry in the hard forwarding table to the on-chip forwarding table;
若已满,则判断所述片内转发表中是否存在掩码比所述需添加的路由转发条目的掩码短的同一IP地址的路由转发条目,若存在,则用所述需添加的路由转发条目覆盖所述短掩码对应的路由转发条目。 If it is full, it is determined whether there is a route forwarding entry of the same IP address whose mask is shorter than the mask of the route forwarding entry to be added in the on-chip forwarding table, and if yes, the route to be added is used. The forwarding entry covers the routing forwarding entry corresponding to the short mask.
可选地,所述方法还包括:Optionally, the method further includes:
查找所述软转发表中是否存在需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除;Determining whether there is a routing forwarding entry to be deleted in the soft forwarding table, and if yes, deleting the routing forwarding entry to be deleted;
将所述软转发表中的所述需删除的路由转发条目删除后,查找所述二层交换芯片的片内转发表中是否存在所述需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除,并从所述软转发表中查找与删除的路由转发条目同一IP地址的、比删除的路由转发条目的掩码短的掩码,从查找到的掩码中选取最长的掩码,将所述最长的掩码对应的路由转发条目写到所述二层交换芯片的片内转发表中。After deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the routing forwarding entry to be deleted in the on-chip forwarding table of the Layer 2 switching chip, if yes, the The route forwarding entry to be deleted is deleted, and a mask shorter than the mask of the deleted routing forwarding entry with the same IP address as the deleted routing forwarding entry is searched from the soft forwarding table, and the mask is selected from the found mask. The longest mask writes the route forwarding entry corresponding to the longest mask to the on-chip forwarding table of the layer 2 switch chip.
可选地,在所述获取网络设备上的一个或多个业务转发信息的步骤中:Optionally, in the step of acquiring one or more service forwarding information on the network device:
当网络设备上配置了二层交换芯片无法处理的复杂业务转发信息时,需将所述业务转发信息对应的路由转发条目置上上送标志,将所述路由转发条目对应的转发流量上送至所述多核CPU转发。When the network device is configured with the complex service forwarding information that cannot be processed by the Layer 2 switch chip, the route forwarding entry corresponding to the service forwarding information is sent to the sending flag, and the forwarding traffic corresponding to the routing forwarding entry is sent to the The multi-core CPU forwards.
可选地,在添加路由转发条目时,若目的出口的二层封装信息不存在,则需将所述路由转发条目置上上送标志,由所述多核CPU转发所述路由转发条目对应的转发流量。Optionally, when the route forwarding entry is added, if the Layer 2 encapsulation information of the destination egress does not exist, the route forwarding entry needs to be set to an uplink sending flag, and the multi-core CPU forwards the forwarding corresponding to the routing forwarding entry. flow.
可选地,在添加路由转发条目时,若所述路由为需直接上送的路由,则需将所述路由条目置上上送标志,上送至所述多核CPU转发。Optionally, when the routing forwarding entry is added, if the route is a route that needs to be directly sent, the routing entry needs to be sent to the multi-core CPU for forwarding.
依据本发明的另一个方面,提供了一种报文转发的网络设备,所述网络设备包括:According to another aspect of the present invention, a network device for packet forwarding is provided, and the network device includes:
业务协议模块,设置为获取网络设备上的一个或多个业务转发信息,并对所述一个或多个业务转发信息进行处理,将处理后的一个或多个业务转发信息下发至转发表管理模块;The service protocol module is configured to obtain one or more service forwarding information on the network device, process the one or more service forwarding information, and deliver the processed one or more service forwarding information to the forwarding table management. Module
转发表管理模块,设置为接收所述一个或多个业务转发信息,并将所述一个或多个业务转发信息整合成多核CPU软转发时所需的一个或多个软转发表写到共享内存中,以供软转发时读取;以及将所述一个或多个业务转发信息整合成所述二层交换芯片硬转发所需的一个或多个硬转发表,并将所述一个或多个硬转发表下发至业务驱动模块; a forwarding table management module, configured to receive the one or more service forwarding information, and integrate the one or more service forwarding information into one or more soft forwarding tables required for multi-core CPU soft forwarding to write to the shared memory Reading for soft forwarding; and integrating the one or more service forwarding information into one or more hard forwarding tables required for hard forwarding by the layer 2 switching chip, and the one or more The hard forwarding table is delivered to the service driver module.
业务驱动模块,设置为将所述一个或多个硬转发表中需要所述二层交换芯片转发的路由转发条目写到所述二层交换芯片的片内转发表中,由所述二层交换芯片对所述路由转发条目对应的转发流量进行相关业务处理后进行转发;a service driving module, configured to write, in the one or more hard forwarding tables, a routing forwarding entry that needs to be forwarded by the Layer 2 switching chip to an on-chip forwarding table of the Layer 2 switching chip, where the Layer 2 switching is performed. The chip forwards the forwarding traffic corresponding to the routing forwarding entry after performing related service processing;
软转发模块,设置为根据报文信息和所述共享内存中的软转发表信息,对上送至所述多核CPU中的转发流量进行处理,将处理后的转发流量下发至所述二层交换芯片。The soft forwarding module is configured to process the forwarding traffic sent to the multi-core CPU according to the packet information and the soft forwarding table information in the shared memory, and deliver the processed forwarding traffic to the layer 2 Switch chip.
可选地,所述软转发模块还包括:Optionally, the soft forwarding module further includes:
软转发单元,设置为将对于所述一个或多个硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU,由所述多核CPU对上送的所述转发流量进行相关业务处理后,再将处理后的转发流量下发至所述二层交换芯片,由所述二层交换芯片转发所述处理后的转发流量。a soft forwarding unit, configured to send, to the multi-core CPU, forwarding traffic corresponding to a routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table, sent by the multi-core CPU After the forwarding traffic is processed by the related service, the processed forwarding traffic is delivered to the Layer 2 switching chip, and the processed forwarding traffic is forwarded by the Layer 2 switching chip.
可选地,所述网络设备还包括:Optionally, the network device further includes:
获取添加路由模块,设置为获取与需添加的路由转发条目相关的业务转发信息;Obtaining a routing module, configured to obtain service forwarding information related to a routing forwarding entry to be added;
添加路由软转发表生成模块,设置为将所述业务转发信息整合成所述多核CPU软转发时所需的软转发表;Adding a route soft forwarding table generating module, configured to integrate the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU;
添加转发条目模块,设置为判断所述二层交换芯片的片内转发表中的路由转发条目是否已满,若未满,则将所述业务转发信息整合成所述二层交换芯片硬转发所需的硬转发表,并将所述硬转发表中的路由转发条目写入所述片内转发表中;若已满,则判断所述片内转发表中是否存在掩码比所述需添加的路由转发条目的掩码短的同一IP地址的路由转发条目,若存在,则用所述需添加的路由转发条目覆盖所述短掩码对应的路由转发条目。Adding a forwarding entry module, configured to determine whether a routing forwarding entry in the on-chip forwarding table of the Layer 2 switching chip is full, and if not, integrating the service forwarding information into the Layer 2 switching chip hard forwarding station a hard forwarding table is required, and the routing forwarding entry in the hard forwarding table is written into the on-chip forwarding table; if it is full, it is determined whether a mask exists in the on-chip forwarding table than the required addition The routing forwarding entry of the same IP address with a short mask of the routing forwarding entry, if yes, overwrites the routing forwarding entry corresponding to the short mask with the routing forwarding entry to be added.
可选地,所述网络设备还包括:Optionally, the network device further includes:
软转发表路由条目删除模块,设置为查找所述软转发表中是否存在需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除;The soft forwarding table routing entry deletion module is configured to search for the routing forwarding entry to be deleted in the soft forwarding table, and if yes, delete the routing forwarding entry to be deleted;
片内转发表路由条目删除模块,设置为将所述软转发表中的所述需删除的路由转发条目删除后,查找所述二层交换芯片的片内转发表中的是否存在 所述需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除,并从所述软转发表中查找与删除的路由转发条目同一IP地址的、比删除的路由转发条目的掩码短的掩码,从查找到的掩码中选取最长的掩码,将所述最长的掩码对应的路由转发条目写到所述二层交换芯片的片内转发表中。The on-chip forwarding table routing entry deletion module is configured to: after deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the presence of the on-chip forwarding table of the layer 2 switching chip Deleting the routing forwarding entry to be deleted, if yes, deleting the routing forwarding entry to be deleted, and searching for the routing forwarding entry of the same IP address as the deleted routing forwarding entry from the soft forwarding table The mask has a short mask, and the longest mask is selected from the found mask, and the route forwarding entry corresponding to the longest mask is written into the on-chip forwarding table of the layer 2 switch chip.
可选地,所述网络设备还包括:Optionally, the network device further includes:
路由条目上送模块,设置为当网络设备上配置了二层交换芯片无法处理的复杂业务转发信息,或目的出口的二层封装信息不存在,或所述路由为需直接上送的路由时,将对应的路由转发条目置上上送标志,上送到所述多核CPU转发。The routing entry is sent to the module, and is configured to: when the network device is configured with the complex service forwarding information that cannot be processed by the Layer 2 switch chip, or the Layer 2 encapsulation information of the destination egress does not exist, or the route is a route that needs to be directly sent, The corresponding route forwarding entry is placed on the upload flag, and sent to the multi-core CPU for forwarding.
本发明实施例还提供一种计算机可读存储介质,所述存储介质存储有计算机程序,该计算机程序包括程序指令,当该程序指令被报文转发设备执行时,使得该设备可执行上述报文转发的方法。The embodiment of the present invention further provides a computer readable storage medium, where the storage medium stores a computer program, where the computer program includes program instructions, when the program instruction is executed by the message forwarding device, enabling the device to execute the message. Forwarding method.
本发明实施例的有益效果是:本发明提供的一种报文转发的方法及网络设备,采用多核CPU软转发与二层交换芯片硬转发相结合的方法,首先将网络设备的业务转发信息,整合成多核CPU软转发时所需的软转发表和二层交换芯片硬转发时所需的硬转发表,当硬转发表数量小于等于二层交换芯片的片内转发表数量时,转发流量都由二层交换芯片来转发,当硬转发表数量大于二层交换芯片的片内转发表数量时,对于超出片内转发表数量的路由转发条目对应的转发流量上送至多核CPU,由多核CPU进行相关的业务处理后,再下发至二层交换芯片转发出去。本发明实施例提供的方法和网络设备既充分利用二层交换芯片硬转发提高报文转发效率,实现了线速,满足了部分网络的路由转发条目容量要求,又利用多核CPU软转发扩充了转发表容量,基本上满足了大多数商用网络应用。The beneficial effects of the embodiments of the present invention are: a packet forwarding method and a network device provided by the present invention, which adopts a combination of multi-core CPU soft forwarding and Layer 2 switching chip hard forwarding, and firstly forwards service information of the network device. The soft forwarding table required for the soft forwarding of the multi-core CPU and the hard forwarding table required for the hard forwarding of the Layer 2 switching chip. When the number of hard forwarding tables is less than or equal to the number of on-chip forwarding tables of the Layer 2 switching chip, the forwarding traffic is Forwarded by the Layer 2 switch chip. When the number of hard forwarding tables is greater than the number of on-chip forwarding tables of the Layer 2 switch chip, the forwarding traffic corresponding to the route forwarding entries exceeding the number of on-chip forwarding tables is sent to the multi-core CPU. After the relevant service processing is performed, it is sent to the Layer 2 switching chip for forwarding. The method and the network device provided by the embodiments of the present invention not only utilize the hard forwarding of the Layer 2 switching chip to improve the packet forwarding efficiency, but also realize the line speed, meet the capacity requirement of the routing forwarding entries of some networks, and expand the rotation by using the multi-core CPU soft forwarding. Published capacity, basically meets most commercial network applications.
附图概述BRIEF abstract
图1表示本发明实施例提供的报文转发方法的步骤流程图;FIG. 1 is a flow chart showing the steps of a packet forwarding method according to an embodiment of the present invention;
图2表示本发明实施例提供的硬件连接结构示意图;2 is a schematic structural diagram of a hardware connection provided by an embodiment of the present invention;
图3表示本发明实施例提供的添加路由转发条目的步骤流程图; FIG. 3 is a flow chart showing the steps of adding a route forwarding entry according to an embodiment of the present invention;
图4表示本发明实施例提供的示例中添加1.1.1.1/24路由转发条目的步骤流程图;4 is a flow chart showing the steps of adding a 1.1.1.1/24 route forwarding entry in an example provided by an embodiment of the present invention;
图5表示本发明实施例提供的删除1.1.1.1/24路由转发条目的步骤流程图;FIG. 5 is a flow chart showing the steps of deleting a 1.1.1.1/24 route forwarding entry according to an embodiment of the present invention;
图6表示本发明实施例提供的示例中删除路由转发条目的步骤流程图;FIG. 6 is a flow chart showing the steps of deleting a route forwarding entry in an example provided by an embodiment of the present invention;
图7表示本发明实施例提供的网络设备的结构框图;FIG. 7 is a structural block diagram of a network device according to an embodiment of the present invention;
图8表示本发明实施例提供的网络设备中添加路由转发条目的结构框图;FIG. 8 is a structural block diagram of adding a route forwarding entry in a network device according to an embodiment of the present invention;
图9表示本发明实施例提供的网络设备中删除路由转发条目的结构框图。FIG. 9 is a structural block diagram of deleting a route forwarding entry in a network device according to an embodiment of the present invention.
本发明的较佳实施方式Preferred embodiment of the invention
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。另外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other. Additionally, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
本发明实施例提供了一种报文转发的方法,如图1所示,所述方法包括:The embodiment of the invention provides a method for packet forwarding. As shown in FIG. 1 , the method includes:
步骤S101、获取网络设备上的一个或多个业务转发信息;Step S101: Acquire one or more service forwarding information on the network device.
从网络设备上获得业务转发信息后,还需要对业务转发信息进行进一步的处理,因为从网络设备上获得的业务转发信息处于一种杂乱、无序的状态,不能直接用在后续的转发流程中。After the service forwarding information is obtained from the network device, the service forwarding information needs to be further processed because the service forwarding information obtained from the network device is in a disorderly and disorderly state and cannot be directly used in the subsequent forwarding process. .
步骤S102、将所述业务转发信息整合成多核CPU软转发时所需的一个或多个软转发表存储在共享内存中以及将所述业务转发信息整合成二层交换芯片硬转发时所需的一个或多个硬转发表;Step S102: Integrating the service forwarding information into one or more soft forwarding tables required for soft forwarding of the multi-core CPU, storing the information in the shared memory, and integrating the service forwarding information into a hard forwarding of the layer 2 switching chip. One or more hard forwarding tables;
其中,如图2所示,多核CPU为控制中枢,承载着整个软件系统的运行。多核CPU下挂二层交换芯片,级联接口带宽为N个10G,其中在级联接口中包括数据报文通道XAUI、协议报文通道SGMI以及芯片配置通道 PCIE,多核CPU从三个通道中接收所有二层交换芯片无法处理的业务流量,包括超出二层交换芯片的片内转发表数量的路由转发条目对应的转发流量、没有二层封装信息的转发流量、一些特殊路由需要上送的流量、以及一些复杂业务流量,同时多核CPU也与共享内存连接,从共享内存中读取软转所需的软转发表;Among them, as shown in Figure 2, the multi-core CPU is the control center, which carries the operation of the entire software system. The Layer 2 switch chip is connected to the multi-core CPU. The cascading interface bandwidth is N 10G. The cascading interface includes the data packet channel XAUI, the protocol packet channel SGMI, and the chip configuration channel. The PCIE, the multi-core CPU receives the traffic that cannot be processed by all the Layer 2 switch chips from the three channels, including the forwarding traffic corresponding to the routing forwarding entries exceeding the number of the on-chip forwarding tables of the Layer 2 switching chip, and the forwarding traffic without the Layer 2 encapsulation information. Some special routes need to send traffic, as well as some complex traffic, while the multi-core CPU is also connected to the shared memory, reading the soft forwarding table required for soft forwarding from the shared memory;
二层交换芯片下挂各个接口板,网络设备所有对外接口都连接到二层交换芯片上,二层交换芯片主要负责网络流量的线速转发和物理链路流量的相互转换,流量的接收、发送、统计等;Each interface board is connected to the Layer 2 switch chip. All external interfaces of the network device are connected to the Layer 2 switch chip. The Layer 2 switch chip is responsible for the line-speed forwarding of network traffic and the mutual conversion of physical link traffic. Statistics, etc.
共享内存为可访问存储区,包括SRAM(Static Random Access Memory,静态随机存储器),DRAM(Dynamic Random Access Memory,动态随机存储器),DDR(Double Data Rate,双倍数据传输速率存储器)等存储单元,用于各种业务转发流量信息的交互,报文缓存等。The shared memory is an accessible storage area, and includes a storage unit such as a SRAM (Static Random Access Memory), a DRAM (Dynamic Random Access Memory), and a DDR (Double Data Rate Memory). Used for forwarding traffic information exchanges, packet buffers, etc.
步骤S103、当所述硬转发表数量小于或等于所述二层交换芯片的片内转发表数量时,将所述硬转发表中的路由转发条目写到所述片内转发表中,由所述二层交换芯片对所述路由转发条目对应的转发流量进行相关业务处理后转发出去;Step S103: When the number of the hard forwarding table is less than or equal to the number of the on-chip forwarding tables of the Layer 2 switching chip, write the routing forwarding entry in the hard forwarding table to the on-chip forwarding table, where The Layer 2 switch chip performs related service processing on the forwarding traffic corresponding to the route forwarding entry, and then forwards the packet;
当所述硬转发表数量小于或等于所述二层交换芯片的片内转发表数量时,由二层交换芯片转发路由所述转发条目对应的转发流量,通过二层交换芯片进行转发,能够实现线速,转发效率比较快。When the number of the hard forwarding table is less than or equal to the number of the on-chip forwarding tables of the Layer 2 switching chip, the forwarding traffic corresponding to the forwarding entry is forwarded by the Layer 2 switching chip, and the forwarding is performed by the Layer 2 switching chip. Line speed, forwarding efficiency is faster.
步骤S104、当所述硬转发表数量大于所述片内转发表数量时,将所述硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU转发。Step S104: When the number of the hard forwarding table is greater than the number of the on-chip forwarding table, send the forwarding traffic corresponding to the routing forwarding entry of the hard forwarding table that exceeds the number of the on-chip forwarding table to the multi-core CPU. Forward.
当硬转发表数量大于片内转发表数量时,硬转发表的超出片内转发表数量的路由转发条目对应的转发流量不能再由二层交换芯片进行转发,需上送至多核CPU,由多核CPU对上送的转发流量进行相关业务处理。由于多核CPU没有对外接口,所以还需要通过级联接口将转发流量下发至二层交换芯片,由二层交换芯片将转发流量发送出去。When the number of hard forwarding tables is greater than the number of on-chip forwarding tables, the forwarding traffic corresponding to the routing forwarding entries of the hard forwarding table that exceeds the number of on-chip forwarding tables cannot be forwarded by the Layer 2 switching chip, and needs to be sent to the multi-core CPU. The CPU performs related service processing on the forwarded traffic. The multi-core CPU does not have an external interface. Therefore, the forwarding traffic is sent to the Layer 2 switch chip through the cascade interface. The Layer 2 switch chip sends the forwarding traffic.
如图3为本发明实施例提供的添加路由转发条目的步骤流程图,包括: FIG. 3 is a flowchart of a step of adding a route forwarding entry according to an embodiment of the present invention, including:
步骤S301、获取与需添加的路由转发条目相关的业务转发信息;Step S301: Obtain service forwarding information related to a route forwarding entry to be added.
步骤S302、将所述业务转发信息整合成所述多核CPU软转发时所需的软转发表;Step S302, integrating the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU;
步骤S303、判断所述二层交换芯片的片内转发表中的路由转发条目是否已满,若未满,则将所述业务转发信息整合成所述二层交换芯片硬转发时所需的硬转发表,并将所述硬转发表中的路由转发条目写入所述片内转发表中;Step S303, determining whether the routing forwarding entry in the on-chip forwarding table of the Layer 2 switching chip is full, and if not, integrating the service forwarding information into the hard required for the hard forwarding of the Layer 2 switching chip. Forwarding the table, and writing the routing forwarding entry in the hard forwarding table into the on-chip forwarding table;
步骤S304、若已满,再判断所述片内转发表中是否存在掩码比所述需添加的路由转发条目的掩码短的同一IP地址的路由转发条目,若存在,则用所述需添加的路由转发条目覆盖所述短掩码对应的路由转发条目。Step S304: If it is full, determine whether there is a routing forwarding entry in the on-chip forwarding table with the same IP address that is shorter than the mask of the routing forwarding entry to be added, if yes, use the required The added route forwarding entry covers the route forwarding entry corresponding to the short mask.
为更详细说明本发明实施例提供的添加路由转发条目的步骤流程,下面将举例说明。The flow of the steps for adding a route forwarding entry provided by the embodiment of the present invention is described in more detail below.
以IPV4地址1.1.1.1/24为例,如图4所示,添加路由1.1.1.1/24的路由转发条目的步骤流程如下:Take the IPV4 address 1.1.1.1/24 as an example. As shown in Figure 4, the procedure for adding a route forwarding entry for route 1.1.1.1/24 is as follows:
步骤S401、配置添加1.1.1.1/24的路由,对路由1.1.1.1/24进行相关的业务处理后,生成本条路由的转发信息;Step S401: Configure a route that adds 1.1.1.1/24, and perform related service processing on the route 1.1.1.1/24 to generate forwarding information of the route.
步骤S402、将路由1.1.1.1/24的转发信息进行整合后,以与多核CPU软转发时所需软转发表形式写入共享内存;Step S402: After the forwarding information of the route 1.1.1.1/24 is integrated, the shared memory is written in the form of a soft forwarding table required for soft forwarding with the multi-core CPU;
步骤S403、判断二层交换芯片的片内路由转发表条目是否已满,Step S403, determining whether the on-chip routing forwarding table entry of the layer 2 switch chip is full.
步骤S404、若未满,则将路由1.1.1.1/24的转发信息整合二层交换芯片硬转发时所需的硬转发表,将所述硬转发表中的路由转发条目写入片内转发表中,流程结束。Step S404: If not, the forwarding information of the route 1.1.1.1/24 is integrated with the hard forwarding table required for the hard forwarding of the Layer 2 switching chip, and the routing forwarding entry in the hard forwarding table is written into the on-chip forwarding table. In the middle, the process ends.
步骤S405、若已满,再判断二层交换芯片的片内转发表中有没有1.1.1.1短于24位掩码的路由转发条目,若没有,流程结束。Step S405: If it is full, determine whether there is a route forwarding entry in the on-chip forwarding table of the Layer 2 switch chip that is shorter than the 24-bit mask in 1.1.1.1. If not, the process ends.
步骤S406、若二层交换芯片的片内转发表中有更短掩码的路由条目,例如16位,则用1.1.1.1/24覆盖1.1.1.1/16,路由转发条目添加成功,流程结束。Step S406: If the on-chip forwarding table of the Layer 2 switch chip has a shorter masked route entry, for example, 16 bits, the 1.1.1.1/16 is overwritten with 1.1.1.1/16, and the route forwarding entry is successfully added, and the process ends.
图5所示为本发明实施例提供的删除路由转发条目的步骤流程图,包 括:FIG. 5 is a flowchart of a process for deleting a route forwarding entry according to an embodiment of the present invention. include:
步骤S501、查找所述软转发表中是否存在需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除;Step S501: Search for the routing forwarding entry to be deleted in the soft forwarding table, and if yes, delete the routing forwarding entry to be deleted.
步骤S502、将所述软转发表中的所述需删除的路由转发条目删除后,查找所述二层交换芯片的片内转发表中的是否存在所述需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除,并从所述软转发表中查找与删除的路由转发条目同一IP地址的、比删除的路由转发条目的掩码短的掩码,从查找到的掩码中选取最长的掩码,将所述最长的掩码对应的路由转发条目写到所述二层交换芯片的片内转发表中。Step S502, after deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the routing forwarding entry to be deleted in the on-chip forwarding table of the Layer 2 switching chip, if yes, And deleting the route forwarding entry to be deleted, and searching for the same IP address of the deleted routing entry from the soft forwarding table, and a mask shorter than the mask of the deleted routing forwarding entry, from the found The longest mask is selected in the mask, and the route forwarding entry corresponding to the longest mask is written into the on-chip forwarding table of the layer 2 switch chip.
为更详细说明本发明实施例提供的删除路由转发条目的步骤流程,下面将举例说明。The flow of the steps for deleting the route forwarding entry provided by the embodiment of the present invention is described in more detail below.
以IPV4地址1.1.1.1/24为例,如图6所示,删除路由1.1.1.1/24的路由转发条目的步骤流程如下:Take the IPV4 address 1.1.1.1/24 as an example. As shown in Figure 6, the procedure for deleting the route forwarding entry of route 1.1.1.1/24 is as follows:
步骤S601、配置删除1.1.1.1/24的路由;Step S601, configuring to delete the route of 1.1.1.1/24;
步骤S602、查找软转发表中是否存在1.1.1.1/24的路由转发条目;Step S602: Search for a route forwarding entry of 1.1.1.1/24 in the soft forwarding table.
步骤S603、若存在,则将路由转发条目删除;Step S603, if yes, deleting the routing forwarding entry;
步骤S604、查找所述二层交换芯片的片内转发表中的是否存在1.1.1.1/24的路由转发条目;Step S604: Search for a route forwarding entry of 1.1.1.1/24 in the on-chip forwarding table of the layer 2 switch chip.
步骤S605、若存在,则将路由转发条目删除;Step S605, if yes, deleting the routing forwarding entry;
步骤S606、查找共享内存中的软转发表中是否存在1.1.1.1地址的比删除的24位掩码短的掩码;Step S606, searching for a mask having a shorter 1.1.1.1 address than the deleted 24-bit mask in the soft forwarding table in the shared memory;
步骤S607、若存在,则从查找到的掩码中选取最长的掩码,例如23位掩码,将1.1.1.1/23的路由转发条目写到所述二层交换芯片的片内转发表中,若不存在,流程结束;Step S607: If yes, select the longest mask from the found mask, for example, a 23-bit mask, and write the route forwarding entry of 1.1.1.1/23 to the on-chip forwarding table of the layer 2 switch chip. If the process does not exist, the process ends;
可选地,当网络设备上配置了二层交换芯片无法处理的复杂业务转发信息时,需将所述业务转发信息对应的路由转发条目置上上送标志,将所述路由转发条目对应的转发流量上送至所述多核CPU转发。 Optionally, when the complex service forwarding information that cannot be processed by the Layer 2 switch chip is configured on the network device, the route forwarding entry corresponding to the service forwarding information is set to an uplink sending flag, and the routing forwarding entry is forwarded correspondingly. The traffic is sent to the multi-core CPU for forwarding.
例如,网络设备上配置了网络地址转换NAT、宽带远程接入法务器BRAS等二层芯片无法处理的复杂业务,需要将“进入业务绑定端口,动作上送”的访问控制列表ACL条目写入二层芯片片内的三态内容寻址存储器TCAM中,再上送到多核CPU中处理。For example, a complex service that cannot be processed by a Layer 2 chip such as a network address translation NAT or a broadband remote access protocol BRAS is configured on the network device, and the access control list ACL entry of “entering the service binding port and sending the action” needs to be written. The three-state content address memory TCAM in the two-layer chip is sent to the multi-core CPU for processing.
可选地,在添加路由转发条目时,若目的出口的二层封装信息不存在,则需将所述路由转发条目置上上送标志,由所述多核CPU转发所述路由转发条目对应的转发流量。Optionally, when the route forwarding entry is added, if the Layer 2 encapsulation information of the destination egress does not exist, the route forwarding entry needs to be set to an uplink sending flag, and the multi-core CPU forwards the forwarding corresponding to the routing forwarding entry. flow.
例如,目的出口无介质访问控制MAC地址和虚拟局域网VLAN等二层封装信息,路由转发条目对应的转发流量在二层芯片内无法转发,此时需要将路由转发条目置上上送标志,保证进入二层芯片的对应流量能上送到多核CPU,由多核CPU转发。For example, the destination exit has no media access control MAC address and virtual LAN VLAN and other Layer 2 encapsulation information. The forwarding traffic corresponding to the routing forwarding entry cannot be forwarded in the Layer 2 chip. In this case, the routing forwarding entry needs to be sent to the sending flag to ensure entry. The corresponding traffic of the Layer 2 chip can be sent to the multi-core CPU and forwarded by the multi-core CPU.
可选地,若所述路由为需直接上送的路由,则需将所述路由条目置上上送标志,上送至所述多核CPU转发。Optionally, if the route is a route that needs to be sent directly, the route entry is sent to an uplink sending flag, and sent to the multi-core CPU for forwarding.
例如,当转发的路由为本地路由时,二层芯片无法转发本地路由,需要将路由条目置上上送标志,保证进入二层芯片的对应流量能上送到多核CPU,由多核CPU转发。For example, when the forwarded route is a local route, the Layer 2 chip cannot forward the local route. The route entry needs to be sent to the upper route to ensure that the corresponding traffic entering the Layer 2 chip can be sent to the multi-core CPU and forwarded by the multi-core CPU.
本发明实施例还提供了一种报文转发的网络设备,包括处理器和程序存储设备,如图7所示,其中,图中细箭头表示转发表信息,粗箭头表示转发流量,所述网络设备还包括:The embodiment of the present invention further provides a network device for packet forwarding, including a processor and a program storage device, as shown in FIG. 7 , wherein a thin arrow in the figure indicates forwarding table information, and a thick arrow indicates forwarding traffic, and the network The equipment also includes:
业务协议模块701,适用于获取网络设备上的一个或多个业务转发信息,并对所述业务转发信息进行处理,将处理后的业务转发信息下发至转发表管理模块;The service protocol module 701 is configured to obtain one or more service forwarding information on the network device, process the service forwarding information, and deliver the processed service forwarding information to the forwarding table management module.
业务协议模块701负责对配置命令的解析,业务协议的学习等,生成业务需要的转发信息通过多路复用器MUX消息机制下发给转发表管理模块,业务协议模块701属于控制面,不参与对业务报文的转发处理。The service protocol module 701 is responsible for parsing the configuration command, learning the service protocol, and the like, and the forwarding information required for generating the service is sent to the forwarding table management module through the multiplexer MUX message mechanism, and the service protocol module 701 belongs to the control plane and does not participate. Forwarding of service packets.
转发表管理模块702,适用于接收所述业务转发信息,并将所述业务转发信息整合成所述多核CPU软转发时所需的一个或多个软转发表写到共享内存中,以供软转发时读取;以及将所述业务转发信息整合成所述二层交换芯 片硬转发时所需的一个或多个硬转发表,并将所述硬转发表下发至业务驱动模块;The forwarding table management module 702 is adapted to receive the service forwarding information, and integrate the service forwarding information into one or more soft forwarding tables required for soft forwarding of the multi-core CPU to be written into the shared memory for soft Read when forwarding; and integrate the service forwarding information into the layer 2 switch core One or more hard forwarding tables required for hard forwarding, and the hard forwarding table is sent to the service driving module;
转发表管理模块702主要接收控制面的转发信息,将接收到的MUX消息整合成软转发模块需要的转发表格式,即整合成软转发表,写入共享内存中,并且根据需要,还要整合成二层交换芯片提供的软件开发工具包和应用程序接口SDK API接口入参形式下发给业务驱动模块。除此之外,转发表管理模块702还要接收软转发模块和业务驱动模块在转发过程中的一些老化、统计等实时信息反馈给控制面。The forwarding table management module 702 mainly receives the forwarding information of the control plane, and integrates the received MUX message into a forwarding table format required by the soft forwarding module, that is, integrates into a soft forwarding table, writes into the shared memory, and integrates as needed. The software development kit and the application interface SDK API interface provided by the layer 2 switch chip are sent to the service driver module in the form of input parameters. In addition, the forwarding table management module 702 also receives some real-time information such as aging and statistics of the soft forwarding module and the service driving module during the forwarding process, and feeds back to the control plane.
业务驱动模块703,适用于将所述硬转发表中需要所述二层交换芯片转发的路由转发条目写到所述片内转发表中,由所述二层交换芯片对所述路由转发条目对应的转发流量进行相关业务处理后进行转发;The service driver module 703 is configured to write, in the on-chip forwarding table, a routing forwarding entry that needs to be forwarded by the Layer 2 switching chip in the hard forwarding table, where the Layer 2 switching chip corresponds to the routing forwarding entry. Forwarding traffic is forwarded after relevant business processing;
业务驱动模块703直接操作二层交换芯片的SDK API接口来处理片内转发表和二层交换芯片的寄存器,并对SDK API接口进行了封装,提供给转发表管理模块702驱动接口。The service driver module 703 directly operates the SDK API interface of the Layer 2 switch chip to process the registers of the on-chip forwarding table and the Layer 2 switch chip, and encapsulates the SDK API interface and provides the drive interface to the forwarding table management module 702.
软转发模块704,适用于根据报文信息和所述共享内存中的软转发表信息,对上送至所述多核CPU中的转发流量进行处理,处理完毕后将所述转发流量下发至所述二层交换芯片。The soft forwarding module 704 is configured to process the forwarding traffic sent to the multi-core CPU according to the packet information and the soft forwarding table information in the shared memory, and send the forwarding traffic to the device after the processing is completed. The second layer switching chip is described.
软转发模块704根据报文信息和转发表管理模块702写入共享内存中的转发表信息,对进入多核CPU中的业务转发流量进行相关的业务处理,处理完毕后,将业务转发流量下发至二层交换芯片,由二层交换芯片将流量发送出去。The soft forwarding module 704 writes the forwarding table information in the shared memory according to the packet information and the forwarding table management module 702, and performs related service processing on the service forwarding traffic that enters the multi-core CPU. After the processing is completed, the service forwarding traffic is delivered to the A Layer 2 switch chip that transmits traffic through a Layer 2 switch chip.
可选地,如图7所示,所述软转发模块704还包括:Optionally, as shown in FIG. 7, the soft forwarding module 704 further includes:
软转发单元714,适用于将对于所述硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU,由所述多核CPU对上送的所述转发流量进行相关业务处理后,再将所述转发流量下发至所述二层交换芯片,由所述二层交换芯片将所述转发流量发送出去。The soft forwarding unit 714 is configured to send the forwarding traffic corresponding to the routing forwarding entry of the hard forwarding table that exceeds the number of the on-chip forwarding table to the multi-core CPU, where the multi-core CPU sends the After forwarding the traffic for related service processing, the forwarding traffic is sent to the Layer 2 switching chip, and the forwarding traffic is sent by the Layer 2 switching chip.
可选地,如图8所示,所述网络设备还包括:Optionally, as shown in FIG. 8, the network device further includes:
获取添加路由模块801,适用于获取与需添加的路由转发条目相关的业 务转发信息;The obtaining routing module 801 is adapted to obtain the industry related to the routing forwarding entry to be added. Transmitting information;
添加路由软转发表生成模块802,适用于将所述业务转发信息整合成所述多核CPU软转发时所需的软转发表;Adding a route soft forwarding table generating module 802, configured to integrate the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU;
在添加任何一条路由转发条目时,都需要将业务转发信息整合成多核CPU软转发时所需的软转发表。When adding any route forwarding entry, you need to integrate the service forwarding information into the soft forwarding table required for multi-core CPU soft forwarding.
添加转发条目模块803,判断所述二层交换芯片的片内转发表中的路由转发条目是否已满,若未满,则将所述业务转发信息整合成所述二层交换芯片硬转发时所需的硬转发表,并将所述硬转发表中的路由转发条目写入所述片内转发表中;若已满,则判断所述片内转发表中是否存在掩码比所述需添加的路由转发条目的掩码短的同一IP地址的路由转发条目,若存在,则用所述需添加的路由转发条目覆盖所述短掩码对应的路由转发条目。Adding a forwarding entry module 803, determining whether the routing forwarding entry in the on-chip forwarding table of the Layer 2 switching chip is full, and if not, integrating the service forwarding information into the hard forwarding of the Layer 2 switching chip a hard forwarding table is required, and the routing forwarding entry in the hard forwarding table is written into the on-chip forwarding table; if it is full, it is determined whether a mask exists in the on-chip forwarding table than the required addition The routing forwarding entry of the same IP address with a short mask of the routing forwarding entry, if yes, overwrites the routing forwarding entry corresponding to the short mask with the routing forwarding entry to be added.
可选地,如图9所示所述网络设备还包括:Optionally, the network device shown in FIG. 9 further includes:
软转发表路由条目删除模块901,适用于查找所述软转发表中是否存在所需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除;The soft forwarding table routing entry deletion module 901 is configured to search for the routing forwarding entry that needs to be deleted in the soft forwarding table, and if yes, delete the routing forwarding entry that needs to be deleted;
片内转发表路由条目删除模块902,适用于将所述软转发表中的所述需删除的路由转发条目删除后,查找所述二层交换芯片的片内转发表中的是否存在所述需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除,并从所述软转发表中查找与删除的路由转发条目同一IP地址的、比删除的路由转发条目的掩码短的掩码,从查找到的掩码中选取最长的掩码,将所述最长的掩码对应的路由转发条目写到所述二层交换芯片的片内转发表中。The on-chip forwarding table routing entry deleting module 902 is configured to: after deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the need for the in-chip forwarding table of the layer 2 switching chip The deleted routing forwarding entry, if yes, deletes the routing forwarding entry to be deleted, and searches for the same IP address of the deleted routing forwarding entry from the soft forwarding table than the deleted routing forwarding entry mask The short mask is used to select the longest mask from the found mask, and the route forwarding entry corresponding to the longest mask is written into the on-chip forwarding table of the layer 2 switch chip.
可选地,所述网络设备还包括:Optionally, the network device further includes:
路由条目上送模块,适用于当网络设备上配置了二层交换芯片无法处理的业务转发信息,或目的出口的二层封装信息不存在,或所述路由为需直接上送的路由时,将对应的路由转发条目置上上送标志,上送到多核CPU转发。The routing entry is sent to the module, and is applicable to when the network device is configured with the service forwarding information that cannot be processed by the Layer 2 switch chip, or the Layer 2 encapsulation information of the destination egress does not exist, or the route is a route that needs to be sent directly, The corresponding route forwarding entry is placed on the sending flag and sent to the multi-core CPU for forwarding.
若网络设备上配置了NAT、BRAS等二层交换芯片无法处理的复杂业务,业务协议模块701会下发各种业务绑定端口的MUX信息给转发表管理 模块702,转发表管理模块702需要将“进入业务绑定端口,动作上送”的ACL条目写入二层芯片片内TCAM;If the network device is configured with a complex service that cannot be processed by the Layer 2 switch chip, such as NAT and BRAS, the service protocol module 701 sends the MUX information of the service binding port to the forwarding table management. The module 702, the forwarding table management module 702 needs to write the ACL entry of the "incoming service binding port, the action is sent" to the TCAM in the layer 2 chip;
若在添加1.1.1.1/24的路由条目时,转发表管理模块702发现本路由对应出口无MAC地址和VLAN等二层信息,本路由对应的转发流量在二层交换芯片内无法转发时,转发表管理模块702需要把1.1.1.1/24的路由条目置上上送标志,保证进入二层交换芯片的对应流量能上送到多核CPU;If the route entry of the 1.1.1.1/24 is added, the forwarding table management module 702 finds that the route does not have the MAC address and the Layer 2 information of the VLAN, and the forwarding traffic corresponding to the route cannot be forwarded in the Layer 2 switch chip. The publishing management module 702 needs to put the routing entry of 1.1.1.1/24 on the sending flag to ensure that the corresponding traffic entering the Layer 2 switching chip can be sent to the multi-core CPU;
又如在添加一条路由时,转发表管理模块702需要深度解析路由MUX信息,对于二层交换芯片无法转发的路由例如本地路由等都要置上上送标志。For example, when a route is added, the forwarding table management module 702 needs to deeply parse the routing MUX information, and the uplink routing flag should be set for a route that cannot be forwarded by the Layer 2 switching chip, such as a local route.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。Variations or substitutions are readily conceivable within the scope of the present invention by those skilled in the art and are within the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.
工业实用性 Industrial applicability
本发明实施例提供的报文转发的方法及网络设备,先将业务转发信息整合成多核CPU软转发所需的软转发表和二层交换芯片硬转发所需的硬转发表;当硬转发表数量小于或等于二层交换芯片的片内转发表数量时,将硬转发表中的转发条目写到片内转发表中,由二层交换芯片对转发条目对应的转发流量进行相关业务处理后转发;当硬转发表数量大于片内转发表数量时,将硬转发表的超出片内转发表数量的转发条目对应的转发流量上送至多核CPU转发,既充分利用二层交换芯片硬转发提高了报文转发效率,又利用多核CPU软转发扩充了转发表容量。 The method for forwarding a packet and the network device provided by the embodiment of the present invention first integrate the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU and a hard forwarding table required for hard forwarding of the layer 2 switching chip; If the number of on-chip forwarding tables of the Layer 2 switch chip is less than or equal to the number of on-chip forwarding tables of the Layer 2 switch chip, the forwarding entries in the hard forwarding table are written to the on-chip forwarding table, and the Layer 2 switch chip performs forwarding processing on the forwarding traffic corresponding to the forwarding entry. When the number of hard forwarding tables is greater than the number of on-chip forwarding tables, the forwarding traffic corresponding to the forwarding entries of the hard forwarding table exceeding the number of on-chip forwarding tables is sent to the multi-core CPU for forwarding, and the hard forwarding of the Layer 2 switching chip is fully utilized. The packet forwarding efficiency is extended by the multi-core CPU soft forwarding.

Claims (13)

  1. 一种报文转发的方法,包括:A method for forwarding a message, including:
    获取网络设备上的一个或多个业务转发信息;Obtaining one or more service forwarding information on the network device;
    将所述一个或多个业务转发信息整合成多核CPU软转发所需的一个或多个软转发表存储在共享内存中,以及将所述一个或多个业务转发信息整合成二层交换芯片硬转发所需的一个或多个硬转发表;Integrating the one or more service forwarding information into one or more soft forwarding tables required for multi-core CPU soft forwarding to be stored in the shared memory, and integrating the one or more service forwarding information into a layer 2 switching chip Forward one or more hard forwarding tables required;
    当所述一个或多个硬转发表的数量小于或等于所述二层交换芯片的片内转发表数量时,将所述一个或多个硬转发表中的路由转发条目写到所述片内转发表中,由所述二层交换芯片对所述路由转发条目对应的转发流量进行相关业务处理后转发;Writing a routing forwarding entry in the one or more hard forwarding tables to the slice when the number of the one or more hard forwarding tables is less than or equal to the number of on-chip forwarding tables of the Layer 2 switching chip In the forwarding table, the forwarding traffic corresponding to the routing forwarding entry is processed by the Layer 2 switching chip and then forwarded;
    当所述一个或多个硬转发表数量大于所述片内转发表数量时,将所述一个或多个硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU转发。When the number of the one or more hard forwarding tables is greater than the number of the on-chip forwarding tables, forwarding traffic corresponding to the routing forwarding entries of the one or more hard forwarding tables that exceed the number of the on-chip forwarding tables is sent Forwarded to the multi-core CPU.
  2. 如权利要求1所述的方法,其中,所述将所述一个或多个硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU转发,包括:The method of claim 1, wherein the forwarding traffic corresponding to the routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table is forwarded to the multi-core CPU for forwarding, including :
    将所述一个或多个硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU,由所述多核CPU对上送的所述转发流量进行相关业务处理后,再将处理后的转发流量下发至所述二层交换芯片,由所述二层交换芯片转发所述处理后的转发流量。Transmitting the forwarding traffic corresponding to the routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table to the multi-core CPU, and the multi-core CPU correlates the forwarding traffic sent by the multi-core CPU After the service is processed, the processed forwarding traffic is sent to the Layer 2 switching chip, and the processed forwarding traffic is forwarded by the Layer 2 switching chip.
  3. 如权利要求1所述的方法,还包括:The method of claim 1 further comprising:
    获取与需添加的路由转发条目相关的业务转发信息;Obtaining service forwarding information related to the route forwarding entry to be added;
    将所述业务转发信息整合成所述多核CPU软转发所需的软转发表;Integrating the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU;
    判断所述二层交换芯片的片内转发表中的路由转发条目是否已满,若未满,则将所述业务转发信息整合成所述二层交换芯片硬转发所需的硬转发表,并将所述硬转发表中的路由转发条目写入所述片内转发表中; Determining whether the routing forwarding entry in the on-chip forwarding table of the Layer 2 switching chip is full, and if not, integrating the service forwarding information into a hard forwarding table required for hard forwarding of the Layer 2 switching chip, and Writing a route forwarding entry in the hard forwarding table into the on-chip forwarding table;
    若已满,则判断所述片内转发表中是否存在掩码比所述需添加的路由转发条目的掩码短的同一IP地址的路由转发条目,若存在,则用所述需添加的路由转发条目覆盖所述短掩码对应的路由转发条目。If it is full, it is determined whether there is a route forwarding entry of the same IP address whose mask is shorter than the mask of the route forwarding entry to be added in the on-chip forwarding table, and if yes, the route to be added is used. The forwarding entry covers the routing forwarding entry corresponding to the short mask.
  4. 如权利要求1所述的方法,还包括:The method of claim 1 further comprising:
    查找所述软转发表中是否存在需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除;Determining whether there is a routing forwarding entry to be deleted in the soft forwarding table, and if yes, deleting the routing forwarding entry to be deleted;
    将所述软转发表中的所述需删除的路由转发条目删除后,查找所述二层交换芯片的片内转发表中是否存在所述需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除,并从所述软转发表中查找与删除的路由转发条目同一IP地址的、比删除的路由转发条目的掩码短的掩码,从查找到的掩码中选取最长的掩码,将所述最长的掩码对应的路由转发条目写到所述二层交换芯片的片内转发表中。After deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the routing forwarding entry to be deleted in the on-chip forwarding table of the Layer 2 switching chip, if yes, the The route forwarding entry to be deleted is deleted, and a mask shorter than the mask of the deleted routing forwarding entry with the same IP address as the deleted routing forwarding entry is searched from the soft forwarding table, and the mask is selected from the found mask. The longest mask writes the route forwarding entry corresponding to the longest mask to the on-chip forwarding table of the layer 2 switch chip.
  5. 如权利要求1所述的方法,其中,在所述获取网络设备上的一个或多个业务转发信息的步骤中:The method of claim 1 wherein in said step of obtaining one or more traffic forwarding information on the network device:
    当网络设备上配置了二层交换芯片无法处理的复杂业务转发信息时,需将所述业务转发信息对应的转发条目置上上送标志,将所述路由转发条目对应的转发流量上送至所述多核CPU转发。When the network device is configured with the complex service forwarding information that cannot be processed by the Layer 2 switch chip, the forwarding entry corresponding to the service forwarding information needs to be sent to the sending flag, and the forwarding traffic corresponding to the routing forwarding entry is sent to the Multicore CPU forwarding.
  6. 如权利要求3所述的方法,其中,在添加路由转发条目时,若目的出口的二层封装信息不存在,则需将所述路由转发条目置上上送标志,由所述多核CPU转发所述路由转发条目对应的转发流量。The method of claim 3, wherein when the routing forwarding entry is added, if the Layer 2 encapsulation information of the destination egress does not exist, the routing forwarding entry needs to be placed on the sending flag, and the multi-core CPU forwards the The forwarding traffic corresponding to the routing forwarding entry.
  7. 如权利要求3所述的方法,其中,在添加路由转发条目时,若所述路由为需直接上送的路由,则需将所述路由条目置上上送标志,上送至所述所述多核CPU转发。The method of claim 3, wherein when the routing forwarding entry is added, if the route is a route that needs to be directly sent, the routing entry needs to be sent to the sending flag, and sent to the Multi-core CPU forwarding.
  8. 一种报文转发的网络设备,包括:A network device for packet forwarding, including:
    业务协议模块,设置为获取网络设备上的一个或多个业务转发信息,并对所述一个或多个业务转发信息进行处理,将处理后的一个或多个业务转发信息下发至转发表管理模块; The service protocol module is configured to obtain one or more service forwarding information on the network device, process the one or more service forwarding information, and deliver the processed one or more service forwarding information to the forwarding table management. Module
    转发表管理模块,设置为接收所述一个或多个业务转发信息,并将所述一个或多个业务转发信息整合成多核CPU软转发所需的一个或多个软转发表写到共享内存中,以供软转发时读取;以及将所述一个或多个业务转发信息整合成所述二层交换芯片硬转发所需的一个或多个硬转发表,并将所述一个或多个硬转发表下发至业务驱动模块;a forwarding table management module, configured to receive the one or more service forwarding information, and integrate the one or more service forwarding information into one or more soft forwarding tables required for multi-core CPU soft forwarding to be written into the shared memory Reading for soft forwarding; and integrating the one or more service forwarding information into one or more hard forwarding tables required for hard forwarding by the Layer 2 switching chip, and hardening the one or more The forwarding table is sent to the service driver module.
    业务驱动模块,设置为将所述一个或多个硬转发表中需要所述二层交换芯片转发的路由转发条目写到所述二层交换芯片的片内转发表中,由所述二层交换芯片对所述路由转发条目对应的转发流量进行相关业务处理后进行转发;a service driving module, configured to write, in the one or more hard forwarding tables, a routing forwarding entry that needs to be forwarded by the Layer 2 switching chip to an on-chip forwarding table of the Layer 2 switching chip, where the Layer 2 switching is performed. The chip forwards the forwarding traffic corresponding to the routing forwarding entry after performing related service processing;
    软转发模块,设置为根据报文信息和所述共享内存中的软转发表信息,对上送至所述多核CPU中的转发流量进行处理,将处理后的转发流量下发至所述二层交换芯片。The soft forwarding module is configured to process the forwarding traffic sent to the multi-core CPU according to the packet information and the soft forwarding table information in the shared memory, and deliver the processed forwarding traffic to the layer 2 Switch chip.
  9. 如权利要求8所述的网络设备,其中,所述软转发模块还包括:The network device of claim 8, wherein the soft forwarding module further comprises:
    软转发单元,设置为将所述一个或多个硬转发表的超出所述片内转发表数量的路由转发条目对应的转发流量上送至所述多核CPU,由所述多核CPU对上送的所述转发流量进行相关业务处理后,再将处理后的转发流量下发至所述二层交换芯片,由所述二层交换芯片转发所述处理后的转发流量。a soft forwarding unit, configured to send forwarding traffic corresponding to the routing forwarding entry of the one or more hard forwarding tables that exceeds the number of the on-chip forwarding table to the multi-core CPU, and sent by the multi-core CPU After the forwarding traffic is processed by the related service, the processed forwarding traffic is delivered to the Layer 2 switching chip, and the processed forwarding traffic is forwarded by the Layer 2 switching chip.
  10. 如权利要求8所述的网络设备,还包括:The network device of claim 8, further comprising:
    获取添加路由模块,设置为获取与需添加的路由转发条目相关的业务转发信息;Obtaining a routing module, configured to obtain service forwarding information related to a routing forwarding entry to be added;
    添加路由软转发表生成模块,设置为将所述业务转发信息整合成所述多核CPU软转发所需的软转发表;Adding a route soft forwarding table generating module, configured to integrate the service forwarding information into a soft forwarding table required for soft forwarding of the multi-core CPU;
    添加转发条目模块,设置为判断所述二层交换芯片的片内转发表中的路由转发条目是否已满,若未满,则将所述业务转发信息整合成所述二层交换芯片硬转发所需的硬转发表,并将所述硬转发表中的路由转发条目写入所述片内转发表中;若已满,则判断所述片内转发表中是否存在掩码比所述需添加的路由转发条目的掩码短的同一IP地址的路由转发条目,若存在,则用所述需添加的路由转发条目覆盖所述短掩码对应的路由转发条目。 Adding a forwarding entry module, configured to determine whether a routing forwarding entry in the on-chip forwarding table of the Layer 2 switching chip is full, and if not, integrating the service forwarding information into the Layer 2 switching chip hard forwarding station a hard forwarding table is required, and the routing forwarding entry in the hard forwarding table is written into the on-chip forwarding table; if it is full, it is determined whether a mask exists in the on-chip forwarding table than the required addition The routing forwarding entry of the same IP address with a short mask of the routing forwarding entry, if yes, overwrites the routing forwarding entry corresponding to the short mask with the routing forwarding entry to be added.
  11. 如权利要求8所述的网络设备,还包括:The network device of claim 8, further comprising:
    软转发表路由条目删除模块,设置为查找所述软转发表中是否存在需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除;The soft forwarding table routing entry deletion module is configured to search for the routing forwarding entry to be deleted in the soft forwarding table, and if yes, delete the routing forwarding entry to be deleted;
    片内转发表路由条目删除模块,设置为将所述软转发表中的所述需删除的路由转发条目删除后,查找所述二层交换芯片的片内转发表中的是否存在所述需删除的路由转发条目,若存在,则将所述需删除的路由转发条目删除,并从所述软转发表中查找与删除的路由转发条目同一IP地址的、比删除的路由转发条目的掩码短的掩码,从查找到的掩码中选取最长的掩码,将所述最长的掩码对应的路由转发条目写到所述二层交换芯片的片内转发表中。The on-chip forwarding table routing entry deletion module is configured to: after deleting the routing forwarding entry to be deleted in the soft forwarding table, searching for the presence or absence of the deletion in the on-chip forwarding table of the Layer 2 switching chip Routing forwarding entry, if yes, deleting the routing forwarding entry to be deleted, and searching for the same IP address from the deleted routing entry from the soft forwarding table, shorter than the mask of the deleted routing forwarding entry The mask is configured to select the longest mask from the found mask, and write the route forwarding entry corresponding to the longest mask to the on-chip forwarding table of the layer 2 switch chip.
  12. 如权利要求8所述的网络设备,还包括:The network device of claim 8, further comprising:
    路由条目上送模块,设置为当网络设备上配置了二层交换芯片无法处理的复杂业务转发信息,或目的出口的二层封装信息不存在,或所述路由为需直接上送的路由时,将对应的路由转发条目置上上送标志,上送到多核CPU转发。The routing entry is sent to the module, and is configured to: when the network device is configured with the complex service forwarding information that cannot be processed by the Layer 2 switch chip, or the Layer 2 encapsulation information of the destination egress does not exist, or the route is a route that needs to be directly sent, The corresponding route forwarding entry is placed on the upload flag and sent to the multi-core CPU for forwarding.
  13. 一种计算机可读存储介质,所述存储介质存储有计算机程序,该计算机程序包括程序指令,当该程序指令被报文转发设备执行时,使得该设备可执行权利要求1-7任一项的方法。 A computer readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a message forwarding device, cause the device to perform the method of any of claims 1-7 method.
PCT/CN2015/073971 2014-12-17 2015-03-11 Method and network device for forwarding message WO2016095345A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410788003.6A CN105763437A (en) 2014-12-17 2014-12-17 Message forwarding method and network equipment
CN201410788003.6 2014-12-17

Publications (1)

Publication Number Publication Date
WO2016095345A1 true WO2016095345A1 (en) 2016-06-23

Family

ID=56125726

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/073971 WO2016095345A1 (en) 2014-12-17 2015-03-11 Method and network device for forwarding message

Country Status (2)

Country Link
CN (1) CN105763437A (en)
WO (1) WO2016095345A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106921672A (en) * 2017-03-28 2017-07-04 南京国电南自维美德自动化有限公司 A kind of protocol conversion device of the Multi-netmouth multi -CPU based on exchange chip
CN115865839A (en) * 2023-01-20 2023-03-28 苏州浪潮智能科技有限公司 ACL management method, device, communication equipment and storage medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107977160B (en) * 2016-10-25 2020-10-30 英业达科技有限公司 Method for data access of exchanger
TWI626837B (en) * 2016-12-01 2018-06-11 財團法人工業技術研究院 Method, apparatus and non-transitory computer-readable medium for delivering packets
CN107465619A (en) * 2017-08-22 2017-12-12 南京航空航天大学 A kind of method and apparatus of Internet of Things commercial network message forwarding
CN108521351B (en) * 2018-03-21 2021-02-05 东软集团股份有限公司 Session flow statistical method, processor core, storage medium and electronic device
CN110855568B (en) * 2019-11-22 2022-02-22 迈普通信技术股份有限公司 Message forwarding method and system
CN111131048A (en) * 2019-12-31 2020-05-08 杭州迪普科技股份有限公司 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN114124704B (en) * 2021-11-19 2024-01-23 北京天融信网络安全技术有限公司 Route optimization method, device, electronic equipment and storage medium
CN116016432A (en) * 2022-12-30 2023-04-25 迈普通信技术股份有限公司 Message forwarding method, device, network equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070121616A1 (en) * 2005-11-29 2007-05-31 Samsung Electronics Co., Ltd. Methods and systems for routing packets with a hardware forwarding engine and a software forwarding engine
CN101505280A (en) * 2009-03-30 2009-08-12 武汉烽火网络有限责任公司 Method and equipment for improving forwarding performance of telecommunication stage Ethernet system
CN101841483A (en) * 2010-05-06 2010-09-22 北京星网锐捷网络技术有限公司 Hardware routing table management method and device and communication equipment
CN103220219A (en) * 2013-04-16 2013-07-24 杭州华三通信技术有限公司 Message transmitting method and message transmitting equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070121616A1 (en) * 2005-11-29 2007-05-31 Samsung Electronics Co., Ltd. Methods and systems for routing packets with a hardware forwarding engine and a software forwarding engine
CN101505280A (en) * 2009-03-30 2009-08-12 武汉烽火网络有限责任公司 Method and equipment for improving forwarding performance of telecommunication stage Ethernet system
CN101841483A (en) * 2010-05-06 2010-09-22 北京星网锐捷网络技术有限公司 Hardware routing table management method and device and communication equipment
CN103220219A (en) * 2013-04-16 2013-07-24 杭州华三通信技术有限公司 Message transmitting method and message transmitting equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106921672A (en) * 2017-03-28 2017-07-04 南京国电南自维美德自动化有限公司 A kind of protocol conversion device of the Multi-netmouth multi -CPU based on exchange chip
CN106921672B (en) * 2017-03-28 2023-12-22 南京国电南自维美德自动化有限公司 Protocol conversion device of many net gaps many CPUs based on exchange chip
CN115865839A (en) * 2023-01-20 2023-03-28 苏州浪潮智能科技有限公司 ACL management method, device, communication equipment and storage medium
CN115865839B (en) * 2023-01-20 2023-05-23 苏州浪潮智能科技有限公司 ACL management method, ACL management device, communication equipment and storage medium

Also Published As

Publication number Publication date
CN105763437A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
WO2016095345A1 (en) Method and network device for forwarding message
US10778464B2 (en) NSH encapsulation for traffic steering establishing a tunnel between virtual extensible local area network (VxLAN) tunnel end points (VTEPS) using a NSH encapsulation header comprising a VxLAN header whose VNI field has been replaced by an NSH shim
CN105612719B (en) Advanced network virtualization using metadata in encapsulation headers
US9893987B2 (en) Virtual stacking of switches
EP2802995B1 (en) Connecting layer-2 domains over layer-3 networks
EP3605972B1 (en) Packet transmission method, edge device, and machine readable storage medium
CN109412964A (en) Message control method and network equipment
US9307053B2 (en) Direct data placement over user datagram protocol in a network environment
JP4890613B2 (en) Packet switch device
EP3461072A1 (en) Access control
US9590922B2 (en) Programmable and high performance switch for data center networks
US10397116B1 (en) Access control based on range-matching
WO2019137355A1 (en) Method and device for transmitting data, and network system
US10616105B1 (en) Extending virtual routing and forwarding using source identifiers
US11563683B2 (en) SRv6 with micro segment identifiers
US8976644B2 (en) Multicast traffic forwarding on pruned interface
US11695592B2 (en) Segmentation within a broadcast domain in ethernet VPN
US11126249B1 (en) Power reduction methods for variable sized tables
WO2023236858A1 (en) Flow table rule management method, traffic management method and system, and storage medium
EP2728795A1 (en) Processing method, device and system for controlling packet broadcast
JP2012155650A (en) Router and many-core system
CN116032837A (en) Flow table unloading method and device
US10594618B1 (en) Apparatus, system, and method for fragmenting packets into segments that comply with the maximum transmission unit of egress interfaces
WO2022261961A1 (en) Method for forwarding message, and switch and network interface card
TWI738918B (en) Chassis switches, network interface cards, and methods for management of packet forwarding

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15868862

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15868862

Country of ref document: EP

Kind code of ref document: A1