Abstract:
There is provided with a client device connected to a network, including: a first message sender configured to send a first request message for requesting assignment of an address to communicate in the network to one or more servers on the network; a waiting unit configured to wait for an address candidate notification message including a candidate of the address to be assigned to arrive from each server for a certain period after the first request message is sent; a message reception unit configured to receive the address candidate notification message from each server within the period after the first request message is sent; and a duplication inspection unit configured to inspect whether or not the candidate of the address included in the address candidate notification message received from each sever is already assigned to an other client device, before the period elapses after the first request message is sent.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is based upon and claims the benefit of priority from the prior Japanese Patent Applications No. 2007-140631, filed on May 28, 2007; the entire contents of which are incorporated herein by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to a client device which is assigned an address from a server, a communication method of communicating with the server and a computer readable medium storing a program for communicating with the server. 
         [0004]    2. Related Art 
         [0005]    One of the features of IP (Internet Protocol) v6 which attracts attention as a next-generation Internet technology is an automatic setting function which enables an end host to access a network without any complicated setting operation. For the automatic setting, an IP address setting for a host allows for the use of a Stateless Address Configuration defined in RFC2462 or the use of Dynamic Host Configuration Protocol (DHCPv6) defined in RFC3315 or the like. 
         [0006]    DHCPv6 is a server/client type protocol and sets addresses in the form of assigning some of addresses managed by a server to hosts (client device or simply client). This address setting is required to assign unduplicated addresses to respective clients at an early stage. 
         [0007]    Incidentally, as relevant documents, there are “IETF RFC3315 Dynamic Host Configuration Protocol for IPv6 (DHCPv6)” and “IETF RFC2462 IPv6 Stateless Address Autoconfiguration”. 
       SUMMARY OF THE INVENTION 
       [0008]    According to an aspect of the present invention, there is provided with a client device which is connected to a network, comprising: 
         [0009]    a first message sender configured to send a first request message for requesting assignment of an address to communicate in the network to one or more servers on the network managing the addresses to communicate in the network; 
         [0010]    a waiting unit configured to wait for an address candidate notification message including a candidate of the address to be assigned to arrive from each server for a certain period after the first request message is sent; 
         [0011]    a message reception unit configured to receive the address candidate notification message arriving from each server within the certain period after the first request message is sent; and 
         [0012]    a duplication inspection unit configured to inspect whether or not the candidate of the address included in the address candidate notification message received from each sever is already assigned to an other client device on the network, before the certain period elapses after the first request message is sent. 
         [0013]    According to an aspect of the present invention, there is provided with a communication method performed in a client device connected to a network, comprising: 
         [0014]    sending a first request message for requesting assignment of an address to communicate in the network to one or more servers on the network managing the addresses to communicate in the network; 
         [0015]    waiting for an address candidate notification message including a candidate of the address to be assigned to arrive from each server for a certain period after the first request message is sent; 
         [0016]    receiving the address candidate notification message arriving from each server within the certain period after the first request message is sent; and 
         [0017]    inspecting whether or not the candidate of the address included in the address candidate notification message received from each sever is already assigned to an other client device on the network, before the certain period elapses after the first request message is sent. 
         [0018]    According to an aspect of the present invention, there is provided with a computer readable medium storing a computer program for causing a computer connected to a network, to execute instructions to perform the steps of: 
         [0019]    sending a first request message for requesting assignment of an address to communicate in the network to one or more servers on the network managing the addresses to communicate in the network; 
         [0020]    waiting for an address candidate notification message including a candidate of the address to be assigned to arrive from each server for a certain period after the first request message is sent; 
         [0021]    receiving the address candidate notification message arriving from each server within the certain period after the first request message is sent; and 
         [0022]    inspecting whether or not the candidate of the address included in the address candidate notification message received from each sever is already assigned to an other client device on the network, before the certain period elapses after the first request message is sent. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0023]      FIG. 1  shows the basic configuration of a network according to the embodiment of the present invention; 
           [0024]      FIG. 2  is a flowchart illustrating the operation of a host according to the; 
           [0025]      FIG. 3  shows an example of messages exchanged between the host and server in the procedure in  FIG. 2 ; 
           [0026]      FIG. 4  is a flowchart showing a typical procedure for an address setting according to a prior art; and 
           [0027]      FIG. 5  shows an example of messages exchanged between the host and server in the procedure in  FIG. 4 . 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0028]    First, an address setting based on DHCPv6 known to the inventor before conceiving the present invention will be explained. 
         [0029]    As described above, DHCPv6 is a server/client type protocol and performs address settings by assigning some of addresses managed by a server to hosts. The flowchart in  FIG. 4  shows a typical procedure in such a case. Furthermore,  FIG. 5  shows how messages are exchanged between the client and server according to this procedure in chronological order. 
         [0030]    First, the client transmits a Solicit message for a server search as a multicast packet in step S 101 . 
         [0031]    In response to this, the server writes an address scheduled to assign to the transmission source client in an IA Address option in step S 102  and sends it as an Advertise message in reply. When there are a plurality of servers which have received the multicast Solicit message, the respective servers send an Advertise message in reply.  FIG. 5  shows an example where two servers exist. 
         [0032]    In step S 103 , the client waits for the Advertise message from the server for one second (or for a certain period) and then in step S 104 , selects one of the servers which have sent the Advertise messages obtained in the meantime. The example in  FIG. 5  shows a case where of the two servers, the server located above in the figure is selected. The waiting time here actually includes a random delay within 0.1 seconds in addition to one second to avoid synchronization in operations with other clients. However, for simplicity of explanation, suppose the waiting time is simply one second. 
         [0033]    Criteria for selection of a server by a client are not defined in the protocol specification except in special cases and depend on the implementation of the client. In step S 104 , the client further sends a Request message to the selected server. Upon receiving this, the server secures one of assignable addresses held for the client and sends a Reply message including the address as an IA Address option to the client in reply. 
         [0034]    Here, the address actually assigned by the Reply message normally matches the address notified by the Advertise message. Furthermore, the Advertise and Reply messages may include two or more addresses, but for simplicity, the following explanations will assume a most common mode. That is, suppose the number of addresses included in these messages is one. 
         [0035]    Upon receiving the Reply message in response to the Request message, the client then starts duplicate address detection (DAD) defined as part of RFC2462 in step S 105 . In the duplicate address detection (DAD), the client sends a search packet to determine whether or not there exists any node using the assigned address within a link and waits for a response for a defined time (normally one second). When addresses are correctly managed, there exists normally no node using the same address and the client never receives any response. When no response is received after a lapse of a defined time (NO in S 106 , YES in S 107 ), the client can use the assigned address in step S 108 . 
         [0036]    On the other hand, when there already exists a node using this address, the node responds to the search packet of the client. This causes the client to realize that the address is duplicate (YES in S 106 ) and send a Decline message to the server informing that the assigned address cannot be used. 
         [0037]    Therefore, a time of at least two seconds is required after the address setting by DHCPv6 is started until the address can be actually used. This becomes a delay which is not negligible for such a mobile device or the like that moves between different links with relatively high frequency. 
         [0038]    Furthermore, when a plurality of servers which can assign addresses transmit an Advertise message, even in a situation in which an address assigned by a server is already used by another node, the client cannot know it until duplicate address detection is performed after the Request and Reply messages. That is, despite the situation in which the other server sending Advertise is actually preferable, there is no secure means for selecting the server at a stage at which the Advertise message is received. This results in a delay deriving from a procedure whereby duplicate addresses are detected through duplicate address detection and other servers are then queried. 
         [0039]    Hereinafter, an embodiment of the present invention will be explained in detail with reference to drawings. 
         [0040]      FIG. 1  shows the overall configuration of a network according to an embodiment of the present invention. 
         [0041]    A host (client device)  11 , a host (client device)  12 , a server  13  and a server  14  are connected together via a network  15 . The host  11  is a DHCPv6 client according to this embodiment. The server  13  and server  14  are DHCPv6 servers which assign an address to the host  11 . The host  11  communicates with a communication device (may be another host or a server which provides a service such as a Web server) on the network using the assigned address. Furthermore, suppose the host  12  exists on the same subnet as that of the host  11  and has already completed an address setting and is operating. For simplicity,  FIG. 1  assumes that these hosts and servers exist on the same subnet, but the scheme of the present invention is also applicable to a case where the server is in a remote place and is exchanging with the host via a relay device called “relay agent.” 
         [0042]      FIG. 2  is a flowchart illustrating the operation of the host  11  according to the present invention. Furthermore,  FIG. 3  shows how messages are exchanged between the client and the server according to the procedure in  FIG. 2  in chronological order. Processing in respective steps can also be realized by causing a general-purpose computer to execute a program in which operation code is written which instructs the execution of the respective steps shown in the flowchart in  FIG. 2 . Furthermore, this program can also be executed by storing it in a computer readable storage medium such as a hard disk, CD-ROM or memory card and reading the program from this storage medium. 
         [0043]    First, in a normal case, that is, a case where an address assigned to the host  11  is not a duplicate one will be explained. 
         [0044]    The host  11  sends a Solicit message according to the protocol procedure of DHCPv6 in step S 1  and waits for an Advertise message from the server. In the network shown in  FIG. 1 , the server  13  and server  14  send an Advertise message in reply. The Solicit message corresponds, for example, to a first request message. Furthermore, the processing in step S 1  corresponds to processing by a first message sender and the host  11  is provided with the first message sender. 
         [0045]    The host  11  receives the first Advertise message in step S 2 , and starts duplicate address detection (DAD) defined as part of RFC2462 on an IPv6 address included in the IA Address option in the Advertise message in step S 3 . That is, the host  11  is provided with a duplication inspection unit for inspecting whether the IPv6 address is a duplicate of addresses of other hosts without waiting for a lapse of waiting time for a reply to the Solicit message. Since a case where no duplicate exists will be considered here, a testing in step S 4  is always false (NO) and the host  11  moves to step S 6 . The Advertise message corresponds, for example, to an address candidate notification message. Furthermore, the processing in step S 2  corresponds, for example, to processing by a message reception unit and the host  11  is provided with the message reception unit. 
         [0046]    In step S 6 , whether or not a waiting time (1 second) for the reply to the Solicit message has elapsed is tested and the operation from step S 2  to step S 6  is repeated while the testing result is false (NO). In the network environment shown in  FIG. 1 , the procedure from step S 2  to step S 6  is repeated twice because the Advertise message is received from the two servers  13  and  14 . The processing in step S 6  corresponds, for example, to processing by a waiting unit and the host  11  is provided with the waiting unit. 
         [0047]    When the waiting time (1 second) for the reply to the Solicit message has elapsed, the testing result in step s 6  becomes true (YES) and the host  11  moves to step S 7 . In step S 7 , the host  11  selects any one of the server  13  and server  14 , sends a Request message and receives a Reply message from the server. In this case, there is no difference which server is selected in the implementation of the present invention. The Reply message includes the address assigned by the server. 
         [0048]    Next in step S 8 , the host  11  confirms whether the address assigned by the Reply message matches the address notified by the Advertise message. In the case of a match (YES in S 8 ), the host  11  moves to step S 10  and waits for duplicate address detection to be completed. Since the case where there is no duplicate address is considered here, the inspection procedure ends normally (the result in step S 11  becomes false (NO)), the host  11  can use the address assigned from the server in step S 12 . 
         [0049]    In the above described processing, the time after the duplicate address detection (DAD) starts in step S 3  until it is completed in step S 10  is one second (this time is predefined by a protocol). On the other hand, the time required from step S 1  to step S 3  is negligibly small because only messages with little delay are exchanged. Therefore, the host  11  according to the procedure of the present invention can complete the whole operation involving the address setting including the duplicate address detection in approximately one second. That is, the duplicate address detection can be shortened by one second compared with the normal procedure. 
         [0050]    In step S 8 , when the address included in the Reply message is different from the address notified by the Advertise message (NO in S 8 ), the host  11  moves to step S 9  and starts new duplicate address detection (DAD) on the assigned address. In this case, the mode is equivalent to the conventional one. However, the addresses included in the Reply message and Advertise message generally match in practice and a mismatch is an exceptional case. Furthermore, the time required in the procedure of the present invention is equivalent to that in the conventional mode and no additional delay is produced in this case, either. 
         [0051]    Next, a case where the address assigned to the host  11  is already used by the host  12  and duplicate will be explained. Suppose the duplicate address is A and the server  13  assigns this address. Furthermore, suppose the server  14  assigns an address B which is different from this. 
         [0052]    In the same way as the above described case, the host  11  sends a Solicit message according to the protocol procedure of DHCPv6 in step S 1  and waits for an Advertise message from the server. Upon receiving the Advertise message from the server  13  in step S 2 , the host  11  starts duplicate address detection (DAD) on the notified address A in step S 3 . Since the address A is already used by the host  12 , the host  12  responds to a search packet of the duplicate address detection sent from the host  11  and upon receiving this response, the host  11  detects the duplication (YES in S 4 ). The host  11  then reduces the priority of the server  13  which has notified this address (S 5 ). 
         [0053]    Next, the host  11  returns to step S 2 , receives an Advertise message from the server  14  and starts duplicate address detection on the address B advertised by the Advertise message in step S 3 . On the assumption that there is no duplication on the address B, the decision result in step S 4  becomes false (NO), and the host  11  waits until the waiting time (one second) for a reply to a Solicit message elapses in step S 6 . 
         [0054]    Next, the host  11  selects any one of the server  13  and server  14  in step S 7  and sends a Request message. Here, since the priority for the server  13  has been reduced in step S 6 , the host  11  selects the server  14  with higher priority and sends a Request message. The processing of selecting the server with high priority corresponds to processing by a selecting unit and the processing of sending a Request message to the selected server corresponds to processing by a second message sender and the host  11  is provided with the selecting unit and the second message sender. 
         [0055]    The procedure hereinafter is the same as the case where there is no address duplication. 
         [0056]    Furthermore, in the same way as when there is no address duplication, the time after transmission of the Solicit message in step S 1  until the address can be used in step S 12  is also shortened to approximately one second. 
         [0057]    Here, the case where the host  11  receives an Advertise message from the server  13  first has been explained, but the essential procedure and necessary time are equivalent also when a message is received from the server  14  first. 
         [0058]    As described above, according to the embodiment of the present invention, when the IP address is set using DHCPv6, the time conventionally required for duplicate address detection (DAD) can be virtually omitted and the host can use the IP address assigned from the server speedily. 
         [0059]    Furthermore, according to the embodiment of the present invention, a plurality of DHCPv6 servers assign different addresses and when some of these addresses are actually duplicate with addresses of other nodes, it is possible to detect the duplication at an early stage and preferentially select a server which assigns unduplicated addresses. As a result, this effect also has an effect of shortening the time of IP address setting by hosts as well.