1. Technical Field
The present invention relates to a method of managing IP addresses, and more particularly, to a method of managing IP addresses to improve convenience using a plurality of address acquisition methods under IPv6.
2. Related Art
In the related art, a network communication device such as a personal computer performing communication via the Internet has an IP address, which is an address on the Internet, and performs communication with other devices using that IP address. As a protocol of the communication, IPv4 (Internet Protocol Version 4) has been used, but there is the problem of a lack of IP addresses, and thus IPv6 (Internet Protocol Version 6) has been proposed.
Under IPv6, the address space is drastically expanded, one device can have a plurality of IP addresses, and a plurality of methods of acquiring IP addresses are provided.
In JP-A-11-196135, it is proposed that a large number of private IP addresses are associated with a small number of global IP addresses and are converted.
However, under IPv6 described above, when the same IP address is generated by different acquisition methods and duplicated, the address which can be obtained by any method of the acquisition methods is valid and can be used, and when the address obtained by the acquisition method disappears due to the valid lifetime or the like, the same IP address disappears. That is, the same address obtained by another acquisition method also disappears, even if the reason for disappearance does not occur in the address itself.
In this case, to continue using the IP address, a re-acquisition process is necessary again, this is not efficient, nor convenient.
An advantage of some aspects of the invention is to provide a method of managing IP addresses, and to provide a method of managing IP addresses to improve convenience using a plurality of address acquisition methods under IPv6.
According to an aspect of the invention, there is provided a method of managing IP addresses in a device performing communication using the IP address, the method including: acquiring IP addresses by a plurality of methods; storing the plurality of IP addresses such that the methods are discernable when the plurality of acquired IP addresses are the same, determining an effective IP address used in the communication from the plurality of IP addresses according to a predetermined priority in the methods, and setting the IP address to be used in the communication; and determining the effective IP address according to the priority from the stored IP addresses except for the disappearing IP address when the set IP address disappears, and setting the IP address to be used in the communication.
In the method of managing IP addresses according to an aspect of the invention, the IP address may be acquired when the device is powered on.
In the method of managing IP addresses according to the aspect of the invention, the plurality of methods of acquiring the IP addresses may include a method of acquiring an IP address input by a user of the device, a method of acquiring an IP address generated by the device, a method of acquiring an IP address generated on the basis of a network address acquired from a router connected to the device, and a method of acquiring an IP address from a DHCP server connected to the device.
In the method of managing IP addresses according to the aspect of the invention, the priority of the method of acquiring the IP addresses input by the user may be the highest in the plurality of methods.
According to another aspect of the invention, there is provided a program for causing a device performing communication using an IP address to execute a process of managing the IP addresses, the process including: acquiring IP addresses by a plurality of methods; storing the plurality of IP addresses such that the methods are discernable when the plurality of acquired IP addresses are the same, determining a valid IP address used in the communication from the plurality of IP addresses according to predetermined priority in the methods, and setting the IP address to be used in the communication; and determining a valid IP address according to the priority from the stored IP addresses except for the disappearing IP address when the set IP address disappears, and setting the IP address to be used in the communication.
According to still another aspect of the invention, there is provided a network communication device performing communication using an IP address, wherein IP addresses are acquired by a plurality of methods, wherein the plurality of IP addresses are stored such that the methods are discernable when the plurality of acquired IP addresses are the same, a valid IP address used in the communication is determined from the plurality of IP addresses according to predetermined priority in the methods, and the IP address is used in the communication, and wherein the effective IP address is determined according to the priority from the stored IP addresses except for the disappearing IP address when the set IP address disappears, and the IP address is used in the communication.
Other objects and characteristics of the invention are clarified from embodiments of the invention to be described later.
The invention will be described with reference to the accompanying drawings, wherein like numbers reference like elements.
Hereinafter, embodiments of the invention will be described with reference to the drawings. However, the technical scope of the invention is not limited to the embodiments, and includes the description in Claims and the equivalents thereof.
As shown in
As shown in
The IP address management tool 11 acquires and maintains the IP address described above, which is a characteristic of the network communication device 1, and a specific process thereof will be described later. The IP address management tool 11 is configured by a program stored in the HDD and the CPU performing a process according to the program. The program is provided in a network protocol stack which is in charge of the general function of communication as middleware serving between the OS layer and the application layer, to perform a function. The IP address management tool 11 is provided with four methods to be described later, as methods of acquiring the IP addresses.
The IP address table 12 is a table storing the IP addresses acquired by the IP address management tool 11 according to the acquisition methods, and is generated when the network communication device 1 operates, and stored in the RAM.
The method (1), the method (2), the method (3), and the method (4) are an acquisition method of reading an IP address input by a user of the network communication device 1 from the NVRAM, an acquisition method of receiving an IP address automatically generated by the network communication device 1, an acquisition method of receiving an IP address generated by acquiring a network address from the router, and an acquisition method of an IP address from the DHCP server. The IP addresses acquired by four different methods may be the same, and there may be the case shown in
In the IP address management tool 11, one IP address is valid in the same plurality of IP addresses. That is, when the same IP address is acquired by the plurality of methods, the IP address acquired by any one of the methods is set as the IP address used in the communication process at that time point and a usable IP address. The set effective IP address is referred to as the current IP address 13.
The current IP address 13 is stored in the RAM, and is used for reference at the time of communication based on e-mail. When there are a large number of the same IP addresses, it is determined that the address acquired by what method is the current IP address 13, according to predetermined priority for the methods. Herein, the alignment sequence shown in
In the network communication device 1 having the configuration described above, there are characteristics in the method of managing the IP addresses, and a specific process sequence thereof will be described.
First, when the network communication device 1 is powered on (Step S1), the IP address management tool 11 performs a process of acquiring each IP address (Step S2). As described above, in the network communication device 1, the IP addresses are acquired by four acquisition methods. In the method (1), the IP address input (set) by the user is stored in the NVRAM, and thus the IP address is read and acquired. In the method (2), the network communication device 1 automatically generates the IP address, and thus the IP address is acquired. In the method (3), the network address is acquired by accessing the router, the IP address is generated on the basis thereof, and thus the IP address is acquired. In the method (4), the IP address generated by the DHCP server on access to the DHCP server is acquired. As exemplified in
Then, the IP address management tool 11 generates the IP address table 12 described above from the acquired IP address information, and stores the IP address table in the RAM (Step S3). The IP address management tool 11 determines the current IP address 13 for each of the same IP addresses according to the priority described above in the IP address table 12, and the IP address is set as the current IP address 13 in the RAM (Step S4). For example, the IP address table 12 shown in
Then, the IP address provided in the current IP address 13 is appropriately used as the valid address in the communication process between the network communication device 1 and the other device.
Then, until the network communication device 1 is instructed to be powered off (Step S5: Yes), the IP address management tool 11 checks whether or not the IP address set as the current IP address 13 disappears (Step S6).
As a result of the check, when the IP address set as the current IP address 13 does not disappear (Step S6: No), the setting of the current IP address 13 is not changed, and the process returns to Step S5.
Meanwhile, when the IP address set as the current IP address 13 disappears (Step S6: Yes), the process returns to Step S4, and the current IP address 13 is reset. The IP address disappears when the valid lifetime of the IP address for which the valid lifetime is set has elapsed, when it is eliminated by the user, or when it is eliminated by any trouble.
In the resetting of the current IP address 13, the disappearing IP address is eliminated from the generated and stored IP address table 12, and the IP address with the highest priority is set as the current IP address 13 on the basis of the IP address table 12 after the update.
In the examples shown in
After resetting is performed as described above, the updated current IP address 13 is used in the communication process.
The check for disappearance of the IP address described above and the resetting of the IP address 13 based thereon are performed until the network communication device 1 is instructed to be powered off (Step S5: Yes).
When the network communication device 1 is instructed to be powered off (Step S5: Yes), the network communication device 1 is powered off (Step S7), and the series of IP address management processes is ended.
As described above, in the network communication device 1 according to the embodiment, even in the same IP address, in different acquisition methods, in other words, in different generating origins, all the IP addresses are stored as the IP address table 12. Even when the effectively used IP address disappears, the other stored address is set to be valid, and thus the same IP address is kept. Accordingly, even when the user does not perform a reset operation for the disappearing IP address, it is possible to continuously use the IP address, and it is possible to improve efficiency and convenience.
The priority is determined for each acquisition method, and the resetting of the effective IP address may be automatically performed.
In the embodiment, the network communication device 1 is a personal computer, but the invention may be applied to a communicable device or apparatus such as a printer.
The protective scope of the invention is not limited to the embodiment, and includes the invention described in Claims and equivalents thereof.
The entire disclosure of Japanese Patent Application No. 2011-012654, filed Jan. 25, 2011 is expressly incorporated by reference herein.
Number | Date | Country | Kind |
---|---|---|---|
2011-012654 | Jan 2011 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
20060166699 | Aghvami et al. | Jul 2006 | A1 |
20080205345 | Sachs et al. | Aug 2008 | A1 |
20080297618 | Niimura | Dec 2008 | A1 |
20100332598 | Goyal et al. | Dec 2010 | A1 |
20110176531 | Rune et al. | Jul 2011 | A1 |
Number | Date | Country |
---|---|---|
11-196135 | Jul 1999 | JP |
Number | Date | Country | |
---|---|---|---|
20120191836 A1 | Jul 2012 | US |