Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
METHOD FOR FORWARDING RESPONSE PACKET FROM DHCP SERVER, FORWARDING DEVICE AND SYSTEM
Document Type and Number:
WIPO Patent Application WO/2012/146120
Kind Code:
A1
Abstract:
According to an implementation, a method for forwarding a response packet from a Dynamic Host Configuration Protocol (DHCP) server and a forwarding device is provided. A forwarding device in a DHCP network, after receiving a request packet, adds path information of the request packet in a path information sub-option of the request packet. In addition, after receiving a response packet, the forwarding device extracts from a path information sub-option of the response packet, the path information added by the forwarding device and forwards the response packet according to the path information.

Inventors:
CUI XIAOHUI (CN)
XU YUFEI (CN)
Application Number:
PCT/CN2012/073462
Publication Date:
November 01, 2012
Filing Date:
April 01, 2012
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
HANGZHOU H3C TECH CO LTD (CN)
CUI XIAOHUI (CN)
XU YUFEI (CN)
International Classes:
H04L12/70
Foreign References:
CN101771614A2010-07-07
CN101883158A2010-11-10
CN101150517A2008-03-26
US20030204598A12003-10-30
CN102185766A2011-09-14
Attorney, Agent or Firm:
DEQI INTELLECTUAL PROPERTY LAW CORPORATION (No. 1 Zhichun Road Haidian District, Beijing 3, CN)
Download PDF:
Claims:
CLAIMS

1 . A method of forwarding a data packet by a forwarding device in a Dynamic Host Configuration Protocol (DHCP) environment, the method comprising the forwarding device:

adding path information to a request packet, the path information containing data relating to a path through which the request packet travels from a client device to said forwarding device;

forwarding the request packet towards a DHCP server;

receiving a response packet from the DHCP server, the response containing the path information;

extracting the path information from the response packet; and

forwarding the response packet according to the path information. 2. The method of claim 1 , wherein the path information is added as a path information sub-option in the request packet.

3. The method of Claim 2, wherein the path information sub-option is a sub-option of option82.

4. The method of Claim 2, wherein the method includes adding path information of the forwarding device as an additional path information sub-option when the request packet already contains the path information sub-option.

5. The method of claim 3, wherein adding the path information of the request packet to form the path information sub-option comprises:

adding an additional option field in the path information sub-option, setting the VLAN ID field and the port ID field of the additional option as the IDs of the VLAN and the port from which the request packet is received.

6. The method of claim 5, wherein adding the path information of the request packet to the path information sub-option further comprises:

setting the module ID field of the additional option as the ID of the module from which the request packet is received.

7. The method of claim 5, wherein adding the path information of the request packet to the path information sub-option further comprises setting the node ID field of the additional option as a node ID of the forwarding device; and wherein extracting the path information added by the forwarding device from the path information sub-option contained in the response packet comprises searching in the path information sub-option contained in the response packet the additional option with the node ID of the forwarding device, and taking the path information in the additional option as the path information added by forwarding device.

8. The method of claim 2, wherein adding the path information of the request packet to the path information sub-option comprises: adding an additional option field in the path information sub-option, setting the node ID field of the additional option as a node ID of the forwarding device and setting the VLAN ID field and the port ID field of the additional option as the IDs of the VLAN and the port from which the request packet is received;

wherein extracting the path information added by the forwarding device from the path information sub-option contained in the response packet comprises: searching in the path information sub-option contained in the response packet the additional option with a node ID of the forwarding device, and taking the VLAN ID and the port ID recorded in the additional option with the node ID of the forwarding device as the path information added by the forwarding device; and

wherein forwarding the response packet according to the path information comprises: forwarding the response packet according to the VLAN ID and the port ID.

9. A forwarding device for operating with a DHCP server, the forward device comprising a processor and a memory storing machine readable instructions executable by the processor to:

add path information to a request packet, the path information containing data relating to a path through which the request packet travelled from a client device to said forwarding device;

