摘要 |
A method and an apparatus for forwarding data of a network device. The method comprises: receiving a data packet and generating an IP packet according to the received data packet; when connection information of the IP packet exists in a preset connection tracking table, performing address translation on the IP packet and then forwarding the IP packet after the translation; and when the connection information of the IP packet does not exist in the preset connection tracking table, sending the IP packet to a CPU for TCP/IP protocol stack processing, and forwarding the IP packet after the TCP/IP protocol stack processing. Further disclosed is a corresponding apparatus. In the solution, a CPU does not need to schedule all received data packets for forwarding. This can avoid unnecessary CPU interruption, reduce CPU load, and improve a data forwarding speed. |