Communication methods and devices
By using a DHCPv6 relay, when multiple DHCPv6 server responses are received, only the successful response is forwarded. This solves the problem of DHCPv6 clients handling multiple server responses and improves address configuration efficiency as well as relay forwarding efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2023-04-25
- Publication Date
- 2026-05-05
AI Technical Summary
When the existing DHCPv6 Relay forwards Relay-forward messages to multiple DHCPv6 servers, all DHCPv6 servers respond, causing some DHCPv6 clients to be unable to process multiple responses, resulting in address configuration chaos and inefficiency.
After receiving the service message from the client, the DHCPv6 relay sends a Relay-forward message to multiple DHCPv6 servers and receives responses within a preset time. It only forwards the server reply indicating that the service was successfully executed and blocks unsuccessful responses.
It improves the efficiency of DHCPv6 clients in obtaining responses, reduces the forwarding pressure on DHCPv6 Relay, and solves the problem of client processing chaos caused by multiple server responses.
Smart Images

Figure CN116527636B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a communication method and apparatus. Background Technology
[0002] The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) is designed for the IPv6 addressing scheme to assign IPv6 prefixes, IPv6 addresses, and other network configuration parameters to DHCPv6 clients. Of course, to facilitate the proper use of the assigned addresses by DHCPv6 clients, DHCPv6 also includes several mechanisms, such as the DHCPv6 rebind mechanism and the DHCPv6 confirm mechanism.
[0003] The specific process of the DHCPv6 Rebind mechanism described above is as follows: After a DHCPv6 client obtains an address, it will renew the address after interval T1. If the renewal does not receive a response from the DHCPv6 server, the DHCPv6 client will rebind after interval T2. The DHCPv6 client sends a DHCPv6Rebind message to a reachable DHCPv6 server to extend the address's usage time. When the DHCPv6 server determines that the usage time of the address requested by the DHCPv6 client can be extended, it confirms success by replying with a reply message, and the DHCPv6 client will extend the use of the obtained address. When the DHCPv6 server determines that the usage time of the address requested by the DHCPv6 client cannot be extended, it still replies with a reply message, which includes a "NO BINDING" error code. The DHCPv6 client will not continue to use the requested address and can request a new address from the DHCPv6 server.
[0004] The specific process of the DHCPv6 Confirm mechanism is as follows: The DHCPv6 client sends a DHCPv6 Confirm message to a reachable DHCPv6 server to confirm whether the address already requested by the DHCPv6 client is still available. When the DHCPv6 server determines that the address requested by the DHCPv6 client is still available, it confirms success through a reply message, and the DHCPv6 client will continue to use the requested address. When the DHCPv6 server determines that the address requested by the DHCPv6 client is no longer available, it still replies with a reply message, which includes an error code indicating that the client is offline (NOT ON LINK). The DHCPv6 client will not continue to use the requested address and can request a new address from the DHCPv6 server.
[0005] Currently, DHCPv6 clients typically communicate with DHCPv6 servers via link-local multicast addresses to obtain IPv6 addresses and other network configuration parameters. When the DHCPv6 server and the DHCPv6 client are not in the same link range, they cannot communicate directly and must use a DHCPv6 relay to forward messages. Deploying a DHCPv6 relay avoids deploying a DHCPv6 server on every link range, saving costs and facilitating centralized management.
[0006] When a DHCPv6 client obtains an IPv6 address and other network configuration parameters from a DHCPv6 server via a DHCPv6 Relay, the process is as follows: The DHCPv6 client sends a Solicit message to the multicast address FF02::1:2 of all DHCPv6 servers and the Relay; Upon receiving the Solicit message, the DHCPv6 Relay encapsulates it in the Relay Message Option of a Relay-forward message and sends a Relay-forward message to the DHCPv6 server; The DHCPv6 server parses the Solicit message from the Relay-forward message, selects an IPv6 address and other parameters for the DHCPv6 client, and constructs an Advertise message; The DHCPv6 server encapsulates the Advertise message in the Relay Message Option of a Relay-reply message and sends a Relay-reply message to the DHCPv6 Relay.
[0007] The DHCPv6 Relay parses the Advertise message from the DHCPv6 server in the Relay-reply message and forwards it to the DHCPv6 client so that the client can configure the network according to the IPv6 address and other parameters assigned by the DHCPv6 server. The DHCPv6 client sends a Request message to the multicast address FF02::1:2 of all DHCPv6 servers and the Relay. After receiving the Request message, the DHCPv6 Relay encapsulates it in the relay message option of the Relay-forward message and sends the Relay-forward message to the DHCPv6 server. The DHCPv6 server parses the client's Request message from the Relay-forward message, selects an IPv6 address and other parameters for the client, and constructs a reply message. The DHCPv6 server encapsulates the reply message in the relay message option of the Relay-reply message and sends the Relay-reply message to the DHCPv6 Relay.
[0008] The DHCPv6 Relay parses the server's reply message from the Relay-reply message and forwards the reply message to the DHCPv6 client so that the DHCPv6 client can configure the network according to the IPv6 address and other parameters assigned by the DHCPv6 server.
[0009] Because DHCPv6 is a widely used address allocation and management technology, the reliability of DHCPv6 servers is becoming increasingly important. Multiple DHCPv6 servers are often planned in network configurations so that if one DHCPv6 server fails, others can serve as backups. When multiple DHCPv6 server addresses are configured within a DHCPv6 Relay, upon receiving a request message from a DHCPv6 client, the DHCPv6 Relay first encapsulates the request message into a Relay-forward message, and then sends this Relay-forward message to all configured DHCPv6 servers.
[0010] However, according to existing RFC 3315 and RFC 8415, DHCPv6 clients do not include the Server DUID in their DHCPv6Rebind and DHCPv6 Confirm messages. DHCPv6 servers receiving these messages cannot recognize the Server DUID and are therefore unsure whether they should process the message. Consequently, DHCPv6 servers process all received DHCPv6 Rebind and DHCPv6 Confirm messages. DHCPv6 clients, upon receiving responses from multiple DHCPv6 servers, are unable to process them.
[0011] For example, a DHCPv6 client sends a DHCPv6 Rebind message. The DHCPv6 Relay encapsulates the Rebind message in a Relay-forward message and forwards it to all configured DHCPv6 servers. If DHCPv6 server 1 replies with NOBINDING first, and then DHCPv6 server 2 replies with success, the DHCPv6 client may request an address again. However, this is unnecessary and redundant.
[0012] The DHCPv6 client sends a DHCPv6 Confirm message. The DHCPv6 Relay encapsulates the Confirm message in a Relay-forward message and forwards it to all configured DHCPv6 servers. If DHCPv6 server 1 replies with success first, and then DHCPv6 server 2 replies with NOT ON LINK, some DHCPv6 clients (e.g., some versions of Windows DHCPv6 clients) will neither use the obtained address nor request a new address from the DHCPv6 server, resulting in a stalemate. Summary of the Invention
[0013] In view of this, this application provides a communication method and apparatus to solve the problem that after the existing DHCPv6 Relay forwards to multiple DHCPv6 servers, all DHCPv6 servers respond, and some DHCPv6 clients are unable to handle the responses from multiple DHCPv6 servers.
[0014] In a first aspect, this application provides a communication method applied to a DHCPv6 relay, wherein the DHCPv6 relay is configured with attribute information of multiple DHCPv6 servers, and the method includes:
[0015] Receive a service message sent by a DHCPv6 client, the service message being used to request the DHCPv6 server to perform the corresponding service;
[0016] Send a Relay-forward message to each of the plurality of DHCPv6 servers indicated by the attribute information of the plurality of DHCPv6 servers, the Relay-forward message including the service message;
[0017] If a first Relay-reply message is received from any DHCPv6 server within a preset time period, and the first reply message included in the first Relay-reply message indicates that the DHCPv6 server has successfully executed the corresponding service, then the first reply message is sent to the DHCPv6 client.
[0018] Secondly, this application provides a communication device applied to a DHCPv6 relay, wherein the DHCPv6 relay is configured with attribute information of multiple DHCPv6 servers, and the device includes:
[0019] The receiving unit is used to receive service messages sent by DHCPv6 clients, the service messages being used to request the DHCPv6 server to perform corresponding services.
[0020] The sending unit is configured to send a Relay-forward message to each of the plurality of DHCPv6 servers indicated by the attribute information of the plurality of DHCPv6 servers, wherein the Relay-forward message includes the service message;
[0021] The sending unit is configured to send the first reply message to the DHCPv6 client if it receives a first Relay-reply message from any DHCPv6 server within a preset time period and the first reply message included in the first Relay-reply message indicates that the DHCPv6 server has successfully executed the corresponding service.
[0022] Thirdly, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the first aspect of this application.
[0023] Therefore, using the communication method and apparatus provided in this application, a DHCPv6 relay receives a service message sent by a DHCPv6 client, which is used to request a DHCPv6 server to perform a corresponding service; the DHCPv6 relay sends a Relay-forward message to each DHCPv6 server indicated by the attribute information of multiple DHCPv6 servers, and the Relay-forward message includes the service message; if a first Relay-reply message is received from any DHCPv6 server within a preset time period and the first reply message included in the first Relay-reply message indicates that the DHCPv6 server has successfully performed the corresponding service, then the DHCPv6 relay sends a first reply message to the DHCPv6 client.
[0024] Thus, in a network scenario with a DHCPv6 Relay configured, the DHCPv6 Relay blocks unsuccessful responses from multiple DHCPv6 servers from reaching the DHCPv6 client, forwarding only the successful response from a single DHCPv6 server. This prevents the DHCPv6 client from receiving either a successful or failed response simultaneously, improving the client's response acquisition efficiency and reducing the forwarding load on the DHCPv6 Relay. Furthermore, it resolves the issue where, after a DHCPv6 Relay forwards a relay-forward to multiple DHCPv6 servers, all servers respond, causing some DHCPv6 clients to be unable to process responses from multiple servers. Attached Figure Description
[0025] Figure 1 A flowchart illustrating the communication method provided in the embodiments of this application;
[0026] Figure 2 A structural diagram of a communication device provided in an embodiment of this application;
[0027] Figure 3 The network device hardware structure provided in the embodiments of this application. Detailed Implementation
[0028] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0029] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the corresponding listed items.
[0030] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0031] The communication method provided in the embodiments of this application will be described in detail below. See also... Figure 1 , Figure 1 A flowchart illustrating a communication method provided in an embodiment of this application. This method is applied to DHCPv6 Relay, and the communication method provided in this application may include the following steps.
[0032] Step 110: Receive a service message sent by the DHCPv6 client, the service message being used to request the DHCPv6 server to perform the corresponding service;
[0033] Specifically, the communication network includes DHCPv6 clients, DHCPv6 relays, and multiple DHCPv6 servers. After obtaining an IPv6 address and other network configuration parameters from the DHCPv6 server through the DHCPv6 relay, the DHCPv6 client can continue to request DHCPv6 services from the DHCPv6 server through the DHCPv6 relay, such as rebind and confirm services.
[0034] In this embodiment, the following example illustrates how a DHCPv6 client can continue to request DHCPv6 Rebind and DHCPv6 Confirm services.
[0035] The DHCPv6 client generates and sends a service message to the DHCPv6 Relay, which is used to request the DHCPv6 server to perform the corresponding service.
[0036] Optionally, the aforementioned service message may specifically be a DHCPv6 Rebind message or a DHCPv6 Confirm message.
[0037] After receiving a service message, the DHCPv6 Relay encapsulates it within a RelayMessage Option, which is set in the Relay-forward message. After this encapsulation operation, the DHCPv6 Relay produces the Relay-forward message.
[0038] Understandably, the DHCPv6 Relay is configured with the attribute information of multiple DHCPv6 servers. Based on the attribute information of each DHCPv6 server, the DHCPv6 Relay determines the number of DHCPv6 servers configured. Using the number of DHCPv6 servers, the DHCPv6 Relay generates an equal number of Relay-forward messages.
[0039] Step 120: Send a Relay-forward message to each of the DHCPv6 servers indicated by the attribute information of the plurality of DHCPv6 servers, wherein the Relay-forward message includes the service message;
[0040] Specifically, according to the description of step 110, after the DHCPv6 Relay receives multiple Relay-forward messages equal to the number of DHCPv6 servers, it sends a Relay-forward message to each DHCPv6 server indicated by the attribute information of the multiple DHCPv6 servers. The Relay-forward message includes a service message.
[0041] Optionally, in this embodiment of the application, after the DHCPv6 Relay sends a Relay-forward message to each DHCPv6 server, the DHCPv6 Relay starts a timer, and within the timer's duration, determines whether it receives a Relay-reply message sent by the DHCPv6 server and identifies the content of the reply message included in the Relay-reply message.
[0042] The timing duration of the timer can also be called the preset time period, which can be specifically 30 seconds, 1 minute, etc., and can be set according to the actual situation.
[0043] Upon receiving a Relay-forward message, each DHCPv6 server retrieves the service message from it. Based on the service message, each DHCPv6 server executes the corresponding service. After executing the service, each DHCPv6 server generates a corresponding reply message. Each DHCPv6 server encapsulates the corresponding reply message within a relay message option, which is set in the Relay-reply message. After performing the above encapsulation operation, each DHCPv6 server obtains a Relay-reply message.
[0044] Each DHCPv6 server sends its own generated Relay-reply message to the DHCPv6 Relay.
[0045] It should be noted that the DHCPv6 server executes different services depending on the different service messages.
[0046] In one example, when the service message is specifically a DHCPv6 Rebind message, the DHCPv6 server performs the following service: determining whether the address requested by the DHCPv6 client has its usage time extended. This DHCPv6 Rebind message is sent by the DHCPv6 client in the following scenario: After obtaining an address, the DHCPv6 client will renew the address after interval T1. If the renewal does not receive a response from the DHCPv6 server, the DHCPv6 client will rebind after interval T2. The DHCPv6 client sends a DHCPv6 Rebind message to a reachable DHCPv6 server to extend the address's usage time.
[0047] When a DHCPv6 server obtains an address requested by a DHCPv6 client locally, it determines the expiration time of the address's usage and generates a reply message containing a success confirmation message, allowing the DHCPv6 client to extend its use of the obtained address. Conversely, when the DHCPv6 server does not obtain an address locally, it determines the expiration time of the requested address's usage and still generates a reply message containing a "NO BINDING" indication message, preventing the DHCPv6 client from continuing to use the obtained address and requesting a new address from the DHCPv6 server.
[0048] In another example, when the service message is specifically a DHCPv6 Confirm message, the DHCPv6 server performs the following service: determining whether the address requested by the DHCPv6 client is still available. If the DHCPv6 server determines that the address requested by the DHCPv6 client is still available, it generates a reply message containing a success confirmation message, allowing the DHCPv6 client to continue using the requested address. If the DHCPv6 server determines that the address requested by the DHCPv6 client is no longer available, it still generates a reply message containing a NOT ON LINK message, causing the DHCPv6 client to stop using the requested address and request a new address from the DHCPv6 server.
[0049] As described above, after executing different services, each DHCPv6 server generates a corresponding reply message based on the execution result. Each reply message includes indication information indicating the execution result. Each DHCPv6 server encapsulates the corresponding reply message within a relay message option, which is set in the Relay-reply message. After performing the above encapsulation operation, each DHCPv6 server obtains a Relay-reply message.
[0050] Step 130: If a first Relay-reply message is received from any DHCPv6 server within a preset time period, and the first reply message included in the first Relay-reply message indicates that the DHCPv6 server has successfully executed the corresponding service, then the first reply message is sent to the DHCPv6 client.
[0051] Specifically, as described in step 120, after the DHCPv6 Relay sends a Relay-forward message to each DHCPv6 server, it determines whether it has received a first Relay-reply message from any DHCPv6 server within a preset time period.
[0052] If so, the DHCPv6 Relay obtains the first reply message from the first Relay-reply message and identifies the content of the indication information included in the first reply message.
[0053] If the first reply message indicates that the DHCPv6 server has successfully executed the corresponding service, then DHCPv6Relay sends the first reply message to the DHCPv6 client so that the DHCPv6 client can perform subsequent operations based on the first reply message.
[0054] Optionally, in this embodiment of the application, it further includes: if the DHCPv6 Relay receives a second Relay-reply message sent by any DHCPv6 server within a preset time period, and the second Relay-reply message includes a second reply message indicating that the DHCPv6 server has not successfully executed the corresponding service, then the DHCPv6 Relay caches the second reply message locally and does not send the second reply message to the DHCPv6 client.
[0055] Optionally, in this embodiment of the application, after the DHCPv6 Relay sends the first reply message to the DHCPv6 client, it further includes:
[0056] The DHCPv6 Relay discards all cached second reply messages; if the DHCPv6 Relay receives a third relay-reply message from any DHCPv6 server again, the DHCPv6 Relay discards the third relay-reply message directly.
[0057] Optionally, in this embodiment of the application, it further includes: if the DHCPv6 Relay does not receive the first Relay-reply message after a preset time period, and the fourth reply message cached locally by the DHCPv6 Relay indicates that the DHCPv6 server has not successfully executed the corresponding service, that is, the DHCPv6 Relay continues not to receive a reply message indicating that the DHCPv6 server has successfully executed the corresponding service, then the DHCPv6 Relay sends a fourth reply message to the DHCPv6 client to inform the DHCPv6 client that the DHCPv6 server has not successfully executed the corresponding service.
[0058] Furthermore, the DHCPv6 Relay may have cached multiple fourth reply messages locally. In this case, the DHCPv6 Relay can randomly select a fourth reply message and send it to the DHCPv6 client; or, based on the geographical location between the DHCPv6 Relay and the DHCPv6 server, it can select a fourth reply message generated by the DHCPv6 server with the closest geographical location and send it to the DHCPv6 client.
[0059] The process of selecting and sending the fourth reply message described above can also be configured with other selection methods according to the actual application situation. Here, we only use an example to illustrate the process.
[0060] Therefore, using the communication method provided in this application, the DHCPv6 relay receives a service message sent by a DHCPv6 client, which is used to request the DHCPv6 server to perform the corresponding service; the DHCPv6 relay sends a Relay-forward message to each DHCPv6 server indicated by the attribute information of multiple DHCPv6 servers, and the Relay-forward message includes the service message; if a first Relay-reply message is received from any DHCPv6 server within a preset time period and the first reply message included in the first Relay-reply message indicates that the DHCPv6 server has successfully performed the corresponding service, then the DHCPv6 relay sends a first reply message to the DHCPv6 client.
[0061] Thus, in a network scenario with a DHCPv6 Relay configured, the DHCPv6 Relay blocks unsuccessful responses from multiple DHCPv6 servers from reaching the DHCPv6 client, forwarding only the successful response from a single DHCPv6 server. This prevents the DHCPv6 client from receiving either a successful or failed response simultaneously, improving the client's response acquisition efficiency and reducing the forwarding load on the DHCPv6 Relay. Furthermore, it resolves the issue where, after a DHCPv6 Relay forwards a relay-forward to multiple DHCPv6 servers, all servers respond, causing some DHCPv6 clients to be unable to process responses from multiple servers.
[0062] Based on the same inventive concept, embodiments of this application also provide a communication device corresponding to the communication method. See also Figure 2 , Figure 2 The communication apparatus provided in this application embodiment is applied to a DHCPv6 relay, wherein the DHCPv6 relay is configured with attribute information of multiple DHCPv6 servers, and the apparatus includes:
[0063] The receiving unit 210 is used to receive service messages sent by a DHCPv6 client, wherein the service messages are used to request the DHCPv6 server to perform corresponding services.
[0064] The sending unit 220 is configured to send a Relay-forward message to each of the plurality of DHCPv6 servers indicated by the attribute information of the plurality of DHCPv6 servers, wherein the Relay-forward message includes the service message;
[0065] The sending unit 220 is configured to send the first reply message to the DHCPv6 client if it receives a first Relay-reply message from any DHCPv6 server within a preset time period and the first reply message included in the first Relay-reply message indicates that the DHCPv6 server has successfully executed the corresponding service.
[0066] Optionally, the device further includes a caching unit (not shown in the figure), configured to cache the second reply message if a second Relay-reply message sent by any DHCPv6 server is received within a preset time period and the second reply message included in the second Relay-reply message indicates that the DHCPv6 server has failed to execute the corresponding service.
[0067] Optionally, the apparatus further includes: a discarding unit (not shown in the figure) for discarding all cached second reply messages;
[0068] If the receiving unit receives a third Relay-reply message from any DHCPv6 server again, it discards the third Relay-reply message.
[0069] Optionally, the sending unit 220 is further configured to send the fourth reply message to the DHCPv6 client if the first Relay-reply message is not received after a preset time period and the locally cached fourth reply message indicates that the DHCPv6 server has not successfully executed the corresponding service.
[0070] Optionally, the service message is specifically a DHCPv6 Rebind message or a DHCPv6 Confirm message.
[0071] Therefore, using the communication device provided in this application, the DHCPv6 relay receives a service message sent by a DHCPv6 client, which is used to request the DHCPv6 server to perform the corresponding service; the DHCPv6 relay sends a Relay-forward message to each DHCPv6 server indicated by the attribute information of multiple DHCPv6 servers, and the Relay-forward message includes the service message; if a first Relay-reply message is received from any DHCPv6 server within a preset time period and the first reply message included in the first Relay-reply message indicates that the DHCPv6 server has successfully performed the corresponding service, then the DHCPv6 relay sends a first reply message to the DHCPv6 client.
[0072] Thus, in a network scenario with a DHCPv6 Relay configured, the DHCPv6 Relay blocks unsuccessful responses from multiple DHCPv6 servers from reaching the DHCPv6 client, forwarding only the successful response from a single DHCPv6 server. This prevents the DHCPv6 client from receiving either a successful or failed response simultaneously, improving the client's response acquisition efficiency and reducing the forwarding load on the DHCPv6 Relay. Furthermore, it resolves the issue where, after a DHCPv6 Relay forwards a relay-forward to multiple DHCPv6 servers, all servers respond, causing some DHCPv6 clients to be unable to process responses from multiple servers.
[0073] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 3 As shown, the system includes a processor 310, a transceiver 320, and a machine-readable storage medium 330. The machine-readable storage medium 330 stores machine-executable instructions that can be executed by the processor 310. The processor 310 is prompted by the machine-executable instructions to execute the communication method provided in the embodiments of this application. (The foregoing...) Figure 2 The communication device shown can be used as follows: Figure 3 The hardware structure of the network device shown is implemented.
[0074] The aforementioned computer-readable storage medium 330 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the computer-readable storage medium 330 may also be at least one storage device located remotely from the aforementioned processor 310.
[0075] The processor 310 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0076] In this embodiment of the application, the processor 310 reads the machine-executable instructions stored in the machine-readable storage medium 330, and is prompted by the machine-executable instructions to enable the processor 310 itself and the transceiver 320 to execute the communication method described in the foregoing embodiment of the application.
[0077] In addition, this application provides a machine-readable storage medium 330 that stores machine-executable instructions. When called and executed by the processor 310, the machine-executable instructions cause the processor 310 itself and the transceiver 320 to execute the communication method described in the aforementioned application.
[0078] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0079] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0080] For the embodiments of communication devices and machine-readable storage media, since the methods involved are basically similar to those of the aforementioned method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.
[0081] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A communication method, characterized in that, The method is applied to a DHCPv6 relay, wherein the DHCPv6 relay is configured with attribute information of multiple DHCPv6 servers, and the method includes: Receive a service message sent by a DHCPv6 client, the service message being used to request the DHCPv6 server to perform the corresponding service; Send a Relay-forward message to each of the plurality of DHCPv6 servers indicated by the attribute information of the plurality of DHCPv6 servers, the Relay-forward message including the service message; If a first Relay-reply message is received from any DHCPv6 server within a preset time period, and the first Relay-reply message includes a first reply message indicating that the DHCPv6 server has successfully executed the corresponding service, then the first reply message is sent to the DHCPv6 client. Specifically, the service message is either a DHCPv6 Rebind message or a DHCPv6 Confirm message.
2. The method according to claim 1, characterized in that, The method further includes: If a second Relay-reply message is received from any DHCPv6 server within a preset time period, and the second Relay-reply message includes a second reply message indicating that the DHCPv6 server has failed to execute the corresponding service, then the second reply message is cached.
3. The method according to claim 2, characterized in that, After sending the first reply message to the DHCPv6 client, the method further includes: Discard all cached second reply messages; If a third Relay-reply message is received again from any DHCPv6 server, the third Relay-reply message is discarded.
4. The method according to claim 2, characterized in that, The method further includes: If the first Relay-reply message is not received after a preset time period and the locally cached fourth reply message indicates that the DHCPv6 server has not successfully executed the corresponding service, then the fourth reply message is sent to the DHCPv6 client.
5. A communication device, characterized in that, The device is used in a DHCPv6 relay, wherein the DHCPv6 relay is configured with attribute information of multiple DHCPv6 servers, and the device includes: The receiving unit is used to receive service messages sent by DHCPv6 clients, the service messages being used to request the DHCPv6 server to perform corresponding services. The sending unit is configured to send a Relay-forward message to each of the plurality of DHCPv6 servers indicated by the attribute information of the plurality of DHCPv6 servers, wherein the Relay-forward message includes the service message; The sending unit is configured to send the first reply message to the DHCPv6 client if it receives a first Relay-reply message from any DHCPv6 server within a preset time period and the first reply message included in the first Relay-reply message indicates that the DHCPv6 server has successfully executed the corresponding service. Specifically, the service message is either a DHCPv6 Rebind message or a DHCPv6 Confirm message.
6. The apparatus according to claim 5, characterized in that, The device further includes: The caching unit is configured to cache the second reply message if it receives a second Relay-reply message from any DHCPv6 server within a preset time period, and the second reply message included in the second Relay-reply message indicates that the DHCPv6 server has failed to execute the corresponding service.
7. The apparatus according to claim 6, characterized in that, The device further includes: The discard unit is used to discard all cached second reply messages; If the receiving unit receives a third Relay-reply message from any DHCPv6 server again, it discards the third Relay-reply message.
8. The apparatus according to claim 6, characterized in that, The sending unit is further configured to send the fourth reply message to the DHCPv6 client if the first Relay-reply message is not received after a preset time period and the locally cached fourth reply message indicates that the DHCPv6 server has not successfully executed the corresponding service.
Citation Information
Patent Citations
Internet protocol (IP) address auto-configuration method, server device, client and communicaiton system
WO2011079786A1
Message processing method, relay device, system, and storage medium
WO2021135795A1