forward the request packet towards a DHCP server;

receive a response packet from the DHCP server, the response containing the path information;

extract the path information from the response packet; and

forward the response packet according to the path information.

10. A forwarding device according to Claim 9, wherein the processor is to add the path information as a path information sub-option in the request packet, and to add path information of the forwarding device as an additional path information sub-option when the request packet already contains the path information sub-option.

11 . A forwarding device, comprising:

an information adding unit to add path information of a request packet to a path information sub-option contained in the request packet and forward the request packets, the path information containing data relating to a path through which the request packet travels from a client device to said forwarding device; and

a forwarding unit to receive a response packet from a DHCP server, extract the path information added by itself from the path information sub-option contained in the response packet and forward the response packet according to the path information. 12. The forwarding device of claim 11 , wherein the information adding unit comprises a judging module, a first information adding module and a second information adding module; wherein

the judging module is to judge whether the request packet contains a path information sub-option, if the request packet contains a path information sub-option, forward the request packet and the path information of the request packet to the second information adding module and trigger the second information adding module to operate; otherwise, forward the request packet and the path information of the request packet to the first information adding module and trigger the first information adding module to operate;

the first information adding module is to add a path information sub-option in the request packet, add the path information of the request packet in the path information sub-option and forward the request packet;

the second information adding module is to add the path information of the request packet in the path information sub-option and forward the request packet. 13. The forwarding device of claim 12, wherein the first information adding module and the second information adding module add the path information of the request packet by adding an additional option field in the path information sub-option, and by setting the VLAN ID field and the port ID field of the additional option as the IDs of the VLAN and the port from which the request packet is received.

14. The forwarding device of claim 13, wherein the first information adding module and the second information adding module are further to set the module ID field of the additional option as the ID of the module from which the request packet is received.

15. The forwarding device of claim 13, wherein the first information adding module and the second information adding module are further to set the node ID field of the additional option as the node ID of the forwarding device it belongs to;

the forwarding unit comprises: a searching module and a forwarding module; wherein

the searching module is to receive a response packet from a DHCP server, extract an additional option with a node ID of the forwarding device it belongs to in the path information sub-option brought back in the response packets, take the path information in the additional option as the path information added by an information adding unit of a forwarding device it belongs to, and forward the response packet and the path information to the forwarding module; and the forwarding module is to forward the response packet according to the path information provided by the searching module;. 16. The forwarding device of claim 13, wherein the forwarding unit further comprises a removing module to delete the additional option with a node ID of the forwarding device it belongs in the configured Option82 sub-option brought back by the response packets.

Description:
METHOD FOR FORWARDING RESPONSE PACKET FROM DHCP SERVER, FORWARDING DEVICE AND SYSTEM

BACKGROUND

[0001 ] DHCP, which is a communication protocol based on client/server mode, can be used to dynamically allocate network configuration parameters, such as Internet Protocol (IP) addresses. Conventionally, during the allocation of network configuration parameters, a DHCP client first broadcasts a request packet to a forwarding device, the forwarding device receiving the request packet forwards the request packet to a DHCP server via a port connecting the DHCP server, the DHCP server unicasts a response packet to the forwarding device, and then the forwarding device forwards the response packet to the DHCP client.

BRIEF DESCRIPTION OF THE DRAWINGS

[0002] Features of the present disclosure are illustrated by way of example and not limited in the following figure(s), in which like numerals indicate like elements, in which:

[0003] Figures 1 and 2 are respective diagrams illustrating the architectures of a first and a second type of example DHCP networks;

Figure 2A is an example second type DHCP network labeled with device names.

[0004] Figure 3 is a flow chart illustrating a method for forwarding a response packet from a DHCP server according to an example of the present disclosure;

[0005] Figure 4 is a diagram illustrating the structure of a configured Option82 sub-option according to an example of the present disclosure;

