JP5527233B2 - Communication device - Google Patents
Communication device Download PDFInfo
- Publication number
- JP5527233B2 JP5527233B2 JP2011015910A JP2011015910A JP5527233B2 JP 5527233 B2 JP5527233 B2 JP 5527233B2 JP 2011015910 A JP2011015910 A JP 2011015910A JP 2011015910 A JP2011015910 A JP 2011015910A JP 5527233 B2 JP5527233 B2 JP 5527233B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- communication device
- specific
- communication
- printer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本明細書によって開示される技術は、ローカルエリアネットワークを介して、外部装置と通信する通信装置に関する。 The technology disclosed in this specification relates to a communication device that communicates with an external device via a local area network.
例えば、特許文献1には、PCと複数個のプリンタとがローカルエリアネットワークに接続されているシステムが開示されている。PCは、SNMPのGETコマンドをブロードキャストすることによって、各プリンタから、各プリンタのIPアドレスを取得する。PCは、例えば、PCと異なるネットワークアドレスを含むIPアドレスを有する1個以上のプリンタを表示する。ユーザは、PCの操作部を操作して、1個以上のプリンタの中から特定のプリンタを選択すると共に、IPアドレスを入力する。PCは、ユーザによって入力されたIPアドレスを含むSNMPのSETコマンドをブロードキャストする。これにより、特定のプリンタは、特定のプリンタ自身のIPアドレスを、ユーザによって入力されたIPアドレスに変更する。この結果、特定のプリンタは、PCとのユニキャスト通信を実行可能な状態になり得る。 For example, Patent Document 1 discloses a system in which a PC and a plurality of printers are connected to a local area network. The PC acquires the IP address of each printer from each printer by broadcasting an SNMP GET command. For example, the PC displays one or more printers having an IP address including a network address different from that of the PC. The user operates the operation unit of the PC, selects a specific printer from one or more printers, and inputs an IP address. The PC broadcasts an SNMP SET command including the IP address input by the user. Accordingly, the specific printer changes the IP address of the specific printer itself to the IP address input by the user. As a result, the specific printer can be in a state where it can execute unicast communication with the PC.
特許文献1の技術では、プリンタは、PCからの指示がなければ、プリンタのIPアドレスを変更しない。即ち、プリンタは、PCとのユニキャスト通信を実行可能な状態になるために、プリンタのIPアドレスを主体的に変更しない。 In the technique of Patent Document 1, the printer does not change the IP address of the printer unless there is an instruction from the PC. That is, the printer does not change the IP address of the printer in order to be able to execute unicast communication with the PC.
本明細書では、通信装置が、外部装置とのユニキャスト通信を実行可能な状態になるために、通信装置のIPアドレスを主体的に変更し得る技術を提供する。 In the present specification, a technique is provided in which the communication device can change the IP address of the communication device in order to be able to execute unicast communication with an external device.
本明細書では、ローカルエリアネットワークを介して、特定のIPアドレスを有する外部装置と通信する通信装置を開示する。通信装置は、受信部と、判断部と、変更部と、を備える。受信部は、外部装置からブロードキャスト通信によって送信される特定の信号であって、特定のIPアドレスを含む特定の信号を受信する。判断部は、特定の信号が受信される場合に、通信装置が、通信装置自身の現在のIPアドレスである第1のIPアドレスと、特定の信号に含まれる特定のIPアドレスと、を用いたユニキャスト通信を、外部装置と実行可能であるのか否かを判断する。変更部は、通信装置がユニキャスト通信を外部装置と実行不可能であると判断される特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、第1のIPアドレスと異なる第2のIPアドレスに変更する。 The present specification discloses a communication device that communicates with an external device having a specific IP address via a local area network. The communication device includes a receiving unit, a determining unit, and a changing unit. The receiving unit receives a specific signal that is transmitted from an external device by broadcast communication and includes a specific IP address. When the specific signal is received, the determination unit uses the first IP address, which is the current IP address of the communication device itself, and the specific IP address included in the specific signal. It is determined whether unicast communication can be executed with an external device. The changing unit is configured to change the IP address of the communication device from the first IP address to the first IP address in a specific case where the communication device is determined to be unable to perform unicast communication with the external device. Change the IP address to 2.
上記の構成では、通信装置は、外部装置からブロードキャストされる特定の信号を受信する場合に、外部装置とのユニキャスト通信を実行可能であるのか否かを判断する。通信装置は、外部装置とのユニキャスト通信を実行不可能であると判断する場合に、通信装置のIPアドレスを変更する。通信装置のIPアドレスが変更されるために、通信装置と外部装置とがユニキャスト通信を実行可能な状態になり得る。しかも、通信装置は、上記の判断を実行するために、通信装置のIPアドレスを変更する必要があるのか否かを主体的に判断することができる。従って、通信装置は、通信装置のIPアドレスを変更する必要があると判断する場合(即ち、外部装置とのユニキャスト通信を実行不可能であると判断する場合)に、例えば外部装置からの指示を受けなくても、通信装置のIPアドレスを主体的に変更し得る。 In the above configuration, when receiving a specific signal broadcast from an external device, the communication device determines whether or not unicast communication with the external device can be performed. The communication device changes the IP address of the communication device when determining that the unicast communication with the external device cannot be performed. Since the IP address of the communication device is changed, the communication device and the external device can be in a state where unicast communication can be performed. Moreover, the communication device can independently determine whether or not it is necessary to change the IP address of the communication device in order to execute the above determination. Accordingly, when the communication device determines that the IP address of the communication device needs to be changed (that is, when it is determined that unicast communication with the external device cannot be performed), for example, an instruction from the external device Even without receiving, the IP address of the communication device can be changed independently.
変更部は、ユーザからの指示を受けることなく、通信装置のIPアドレスを、第1のIPアドレスから第2のIPアドレスに変更してもよい。この構成によると、通信装置は、ユーザからの指示(例えば外部装置からの指示)を受けなくても、通信装置のIPアドレスを主体的に変更し得る。 The changing unit may change the IP address of the communication device from the first IP address to the second IP address without receiving an instruction from the user. According to this configuration, the communication device can independently change the IP address of the communication device without receiving an instruction from the user (for example, an instruction from an external device).
外部装置とのユニキャスト通信を実行可能な適切なIPアドレスを通信装置に設定するために、以下の(A)〜(E)のいずれかの手法を採用してもよい。 In order to set an appropriate IP address capable of performing unicast communication with an external device in the communication device, any of the following methods (A) to (E) may be employed.
(A)通信装置は、ローカルエリアネットワークに接続される各デバイスにIPアドレスを割り当てるIPアドレス割当サーバから、第2のIPアドレスを取得する取得部をさらに備えていてもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、取得済みの第2のIPアドレスに変更してもよい。 (A) The communication apparatus may further include an acquisition unit that acquires a second IP address from an IP address assignment server that assigns an IP address to each device connected to the local area network. The changing unit may change the IP address of the communication device from the first IP address to the acquired second IP address in a specific case.
(B)通信装置は、特定のIPアドレスの値が、IPアドレスを生成するための所定のアルゴリズムによって生成され得るIPアドレスの値の範囲に含まれる場合に、上記の所定のアルゴリズムを用いて、第2のIPアドレスを生成する第1の生成部をさらに備えていてもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、生成済みの第2のIPアドレスに変更してもよい。 (B) When the value of a specific IP address is included in the range of IP address values that can be generated by a predetermined algorithm for generating an IP address, the communication device uses the predetermined algorithm, You may further provide the 1st production | generation part which produces | generates a 2nd IP address. The changing unit may change the IP address of the communication device from the first IP address to the generated second IP address in a specific case.
(C)通信装置は、特定のIPアドレスの全部の値のうちの一部を変更することによって、特定のIPアドレスから第2のIPアドレスを生成する第2の生成部をさらに備えていてもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、生成済みの第2のIPアドレスに変更してもよい。 (C) The communication apparatus may further include a second generation unit that generates a second IP address from the specific IP address by changing a part of all values of the specific IP address. Good. The changing unit may change the IP address of the communication device from the first IP address to the generated second IP address in a specific case.
(D)通信装置は、通信装置の過去のIPアドレスである第3のIPアドレスを得るために利用されたIPアドレス設定手法を示す手法情報を格納するための手法メモリをさらに備えていてもよい。第3のIPアドレスは、外部装置とのユニキャスト通信を実行可能であったIPアドレスであってもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、手法メモリ内の手法情報が示すIPアドレス設定手法を利用して得られる第2のIPアドレスに変更してもよい。 (D) The communication apparatus may further include a technique memory for storing technique information indicating an IP address setting technique used for obtaining a third IP address that is a past IP address of the communication apparatus. . The third IP address may be an IP address that could execute unicast communication with an external device. In a specific case, the changing unit changes the IP address of the communication device from the first IP address to the second IP address obtained by using the IP address setting technique indicated by the technique information in the technique memory. Also good.
(E)通信装置は、通信装置の過去のIPアドレスである第2のIPアドレスを格納するためのアドレスメモリをさらに備えていてもよい。第2のIPアドレスは、外部装置とのユニキャスト通信を実行可能であったIPアドレスであってもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、アドレスメモリ内の第2のIPアドレスに変更してもよい。 (E) The communication device may further include an address memory for storing a second IP address that is a past IP address of the communication device. The second IP address may be an IP address that could execute unicast communication with an external device. In a specific case, the changing unit may change the IP address of the communication device from the first IP address to the second IP address in the address memory.
通信装置は、第2のIPアドレスが、ローカルエリアネットワークに接続されている他のデバイスのIPアドレスであるのか否かを確認する確認部をさらに備えていてもよい。変更部は、特定の場合において、第2のIPアドレスが他のデバイスのIPアドレスでないと確認される場合に、通信装置のIPアドレスを、第1のIPアドレスから、第2のIPアドレスに変更し、特定の場合において、第2のIPアドレスが他のデバイスのIPアドレスであると確認される場合に、通信装置のIPアドレスを、第1のIPアドレスから、第1及び第2のIPアドレスと異なるIPアドレスに変更してもよい。この構成によると、通信装置と他のデバイスとの両方に同じIPアドレスが設定されることを抑制することができる。 The communication apparatus may further include a confirmation unit that confirms whether or not the second IP address is an IP address of another device connected to the local area network. The changing unit changes the IP address of the communication device from the first IP address to the second IP address when it is confirmed that the second IP address is not the IP address of another device in a specific case. In a specific case, when it is confirmed that the second IP address is an IP address of another device, the IP address of the communication device is changed from the first IP address to the first and second IP addresses. It may be changed to a different IP address. According to this configuration, it is possible to prevent the same IP address from being set in both the communication apparatus and other devices.
判断部は、特定のIPアドレスが送信先として含まれる第1の信号であって、第1のIPアドレスが送信元として含まれる第1の信号を送信して、第1の信号の応答信号を受信した場合に、通信装置がユニキャスト通信を外部装置と実行可能であると判断し、第1の信号を送信して、第1の信号の応答信号を受信しなかった場合に、通信装置がユニキャスト通信を外部装置と実行不可能であると判断してもよい。この構成によると、通信装置は、外部装置とのユニキャスト通信を実行可能であるのか否かについて、適切な判断を実行し得る。 The determination unit transmits a first signal that includes a specific IP address as a transmission destination and includes the first IP address as a transmission source, and returns a response signal of the first signal. If it is received, the communication device determines that the unicast communication can be performed with the external device, transmits the first signal, and does not receive the response signal of the first signal. It may be determined that unicast communication cannot be performed with an external device. According to this configuration, the communication device can make an appropriate determination as to whether or not unicast communication with an external device can be performed.
判断部は、第1のIPアドレスのネットワークアドレス部の値と、特定のIPアドレスのネットワークアドレス部の値と、が一致する場合に、通信装置がユニキャスト通信を外部装置と実行可能であると判断し、第1のIPアドレスのネットワークアドレス部の値と、特定のIPアドレスのネットワークアドレス部の値と、が一致しない場合に、通信装置がユニキャスト通信を外部装置と実行不可能であると判断してもよい。この構成によると、通信装置は、外部装置とのユニキャスト通信を実行可能であるのか否かについて、適切な判断を実行し得る。 The determination unit determines that the communication device can execute unicast communication with an external device when the value of the network address portion of the first IP address matches the value of the network address portion of the specific IP address. If the network address portion value of the first IP address does not match the network address portion value of the specific IP address, the communication device cannot execute unicast communication with the external device. You may judge. According to this configuration, the communication device can make an appropriate determination as to whether or not unicast communication with an external device can be performed.
通信装置は、通信装置のIPアドレスが、第1のIPアドレスから第2のIPアドレスに変更された後に、特定のIPアドレスが送信先として含まれる第2の信号であって、第2のIPアドレスが送信元として含まれる第2の信号を送信する送信部をさらに備えていてもよい。この構成によると、通信装置は、特定のIPアドレスと、第2のIPアドレスと、を用いたユニキャスト通信を、外部装置と実行し得る。 The communication device is a second signal including a specific IP address as a transmission destination after the IP address of the communication device is changed from the first IP address to the second IP address, and the second IP You may further provide the transmission part which transmits the 2nd signal in which an address is contained as a transmission source. According to this configuration, the communication device can execute unicast communication using the specific IP address and the second IP address with the external device.
なお、上記の通信装置を実現するための制御方法、コンピュータプログラム、及び、当該コンピュータプログラムを格納するコンピュータ読取可能記録媒体も、新規で有用である。 Note that a control method, a computer program, and a computer-readable recording medium storing the computer program for realizing the communication device are also novel and useful.
(実施例)
(システムの構成)
図1に示されるように、通信システム2は、プリンタ10(PC80の周辺機器)と、PC80と、DHCP(Dynamic Host Configuration Protocol)サーバ90と、を備える。各デバイス10,80,90は、LAN4に接続されている。各デバイス10,80,90は、LAN4を介して、相互に通信可能である。
(Example)
(System configuration)
As shown in FIG. 1, the communication system 2 includes a printer 10 (peripheral device of the PC 80), the PC 80, and a DHCP (Dynamic Host Configuration Protocol)
(プリンタ10の構成)
プリンタ10は、操作部12と、表示部14と、印刷実行部16と、ネットワークインターフェイス18と、制御部20と、を備える。上記の各部12〜20は、バス線19に接続されている。操作部12は、複数のキーによって構成される。ユーザは、操作部12を操作することによって、様々な指示をプリンタ10に入力することができる。表示部14は、様々な情報を表示するためのディスプレイである。印刷実行部16は、インクジェットヘッド方式、レーザ方式等の印刷機構を備え、制御部20からの指示に従って印刷を実行する。ネットワークインターフェイス18は、LAN4に接続されている。
(Configuration of Printer 10)
The
制御部20は、CPU22とメモリ30とを備える。CPU22は、メモリ30に格納されているプログラム(図示省略)に従って、様々な処理を実行する。CPU22が当該プログラムに従って処理を実行することによって、各部50〜64の機能が実現される。メモリ30は、不揮発性メモリ、揮発性メモリ等によって構成される。メモリ30は、設定記憶領域32と、成功手法記憶領域34と、成功IP記憶領域36と、受信IP記憶領域38と、を備える。
The
設定記憶領域32は、プリンタ10の現在のIPアドレスと、プリンタ10の現在のサブネットマスクと、プリンタ10の現在のIPアドレス設定手法を示す手法情報と、を記憶する。なお、詳しくは後述するが、本実施例では、IPアドレス設定手法として、5種類の手法(「STATIC」、「DHCP」、「BOOTP(Bootstrap Protocol)」、「RARP(Reverse Address Resolution Protocol)」、及び、「APIPA(Automatic Private IP Addressing)」)が存在する。
The setting
成功手法記憶領域34は、PC80とのユニキャスト通信を実行可能であったプリンタ10の過去のIPアドレスを得るために利用されたIPアドレス設定手法(以下では「成功手法」と呼ぶ)を示す手法情報を記憶する。本実施例では、成功手法記憶領域34は、最新の1個の成功手法を示す手法情報を記憶する。ただし、変形例では、成功手法記憶領域34は、複数個の成功手法を示す複数個の手法情報を記憶可能であってもよい。
The successful
成功IP記憶領域36は、PC80とのユニキャスト通信を実行可能であったプリンタ10の過去のIPアドレス(以下では「成功IPアドレス」と呼ぶ)を記憶する。特に、成功IP記憶領域36は、「STATIC」に従って設定された成功IPアドレスを記憶する。成功IP記憶領域36は、最新の1個の成功IPアドレスを記憶する。ただし、変形例では、成功IP記憶領域36は、複数個の成功IPアドレスを記憶可能であってもよい。なお、成功IP記憶領域36は、成功IPアドレスと同時に利用されていたプリンタ10の過去のサブネットマスクも記憶する。
The successful
受信IP記憶領域38は、プリンタ10が過去に受信したパケットに含まれる送信元IPアドレスを記憶する。受信IP記憶領域38が記憶可能なIPアドレスの数は、予め決められている(以下では「所定数」と呼ぶ)。制御部20は、受信IP記憶領域38に上記の所定数のIPアドレスが記憶されている状態で新たなパケットを受信すると、受信IP記憶領域38に記憶されている最も古いIPアドレスを削除し、当該新たなパケットに含まれる送信元IPアドレスを受信IP記憶領域38に記憶させる。
The reception
(PC80の構成)
PC80は、図示省略の操作部、表示部、制御部等を備える。PC80には、プリンタ10のためのプリンタドライバがインストールされている。プリンタドライバがPC80にインストールされる際に、プリンタポートが生成される。プリンタポートでは、プリンタ10のノード名が指定されている。ユーザは、PC80の操作部を操作して、印刷対象のデータ(以下では「印刷データ」と呼ぶ)を選択することができる。この場合、PC80の制御部は、印刷データをプリンタ10で印刷させるための処理(後述する)を実行する。
(Configuration of PC80)
The
(DHCPサーバ90の構成)
DHCPサーバ90は、LAN4に接続されているデバイス(例えば、プリンタ10、PC80等)からの要求に応じて、上記のデバイスにIPアドレス及びサブネットマスクを割り当てる。例えば、プリンタ10のIPアドレス設定手法が「DHCP」である場合には、プリンタ10の制御部20は、IPアドレスの割り当てを要求するコマンドをDHCPサーバ90に送信する。この場合、DHCPサーバ90は、予め決められているIPアドレスの範囲内から選択されるIPアドレスと、予め決められているサブネットマスクと、をプリンタ10に割り当てる(送信する)。これにより、プリンタ10の制御部20は、DHCPサーバ90からIPアドレス及びサブネットマスクを取得して、プリンタ10の設定値として記憶することができる(即ち設定記憶領域32に記憶させることができる)。同様に、PC80の制御部は、DHCPサーバ90からIPアドレス及びサブネットマスクを取得して、PC80の設定値として記憶することができる。
(Configuration of DHCP server 90)
The
(プリンタ10のIPアドレス設定手法)
上述したように、プリンタ10のIPアドレス設定手法として、「STATIC」、「DHCP」、「BOOTP」、「RARP」、及び、「APIPA」が存在する。ユーザは、プリンタ10の操作部12を操作することによって、上記の5種類のIPアドレス設定手法の中から、1種類のIPアドレス設定手法を選択する。この場合、制御部20は、ユーザによって選択されたIPアドレス設定手法を示す手法情報(例えば、「STATIC」が選択された場合には、「STATIC」を示す情報)を、設定記憶領域32に記憶させる。
(IP address setting method of the printer 10)
As described above, “STATIC”, “DHCP”, “BOOTP”, “RARP”, and “APIPA” exist as IP address setting methods for the
(STATIC)
ユーザは、「STATIC」を選択する場合に、さらに、操作部12を操作して、プリンタ10に設定されるべきIPアドレス及びサブネットマスクをプリンタ10に入力する。制御部20は、ユーザによって入力されたIPアドレス及びサブネットマスクを、プリンタ10の設定値として記憶する(即ち設定記憶領域32に記憶させる)。
(STATIC)
When selecting “STATIC”, the user further operates the
(DHCP)
「DHCP」が選択される場合には、制御部20は、IPアドレスの割り当てを要求するコマンドをDHCPサーバ90に送信して、DHCPサーバ90からIPアドレス及びサブネットマスクを取得する。プリンタ10は、DHCPサーバ90から取得されるIPアドレス及びサブネットマスクを、プリンタ10の設定値として記憶する。
(DHCP)
When “DHCP” is selected, the
(BOOTP)
「BOOTP」が選択される場合には、制御部20は、IPアドレスの割り当てを要求するコマンドをBOOTPサーバ(図示省略)に送信して、BOOTPサーバからIPアドレス及びサブネットマスクを取得する。「BOOTP」は、コマンドの送信先がBOOTPサーバである点を除くと、「DHCP」と同様である。
(BOOTP)
When “BOOTP” is selected, the
(RARP)
ユーザは、「RARP」を選択する場合に、RARPサーバ(図示省略)の操作部を操作して、プリンタ10に設定されるべきIPアドレスと、プリンタ10に設定されるべきサブネットマスクと、プリンタ10のMACアドレスと、が対応付けられている情報を、RARPサーバに登録する。プリンタ10は、RARPサーバに自己のMACアドレスを含むコマンドを送信する。RARPサーバは、コマンドに含まれるMACアドレスに対応づけられているIPアドレス及びサブネットマスクを、プリンタ10に送信する。これにより、プリンタ10は、RARPサーバからIPアドレスを取得する。プリンタ10は、RARPサーバから取得されるIPアドレス及びサブネットマスクを、プリンタ10の設定値として記憶する。
(RARP)
When the user selects “RARP”, the user operates an operation unit of a RARP server (not shown) to set an IP address to be set in the
(APIPA)
「APIPA」が選択される場合には、制御部20は、APIPAに従ってIPアドレス及びサブネットマスクを生成して、プリンタ10の設定値として記憶する。なお、APIPAで生成され得るIPアドレスの範囲は、予め決められている。具体的には、「169.254.0.0」〜「169.254.255.255」の範囲である。
(APIPA)
When “APIPA” is selected, the
なお、「STATIC」及び「RARP」では、ユーザが、IPアドレス設定手法を変更したり、IPアドレスを変更したりしない限り、プリンタ10のIPアドレスは変化しない。従って、「STATIC」及び「RARP」は、ユーザによって指定される静的なIPアドレスをプリンタ10に設定するためのIPアドレス設定手法である、と言える。なお、「APIPA」も、静的なIPアドレスをプリンタ10に設定するためのIPアドレス設定手法である、と言える。これに対し、「DHCP」及び「BOOTP」では、プリンタ10の電源がONされる毎に、DHCPサーバ90からプリンタ10に新たなIPアドレスが割り当てられる。従って、「DHCP」及び「BOOTP」は、動的なIPアドレスをプリンタ10に設定するためのIPアドレス設定手法である、と言える。
In “STATIC” and “RARP”, the IP address of the
(メイン処理(図2))
続いて、プリンタ10が実行する処理について説明する。上述したように、PC80のユーザは、PC80の操作部を操作して、印刷データを選択することができる。この場合、PC80の制御部は、NetBIOS(Network Basic Input Output System)の一手法を用いて、プリンタ10のIPアドレスを取得することを試行する(即ち名前解決を実行する)。なお、これは、DNS(Domain Name System)サーバを用いた名前解決とは異なる手法である。具体的に言うと、PC80の制御部は、プリンタポートで指定されているプリンタ10のノード名を含む名前解決パケットを、ブロードキャストする。即ち、名前解決パケットでは、送信先IPアドレスが不特定である。なお、名前解決パケットは、送信元IPアドレスとして、PC80の現在のIPアドレスを含む。
(Main processing (Fig. 2))
Next, processing executed by the
プリンタ10の受信部50(図1参照)は、PC80からブロードキャストされる名前解決パケットを受信する。この場合、判断部52(図1参照)は、名前解決パケットに含まれるノード名がプリンタ10のノード名であるのか否かを判断する。判断部52は、名前解決パケットに含まれるノード名がプリンタ10のノード名である場合に、図2のS10でYESと判断して、S12に進む。一方において、判断部52は、名前解決パケットに含まれるノード名がプリンタ10のノード名でない場合に、図2のS10でNOと判断する。
The receiving unit 50 (see FIG. 1) of the
S12では、判断部52は、PINGパケットを送信する。このPINGパケットは、送信先IPアドレスとして、PC80の現在のIPアドレスを含み、送信元IPアドレスとして、プリンタ10の現在のIPアドレス(即ち設定記憶領域32に現在記憶されているIPアドレス)を含む。
In S12, the
次いで、S14において、判断部52は、S12で送信されたPINGパケットの応答パケットを受信することを監視する。なお、詳しくは後述するが、PINGパケットの応答パケットが受信される場合は、プリンタ10がPC80とユニキャスト通信を実行可能であることを意味し、PINGパケットの応答パケットが受信されない場合は、プリンタ10がPC80とユニキャスト通信を実行不可能であることを意味する。判断部52は、PINGの応答パケットを受信することを監視することによって、プリンタ10がPC80とユニキャスト通信を実行可能であるのか否かについて、適切な判断を実行することができる。
Next, in S14, the
判断部52は、応答パケットを受信する場合(S14でYESの場合)に、S16〜S20をスキップして、S22に進む。一方において、判断部52は、S12でPINGパケットを送信してから所定時間が経過しても、応答パケットを受信しない場合に、S14でNOと判断してS16に進む。
When receiving a response packet (YES in S14), the
なお、上述したように、S14でYESの場合は、プリンタ10がPC80とユニキャスト通信を実行可能であることを意味する。従って、フローチャート内の処理を図示省略しているが、S14でYESの場合には、制御部20は、設定記憶領域32に現在記憶されている手法情報を、成功手法記憶領域34に記憶させる。また、設定記憶領域32に現在記憶されている手法情報が「STATIC」を示す場合には、制御部20は、さらに、設定記憶領域32に現在記憶されているIPアドレス及びサブネットマスクを、成功IP記憶領域36に記憶させる。
Note that, as described above, if YES in S14, it means that the
S16では、制御部20は、IPアドレス変更処理(図3参照)を実行する。次いで、S18では、制御部20は、S16のIPアドレス変更処理でIPアドレスが変更されたのか否かを判断する。制御部20は、IPアドレスが変更されたと判断する場合(S18でYESの場合)に、S22に進む。一方において、制御部20は、IPアドレスが変更されなかったと判断する場合(S18でNOの場合)、即ち、後述の図3のS66で元の各設定値に戻された場合に、S20に進む。
In S16, the
S20では、制御部20は、IPアドレス変更処理が実行されたが、PC80とのユニキャスト通信を実行可能なIPアドレスに変更することができなかったことを示すメッセージをユーザに通知する。制御部20は、プリンタ10の表示部14にメッセージを表示させてもよいし、予め決められているデバイスにメッセージを送信してもよい(例えば電子メールを用いて送信してもよい)。S20を終えると、図2の処理が終了する。
In S20, the
S22では、送信部64(図1参照)は、S10で受信された名前解決パケットの応答パケットを送信する。この応答パケットは、送信先IPアドレスとして、PC80の現在のIPアドレスを含み、送信元IPアドレスとして、プリンタ10の現在のIPアドレス(例えば、S16のIPアドレス変更処理が実行された場合には、変更後のIPアドレス)を含む。PC80は、名前解決パケットの応答パケットを受信し、この結果、プリンタ10のIPアドレスを取得することができる(即ち名前解決が成功する)。
In S22, the transmission unit 64 (see FIG. 1) transmits the response packet for the name resolution packet received in S10. This response packet includes the current IP address of the
次いで、S24では、制御部20は、S16のIPアドレス変更処理でIPアドレスが変更されたのか否かを判断する。制御部20は、IPアドレスが変更されたと判断する場合(S24でYESの場合)に、S26に進む。一方において、制御部20は、IPアドレスが変更されなかったと判断する場合(S24でNOの場合)に、S26をスキップして、図2の処理を終了する。
Next, in S24, the
S26では、制御部20は、IPアドレス変更処理によってIPアドレスが変更されたことを示すメッセージをユーザに通知する。メッセージは、変更前のIPアドレスと、変更後のIPアドレスと、を含む。また、IPアドレス設定手法も変更された場合には、メッセージは、さらに、変更前のIPアドレス設定手法と、変更後のIPアドレス設定手法と、を含んでいてもよい。また、サブネットマスクも変更された場合には、メッセージは、さらに、変更前のサブネットマスクと、変更後のサブネットマスクと、を含んでいてもよい。なお、メッセージの通知先は、上記のS20と同様である。S26を終えると、図2の処理が終了する。
In S26, the
(IPアドレス変更処理)
続いて、図2のS16で実行されるIPアドレス変更処理の内容について、詳しく説明する。
(IP address change processing)
Next, the details of the IP address changing process executed in S16 of FIG. 2 will be described in detail.
(DHCPの利用)
図3に示されるように、S40において、変更部54(図1参照)は、設定記憶領域32に現在記憶されている手法情報を参照して、プリンタ10の現在のIPアドレス設定手法が「STATIC」であるのか否かを判断する。プリンタ10の現在のIPアドレス設定手法が「STATIC」である場合(S40でYESの場合)には、S42に進み、プリンタ10の現在のIPアドレス設定手法が「STATIC」でない場合(S40でNOの場合)には、S48に進む。
(Use of DHCP)
As shown in FIG. 3, in S <b> 40, the changing unit 54 (see FIG. 1) refers to the technique information currently stored in the setting
S42では、変更部54は、設定記憶領域32内の手法情報を、「STATIC」を示す手法情報から、「DHCP」を示す手法情報に変更する。次いで、S44において、取得部56(図1参照)は、IPアドレスの割り当てを要求するコマンドをDHCPサーバ90に送信して、DHCPサーバ90からIPアドレス及びサブネットマスクを取得する。次いで、S46において、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、S44で取得されたIPアドレス及びサブネットマスクに変更する。この構成によると、PC80とのユニキャスト通信を実行可能な適切なIPアドレスを、プリンタ10に新たに設定し得る。S46を終えると、S60に進む。
In S <b> 42, the changing
(APIPAの利用)
S48では、変更部54は、PC80の現在のIPアドレスが、APIPAで生成され得るIPアドレスの範囲、即ち、「169.254.0.0」〜「169.254.255.255」に含まれるのか否かを判断する。PC80の現在のIPアドレスが上記の範囲に含まれる場合(S48でYESの場合)には、S50に進み、PC80の現在のIPアドレスが上記の範囲に含まれない場合(S48でNOの場合)には、S56に進む。
(Use of APIPA)
In S48, the changing
S50では、変更部54は、設定記憶領域32内の手法情報を、「APIPA」を示す手法情報に変更する。なお、S50が実行される時点において、設定記憶領域32内の手法情報が、「APIPA」を示す手法情報である場合には、S50がスキップされる。次いで、S52において、第1の生成部58(図1参照)は、APIPAのアルゴリズムを用いて、IPアドレスを生成する。即ち、第1の生成部58は、「169.254.0.0」〜「169.254.255.255」の中から、1個のIPアドレスを選択することによって、IPアドレスを生成する。なお、S52では、さらに、第1の生成部58は、APIPAで予め決められているサブネットマスク「255.255.0.0」を生成する。次いで、S54において、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、S52で生成されたIPアドレス及びサブネットマスクに変更する。この構成によると、PC80とのユニキャスト通信を実行可能な適切なIPアドレスを、プリンタ10に新たに設定し得る。S54を終えると、S60に進む。
In S50, the changing
(成功手法の利用)
S56では、変更部54は、成功手法を示す手法情報(以下では「成功手法情報」と呼ぶ)が成功手法記憶領域34に記憶されているのか否かを判断する。成功手法情報が成功手法記憶領域34に記憶されている場合(S56でYESの場合)には、S58に進み、成功手法情報が成功手法記憶領域34に記憶されていない場合(S56でNOの場合)には、図4のS90に進む。
(Use of successful methods)
In S <b> 56, the changing
S58では、制御部20は、成功手法処理を実行する。図4に示されるように、成功手法処理では、S80において、変更部54は、成功手法情報が示す成功手法が「STATIC」であるのか否かを判断する。成功手法が「STATIC」である場合(S80でYESの場合)には、S82に進み、成功手法が「STATIC」でない場合(S80でNOの場合)には、S86に進む。
In S58, the
成功手法が「STATIC」である場合には、通常、成功IP記憶領域36に成功IPアドレス及びサブネットマスクが記憶されている。S82では、確認部62(図1参照)は、成功IP記憶領域36に記憶されている成功IPアドレスを含むARPパケットをブロードキャストする。
When the success method is “STATIC”, the success IP address and the subnet mask are usually stored in the success
次いで、S84において、確認部62は、ARPパケットの応答パケットを受信することを監視する。例えば、ARPパケットに含まれる成功IPアドレスが、LAN4に接続されている他のデバイスに現在設定されている場合には、当該他のデバイスは、ARPパケットの応答パケットを送信する。この場合、確認部62は、ARPパケットの応答パケットを受信して、S84でYESと判断し、S90に進む。一方において、ARPパケットに含まれる成功IPアドレスが、LAN4に接続されているいずれのデバイスにも現在設定されていない場合には、確認部62は、ARPパケットの応答パケットを受信せず、S84でNOと判断し、S86に進む。S82及びS84でARPパケットが利用されるために、他のデバイスのIPアドレスと同じIPアドレスが、プリンタ10に設定されるのを抑制することができる。
Next, in S84, the
S86では、変更部54は、成功手法に対応するIPアドレスを取得可能であるのか否かを判断する。例えば、S84でNOの場合に実行されるS88では、成功手法が「STATIC」であり、成功IPアドレス及びサブネットマスクが成功IP記憶領域36に記憶されている。従って、この場合、変更部54は、成功手法に対応するIPアドレス(即ち成功IPアドレス)を取得可能であるために、S86でYESと判断して、S88に進む。
In S86, the changing
また、S80でNOと判断される場合には、成功手法は、「DCHP」、「BOOTP」、「RARP」、及び、「APIPA」のいずれかである。例えば、成功手法が「DHCP」又は「BOOTP」である場合には、S86において、取得部56は、IPアドレスの割り当てを要求するコマンドをDHCPサーバ90又はBOOTPサーバに送信して、IPアドレス及びサブネットマスクを取得することを試行する。また、例えば、成功手法が「RARP」である場合には、変更部54は、プリンタ10のMACアドレスを含むコマンドをRARPサーバに送信して、IPアドレス及びサブネットマスクを取得することを試行する。変更部54は、上記の試行が成功した場合(即ちコマンドの送信先のサーバからIPアドレス及びサブネットマスクが取得された場合)に、S86でYESと判断して、S88に進み、上記の試行が成功しなかった場合に、S86でNOと判断して、S90に進む。なお、例えば、成功手法が「APIPA」である場合には、S86において、第1の生成部58は、APIPAのアルゴリズムを用いて、IPアドレスを生成する。この場合、変更部54は、成功手法に対応するIPアドレスを取得可能であるために、S86でYESと判断して、S88に進む。
If NO is determined in S80, the successful technique is any one of “DCHP”, “BOOTP”, “RARP”, and “APIPA”. For example, if the successful technique is “DHCP” or “BOOTP”, in S86, the
S88では、変更部54は、設定記憶領域32内の手法情報を、成功手法記憶領域34に記憶されている成功手法情報に変更する。なお、S88が実行される時点において、設定記憶領域32内の手法情報と、成功手法情報と、が一致する場合には、S88がスキップされる。S88を終えると、S98に進む。
In S88, the changing
S90では、第2の生成部60(図1参照)は、PC80の現在のIPアドレスの一部の値を変更することによって、候補のIPアドレスを生成する。なお、第2の生成部60は、受信IP記憶領域38に記憶されている複数のIPアドレスのいずれにも一致しない候補のIPアドレスを生成する。S90の具体例として、以下の(第1の例)及び(第2の例)を挙げることができる。
In S90, the second generation unit 60 (see FIG. 1) generates a candidate IP address by changing a part of the value of the current IP address of the
(S90の具体例:第1の例)
例えば、プリンタ10の現在のサブネットマスクが、先頭の16ビットをマスクするものである場合(即ち「255.255.0.0」である場合)には、第2の生成部60は、PC80の現在のサブネットマスクが、先頭の24ビットをマスクするものであると仮定する(即ち仮のサブネットマスク=「255.255.255.0」)。次いで、第2の生成部60は、PC80の現在のIPアドレス(例えば「192.168.1.2」)と、仮のサブネットマスク(例えば「255.255.255.0」)と、を用いて、ネットワークアドレス部の値(例えば「192.168.1」)を決定する。次いで、第2の生成部60は、PC80の現在のIPアドレスに含まれる最後の8ビットの値(例えば「2」)と異なる値(例えば「3」)を、候補の値として決定する。次いで、第2の生成部60は、ネットワークアドレス部の値(例えば「192.168.1」)と、候補の値(例えば「3」)と、を用いて(即ち論理和を算出して)、候補のIPアドレス(例えば「192.168.1.3」)を生成する。
(Specific example of S90: first example)
For example, if the current subnet mask of the
(S90の具体例:第2の例)
例えば、プリンタ10の現在のサブネットマスクが、先頭の24ビットをマスクするものである場合(即ち「255.255.255.0」である場合)には、第2の生成部60は、PC80の現在のサブネットマスクが、先頭の28ビットをマスクするものであると仮定する(即ち仮のサブネットマスク=「255.255.255.240」と仮定する)。後の処理は、上記の第1の例と同様である。
(Specific example of S90: second example)
For example, if the current subnet mask of the
上記のS90の処理は、以下のように表現することができる。即ち、第2の生成部60は、PC80の現在のIPアドレスのうちの第1の部分(第1の例では先頭の24ビット、第2の例では先頭の28ビット)をマスクして、PC80の現在のIPアドレスのうちの第1の部分と異なる第2の部分の値を変更することによって、候補のIPアドレスを生成する。第1の部分の桁数は、プリンタ10の現在のサブネットマスクのマスク部分の桁数(第1の例では先頭の16ビット、第2の例では先頭の24ビット)よりも大きい。
The process of S90 can be expressed as follows. That is, the
S90を終えると、S92において、確認部62は、S90で生成された候補のIPアドレスを含むARPパケットをブロードキャストする。次いで、S94において、確認部62は、ARPパケットの応答パケットを受信することを監視する。ARPパケットの応答パケットが受信される場合(S94でYESの場合)は、他のデバイスに候補のIPアドレスが現在設定されていることを意味する。従って、第2の生成部60は、S90において、前回の候補のIPアドレスと異なる新たな候補のIPアドレスを再び生成する。一方において、ARPパケットの応答パケットが受信されない場合(S94でNOの場合)は、他のデバイスに候補のIPアドレスが現在設定されていないことを意味する。この場合、S96に進む。S92及びS94でARPパケットが利用されるために、他のデバイスのIPアドレスと同じIPアドレスが、プリンタ10に設定されるのを抑制することができる。
When S90 ends, in S92, the
S96では、変更部54は、設定記憶領域32内の手法情報を、「STATIC」を示す手法情報に変更する。なお、S96が実行される時点において、設定記憶領域32内の手法情報が、「STATIC」を示す手法情報である場合には、S96がスキップされる。S96を終えると、S98に進む。
In S96, the changing
S98では、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを変更する。例えば、S84でNOの場合に実行されるS98では、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、成功IP記憶領域36に記憶されている成功IPアドレス及びサブネットマクスに変更する。また、S80でNOと判断され、かつ、S86でYESと判断される場合に実行されるS98では、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、S86で取得されたIPアドレス及びサブネットマクスに変更する。また、S96を経て実行されるS98では、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、S90で生成された候補のIPアドレス及び仮のサブネットマスクに変更する。この構成によると、PC80とのユニキャスト通信を実行可能な適切なIPアドレスを、プリンタ10に新たに設定し得る。S98を終えると、成功手法処理が終了する。
In S98, the changing
(図3のS60以降の処理)
成功手法処理が終了すると、図3のS60に進む。S60では、制御部20は、PINGパケットを送信する。このPINGパケットは、送信先IPアドレスとして、PC80の現在のIPアドレスを含み、送信元IPアドレスとして、プリンタ10の変更後のIPアドレス(即ち設定記憶領域32に現在記憶されているIPアドレス)を含む。
(Processing after S60 in FIG. 3)
When the successful technique process ends, the process proceeds to S60 of FIG. In S60, the
次いで、S62において、制御部20は、S60で送信されたPINGパケットの応答パケットを受信すること監視する。制御部20は、応答パケットを受信する場合(S62でYESの場合)に、S64及びS66をスキップして、図3の処理を終了する。一方において、制御部20は、S60でPINGパケットを送信してから所定時間が経過しても、応答パケットを受信しない場合に、S62でNOと判断してS64に進む。
Next, in S62, the
S64では、制御部20は、設定記憶領域32に記憶されているIPアドレスが変更された回数(以下では「リトライ回数」と呼ぶ)が、所定値に達したのか否かを判断する。、制御部20は、リトライ回数が所定値に達していない場合(S64でNOの場合)に、S40に戻り、リトライ回数が所定値に達した場合(S64でYESの場合)に、S66に進む。S66では、変更部54は、設定記憶領域32内の各設定値(IPアドレス、サブネットマスク、IPアドレス設定手法)を、図3のIPアドレス変更処理が実行される前の各設定値に戻す。S66を終えると、図3の処理が終了する。
In S64, the
以上のように、本実施例によると、プリンタ10は、PC80からの指示、又は、操作部12を介した指示を受けなくても、上記の種々の方法を用いて、プリンタ10のIPアドレスを主体的に変更することができる。即ち、ユーザがプリンタ10のIPアドレスを変更するための作業を行なわなくても、プリンタ10のIPアドレスを変更可能である。
As described above, according to the present embodiment, the
(具体的なケース(図5))
図5に示されるように、PC80では、IPアドレス設定手法が「DHCP」であり、IPアドレスが「192.168.1.2」であり、サブネットマスクが「255.255.255.0」である。従って、PC80のIPアドレスのネットワークアドレス部の値は、「192.168.1」である。
(Specific case (Fig. 5))
As shown in FIG. 5, in the
図5では、ユーザが、プリンタ10のIPアドレス設定手法を、「DHCP」から「STATIC」に変更する場合を想定している。上述したように、PC80のIPアドレス設定手法は、「DHCP」である。従って、プリンタ10のIPアドレス設定手法が「DHCP」から「STATIC」に変更される前には、プリンタ10及びPC80のそれぞれに、DHCPサーバ90からIPアドレス及びサブネットマスクが割り当てられる。この場合、プリンタ10及びPC80は、通常、適切にユニキャスト通信を実行し得る。ただし、プリンタ10のIPアドレス設定手法が「DHCP」から「STATIC」に変更される場合には、プリンタ10のIPアドレス及びサブネットマスクが、ユーザによって指定される。
In FIG. 5, it is assumed that the user changes the IP address setting method of the
図5は、ユーザによって指定されたプリンタ10のIPアドレス及びサブネットマスクを示す。即ち、プリンタ10では、IPアドレス設定手法が「STATIC」であり、IPアドレスが「192.168.2.3」であり、サブネットマスクが「255.255.0.0」である。従って、プリンタ10のIPアドレスのネットワークアドレス部の値は、「192.168」である。上述したように、PC80のIPアドレスのネットワークアドレス部の値は、「192.168.1」である。従って、プリンタ10とPC80との間でネットワークアドレスが異なる。
FIG. 5 shows the IP address and subnet mask of the
上述したように、PC80は、プリンタ10のノード名「AAA」を含む名前解決パケットNPをブロードキャストする。なお、名前解決パケットNPは、送信元IPアドレスとして、PC80の現在のIPアドレス「192.168.1.2」を含む。
As described above, the
プリンタ10の受信部50は、名前解決パケットNPを受信する(図2のS10参照)。プリンタ10の制御部20は、通常、パケットが受信される毎に、当該パケットが妥当であるのか否かを判断する。制御部20は、妥当であると判断されるパケットについて、当該パケットに従った処理を実行し、妥当でないと判断されるパケットについて、当該パケットに従った処理を実行せずに、当該パケットを破棄する。パケットの妥当性は、当該パケットがプリンタ10と同じネットワークから送信されたものであるのか否かに基づいて、判断される。具体的に言うと、制御部20は、名前解決パケットNPに含まれる送信元IPアドレス「192.168.1.2」が、プリンタ10のネットワークアドレス「192.168」を含むのか否かを判断する。この例では、制御部20は、名前解決パケットNPが妥当であると判断する。即ち、プリンタ10とPC80との間でネットワークアドレスが異なるにも関わらず、制御部20は、名前解決パケットNPが妥当であると判断して、名前解決パケットNPを破棄しない。
The receiving
次いで、プリンタ10の判断部52は、PINGパケットP1を送信する(図2のS12参照)。なお、PINGパケットP1は、送信先IPアドレスとして、PC80の現在のIPアドレス「192.168.1.2」を含み、送信元IPアドレスとして、プリンタ10の現在のIPアドレス「192.168.2.3」を含む。
Next, the
PC80は、PINGパケットP1が妥当であるのか否かを判断する。即ち、PC80は、PINGパケットP1に含まれる送信元IPアドレス「192.168.2.3」が、PC80のネットワークアドレス「192.168.1」を含むのか否かを判断する。この例では、PC80は、PINGパケットP1が妥当でないと判断して、PINGパケットP1を破棄する。即ち、PC80は、PINGパケットP1の応答パケットを送信しない。従って、このような状況では、プリンタ10は、プリンタ10のIPアドレス「192.168.2.3」と、PC80のIPアドレス「192.168.1.2」と、を用いて、PC80とのユニキャスト通信を実行不可能である。
The
図5の例では、PC80からPINGパケットP1の応答パケットが送信されないために、プリンタ10の判断部52は、PC80とのユニキャスト通信を実行不可能であると判断して、図2のS14でNOと判断する。即ち、図2のS14の判断処理は、PC80とのユニキャスト通信を実行可能であるのか否かを判断することに等しい。より具体的に言うと、図2のS14の判断処理は、プリンタ10のIPアドレスのネットワークアドレス部の値と、PC80のIPアドレスのネットワークアドレス部の値と、が一致するのか否かを判断することに等しい。
In the example of FIG. 5, since the response packet of the PING packet P1 is not transmitted from the
PC80とのユニキャスト通信を実行不可能であると判断される場合(図2のS14でNOの場合)には、制御部20は、IPアドレス変更処理を実行する(図2のS16参照)。図5の例では、プリンタ10のIPアドレス設定手法が「STATIC」である。従って、図3のS40でYESと判断されるために、S42において、変更部54は、プリンタ10のIPアドレス設定手法を、「STATIC」から「DHCP」に変更する。さらに、S44において、取得部56は、DHCPサーバ90から、IPアドレス「192.168.1.3」及びサブネットマスク「255.255.255.0」を取得する。PC80が利用しているDHCPサーバ90から、IPアドレス及ぶサブネットマスクが取得されるために、当該IPアドレスのネットワークアドレス部の値「192.168.1」は、PC80のIPアドレスのネットワークアドレス部の値に一致する。次いで、S46において、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、「192.168.2.3」及び「255.255.0.0」から、「192.168.1.3」及び「255.255.255.0」に変更する。
When it is determined that unicast communication with the
次いで、S60において、制御部20は、PINGパケットP2(図5参照)を送信する。なお、PINGパケットP2は、送信先IPアドレスとして、PC80の現在のIPアドレス「192.168.1.2」を含み、送信元IPアドレスとして、プリンタ10の変更後のIPアドレス「192.168.1.3」を含む。
Next, in S60, the
PINGパケットP2に含まれる送信元IPアドレス「192.168.1.3」が、PC80のネットワークアドレス「192.168.1」を含むために、PC80は、PINGパケットP2が妥当であると判断する。このために、PC80は、PINGパケットP2の応答パケットR1を送信する。従って、プリンタ10の制御部20は、S62でYESと判断し、図3のIPアドレス変更処理(即ち図2のS16)を終了する。このように、IPアドレス変更処理が実行されることにより、プリンタ10とPC80とがユニキャスト通信を実行可能な状態が構築される。
Since the source IP address “192.168.1.3” included in the PING packet P2 includes the network address “192.168.1” of the
次いで、図2のS22において、送信部64は、名前解決パケットNPの応答パケットR2を送信する。この応答パケットR2は、送信先IPアドレスとして、PC80の現在のIPアドレス「192.168.1.2」を含み、送信元IPアドレスとして、プリンタ10の変更後のIPアドレス「192.168.1.3」を含む。
Next, in S22 of FIG. 2, the
PC80は、応答パケットR2を受信することによって、プリンタ10のIPアドレス「192.168.1.3」を取得することができる。この場合、PC80は、プリンタ10のIPアドレス「192.168.1.3」を送信先IPアドレスとして、印刷データPDを送信する。これにより、プリンタ10の制御部20は、印刷データPDに従って、印刷実行部16に印刷を実行させる印刷処理を実行する。
The
(本実施例の効果)
本実施例によると、プリンタ10は、PC80からブロードキャストされる名前解決パケットNPを受信する場合に、PC80とのユニキャスト通信を実行可能であるのか否かを判断する(図2のS14参照)。プリンタ10は、PC80とのユニキャスト通信を実行不可能であると判断する場合(図2のS14でNOの場合)に、プリンタ10のIPアドレスを変更する(図2のS16参照)。プリンタ10のIPアドレスが変更されるために、プリンタ10とPC80とがユニキャスト通信を実行可能な状態になり得る。しかも、プリンタ10は、上記の判断を実行して、プリンタ10のIPアドレスを変更する必要があるのか否かを主体的に決定する。そして、プリンタ10は、プリンタ10のIPアドレスを変更する必要があると判断する場合(即ち、PC80とのユニキャスト通信を実行不可能であると判断する場合)に、PC80からの指示を受けなくても、プリンタ10のIPアドレスを主体的に変更する。即ち、プリンタ10は、PC80からの印刷データに従って印刷処理を実行可能な状態に自動的に復帰する。ユーザは、PC80において、プリンタ10のIPアドレスを変更するための作業を行なう必要がない。従って、ユーザの作業負担を軽減することができる。
(Effect of this embodiment)
According to this embodiment, when receiving the name resolution packet NP broadcast from the
(対応関係)
プリンタ10、PC80が、それぞれ、「通信装置」、「外部装置」の一例である。名前解決パケットNP、PINGパケットP1、応答パケットR2が、それぞれ、「特定の信号」、「第1の信号」、「第2の信号」の一例である。また、図5に示される各IPアドレス、即ち、「192.168.1.2」、「192.168.2.3」、「192.168.1.3」が、それぞれ、「特定のIPアドレス」、「第1のIPアドレス」、「第2のIPアドレス」の一例である。なお、図3のS52で生成されるIPアドレス、図4のS86で取得されるIPアドレス、及び、図4のS90で生成されるIPアドレスも、「第2のIPアドレス」の一例である。さらに、図4のS94でYESの場合にS90で再び生成されるIPアドレスが、「第1及び第2のIPアドレスと異なるIPアドレス」の一例である。また、成功手法記憶領域34、成功IP記憶領域36が、それぞれ、「手法メモリ」、「アドレスメモリ」の一例である。DHCPサーバ90及びBOOTPサーバが、「IPアドレス割当サーバ」の一例である。また、APIPAが、「所定のアルゴリズム」の一例である。
(Correspondence)
The
以上、本発明の具体例を詳細に説明したが、これらは例示にすぎず、特許請求の範囲を限定するものではない。特許請求の範囲に記載の技術には、以上に例示した具体例を様々に変形、変更したものが含まれる。上記の実施例の変形例を以下に列挙する。 Specific examples of the present invention have been described in detail above, but these are merely examples and do not limit the scope of the claims. The technology described in the claims includes various modifications and changes of the specific examples illustrated above. The modifications of the above embodiment are listed below.
(1)上記の実施例では、プリンタ10が「通信装置」の一例であるが、「通信装置」は、例えば、PC、サーバ、スキャナ、FAX、電話機、多機能機、携帯電話、PDA等であってもよい。
(1) In the above embodiment, the
(2)上記の実施例では、図5に示されるように、PC80がPINGパケットP1の応答パケットを送信しない状況として、プリンタ10とPC80との間でネットワークアドレスが異なる場合を想定している。ただし、例えば、PC80は、IPアドレスのフィルタリング機能を備えていてもよい。即ち、PC80は、フィルタリングの対象のIPアドレス(例えばユーザによって予め指定されたIPアドレス)を送信元IPアドレスとして含むパケットを破棄してもよい。このような状況では、例えば、プリンタ10のIPアドレスがフィルタリングの対象のIPアドレスである場合には、プリンタ10とPC80との間でネットワークアドレスが同じであっても、PC80は、PINGパケットP1の応答パケットを送信しない。即ち、一般的に言うと、「ユニキャスト通信を外部装置と実行不可能である」は、通信装置と外部装置との間でネットワークアドレスが異なる場合のみならず、外部装置が通信装置のIPアドレスをフィルタリングしている場合を含む。
(2) In the above embodiment, as shown in FIG. 5, it is assumed that the network address is different between the
(3)上記の実施例では、判断部52は、PINGパケットP1の応答パケットを受信することを監視することによって、PC80とのユニキャスト通信を実行可能であるのか否かを判断する。即ち、一般的に言うと、判断部は、第1の信号の応答信号を受信することを監視することによって、通信装置がユニキャスト通信を外部装置と実行可能であるのか否かを判断する。ただし、判断部は、外部装置のIPアドレス及びサブネットマスクを取得可能である場合には、外部装置のIPアドレス及びサブネットマスクを用いて、外部装置のIPアドレスのネットワークアドレス部の値を特定してもよい。これに代えて、判断部は、通信装置のIPアドレス及びサブネットマスクを用いて、外部装置のIPアドレスのネットワークアドレス部の値を推定してもよい。そして、判断部は、特定済み又は推定済みのネットワークアドレス部の値を用いて、通信装置と外部装置との間でIPアドレスのネットワークアドレス部の値が同じであるのか否かを判断することによって、通信装置がユニキャスト通信を外部装置と実行可能であるのか否かを判断してもよい。即ち、一般的に言うと、「ユニキャスト通信を外部装置と実行可能であるのか否かを判断する」は、第1の信号(例えばPINGパケットP1)を送信して判断する場合も、第1の信号(例えばPINGパケットP1)を送信せずに判断する場合も含む。
(3) In the above embodiment, the
(4)上記の実施例では、プリンタ10のIPアドレスが変更される場合に、プリンタ10が変更後のIPアドレスを利用し続けることを想定している。しかしながら、プリンタ10は、変更後のIPアドレスを一時的に利用してもよい。例えば、プリンタ10は、PC80から印刷データを受信して印刷処理を実行すると、プリンタ10のIPアドレスを、変更前のIPアドレスに戻してもよい。一般的に言うと、通信装置は、第2のIPアドレスを永続的に利用してもよいし、第2のIPアドレスを一時的に利用してもよい。
(4) In the above embodiment, it is assumed that when the IP address of the
(5)上記の実施例では、CPU22がプログラムに従った処理を実行することによって、各部50〜64の機能が実現される。ただし、各部50〜64のうちの少なくとも1つは、論理回路等のハードウェアによって実現されてもよい。
(5) In the above-described embodiment, the functions of the
また、本明細書または図面に説明した技術要素は、単独であるいは各種の組合せによって技術的有用性を発揮するものであり、出願時請求項記載の組合せに限定されるものではない。また、本明細書または図面に例示した技術は複数目的を同時に達成するものであり、そのうちの一つの目的を達成すること自体で技術的有用性を持つものである。 The technical elements described in this specification or the drawings exhibit technical usefulness alone or in various combinations, and are not limited to the combinations described in the claims at the time of filing. In addition, the technology illustrated in the present specification or the drawings achieves a plurality of objects at the same time, and has technical utility by achieving one of the objects.
2:通信システム、10:プリンタ、80:PC、90:DHCPサーバ、NP:名前解決パケット、P1,P2:PINGパケット、R1,R2:応答パケット、PD:印刷データ 2: Communication system, 10: Printer, 80: PC, 90: DHCP server, NP: Name resolution packet, P1, P2: PING packet, R1, R2: Response packet, PD: Print data
Claims (11)
前記外部装置からブロードキャスト通信によって送信される特定の信号であって、前記通信装置を識別するための識別情報と、前記特定のIPアドレスと、を含む前記特定の信号を受信する受信部と、
前記識別情報を含む前記特定の信号が受信される場合に、前記通信装置が、前記通信装置自身の現在のIPアドレスである第1のIPアドレスと、前記特定の信号に含まれる前記特定のIPアドレスと、を用いたユニキャスト通信を、前記外部装置と実行可能であるのか否かを判断する判断部と、
前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断される特定の場合に、前記ブロードキャスト通信によって受信された前記特定の信号に含まれる前記特定のIPアドレスを利用して、前記通信装置のIPアドレスを、前記第1のIPアドレスから、前記第1のIPアドレスと異なる第2のIPアドレスに変更する変更部と、
を備える通信装置。 A communication device for communicating with an external device having a specific IP address via a local area network,
A reception unit that receives the specific signal, which is a specific signal transmitted from the external device by broadcast communication , including identification information for identifying the communication device, and the specific IP address;
When the specific signal including the identification information is received, the communication device has a first IP address that is the current IP address of the communication device itself and the specific IP included in the specific signal. A determination unit that determines whether or not unicast communication using the address is executable with the external device;
In the specific case where it is determined that the communication device cannot execute the unicast communication with the external device, the specific IP address included in the specific signal received by the broadcast communication is used. , the IP address of the communication device, from the first IP address, a changing unit to change the first IP address is different from the second IP address,
A communication device comprising:
前記変更部は、前記特定の場合に、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから、生成済みの前記第2のIPアドレスに変更する、請求項2に記載の通信装置。 When the value of the specific IP address is included in a range of IP address values that can be generated by a predetermined algorithm for generating an IP address, the second IP address is set using the predetermined algorithm. A first generation unit for generating,
The communication device according to claim 2, wherein the changing unit changes the IP address of the communication device from the first IP address to the generated second IP address in the specific case.
前記変更部は、前記特定の場合に、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから、生成済みの前記第2のIPアドレスに変更する、請求項2に記載の通信装置。 A second generation unit configured to generate the second IP address from the specific IP address by changing a part of all values of the specific IP address;
The communication device according to claim 2, wherein the changing unit changes the IP address of the communication device from the first IP address to the generated second IP address in the specific case.
前記変更部は、
前記特定の場合において、前記第2のIPアドレスが前記他のデバイスのIPアドレスでないと確認される場合に、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから、前記第2のIPアドレスに変更し、
前記特定の場合において、前記第2のIPアドレスが前記他のデバイスのIPアドレスであると確認される場合に、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから、前記第1及び第2のIPアドレスと異なるIPアドレスに変更する、請求項1,2及び4のいずれか一項に記載の通信装置。 A confirmation unit for confirming whether the second IP address is an IP address of another device connected to the local area network;
The changing unit is
In the specific case, when it is confirmed that the second IP address is not the IP address of the other device, the IP address of the communication device is changed from the first IP address to the second IP address. Change to the address,
In the specific case, when it is confirmed that the second IP address is an IP address of the other device, the IP address of the communication device is changed from the first IP address to the first and second IP addresses. It is changed to the second IP address and different IP addresses, the communication device according to any one of claims 1, 2 and 4.
前記特定のIPアドレスが送信先として含まれる第1の信号であって、前記第1のIPアドレスが送信元として含まれる前記第1の信号を送信して、前記第1の信号の応答信号を受信した場合に、前記通信装置が前記ユニキャスト通信を前記外部装置と実行可能であると判断し、
前記第1の信号を送信して、前記第1の信号の前記応答信号を受信しなかった場合に、前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断する、請求項1から5のいずれか一項に記載の通信装置。 The determination unit
The first signal including the specific IP address as a transmission destination, the first signal including the first IP address as a transmission source, and a response signal of the first signal If received, the communication device determines that the unicast communication can be performed with the external device;
The communication apparatus determines that the unicast communication cannot be performed with the external apparatus when the first signal is transmitted and the response signal of the first signal is not received. Item 6. The communication device according to any one of Items 1 to 5 .
前記第1のIPアドレスのネットワークアドレス部の値と、前記特定のIPアドレスのネットワークアドレス部の値と、が一致する場合に、前記通信装置が前記ユニキャスト通信を前記外部装置と実行可能であると判断し、
前記第1のIPアドレスの前記ネットワークアドレス部の前記値と、前記特定のIPアドレスの前記ネットワークアドレス部の前記値と、が一致しない場合に、前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断する、請求項1から6のいずれか一項に記載の通信装置。 The determination unit
When the value of the network address part of the first IP address matches the value of the network address part of the specific IP address, the communication device can execute the unicast communication with the external device. And
When the value of the network address portion of the first IP address does not match the value of the network address portion of the specific IP address, the communication device performs the unicast communication with the external device. The communication apparatus according to any one of claims 1 to 6 , wherein the communication apparatus determines that execution is impossible.
前記通信装置に搭載されるコンピュータに、
前記外部装置からブロードキャスト通信によって送信される特定の信号であって、前記通信装置を識別するための識別情報と、前記特定のIPアドレスと、を含む前記特定の信号を受信する受信処理と、
前記識別情報を含む前記特定の信号が受信される場合に、前記通信装置が、前記通信装置自身の現在のIPアドレスである第1のIPアドレスと、前記特定の信号に含まれる前記特定のIPアドレスと、を用いたユニキャスト通信を、前記外部装置と実行可能であるのか否かを判断する判断処理と、
前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断される特定の場合に、前記ブロードキャスト通信によって受信された前記特定の信号に含まれる前記特定のIPアドレスを利用して、前記通信装置のIPアドレスを、前記第1のIPアドレスから、前記第1のIPアドレスと異なる第2のIPアドレスに変更する変更処理と、
を実行させるコンピュータプログラム。 A computer program for a communication device for communicating with an external device having a specific IP address via a local area network,
In a computer mounted on the communication device,
A reception process for receiving the specific signal, which is a specific signal transmitted by broadcast communication from the external device , and includes identification information for identifying the communication device and the specific IP address;
When the specific signal including the identification information is received, the communication device has a first IP address that is the current IP address of the communication device itself and the specific IP included in the specific signal. A determination process for determining whether or not unicast communication using the address can be executed with the external device;
In the specific case where it is determined that the communication device cannot execute the unicast communication with the external device, the specific IP address included in the specific signal received by the broadcast communication is used. , the IP address of the communication device, from the first IP address, and changing process for changing the first IP address is different from the second IP address,
A computer program that executes
前記通信装置の過去のIPアドレスを得るために利用されたIPアドレス設定手法を示す手法情報を格納するための手法メモリであって、前記過去のIPアドレスは、前記外部装置とのユニキャスト通信を実行可能であったIPアドレスである、前記手法メモリと、
前記外部装置からブロードキャスト通信によって送信される特定の信号であって、前記特定のIPアドレスを含む前記特定の信号を受信する受信部と、
前記特定の信号が受信される場合に、前記通信装置が、前記通信装置自身の現在のIPアドレスである第1のIPアドレスと、前記特定の信号に含まれる前記特定のIPアドレスと、を用いたユニキャスト通信を、前記外部装置と実行可能であるのか否かを判断する判断部と、
前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断される特定の場合に、ユーザからの指示を受けることなく、前記通信装置のIPアドレスを、前記第1のIPアドレスから、前記第1のIPアドレスと異なる第2のIPアドレスであって、前記手法メモリ内の前記手法情報が示す前記IPアドレス設定手法を利用して得られる前記第2のIPアドレスに変更する変更部と、
を備える通信装置。 A communication device for communicating with an external device having a specific IP address via a local area network,
A method memory for storing method information indicating an IP address setting method used for obtaining a past IP address of the communication device, wherein the past IP address is a unicast communication with the external device. The technique memory being an executable IP address;
A reception unit that receives the specific signal that is a specific signal transmitted by broadcast communication from the external device and includes the specific IP address;
When the specific signal is received, the communication device uses a first IP address that is the current IP address of the communication device itself and the specific IP address included in the specific signal. A determination unit that determines whether or not the unicast communication performed can be performed with the external device;
In a specific case where it is determined that the communication device cannot execute the unicast communication with the external device, the IP address of the communication device is changed to the first IP address without receiving an instruction from a user. To change to the second IP address that is different from the first IP address and is obtained by using the IP address setting technique indicated by the technique information in the technique memory And
A communication device comprising:
前記通信装置は、前記通信装置の過去のIPアドレスを得るために利用されたIPアドレス設定手法を示す手法情報を格納するための手法メモリであって、前記過去のIPアドレスは、前記外部装置とのユニキャスト通信を実行可能であったIPアドレスである、前記手法メモリを備え、
前記通信装置に搭載されるコンピュータに、
前記外部装置からブロードキャスト通信によって送信される特定の信号であって、前記特定のIPアドレスを含む前記特定の信号を受信する受信処理と、
前記特定の信号が受信される場合に、前記通信装置が、前記通信装置自身の現在のIPアドレスである第1のIPアドレスと、前記特定の信号に含まれる前記特定のIPアドレスと、を用いたユニキャスト通信を、前記外部装置と実行可能であるのか否かを判断する判断処理と、
前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断される特定の場合に、ユーザからの指示を受けることなく、前記通信装置のIPアドレスを、前記第1のIPアドレスから、前記第1のIPアドレスと異なる第2のIPアドレスであって、前記手法メモリ内の前記手法情報が示す前記IPアドレス設定手法を利用して得られる前記第2のIPアドレスに変更する変更処理と、
を実行させるコンピュータプログラム。 A computer program for a communication device for communicating with an external device having a specific IP address via a local area network,
The communication apparatus is a technique memory for storing technique information indicating an IP address setting technique used to obtain a past IP address of the communication apparatus, and the past IP address is the same as that of the external apparatus. The method memory, which is an IP address that was able to execute the unicast communication of
In a computer mounted on the communication device,
A reception process for receiving the specific signal transmitted from the external device by broadcast communication and including the specific IP address;
When the specific signal is received, the communication device uses a first IP address that is the current IP address of the communication device itself and the specific IP address included in the specific signal. Determination processing for determining whether or not the unicast communication performed with the external device can be performed;
In a specific case where it is determined that the communication device cannot execute the unicast communication with the external device, the IP address of the communication device is changed to the first IP address without receiving an instruction from a user. To change to the second IP address that is different from the first IP address and is obtained by using the IP address setting technique indicated by the technique information in the technique memory Processing,
A computer program that executes
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011015910A JP5527233B2 (en) | 2011-01-28 | 2011-01-28 | Communication device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011015910A JP5527233B2 (en) | 2011-01-28 | 2011-01-28 | Communication device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012156910A JP2012156910A (en) | 2012-08-16 |
JP5527233B2 true JP5527233B2 (en) | 2014-06-18 |
Family
ID=46838150
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011015910A Active JP5527233B2 (en) | 2011-01-28 | 2011-01-28 | Communication device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5527233B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014060570A (en) * | 2012-09-18 | 2014-04-03 | Sanken Electric Co Ltd | Information communication method and information communication system |
JP6248822B2 (en) * | 2014-06-16 | 2017-12-20 | 三菱電機ビルテクノサービス株式会社 | Communication address management system, building management system, and communication address management program |
JP7024602B2 (en) * | 2018-05-23 | 2022-02-24 | コニカミノルタ株式会社 | Image processing equipment, network connection method and network connection program |
CN112187964A (en) * | 2020-08-31 | 2021-01-05 | 北京三快在线科技有限公司 | IP address modification method and device, electronic equipment and computer readable medium |
KR102298731B1 (en) * | 2021-03-24 | 2021-09-06 | 퍼시픽 센츄리 주식회사 | Device for Wireless Communications and Driving Method Thereof |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003046519A (en) * | 2001-08-03 | 2003-02-14 | Fujitsu Ltd | Address automatic setting method |
JP4701799B2 (en) * | 2004-05-31 | 2011-06-15 | セイコーエプソン株式会社 | Printer and printer system |
JP2008236543A (en) * | 2007-03-22 | 2008-10-02 | Hitachi Ltd | Communication path control method and program, and communication apparatus |
JP5178539B2 (en) * | 2008-04-04 | 2013-04-10 | キヤノン株式会社 | Information processing apparatus, information processing apparatus control method, session management system, and program |
-
2011
- 2011-01-28 JP JP2011015910A patent/JP5527233B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2012156910A (en) | 2012-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5093277B2 (en) | Communication apparatus and computer program | |
JP5527233B2 (en) | Communication device | |
JP5820106B2 (en) | Communication apparatus and control method thereof | |
JP2009010772A (en) | Communication apparatus and control method thereof | |
JP2006050286A (en) | Network system, communication method therein, and host device | |
JP5882855B2 (en) | Method, system and program for protecting a host device | |
US8601271B2 (en) | Method and system for power management using ICMPV6 options | |
JP4775437B2 (en) | Computer program for installing software | |
JP2006067480A (en) | Network device management system, its control method, and program | |
US10728211B2 (en) | Electronic apparatus, communication system, and a non-transitory computer-readable recording medium | |
US8516141B2 (en) | Method and system for modifying and/or changing a MAC ID utilizing an IPv6 network connection | |
JP2012029139A (en) | Device to be connected to network | |
JP5338597B2 (en) | IP address determination device, terminal device, and computer program | |
US20140122680A1 (en) | Information processing apparatus and method, and non-transitory computer readable medium | |
JP6088959B2 (en) | Electronics | |
JP5664399B2 (en) | Information providing server | |
JP6119187B2 (en) | Management device, address information management program, and address information management system | |
US10574837B2 (en) | Information processing apparatus for data communication with external apparatus and control method for the same, and storage medium | |
JP4368776B2 (en) | Network device, network device control method, program, and recording medium | |
JP2015195533A (en) | communication device | |
JP6460346B2 (en) | Electronic equipment and power control program | |
US8953614B2 (en) | Data communication system and address setting method for setting an IP address | |
JP6444174B2 (en) | Image forming apparatus, image forming apparatus control method, and program | |
JP5454463B2 (en) | Communication device | |
JP5234062B2 (en) | Communication device and multi-function communication device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130325 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131211 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131217 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140213 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140318 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140331 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5527233 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |