Patent Publication Number: US-2016248668-A1

Title: Network packet forwarding method and device

Description:
TECHNICAL FIELD 
     The disclosure relates to network device management and, in particular to, a method and device for forwarding a network packet. 
     BACKGROUND 
     Generally, a network management packet consists of packets in an IP format. If it is necessary to send such a packet from a certain network device to a network management device, the layer 3 forwarding of an IP packet is inevitable. During the layer 3 forwarding, a Media Access Control (MAC) address encapsulated in a layer 2 header of the IP packet must be the MAC address linking to a gateway. In a network, it is the MAC address linking to a routing next-hop device. 
     When network expansion and network deployment are performed, if a new network device comes online, and the new network device needs to send the network management packet to the network management device, it is necessary to configure an IP address of the corresponding network management device on the new network device. Then, the MAC address of an upstream network device is determined through the configured IP address of the network management device and an Address Resolution Protocol (ARP). A communication channel between the new online network device and the upstream network device is realized, and a network management channel between the new online network device and the network management device is established according to a management channel between the upstream network device and the network management device and a communication channel between the upstream network device and the new network device, so that the network management device can manage the new online network device via the established network management channel. 
     At present, managing and opening the new online network device in a new site is generally performed manually, including the following steps: 
     1. a connection port with the upstream network device is opened for the new online network device, and the corresponding IP address of the upstream network device is configured for the opened connection port; 
     2. a connection port with the new online network device is opened for the upstream network device, and the corresponding IP address of the new online network device is configured for the opened connection port; 
     3. a mutual identification between the new online network device and the upstream network device is implemented according to the configured IP address of the upstream network device and the IP address of the network device newly online, and then a data interaction is implemented; only in the case that the management channel between the upstream network device and the new online network device is acquired according to the configured management channel between the upstream network device and the network management device, the new online network device can send its own information to the network management device, so that the network management device manages the new online network device. 
     However, in the actual beginning of network engineering, if there is great network deployment, then each of the new online network device in each of the sites can report, through the routing forwarding, its own information (like an identification identifier) to the network management device which performs network management on it only by manually configuring the corresponding IP address in the above way. As such, engineering personnel is required to perform complicated and tedious manual configuration in each of the sites, which is bound to put a great burden on the beginning. 
     The current mechanism for solving the problem that personnel is required to manually configure the IP address in each of the sites is to directly broadcast in the whole network until the network management device receives information of the new online network device. In this way, it easily results in broadcast storm in the network or occupation of network bandwidth, thereby wasting the network resources and reducing the bandwidth utilization. 
     SUMMARY 
     In order to solve the existing technical problems, the disclosure mainly provides a method and device for forwarding a network packet. 
     The embodiments of the disclosure provide a method forwarding a network packet, including that: 
     when a packet forwarding request sent from a network device to be configured is received, a forwarding end analyzes whether there is a prestored forwarding identifier consistent with a forwarding identifier in the packet forwarding request; 
     when there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, the forwarding end determines a forwarding path corresponding to the packet forwarding request according to a predetermined mapping relationship between prestored forwarding identifiers and forwarding paths; and 
     the forwarding end forwards information of the network device to be configured in the packet forwarding request to a network management device according to the determined forwarding path, so that the network management device generates network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured. 
     The embodiments of the disclosure further provide a device for forwarding a network packet, including: 
     an analyzing module configured to, when the packet forwarding request sent from the network device to be configured is received, analyze whether there is a prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request; 
     a processing module configured to, when there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, determine the forwarding path corresponding to the packet forwarding request according to the predetermined mapping relationship between prestored forwarding identifiers and forwarding paths; and 
     a data transceiving module configured to forward the information of the network device to be configured in the packet forwarding request to the network management device according to the determined forwarding path, so that the network management device generates the network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured. 
     Compared with the conventional technology, according to the embodiments of the disclosure, the network device to be configured initiates automatically the network packet forwarding request including the forwarding identifier. When there is the prestored forwarding identifier consistent with the forwarding identifier in the network packet forwarding request, the forwarding end determines the forwarding path corresponding to the network packet forwarding request, and forwards to the network management device information of the network device to be configured in the network packet forwarding request according to the determined forwarding path, so that the network management device generates the network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured. Thus, the disclosure effectively avoids the technical problems of broadcast storm in the network or occupation of the network bandwidth which are caused by the network device to be configured broadcasting its own information to the network management device, improves the network bandwidth utilization, and introduces the new online network device to the management of the network management device more quickly. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a flowchart showing a method for forwarding a network packet according to a first embodiment of the disclosure; 
         FIG. 2  is a flowchart showing a method for forwarding a network packet according to a second embodiment of the disclosure; and 
         FIG. 3  is a functional module diagram illustrating a device for forwarding a network packet according to a preferred embodiment of the disclosure. 
     
    
    
     DETAILED DESCRIPTION 
     It should be understood that specific embodiments described herein are only used to illustrate the disclosure and not intended to limit the disclosure. 
       FIG. 1  is a flowchart showing a method for forwarding a network packet according to a first embodiment of the disclosure. 
     It is noted that the flowchart shown in  FIG. 1  is only a preferred embodiment. Those skilled in the art should know that any embodiment constructed based on the idea of the disclosure should not depart from the scope covered by the following technical solution: 
     when a packet forwarding request sent from a network device to be configured is received, a forwarding end analyzes whether there is a prestored forwarding identifier consistent with a forwarding identifier in the packet forwarding request; when there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, the forwarding end determines a forwarding path corresponding to the packet forwarding request according to a predetermined mapping relationship between the prestored forwarding identifiers and the forwarding paths; and the forwarding end forwards information of the network device to be configured in the packet forwarding request to a network management device according to the determined forwarding path, so that the network management device generates network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured. 
     The present embodiment includes the following specific steps of gradually implementing the forwarding of a network packet. 
     At Step  11 , when the packet forwarding request sent from the network device to be configured is received, the forwarding end analyzes whether there is a prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request. 
     Specifically, one or more network devices and a network management device are included in a network system. The network device can be a forwarding end, a data providing end and/or a data initiating end. The network management device delivers management information to each of the network devices, so as to implement management for each of the network devices. A specific network packet is set in the opening software of the network device, wherein the network packet includes the forwarding identifier. When the forwarding end establishes a communication connection with the network device to be configured (i.e. the new online network device) including the forwarding identifier, the network device to be configured sends the network packet including the forwarding identifier out, and the forwarding end which can identify the network packet receives the network packet. The network packet also encapsulates with the information of the network device to be configured. The communication connection can be a wired connection or a near field communication connection, that is, the network device to be configured can send the network packet out by means of the established wired connection or near field communication connection. When the packet forwarding request sent from the network device to be configured is received, the forwarding end analyzes whether there is a prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, that is, the forwarding end analyzes whether the network packet can be forwarded to a target end corresponding to the packet forwarding request correctly and effectively. When there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, Step  12  is executed. When there is not the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, the forwarding end sends forwarding failure information to the network management device to prompt the network device to be configured that the forwarding is failed, so that monitoring personnel of the network management device designate, according to prompt information, engineering personnel to configure for the network device to be configured an identification port and an IP address of an upstream network device. As such, a communication channel between the network device to be configured and the upstream network device is established so as to cause the network device to be configured to send its own information to the network management device. 
     At Step  12 , when there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, the forwarding end determines the forwarding path corresponding to the packet forwarding request according to the predetermined mapping relationship between the prestored forwarding identifiers and the forwarding paths. 
     Specifically, the forwarding end prestores at least one determined forwarding identifier, and each of the forwarding identifiers is predetermined to correspond to a different forwarding path. Alternatively, some of the forwarding identifiers correspond to the same forwarding identifier. The forwarding end can forward the received packet to either the network management device or other network device, wherein the communication channel is established between the other network device and the forwarding end. When there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, the forwarding end can forward the network packet to the target end corresponding to the packet forwarding request correctly and effectively. The forwarding end determines the forwarding path corresponding to the packet forwarding request according to the predetermined mapping relationship between the prestored forwarding identifiers and the forwarding paths. In other embodiments of the disclosure, the forwarding end prestores at least one determined forwarding identifier. Each of the forwarding identifiers is predetermined to correspond to a different target network device or network management device. Each of the target network devices corresponds to a different forwarding path. Alternatively, some of the target network devices correspond to the same forwarding path. The forwarding end determines the target network device corresponding to the packet forwarding request according to a predetermined mapping relationship between the prestored forwarding identifiers and the target network devices; and the forwarding end determines the forwarding path corresponding to the packet forwarding request according to a predetermined mapping relationship between the prestored forwarding paths and the network devices. 
     At Step  13 , the forwarding end forwards the information of the network device to be configured in the packet forwarding request to the network management device according to the determined forwarding path, so that the network management device generates the network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured. 
     Specifically, when determining the forwarding path corresponding to the packet forwarding request, the forwarding end acquires the information of the network device to be configured in the packet forwarding request, and forwards the information of the network device to be configured in the packet forwarding request to the network management device according to the determined forwarding path, so that the network management device generates the network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured, wherein the network configuration information may include an IP address which is assigned to the new online network device and delivered by the network management device or the like. The information of the network device to be configured may include any information that can identify a network to be configured such as an identification code and a physical address of the network to be configured, and information about that the network device to be configured is online, or information about that the network device to be configured requests for being managed by the network management device. By taking an example of the MAC address as the forwarding identifier, a network packet including the MAC address is set in the opening software of the network device, wherein the MAC address can be identified by all of the network devices in the network system, and is different from other MAC addresses in the network system. For example, the MAC address is 00-00-00-11-22-33, which is unique, namely the MAC address is different from the MAC addresses of other devices in the network. When a new network device comes online, that is, the forwarding end establishes the communication connection with the network device for the first time, the new online network device sends the network packet set in the opening software. When the packet forwarding request sent from the network device to be configured is received, the forwarding end establishing the communication connection with the network device acquires the MAC address in the packet forwarding request, and analyzes whether there is a prestored MAC address consistent with the MAC address in the packet forwarding request. When there is the prestored MAC address consistent with the MAC address in the packet forwarding request, the forwarding end determines the forwarding path corresponding to the packet forwarding request according to a predetermined mapping relationship between the prestored MAC addresses and the forwarding paths. The forwarding end acquires information of the new online network device which is included in the packet forwarding request, and forwards the information of the new online network device to the network management device according to the determined forwarding path, so that the network management device generates network configuration information of the new online network device according to the received information, and delivers the generated network configuration information to the new online network device. 
     In the present embodiment, the network device to be configured initiates automatically the network packet forwarding request including the forwarding identifier; when there is the prestored forwarding identifier consistent with the forwarding identifier in the network packet forwarding request, the forwarding end determines the forwarding path corresponding to the network packet forwarding request, and forwards to the network management device the information of the network device to be configured in the network packet forwarding request according to the determined forwarding path, so that the network management device generates the network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured. As such, according to the present embodiment, the technical problems of broadcast storm in the network or occupation of the network bandwidth which are caused by the network device to be configured broadcasting its own information to the network management device are effectively avoided, the network bandwidth utilization is improved, and the new online network device is introduced more quickly to the management of the network management device. 
       FIG. 2  is a flowchart showing a method for forwarding a network packet according to a second embodiment of the disclosure. 
     Based on the first embodiment, after Step  13 , the method also includes the following step. 
     At Step  14 , the forwarding end receives initial configuration information sent from the network management device via the determined forwarding path, and sends the initial configuration information to the network device to be configured, so that the network device to be configured completes an initiation configuration of a network according to the received initial configuration information. 
     Specifically, when the forwarding end sends the information of the network device to be configured in the packet forwarding request to the network management device via the determined forwarding path, the network management device knows that the network device to be configured has been online and it is the new online network device. The network management device generates the network configuration information of the network device to be configured according to the received information of the network device to be configured, wherein the network configuration information includes an IP address of the network device to be configured, an IP address of the forwarding end, and so on. The network management device sends the generated configuration information to the forwarding end via the determined forwarding path, and the forwarding end sends the received configuration information to the network device to be configured, so that the network device to be configured completes the initial configuration of the network according to the received initial configuration information, and establishes the connection between itself and the network management device. After completing the initial configuration, the network device to be configured can communicate with other network devices via the forwarding end and receive the management information from the network management device. 
     In the present embodiment, the network management device delivers the initial configuration information to the network device to be configured via the determined forwarding path, thereby implementing that the generated configuration information of the network device to be configured is delivered to the network device to be configured more quickly, so as to implement data interaction between the network device to be configured and other network devices, and improve the user experience. 
       FIG. 3  is a functional module diagram illustrating a device for forwarding a network packet according to a preferred embodiment of the disclosure. The device includes an analyzing module  10 , a processing module  20  and a data transceiving module  30 . 
     The analyzing module  10  is configured to, when the packet forwarding request sent from the network device to be configured is received, analyze whether there is a prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request. 
     Specifically, one or more network devices and a network management device are included in a network system. The network device can be a forwarding end, a data providing end and/or a data initiating end. The network management device delivers management information to each of the network devices, so as to implement management for each of the network devices. The device for forwarding the network packet is preferably a forwarding end. In other embodiments of the disclosure, the network packet forwarding device can also be a network device with a forwarding function. A specific network packet is set in the opening software of the network device, wherein the network packet includes the forwarding identifier. When the forwarding end establishes a communication connection with the network device to be configured (i.e. the new online network device) including the forwarding identifier, the network device to be configured sends the network packet including the forwarding identifier out, and the forwarding end which can identify the network packet receives the network packet. The network packet also encapsulates with the information of the network device to be configured. The communication connection can be a wired connection or a near field communication connection, that is, the network device to be configured can send the network packet out by means of the established wired connection or near field communication connection. When the data transceiving module  30  receives the packet forwarding request sent from the network device to be configured, the analyzing module  10  analyzes whether there is a prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, that is, the forwarding end analyzes whether the network packet can be forwarded to the target end corresponding to the packet forwarding request correctly and effectively. When there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, the processing module  20  determines the forwarding path corresponding to the packet forwarding request according to the predetermined mapping relationship between the prestored forwarding identifiers and the forwarding paths. When there is not the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, the data transceiving module  30  sends the forwarding failure information to the network management device to prompt the network device to be configured that the forwarding is failed, so that the monitoring personnel of the network management device designate, according to the prompt information, the engineering personnel to configure for the network device to be configured the identification port and the IP address of the upstream network device. As such, the communication channel between the network device to be configured and the upstream network device is established so as to cause the network device to be configured to send its own information to the network management device. 
     The processing module  20  is configured to, when there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, determine the forwarding path corresponding to the packet forwarding request according to the predetermined mapping relationship between the prestored forwarding identifiers and the forwarding paths. 
     Specifically, the forwarding end prestores at least one determined forwarding identifier, and each of the forwarding identifiers is predetermined to correspond to a different forwarding path. Alternatively, some of the forwarding identifiers correspond to the same forwarding identifier. The forwarding end can forward the received packet to either the network management device or other network device, wherein the communication channel is established between the other network device and the forwarding end. When there is the prestored forwarding identifier consistent with the forwarding identifier in the packet forwarding request, the data transceiving module  30  can forward the network packet to the target end corresponding to the packet forwarding request correctly and effectively. The processing module  20  determines the forwarding path corresponding to the packet forwarding request according to the predetermined mapping relationship between the prestored forwarding identifier and the forwarding path. In other embodiments of the disclosure, the forwarding end prestores at least one determined forwarding identifier. Each of the forwarding identifiers is predetermined to correspond to a different target network device or network management device. Each of the target network devices corresponds to a different forwarding path. Alternatively, some of the target network devices correspond to the same forwarding path. The processing module  20  determines the target network device corresponding to the packet forwarding request according to the predetermined mapping relationship between the prestored forwarding identifiers and the target network devices. The processing module  20  determines the forwarding path corresponding to the packet forwarding request according to the predetermined mapping relationship between the prestored forwarding paths and the network devices. 
     The data transceiving module  30  is configured to forward the information of the network device to be configured in the packet forwarding request to the network management device according to the determined forwarding path, so that the network management device generates the network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured. 
     Specifically, when determining the forwarding path corresponding to the packet forwarding request, the processing module  20  acquires the information of the network device to be configured in the packet forwarding request, and the data transceiving module  30  forwards the information of the network device to be configured in the packet forwarding request to the network management device according to the determined forwarding path, so that the network management device generates the network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured, wherein the network configuration information may include the IP address which is assigned to the new online network device and delivered by the network management device or the like. The information of the network device to be configured may include any information that can identify the network to be configured such as am identification code and a physical address of the network to be configured, and information about that the network device to be configured is online, or information about that the network device to be configured requests for being managed by the network management device. By taking an example of the MAC address as the forwarding identifier, a network packet including the MAC address is set in the opening software of the network device, wherein the MAC address can be identified by all of the network devices in the network system, and is different from other MAC addresses in the network system. For example, the MAC address can be 00-00-00-11-22-33, which is unique, namely the MAC address is different from the MAC addresses of other devices in the network. When a new network device comes online, that is, the data transceiving module  30  establishes the communication connection with the network device for the first time, the new online network device sends the network packet set in the opening software. When the data transceiving module  30 , which establishes the communication connection with the processing module  20 , receives the packet forwarding request sent from the network device to be configured, the processing module  20  acquires the MAC address in the packet forwarding request, and the analyzing module  10  analyzes whether there is a prestored MAC address consistent with the MAC address in the packet forwarding request. When there is the prestored MAC address consistent with the MAC address in the packet forwarding request, the processing module  20  determines the forwarding path corresponding to the packet forwarding request according to the predetermined mapping relationship between the prestored MAC addresses and the forwarding paths. The processing module  20  acquires the information of the new online network device which is included in the packet forwarding request, and forwards, through the data transceiving module  30 , the information of the new online network device to the network management device according to the determined forwarding path, so that the network management device generates the network configuration information of the network device newly online according to the received information, and delivers the generated network configuration information to the new online network device. 
     In the present embodiment, the network device to be configured initiates automatically the network packet forwarding request including the forwarding identifier; when there is the prestored forwarding identifier consistent with the forwarding identifier in the network packet forwarding request, the processing module  20  determines the forwarding path corresponding to the network packet forwarding request, and forwards to the network management device the information of the network device to be configured in the network packet forwarding request through the data transceiving module  30  according to the determined forwarding path, so that the network management device generates the network configuration information of the network device to be configured according to the received information, and delivers the generated network configuration information to the network device to be configured. As such, according to the present embodiment, the technical problems of broadcast storm in the network or occupation of the network bandwidth which are caused by the network device to be configured broadcasting its own information to the network management device are effectively avoided, the network bandwidth utilization is improved, and the new online network device is introduced more quickly to the management of the network management device. 
     Preferably, the data transceiving module  30  is further configured to receive the initial configuration information sent from the network management device via the determined forwarding path, and send the initial configuration information to the network device to be configured, so that the network device to be configured completes the initiation configuration of the network according to the received initial configuration information. 
     Specifically, when the data transceiving module  30  sends the information of the network device to be configured in the packet forwarding request to the network management device via the determined forwarding path, the network management device knows that the network device to be configured has been online and it is the new online network device. The network management device generates the network configuration information of the network device to be configured according to the received information of the network device to be configured, wherein the network configuration information includes the IP address of the network device to be configured, the IP address of the forwarding end, and so on. The network management device sends the generated configuration information to the forwarding end via the determined forwarding path, and the data transceiving module  30  sends the received configuration information to the network device to be configured, so that the network device to be configured completes the initial configuration of the network according to the received initial configuration information, and establishes the connection between itself and the network management device. After completing the initial configuration, the network device to be configured can communicate with other network devices via the forwarding end and receive the management information from the network management device. 
     In the present embodiment, the network management device delivers the initial configuration information to the network device to be configured via the determined forwarding path, thereby implementing that the generated configuration information of the network device to be configured is delivered to the network device to be configured more quickly, so as to implement data interaction between the network device to be configured and other network devices, and improve the user experience. 
     Only the preferred embodiments of the disclosure are described above and are not intended to limit the scope of the disclosure. Any equivalent replacements of structures or flows performed based on contents of the specification and accompanying drawings of the disclosure, or direct or indirect application of the equivalent replacements in other related technical fields shall fall within the scope of the disclosure. 
     INDUSTRIAL APPLICABILITY 
     In combination with the embodiments of the disclosure, the forwarding end receives the packet forwarding request sent from the network device to be configured, and determines the forwarding path according to the packet forwarding request, so that the network management device sends the generated configuration information to the network device to be configured via the determined forwarding path. Thus, the disclosure can effectively avoid the technical problems of broadcast storm in the network or occupying the network bandwidth which are caused by the network device to be configured broadcasting its own information to the network management device, improve the network bandwidth utilization, and introduce the new online network device to the management of the network management device more quickly.