[0006] Figure 5 is a diagram illustrating the structure of an additional option of a configured Option82 sub-option according to an example of the present disclosure;

[0007] Figure 6 is a flow chart illustrating a method for forwarding a response packet of a DHCP server according to another example of the present disclosure;

[0008] Figure 7 is a diagram illustrating the structure of a forwarding device according to an example of the present disclosure;

[0009] Figure 8 is a diagram illustrating the structure of an information adding unit of the forwarding device according to an example of the present disclosure;

[0010] Figure 9 is a diagram illustrating the structure of a forwarding unit of the forwarding device according to an example of the present disclosure;

[0011 ] Figure 10 is a diagram illustrating the hardware construction of a forwarding device according to an example of the present disclosure. DETAILED DESCRIPTION

[0012] For simplicity and illustrative purposes, the present disclosure is described by referring mainly to an example thereof. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. It will be readily apparent however, that the present disclosure may be practiced without limitation to these specific details. In other instances, some methods and structures have not been described in detail so as not to unnecessarily obscure the present disclosure. As used herein, the term "includes" means includes but not limited to, the term "including" means including but not limited to. The term "based on" means based at least in part on.

[0013] Figure 1 illustrates the architecture of a first type of an example DHCP network. The example DHCP network includes a DHCP server 13, DHCP clients 111 to 114, and a forwarding device 12. The functional entities illustrated in Figure 1 will perform the following blocks 1 to 8 to implement dynamic allocation of an IP address.

[0014] Block 1 : The DHCP Client 112 broadcasts a DHCP-DISCOVER packet.

[0015] Block 2: The forwarding device 12 forwards the DHCP-DISCOVER packet to the DHCP server 13 according to configuration parameters.

[001 6] Block 3: The DHCP server 13 allocates an IP address to the DHCP client 112, and uni-casts a DHCP-OFFER packet containing the IP address to the forwarding device 12.

[0017] Block 4: The forwarding device 12 forwards the DHCP-OFFER packet to the DHCP client 112.

[0018] Block 5: The DHCP Client 112 broadcasts a DHCP-REQUEST packet, in which the IP address allocated by the DHCP server 13 is contained.

[0019] Block 6: The forwarding device 12 forwards the DHCP-REQUEST packet to the DHCP server 13 according to configuration parameters. [0020] Block 7: The DHCP server 13 unicasts a DHCP-ACK packet to confirm the allocation of the IP address.

[0021 ] Block 8: The forwarding device 12 forwards the DHCP-ACK packet to the DHCP client 112.

[0022] The packets broadcasted by the DHCP client in the above blocks 1 and 5 are called request packets. The packets uni-casted by the DHCP server in the above blocks 3 and 7 are called response packets.

[0023] The forwarding device 12 shown in Figure 1 is a forwarding device which is configured to be capable of supporting the "Relay Agent Information" and connects to four DHCP clients, and the forwarding device 12 can uni-cast the response packet from the DHCP server 12 to an appropriate DHCP client.

The DHCP relay agent is a bootstrap protocol that relays DHCP messages between clients and servers for DHCP on different IP Networks, it can be a host or an IP router that listens" to DHCP client messages being broadcast on a subnet and relays them to the configured DHCP server. The DHCP server would then send responses again using DHCP relay agent back to the DHCP client. As defined in RFC 2132, the Relay Agent Information option is inserted by the DHCP relay agent when forwarding client-originated DHCP packets to the DHCP server. The DHCP server echoes the option back verbatim to the relay agent in server-to-client replies, and the relay agent strips the option before forwarding the reply to the client. This DHCP Relay Agent Information option is also known as option82. The specific procedure is described in the following:

[0024] . In the above blocks 2 and 6, when receiving a request packet from a DHCP client, the forwarding device 12 adds an Option82 sub-option in the request packet received. This added Option82 sub-option is used to record the path information of the request packet, specifically, the path information from which the request packet is received, such as the information of the VLAN and the port from which the request packet is received. In the above blocks 3 and 7, the DHCP server 13 copies the Option82 sub-option in the request packet to the response packet. In the above blocks 4 and 8, the forwarding device 12 forwards the response packet from the DHCP server to the DHCP client according to the Option82 sub-option contained in the response packet from the DHCP server.

[0025] Figure 2 illustrates the architecture of another type of DHCP Network, which is more complicated than the architecture of the DHCP Network illustrated in Figure 1 . As shown in Figure 2, the forwarding device 23 connects not only a DHCP client 211 but also forwarding devices 22 and 24, and both forwarding devices are also capable of supporting Option82.

[0026] In this case, if the above approach is taken, when receiving a request packet from a DHCP client 212, the forwarding device 24 will add an Option82 sub-option in the request packet, which records the information of the VLAN and the port from which the request packet is received. And then the forwarding device 24 forwards the request packet to the forwarding device 23. The forwarding device 23 can maintain the Option82 sub-option added by the forwarding device 24 in the request packet. In this case, the forwarding device 23 will directly forward the request packet received to the DHCP server 25. But when receiving the response packet from the DHCP server 25, the forwarding device 23 cannot decide to which device the response packet should be forwarded for the Option82 sub-option contained in the response packet indicates that the response packet is to be forwarded to the DHCP client 212, while the DHCP client 212 is not connected to the forwarding device 23 itself.

[0027] As an alternative solution, the forwarding device 23 can replace the content of the Option82 sub-option in the request packet added by the forwarding device 24. That is, the forwarding device 23 may replace the content of the Option82 sub-option in the request packet with the information of the VLAN and the port from which the request packet is received, and then forward the request packet to the DHCP server 25. In this case, when receiving a response packet from the DHCP server 25, the forwarding device 23 can forward the response packet directly to the forwarding device 24 according to the Option82 sub-option in the response packet. However, because the content of the Option82 sub-option added by the forwarding device 24 is replaced, the forwarding device 24 does not know to which device the response message should be forwarded.

[0028] It can be seen that, in a DHCP network, when a forwarding device connects at least two forwarding devices in parallel, the response packet from the DHCP server cannot be forwarded to the accurate DHCP client by the method described above. Thus a method for forwarding the response packet from the DHCP server and a forwarding device is described herein.

[0029] In one example, a path information sub-option which may be carried in the request packet is predefined. The path information sub-option is used to indicate the path through which the request packet travels, such as from which DHCP client the request message is sent and through which forwarding devices the request packet travels. In addition, in the example, when generating a response packet, the DHCP server may copy the path information sub-option in the request packet to the response packet. As the newly added Option82 sub-option contains path information for onward delivery by the forwarding device, it will be referred to as a 'path information sub-option' herein.

[0030] Figure 3 is a flow chart illustrating a method for forwarding a response packet from a DHCP server according to an example of the present disclosure. The method includes the following operations:

[0031 ] Block 301 : the forwarding device adds path information of the request packet to the path information sub-option contained in the request packet and forwards the request packet.

[0032] Block 302: the forwarding device receives a response packet from the DHCP server, extracts the path information added by the forwarding device from the path information sub-option contained in the response packet and forwards the response packet according to the path information.

[0033] It should be noted that the path information of the request packet refers to the information of the path from which the request packet is received. More specifically, the path information refers to the address of the entity (node, port or module, etc.) receiving the request packet. The path information includes at least one of or any combination of: a node ID, a VLAN ID, a port ID and a module ID. Specifically, the node ID refers to the ID of the node that receives the request packet; the VLAN ID refers to the ID of the VLAN from which the request packet is received; the port ID refers to the ID of the port from which the request packet is received; and the module ID refers to the ID of the module from which the request packet is received.

[0034] In this operation, if the forwarding device directly connects a DHCP server, the forwarding device receives the response packet from the DHCP server. In other cases, the forwarding device receives the response packet from other forwarding devices.

