Abstract:
An IP address setting device includes a request packet transmitting unit, a response reception unit, an address information designation unit, and a setting packet transmission unit. The request packet transmitting unit transmits a request packet to a particular multicast address. The request packet requests transmission of an MAC address from each node of the network. The response reception unit receives responses from the nodes to the request packet. Each response includes the MAC address of a corresponding node. Based on the responses received, the address information designation unit designates a node to be set with address information including an IP address and designates the address information. The setting packet transmission unit transmits a setting packet to the particular multicast address. The setting packet includes the address information set by the address information designation unit and the MAC address included in the response from the node.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a device and a method for setting address information, such as IP address, of a network device in a network environment. 
     2. Description of the Related Art 
     Conventionally, address information, such as the IP address, can be set for a device, such as a network printer, connected in a network environment using any of the following three methods. 
     According to a first method, the user inputs the address information by operating input buttons of the device while watching a display unit, such as a liquid crystal display, that is attached to the network device. 
     According to a second method, a host computer connected to the network is used to set the IP address using a local transmission protocol other than TCP/IP. 
     A third method is represented by  FIG. 1 . According to the third method, a host computer connected to the network broadcasts a command to all network devices, requesting that each network device advise its Media Access Control (MAC) address. The host computer confirms the MAC addresses of responding network devices and selects a network device it wants to set an IP address and the like for. The host computer broadcasts a command indicating that the network device with the MAC address of the selected network device should set its IP address and the like as indicated in the command. The corresponding network device sets its address information, such as IP address, based on the command. 
     SUMMARY OF THE INVENTION 
     There is, a problem with the first method in that each network device must be provided with a display unit. If the network device is not provided with a display unit, for example, to reduce manufacturing costs, then its IP address and the like cannot be set using this method. 
     There is a problem with the second method in that another transmission protocol besides TCP/IP is used, so this method cannot be used if the host computer  300  or the network environment cannot support the other transmission protocol. 
     There is a problem with the third method in that commands need to be broadcast transmitted, which adds to the burden on the network. Further, normally routers set up in the network environment do not allow broadcasted packets to pass through the router. Therefore, this method is frequently unusable for setting an IP address to a network device located on the other side of a router. 
     It is an objective of the present invention to overcome the above-described problems and to provide a device and method capable of using a transmission protocol normally supported in a network environment to set IP address and the like of network devices that have no display unit or that are connected to the network at the other side of a router, while suppressing the burden on the network. 
     In order to achieve the above-described objectives, an IP address setting device according to the present invention includes a request packet transmitting unit, a response reception unit, an address information designation unit, and a setting packet transmission unit. The request packet transmitting unit transmits a request packet to a particular multicast address. The request packet requests transmission of an MAC address from each node of the network. The response reception unit receives responses from the nodes to the request packet transmitted by the request packet transmitting unit. Each response includes the MAC address of the corresponding node. Based on the responses received from the nodes by the response reception unit, the address information designation unit designates a node to be set with address information including an IP address and designates the address information. The setting packet transmission unit transmits a setting packet to the particular multicast address. The setting packet includes the address information set by the address information designation unit and the MAC address included in the response from the node. 
     With this configuration, even inexpensive network devices without a display unit can be set with an IP address and the like. The settings can be made using a transmission protocol usually supported in a network environment, without placing an excessive load on the network, and to network devices on the other side of the router. 
     It is desirable that the address information designation unit include a display that displays a list with at least a portion of nodes that transmitted response packets; a selection unit that enables a user to select from the list the node to be set with address information; and an address information setting unit that sets address information separately to the selected node. With this configuration, nodes, that is, network devices such as network printers, to be set with address information can be selected from nodes in a network environment. 
     It is desirable that the address information designation unit include a display unit that displays in a list at least a portion of network printers at nodes that transmitted a response packet. With this configuration, network printers in the network environment can be displayed an the display and those network printers to be set with address information can be selected from the list. 
     It is desirable that the address information designation unit designate address information including an IP address, a subnet mask, and a default gateway. With this configuration, address information, such as an IP address, a subnet mask, and a default gateway address, can be set in a TCP/IP protocol. 
     It is desirable that the IP address setting device further include a response unit that transmits to the particular multicast address a response packet including an MAC address of a network printer connected at a node that is a member of the particular multicast address; a packet reception unit that receives, at the node, packets from the particular multicast address and that determines whether a received packet includes the MAC address of the network printer; and an IP address setting unit that, when the packet content determination unit determines that a received packet includes the MAC address of the network printer, sets the address information including the IP address in the setting packet as address information of the network printer. With this configuration, a network device can notify its MAC address to an IP address setting device in response to a request packet from the IP address setting device and set address information in a setting packet from the IP address setting device as its own address information 
     A method according to the present invention the present invention includes transmitting a request packet to a particular multicast address, the request packet including a request for an MAC address of each node of a network; transmitting, from a node that is a member of the multicast address and that received the request packet, a response packet to the particular multicast address, the response packet including the MAC address of the node; receiving the response packet; designating to set the node that sent the response packet with address information including an IP address; transmitting to the particular multicast address a setting packet including the designated address information and the MAC address indicated in the response packet from the node; receiving the setting packet at the node; judging whether the MAC address in the received setting packet is the same as the MAC address of the node; and setting the address information in the setting packet as the address information of the node when the MAC address in the received setting packet is the same as the MAC address of the node. 
     A network printer according to the present invention includes a request packet reception unit that receives a request packet from a particular multicast address, the request packet requesting transmission of an MAC address; a response unit that transmits to the particular multicast address a response packet including a network printer MAC address, a setting packet reception unit that receives a setting packet from the particular multicast address; a content determination unit that determines whether the received setting packet includes the network printer MAC address; and an IP address setting unit that, when the packet content determination unit determines that the received setting packet includes the network printer MAC address, sets the address information including the IP address in the setting packet as address information. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The above and other objects, features and advantages of the invention will become more apparent from reading the following description of the embodiment taken in connection with the accompanying drawings in which: 
         FIG. 1  is a schematic view representing one conventional method for setting address information to a network device; 
         FIG. 2  is a block diagram showing internal configuration of a network device; 
         FIG. 3  is a block diagram showing a printing system including the network printer of  FIG. 2 ; 
         FIG. 4  ( a ) is a schematic view representing communication between a host computer and network devices of the printing system of  FIG. 3 ; 
         FIG. 4  ( b ) is a schematic view representing communication between the host computer and the network devices; 
         FIG. 4  ( c ) is a schematic view representing communication between the host computer and the network devices; 
         FIG. 4  ( d ) is a schematic view representing communication between the host computer and the network devices ; 
         FIG. 5  is a flowchart representing processes performed in the host computer ; and 
         FIG. 6  is a flowchart representing processes performed in a network printer, which is one of the network devices of the printing system. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Next, an explanation of a method and device for setting an IP address will be provided while referring to the attached drawings. 
       FIG. 2  shows a portion of hardware configuration of a network printer  100 . The network printer  100  includes a central processing unit (CPU)  1 , a random access memory (RAM)  2 , a read only memory (ROM)  3 , and a network interface card (NIC)  4 , which is also commonly referred to as a LAN card The NIC  4  includes interfaces  4   a  and  4   e , a CPU  44 , a PROM  4   c , and a non-volatile RAM (NV-RAM)  4   d , all connected to a bus  4   f . The NIC  4  can be provided as an integral component of the network printer  100  or as a separate and detachable unit. The PROM  4   c  stores the unique media access control (MAC) address of the NIC  4 . The MAC address is a 6-byte address used as the address in frame headers transmitted over the network  9  and can be, for example, a maker code or a manufacture number. According to the present embodiment, the network printer  100  has a MAC address of 00-80-77-31-00-04. A network printer  200  has a MAC address of 00-80-77-31-00-08. The Nv-RAM  4   d  is for storing an IP address, which is set to the printer  100  in a manner to be described later. 
       FIG. 3  shows the entire network  9  with the network printer  100  connected at a node n 1 . The network  9  includes two groups G 1  and G 2  connected by a router  10 . The first group G 1  includes nodes n 1  to n 6  and the second group G 2  includes nodes n 7  to n 12 . A network printer  200  is connected at node n 2  of group G 1  and a computer  300  is connected at node n 12  of group G 2 . The host computer  300  includes a display unit  301 , such as a cathode ray tube (CRT). The router  10  is a multicast router, so address information, such as IP address, can be set for the network printer  100  and other devices at the nodes n 1  to n 6  on one side of the router  10  from the host computer  300  at a node on the other side of the router  10 . 
     When an address such as an IP address of a network printer is to be set, then as shown in  FIG. 4  ( a ) the host computer  300  transmits a packet to a particular multicast address (239.255.22.23). The packet includes a request for recipients of the packet to advise their own MAC address. In the example of  FIG. 4  ( a ), the network printers  100  and  200  receive the packet and so return a packet including their own MAC addresses to the particular multicast address. 
     Once the host computer  300  receives the responses from the network printers  100  and  200 , then the host computer  300  determines which of these network printers need to be set with address information including an IP address. The host computer  300  sets the address information to desired network printer or printers by transmitting a packet to the multicast address for each of the target network printers. Each packet includes the MAC address of the target network printer and the address information to be set to the target network printer. In the example shown in  FIG. 4  ( c ), the host computer  300  judges that address information need only be set to the printer  100  and so sends a packet for the printer  100 , but not for the printer  200 , to the multicast address. The packet sent from the host computer  300  to the multicast address includes the MAC address of the network printer  100  and, as address information, an IP address of 133.151.12.34, a subnet mask of 255.255.0.0, and a default gateway of 133.151.1.1. When the printer  100  receives this packet, it recognizes its own MAC address and so, as shown in  FIG. 4  ( d ), the printer  100  sets the address information, such as the IP address, in the packet as its own address information. 
     Next, a detailed explanation Will be provided for the above-described processes while referring to the flowcharts in  FIGS. 5 and 6 .  FIG. 5  is a flowchart representing processes performed in the host computer  300  and  FIG. 6  is a flowchart representing processes performed in each of the network printers  100  and  200 . 
     As shown in  FIG. 5 , the host computer  300  uses Internet Group Management Protocol (IGMP) to notify the router that the host computer  300  has joined the particular multicast address 239.255.22.23 (S 1 ). According to the embodiment, the particular multicast address is a multicast address that is stored in the ROM of each of the network printers  100 ,  200  when the printers are produced. Alternatively, the system can be more flexible if the host computer  300  is designed to designate the multicast address itself or the printers are designed so that the user can input the multicast address to each printer separately. 
     Next, the host computer  300  transmits a request packet to the multicast address (S 2 ). The packet includes a request for the MAC address of each recipient network printer. Then the host computer  300  waits for responses (S 3 ). When the host computer  300  receives responses from the printers  100  and  200 , it displays the MAC addresses and printer names of the printers  100  and  200  in a list on a screen of the display unit  310 . The host computer  300  waits for input from the user (S 5 ) and judges whether the user has selected one of the printer names from the displayed list (S 6 ). In this example, the user selects the network printer  100  to set with address information, such as an IP address, and also inputs the address information (S 6 :YES), whereupon the host computer  300  transmits a packet including the address information to the printer  100  (S 7 ) and waits for a fixed period of time, such as two seconds, for responses from the printers  100  and  200  (S 8 ). Then the host computer  300  judges whether or not it has received an ACK packet, which indicates receipt of address information, from the printer  100 . If so (S 9 :YES), then the host computer  300  displays a message on the screen of the display unit  301 , indicating that the address information has been properly set in the printer  100  (S 10 ). If the host computer  300  receives no ACK packet from the network printer  100  (S 9 :No), then an error message is displayed on the screen of the display unit  301  (S 11 ). 
     As shown in  FIG. 6 , each network printer  100 ,  200  uses IGMP to notify the router that it is a member of the particular multicast address  239 . 255 . 22 . 23  (S 12 ). Then the network printers  100 ,  200  enter a waiting condition, wherein they wait for packets to be transmitted from the host computer  300  (S 13 ). 
     When the network printer  100  receives a packet, then the network printer  100  judges whether or not the packet includes a command requesting it to send its MAC address to the multicast address (S 14 ). If so (S 14 :YES), then the network printer  100  sends a packet including its MAC address and printer name to the particular multicast address (S 15 ). 
     When the packet received by network printers  100 ,  200  does not include a command that requests the network printers to send their MAC addresses (S 14 :NO), then the network printers  100 ,  200  judge whether the packet is a multicast command that requests the network printers to set address information (S 16 ). If so (S 16 :YES), then the network printers  100 ,  200  judge whether the MAC address in the received packet is the same as their own MAC address (S 17 ). In this example, the MAC address in the received packet is the same as the MAC address of the printer  100  (S 17 :YES), so the network printer  100  sets the address information in the packet as its own address information by storing the IP address in the NV-RAM  4   d (S 18 ) and transmits an ACK packet to the particular multicast address to indicate to the host computer  300  that processes for setting address information have been completed. If the packet is not a command that requests the network printer to set address information by multicast (S 16 :NO), then other suitable processes are performed (S 19 ). 
     Because the router  10  used in the network of  FIG. 3  is a multicast router, IGMP can be used to set address information to network printers. On the other side of the router  10 . The host computer  300  and the network printers use IGMP to notify the router that they are members of the specific multicast address. Therefore, the host computer  300  and the network printers can mutually transmit information to each other by using the multicast address. 
     While the invention has been described in detail with reference to specific embodiments thereof, it would be apparent to those skilled in the art that various changes and modifications may be made therein without departing from the spirit of the invention, the scope of which is defined by the attached claims. 
     For example, although the embodiment describes the host computer  300  setting address information to only the network printer  100 , the host computer  300  could also set address information to the network printer  200  by sending out a packet with the MAC address of the network printer  200  and address information to be set to the network printer  200 . 
     Also, although the embodiment describes only network printers as examples of network devices, the present invention can be used to set address information to any device connected to a network. Also, more than two network devices can be connected to the network. 
     The router  10  need not a multicast router. In this case, the host computer  300  and network printers in the same group, that is, on the same side of the router, can communicate with each other without using IGMP. Therefore, if the router  10  were not a multicast router, address information can be set by the host computer  300  for devices at nodes n 7  to n 11  on the same side of the router  10 , but not for devices at nodes n 1  to n 6  on the other side of the router  10 .