[0035] In correspondence with the above method, the DHCP server may copy the path information sub-option in the request packet to the response packet. Specifically, after receiving a request packet from a forwarding device, the DHCP server extracts the path information sub-option from the request packet, and adds the extracted instruction sub-option to a generated response packet.

[0036] In addition, after extracting the path information, which was added by the forwarding device, the forwarding device further deletes the path information, which was added by the forwarding device, and then forwards the response packet according to the extracted path information.

[0037] It may be seen that in the above method for forwarding the response packet from the DHCP server, since the DHCP server copies the path information sub-option in the request packet to the response packet, the forwarding device may find the path information in the path information sub-option of the response packet, and then identify the path from which the request packet is received, i.e., the path to which the response packet is to be forwarded. Thus, the response packet may be forwarded according to the extracted path information. In the above method, each forwarding device adds its own path information (the information of the path from which the request packet is received) in the path information sub-option carried in the request packet. In this case, even if a forwarding device connects to two or more other forwarding device in parallel, the forwarding device may find and extract the path information, which the forwarding device added, in the path information sub-option contained in the response packet, and therefore may identify to which device the response packet is to be forwarded.

[0038] By using the above-mentioned method, each forwarding device in the DHCP network illustrated in Figure 2 or in a real DHCP network with a more complicated architecture, may perform an accurate forwarding of the response packet from the DHCP server.

[0039] An example of the present disclosure will be described in detail hereinafter.

[0040] In this example, the path information sub-option may be a configured Option82 sub-option, such as a sub-option Sub10 of the Option 82 sub-option. Figure 4 illustrates the structure of a configured Option82 sub-option according to an example of the present disclosure. The configured Option82 sub-option includes: a sub-option ID field with a length of 1 byte, a sub-option length field with a length of 1 byte, an additional option length field with a length of 1 byte and at least two additional option fields with a total length of N1 bytes. N1 is an integer. The sub-option ID field may be set as the sub-option ID of the configured Option82 sub-option, which may be determined depending on the implementation requirements. The sub-option length field may be set as the length of the configured Option82 sub-option. The additional option length field may be set as the length of additional options. The additional option fields are illustrated as Si (i = 1 ,2, N) in Figure 4, where N is an integer. Each additional field is used to record the path information of the request packet added by a forwarding device.

[0041 ] Further, Figure 5 illustrates the structure of an additional option field of a configured Option82 sub-option according to an example of the present disclosure. The additional option field includes: an additional option ID field with a length of 1 byte, an additional option length field with a length of 1 byte, a node ID field with a length of N2 bytes, a VLAN ID field with a length of 2 bytes, a port ID field with a length of 1 byte and a module ID field with a length of 1 byte. N2 is an integer. The additional option ID field may be set as the ID of the additional option, which may be the identification i as illustrated in Figure 4. The additional option length field may be set as the length of the additional option. The node ID field may be set as the ID of the forwarding device. The VLAN ID field, the port ID field and the module ID field may be set as the IDs of the VLAN, the port and the module from which the forwarding device receives the request packet.

[0042] In this example, the forwarding device may be a centralized or a distributed controlled forwarding device. The centralized controlled device may include multiple sub-cards. The distributed controlled device may include multiple interface boards. And different sub-cards or different interface boards may use the same port ID. In this case, to uniquely identify an export, a module ID may be used to indicate different sub-cards or interface boards.

[0043] The length of each field of the configured Option82 sub-option may be flexibly set under the premise of subjecting to the provisions of existing agreements.

[0044] Figure 6 is a flow chart illustrating a method for forwarding a response packet of a DHCP server according to another example of the present disclosure, based on the structure of the configured Option82 sub-option. The method includes:

[0045] Block 601 : the forwarding device judges whether the received request packet contains a configured Option82 sub-option, if the received request packet contains a configured Option82 sub-option, the method proceeds to block 602, otherwise, the method proceeds to block 603.

[0046] Specifically, in this step, the forwarding device determines whether the received request packet contains a configured Option82 sub-option and the sub-option ID field of the Option82 sub-option is set as the sub-option ID of a configured Option82 sub-option, if so, this is path information that the received request packet contains a configured Option82 sub-option; otherwise, this is path information that the received request packet does not contain a configured Option82 sub-option.

[0047] Block 602: the forwarding device adds an additional option field in the configured Option82 sub-option, sets the node ID field of the additional option as its own node ID, and sets the VLAN I D field and the port ID field of the additional option as the IDs of the VLAN and the port from which the request packet is received, then forwards the request packet, and proceeds to block 604.

[0048] Block 603: the forwarding device adds a configured Option82 sub-option in the received request packet, adds an additional option field in the configured Option82 sub-option, sets the node ID field of the additional option as its own node ID, and sets the VLAN I D field and the port ID field of the additional option as the IDs of the VLAN and the port from which the request packet is received, then forwards the request packet, and proceeds to block 604.

[0049] It should be noted that in the above blocks 602 and 603, if there are different sub-cards or different interface boards that use a same port ID, the forwarding device is also to set the module ID field of the additional option as the ID of the module from which the request packet is received.

[0050] Block 604: the forwarding device receives a response packet from the DHCP server, extracts the additional option with the node ID of its own in the configured Option82 sub-option brought back in the response packet, and then forwards the response packet according to the VLAN ID, port ID and module ID in the additional extracted option.

[0051 ] In addition, before forwarding the response packet, the forwarding device may further delete the additional option with the node ID of its own in the configured Option82 sub-option brought back in the response packet. [0052] According to the provisions of the RFC, the DHCP server copies the Option82 sub-option in the request packet to the response packet, therefore, the response packet contains the same Option82 sub-option as the request packet.

Another example based on the second type DHCP network topology of Figure 2 will be described below with reference to an example network of Figure 2A in which forwarding devices S1 and S2 are connected to another forwarding device S3 which serves as a DHCP snooping device. The forwarding device S3 is connected to the DHCP server such that S3 is intermediate the DHCP server and the secondary forwarding devices S1 , S2. The forwarding device S1 and its client devices pd and pc2 collectively form a group 1 subnet which is connected to the DHCP snooping device via a port Ethernet 1 /1 (Eth1 /1 ). The forwarding device S2 and its client devices pc3 and pc3 collectively form a group 2 subnet which is connected to the DHCP snooping device via a port Ethernet 1 /2 (Eth1 /2). Each of the group 1 and group 2 client devices pd , pc2, pc3 and pc4 is capable of data communication with the DHCP server through the snooping devices S3 and S1 and/or S2. On the other hand, client device pc5 is connected to the snooping device S3 through port Ethernet 1 /3 (Eth 1 /3).

When pd sends a message to the DHCP server via the forwarding device S1 , s1 will add the following example option and sub-option to the message:

0xS£ : 0*18 0x08 1 0χ1δ f 0x01 | 0x14 0x53 0x3 i 00 00 03 00 0000 00 00 00 ϋΰ 00 00 00 00 : 000a 0*0) | OxOs

In the above, all the numbers are hexadecimal numbers. The contents of the first text box Όχ52' indicate that this is option82. The contents of the second box Όχ18' indicate the length of this option82, which is 24 bytes in this example. The contents of the third text box indicate the type of this sub-option, which is 8 in this example. The contents of the third text box indicate the type of this sub-option, which is 8 in this example. The fourth text box Όχ1 6' indicates the length of sub-option8, which is 22 bytes in this example. The fifth text box Όχ01 ' indicates that this is the first sub-option of sub-option8. The sixth text box Όχ14' indicates that length of the first sub-option of sub-option8. The first text group in the seventh text box, namely, 0x53 0x31 is a tag for node S1 , and this is appended with 14 bytes of 0's. The last third text box defines the vlan id, which indicates that vlan 10 has received the DHCP request. As the node device S1 receives the message through port Ethernet 1 /10, the last second text box indicates the module number, which is 1 in this example. The last text box indicates the port number at which the DHCP request was received, which is 10 ( 0x0a in hexadecimal form) in this example.

When the message passes through the forwarding device S3, the message will be further modified as below in which sub-option 2 of sub-option 8 is added (shown with underline).

The contents of the second box Όχ2Ε' indicate the length of this option82 after adding sub-option 2 of sub-option 8, which is 46 bytes in this example. The fourth text box Ox2C indicates the length of current sub-option8, which is 44 bytes in this example. The eleventh text box Όχ02' indicates that this is the second sub-option of sub-option8. The vlan id is 0x53 0x33, which is a tag for node S3. As forwarding device S3 received the message through port Ethernet 1 /1 , the last second text box indicating the module number is 1 . The last text box indicating the port number at which the DHCP request was received is also 1 in this example.

[0053] Figure 7 illustrates the structure of a forwarding device according to an example of the present disclosure. The forwarding device includes an information adding unit and a forwarding unit.

[0054] The information adding unit is to add path information in a path information sub-option contained in the request packet, and forward the request packet.

[0055] The forwarding unit is to receive a response packet from a DHCP server, extract the path information added by the information adding unit in the path information sub-option brought back in the response packet, and then forward the response packet according to the response packet.

[0056] After extracting the path information, the forwarding unit may further delete the path information added by the information adding unit in the path information sub-option of the response packet, and then forward the response packet according to the response packet.

[0057] It may be seen that since the DHCP server copies the path information sub-option in the request packet to the response packet, the forwarding device may find the path information in the path information sub-option of the response packet, and then identify the path from which the request packet is received, i.e., the path to which the response packet is to be forwarded. Thus the response packet may be forwarded according to the extracted path information. In the above method, each forwarding device adds its own path information (the information of the path from which the request packet is received) in the path information sub-option carried in the request packet. In this case, even if a forwarding device connects two or more other forwarding devices in parallel, the forwarding device may find and extract the path information added by the forwarding device in the path information sub-option contained in the response packet, and therefore determines to which device the response packet is to be forwarded.

[0058] The forwarding device in this example may operate by a DHCP relay or a DHCP Snooping.

[0059] An example of a forwarding device will be described in detail hereinafter.

[0060] In this example, the path information sub-option is the configured Option82 sub-option. The structure of the configured Option82 sub-option has been described before, thus no repetition will be given.

[0061 ] Figure 8 illustrates the structure of the information adding unit according to an example of the present disclosure. The information adding unit includes a judging module, a first information adding module and a second information adding module.

[0062] The judging module is to judge whether the request packet contains a configured Option82 sub-option, if the request packet contains a configured Option82 sub-option, forward the request packet and the path information of the request packet to the second information adding module, trigger the second information adding module to operate; otherwise, forward the request packet and the path information of the request packet to the first information adding module, trigger the first information adding module to operate.

[0063] The first information adding module is to add a configured Option82 sub-option in the request packet, add the path information of the request packet in the configured Option82 sub-option and forward the request packet. Here the first information adding module adds the path information of the request packet in the configured Option82 sub-option by adding an additional option in the configured Option82 sub-option, setting the node ID field of the additional option as the node ID of the forwarding device, setting the VLAN ID field and the port ID field of the additional option as the IDs of the VLAN and the port from which the request packet is received, and further by setting the module ID field of the additional option as the ID of the module from which the request packet is received.

[0064] The second information adding module is to add the path information of the request packet in the configured Option82 sub-option and forward the request packet. Here the second information adding module adds the path information of the request packet in the configured Option82 sub-option by adding an additional option in the configured Option82 sub-option, setting the node ID field of the additional option as the node ID of the forwarding device, setting the VLAN ID field and the port ID field of the additional option as the IDs of the VLAN and the port from which the request packet is received, and further by setting the module ID field of the additional option as the ID of the module from which the request packet is received.

[0065] Figure 9 is a diagram illustrating the structure of the forwarding unit of the forwarding device according to an example of the present disclosure. The forwarding unit includes: a searching module and a forwarding module.

[0066] The searching module is to receive a response packet from a DHCP server, extract an additional option with a node ID of the forwarding device it belongs in the configured Option82 sub-option brought back by the response packets, take the VLAN ID, the port ID and the module ID in the extracted additional option as the path information added by an information adding unit of a forwarding device it belongs, and forward the extracted response packet and the path information to the forwarding module.

[0067] The forwarding module is to forward the response packet according to the path information provided by the searching module.

[0068] The forwarding unit may further include a removing module to delete the additional option with a node ID of the forwarding device it belongs in the configured Option82 sub-option brought back by the response packets.

[0069] Figure 10 is a diagram illustrating the hardware construction of a forwarding device according to an example of the present disclosure. As shown in Figure 10, the forwarding device includes: at least one receiving chip, a central processing unit (CPU), a memory and at least one forwarding chip. It should be noted that in Figure 10 only one receiving chip and only one forwarding chip are illustrated.

[0070] The receiving chip is to receive a request packet and forward the received request packet and one of or any combination of the IDs of the VLAN, the port and the module from which the request packet is received to the CPU. Further, the receiving chip is also to receive a response packet from a DHCP server, and forward the received response packet and one of or any combination of the IDs of the VLAN, the port and the module from which the response packet is received to the CPU.

[0071 ] The memory is to store the node ID of the forwarding device, and other configuration parameters, such as the configuration parameters of the port connecting the DHCP server (the configuration parameters of the trust port connecting the DHCP server).

[0072] The CPU is to generate path information of the request packet according to one of or any combination of the IDs of the VLAN, the port and the module from which the request packet is received and the node ID of the forwarding device stored in the memory, add the path information of the request packet in the path information sub-option contained in the request packet, and forward the request packet to the forwarding chip. The CPU is further to receive the response packet from the receiving chip, extract the path information added by itself from the path information sub-option brought back in the response packet according to the node ID of the forwarding device read from the memory, select a forwarding chip according to the path information extracted, and forward the response packet to the forwarding chip selected.

[0073] The forwarding chip is to forward the request packet via a port connecting the DHCP server according to the configuration parameters of the port connecting the DHCP server stored in the memory. The forwarding chip is further to forward the response packet according to the path information in the path information sub-option brought back in the response packet.

[0074] Based on the descriptions of the examples above, it should be clearly understood that the examples may be implemented by machine-readable instructions plus a necessary common hardware platform, of course, they may also be implemented by hardware. Based on such understanding, the technical solutions of the examples substantially or in individual parts may be presented as machine-readable instructions which are stored in a non-transitory computer readable storage medium, including several instructions to make a computing device (may be a personal computer, a server, a network device, etc.,) execute the method of the examples.

[0075] In addition, the modules in the apparatuses of the examples disclosed herein may be distributed as described above or the modules may be located in one or more apparatuses different from those of the examples. The modules of the above examples may be integrated into one module or may be further divided into multiple sub-modules.

[0076] What has been described and illustrated herein is an example of the disclosure along with some of its variations. The terms, descriptions and figures used herein are set forth by way of illustration only and are not meant as limitations. Many variations are possible within the spirit and scope of the disclosure, which is intended to be defined by the following claims - and their equivalents - in which all terms are meant in their broadest reasonable sense unless otherwise indicated. While the examples above have been illustrated with reference to the adding of path information into a request packet as an option82 sub-option, it shall be appreciated by persons skilled in the art that the path information can be added into a selected or predetermined option other than option82, whether as a sub-option or otherwise, when the DHCP server is configured to echo the selected or predetermined option back verbatim to the relay agent as required by the RFC.