Information processing device, information processing method, and program
The information processing device automatically sets its IP address based on an ARP request packet in a wired connection, addressing the manual network configuration challenges and enhancing the efficiency of device connections for maintenance purposes.
Patent Information
- Application Number
- JP2023170142
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-29
- Publication Date
- 2025-04-10
AI Technical Summary
Existing network configuration methods require manual setting of network settings such as IP addresses and subnet masks, which is cumbersome and time-consuming, especially when connecting management devices to managed devices for maintenance purposes.
An information processing device equipped with a communication port, a connection status determining unit, and an address setting unit that automatically sets the IP address of the device based on an ARP request packet in a wired connection state, simplifying network configuration.
This solution enables easy and automated network configuration, reducing the hassle of manual settings and facilitating quick connections between management and managed devices, thereby improving efficiency in maintenance operations.
Smart Images

Figure 2025059820000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to techniques for configuring a network. [Background technology]
[0002] Conventionally, in a client-server system, a method has been proposed in which the same IP address is registered for all connecting clients, and then the server sends an ARP request packet to the client. The client that receives this packet changes its own IP address based on the time it was received, and then sends the changed IP address to the server in an ARP response packet, thereby managing IP addresses on the server (see Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 11-74915 Summary of the Invention [Problem to be solved by the invention]
[0004] Conventionally, communication between devices has been achieved by connecting the devices together. When communicating between devices in this way, users have had to manually configure network settings such as the network portion of the IP (Internet Protocol) address and the subnet mask between the devices, which is time-consuming.
[0005] In view of the above problems, an object of the present disclosure is to easily perform network configuration. [Means for solving the problem]
[0006] One example of the present disclosure is an information processing device comprising: one or more communication ports including a first communication port; a connection status determination means that performs a determination process to determine whether or not the first communication port of the one or more communication ports is in a one-to-one wired connection with an external device; and an address setting means that performs a first setting process to set, when it is determined that the first communication port is in a wired connection state, a first IP address that is set as a target IP (Internet Protocol) address in an ARP (Address Resolution Protocol) request packet from the external device received via the first communication port in the wired connection state, as the IP address of the first communication port.
[0007] The present disclosure can be understood as an information processing device, a system, a method executed by a computer, or a program executed by a computer. The present disclosure can also be understood as a program recorded on a recording medium readable by a computer or other device, machine, etc. Here, a recording medium readable by a computer, etc. refers to a recording medium that stores information such as data and programs by electrical, magnetic, optical, mechanical, or chemical action and can be read by a computer, etc. Effect of the Invention
[0008] According to the present disclosure, network settings can be easily performed. [Brief description of the drawings]
[0009] [Figure 1] 1 is a schematic diagram showing a configuration of a system according to an embodiment. [Diagram 2] 1 is a diagram illustrating an outline of a functional configuration of an information processing device according to an embodiment. [Diagram 3] 11 is a diagram for explaining information stored in an address conversion table according to the embodiment; FIG. [Figure 4] FIG. 4 is a diagram illustrating an example of an address conversion table according to the embodiment. [Diagram 5]5 is a sequence diagram showing an example of a packet flow between an information processing device and a management device according to an embodiment. FIG. [Figure 6] 10 is a flowchart showing an overview of a flow of processing when a packet is received according to the embodiment. [Figure 7] 10 is a flowchart showing an overview of the flow of a connection status determination process according to the embodiment. [Figure 8] 11 is a flowchart showing an overview of the flow of a setting release process according to the embodiment. [Figure 9] 10 is a flowchart showing an overview of the flow of IP packet transmission processing according to the embodiment. [Figure 10] FIG. 13 is a schematic diagram showing a configuration of a system according to another embodiment. [Figure 11] FIG. 11 is a sequence diagram showing an example of a packet flow between an information processing device and a management device according to another embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment of an information processing device, a system, a method, and a program according to the present disclosure will be described with reference to the drawings. However, the embodiment described below is an example of an embodiment, and the information processing device, a system, a method, and a program according to the present disclosure are not limited to the specific configuration described below. In carrying out the present disclosure, a specific configuration according to the embodiment may be appropriately adopted, and various improvements and modifications may be made.
[0011] In this embodiment, an embodiment will be described in which the information processing device, system, method, and program according to the present disclosure are implemented in a system in which a managed device and a management device are connected by wire to perform maintenance work on the managed device. However, the information processing device, system, method, and program according to the present disclosure can be widely used in technologies for performing network settings, and the application of the present disclosure is not limited to the examples shown in the embodiment.
[0012] Conventionally, a management device (e.g., an appliance device) is connected to a management device by wire or wireless connection to perform maintenance work on the management device by the management device. For example, an administrator who performs maintenance work visits the site (where the management device is installed) with the management device, performs network settings for the management device and the management device, and then connects both devices to perform maintenance work. However, in order to enable communication between the management device and the management device, the administrator has to manually check the network environment in which the management device and the management device operate and perform settings to match the network environments of the management device and the management device (settings to match the network part of the IP address and the subnet mask). For example, the administrator has to check the network environment of the management device and perform network settings of the management device to match the network environment of the management device. In addition, the network environments of both devices may be checked and the network settings of both devices may be changed to match the network environments of both devices, and similar time and effort is required in this case. Regarding checking the network environment, when the administrator's PC (Personal Computer) is used as the management device, it is relatively easy to check the network settings of the management device, but the administrator has to check the network settings (set IP address, etc.) of the management device using a manual or the like. In addition, after the communication (maintenance work) is completed, the network settings that were made to enable communication between the managed device and the management device must be manually released (returned to their original state), which is time-consuming. These problems make it difficult to easily connect the management device and the managed device.
[0013] For this reason, in the system described in this embodiment, when a managed device and a management device are connected one-to-one via a wired connection, the network settings for the managed device are automatically configured, thereby eliminating the need for the user (administrator) to manually configure the network, and making it possible to easily connect the managed device and the management device.
[0014] <System configuration> FIG. 1 is a schematic diagram showing the configuration of a system according to this embodiment. In the system according to this embodiment, an information processing device 1 and a management device 9 are connected in a one-to-one wired manner using a wired cable. In this embodiment, a LAN (Local area network) cable is illustrated as an example of the wired cable, but the wired cable may be other cables (optical LAN cable, coaxial cable, etc.). Hereinafter, the one-to-one wired connection between the information processing device 1 and the management device 9 using a wired cable is referred to as "direct LAN connection", and the state in which the information processing device 1 and the management device 9 are connected in a one-to-one wired manner using a wired cable is referred to as "direct LAN connection state". Note that the "one-to-one wired connection state" refers to a wired connection state in which there is only one other device that can communicate with each other, excluding a device (equipment) that mainly relays communication. Therefore, the "direct LAN connection state" includes not only a state in which the information processing device 1 and the management device 9 are connected one-to-one by wire without any other device in between, but also a state in which the information processing device 1 and the management device 9 are connected one-to-one by wire via a network relay device such as an L2 switch (a state in which a network relay device is connected between the information processing device 1 and the management device 9).
[0015] The information processing device 1 is a computer including a central processing unit (CPU) 11, a read only memory (ROM) 12, a random access memory (RAM) 13, a storage device 14 such as an electrically erasable and programmable read only memory (EEPROM) or a hard disk drive (HDD), an input device 15 such as a keyboard, a mouse, or a touch panel, an output device 16 such as a display, and a communication unit 17 such as a network interface card (NIC). However, the specific hardware configuration of the information processing device 1 can be omitted, replaced, or added as appropriate depending on the embodiment. Therefore, for example, the information processing device 1 does not need to include the input device 15 or the output device 16. In addition, the information processing device 1 is not limited to a device consisting of a single housing. The information processing device 1 may be realized by multiple devices using so-called cloud or distributed computing technology, etc.
[0016] The management device 9 is a computer including a CPU 91, a ROM 92, a RAM 93, a storage device 94, an input device 95, an output device 96, and a communication unit 97. However, the specific hardware configuration of the management device 9 can be omitted, replaced, or added as appropriate depending on the embodiment. Therefore, for example, the management device 9 does not need to include the input device 95 or the output device 96. Furthermore, the management device 9 is not limited to a device consisting of a single housing. The management device 9 may be realized by multiple devices using so-called cloud or distributed computing technology, etc.
[0017] In this embodiment, the information processing device 1 is a target device (managed device) of the maintenance work performed using the management device 9, and may be any device such as an appliance device or a general-purpose device. In this embodiment, the management device 9 is a device used by an administrator (user) performing the maintenance work to perform the maintenance work on the information processing device 1, and may be any device such as a notebook PC (Personal Computer) or a desktop PC. The administrator performing the maintenance work brings the management device 9 to the area where the information processing device 1 is located, and performs the maintenance work on the information processing device 1 by connecting the information processing device 1 and the management device 9 one-to-one by wired connection (direct LAN connection) using a wired cable (LAN cable). Note that the purpose of directly connecting the information processing device 1 and the management device 9 to the LAN is not limited to the maintenance work, and may be any purpose. Therefore, the information processing device 1 is not limited to a target device of the maintenance work, and the management device 9 is not limited to a management device such as a device used for the maintenance work, and may be any device as long as it is an external device of the information processing device 1. In this embodiment, a case where IPv4 (Internet Protocol Version 4) communication is performed between the information processing device 1 and the management device 9 is illustrated. The Internet protocol is not limited to TCP / IP, but may be User Datagram Protocol (UDP) or Internet Control Message Protocol (ICMP).
[0018] In this embodiment, the communication unit 17 includes a management port 171 and an operation port 172, which are LAN ports. The management port 171 is a communication port used during maintenance work (management work), and the operation port 172 is a communication port used during business (operation). As shown in FIG. 1, the management port 171 and the communication unit 97 of the management device 9 are directly connected to a LAN. The management port 171 corresponds to a "first communication port" in this disclosure. Also, as shown in FIG. 1, the operation port 172 may be connected to the Internet via a LAN cable or the like for purposes other than maintenance work (for example, business purposes). In this way, in this embodiment, the information processing device 1 includes a plurality of communication ports including a communication port for management work and a communication port for business, which are different communication ports. However, as described later, the information processing device 1 may be an information processing device that includes only one communication port and uses this one communication port for both management work and business. Therefore, the number of communication ports included in the information processing device 1 is not limited to a plurality of ports and may be one. In this embodiment, the communication unit 17 may also have communication ports other than the management port 171 and the operation port 172.
[0019] In this embodiment, when the information processing device 1 and the management device 9 are directly connected to a LAN, an ARP (Address Resolution Protocol) packet is used to automatically set an IP address for the information processing device 1, thereby enabling communication between the two devices. Normally, in order to communicate between devices connected to a LAN, an L2 header (Ethernet header) is added to an IP packet before transmission, so information on a MAC (Media Access Control) address is required. ARP (a protocol for obtaining a MAC address from an IP address) is a protocol for obtaining this MAC address. ARP has two types of packets (ARP packets): an ARP request and an ARP reply, and by using these two types of packets, it is possible to know the MAC address of the other party.
[0020] For example, when device A wants to communicate with device B, device A broadcasts an ARP request packet with device B's IP address specified as the target IP address within the same subnet. When device B receives the ARP request packet, it determines that device A is searching for its own MAC address because the target IP address in the ARP request packet matches its own IP address, and sends an ARP response packet to device A to notify it of its own MAC address. In this way, only a device whose own IP address matches the IP address specified in the ARP request sends an ARP response to the source device (device A). This allows device A to obtain the MAC address of device B and associate the IP address and MAC address of device B, enabling device A to communicate with device B on the LAN.
[0021] On the other hand, in this embodiment, this ARP packet is used not only to obtain the MAC address but also to automatically set the IP address of the information processing device 1. Specifically, when the information processing device 1 and the management device 9 are directly connected to a LAN, the IP address specified as the target IP address in the ARP request (ARP request packet (frame)) transmitted from the management device 9 is automatically set as the IP address of the information processing device 1 (management port 171). Also, as described above, normally, only when the specified IP address matches the IP address of the own device, the ARP response including its own MAC address and IP address is transmitted to the source of the ARP request. On the other hand, in this embodiment, when the information processing device 1 and the management device 9 are directly connected to a LAN, the information processing device 1 transmits an ARP response (ARP response packet (frame)) to all ARP requests regardless of whether the IP address specified in the ARP request matches the IP address of the own device. Note that, in each ARP response transmitted in this embodiment, the IP address specified as the target IP address in the ARP request to which the response is to be made is stored as the source IP address. Details of the processing related to the ARP packet will be described later.
[0022] 2 is a diagram showing an outline of the functional configuration of the information processing device according to this embodiment. The information processing device 1 includes a receiving unit 21, a connection state determining unit 22, an address setting unit 23, an ARP processing unit 24, an address conversion unit 25, a packet generating unit 26, a transmitting unit 27, and a storage unit 28, by a program (for example, an automatic IP address setting program) recorded in the storage device 14 being read into the RAM 13 and executed by the CPU 11, and each piece of hardware included in the information processing device 1 is controlled. Note that in this embodiment and other embodiments described later, each function included in the information processing device 1 is executed by the CPU 11, which is a general-purpose processor, but some or all of these functions may be executed by one or more dedicated processors.
[0023] The receiving unit 21 receives frames (packets) transmitted from an external device via a communication port. The receiving unit 21 receives packets (ARP packets and IP packets) transmitted from a management device 9 that is directly connected to the management port 171 via a LAN via the management port 171. When the information processing device 1 and the management device 9 are connected via an L2 switch, the receiving unit 21 also receives packets transmitted from the L2 switch.
[0024] The connection status determination unit 22 performs a determination process to determine whether or not the information processing device 1 (management port 171) and the external device (management device 9) are in a one-to-one wired connection state (LAN direct connection state). A method of determining whether or not the state is a LAN direct connection state will be described below.
[0025] The connection status determination unit 22 detects (determines) the link status (link down status or link up status) of the management port 171. The connection status determination unit 22 also determines whether or not the connection is in a LAN direct connection status by checking whether or not the source device of packets (ARP packets and / or IP packets) received via the management port 171 up until the time of performing the determination process is the same.
[0026] When the management port 171 is in a link-up state, and the source device of all packets (one or more packets) received through the management port 171 up to the time of the judgment process is the same (only one device), the connection state judgment unit 22 judges that the management port 171 and the management device 9 are in a LAN direct connection state (connected directly to the LAN or the LAN direct connection state continues). To judge whether the source device is the same or not, the connection state judgment unit 22 refers to the source MAC address of the received packet (frame). Specifically, the connection state judgment unit 22 refers to the source MAC addresses of all packets (frames) received from the transition from the link-down state to the link-up state of the management port 171 that last occurred before the judgment process is performed (from after the last link-up was detected) up to the time of the judgment process, and if the source MAC addresses of all packets are the same, the connection state judgment unit 22 judges that the connection state is the LAN direct connection state.
[0027] On the other hand, when the management port 171 is in a link-up state and the source devices of all packets (one or a plurality of packets) received through the management port 171 up to the time of the determination process are not the same, the connection state determination unit 22 determines that the management port 171 and the management device 9 are not in a direct LAN connection state (the direct LAN connection has been released or the state where the direct LAN connection is not directly connected continues). Specifically, when the source MAC addresses of all packets (frames) received from the last transition from the link-down state of the management port 171 to the link-up state that occurred before the time of the determination process (after the last link-up was detected) up to the time of the determination process are not the same, it is determined that the management port 171 is not in a direct LAN connection state. In addition, the connection state determination unit 22 also determines that the management port 171 and the management device 9 are not in a direct LAN connection state when the management port 171 is in a link-down state (when the management port 171 is determined to be in a link-down state (when the link-down state is detected)).
[0028] In this embodiment, as described above, the packets used to determine whether or not the information processing device 1 is directly connected to the LAN are limited to ARP packets and IP packets. In other words, packets for device control such as loopback detection are excluded from the packets used to determine the LAN direct connection state. This makes it possible to avoid erroneous determination of the LAN direct connection caused by using a packet for loopback detection transmitted from the L2 switch for the LAN direct connection determination even when a device such as an L2 switch is connected between the information processing device 1 and the management device 9. Specifically, if a packet for loopback detection transmitted from the L2 switch is used for the LAN direct connection determination, the source MAC address of the packet received via the management port 171 may include the MAC address of the L2 switch in addition to the MAC address of the management device 9. In that case, even though the information processing device 1 and the management device 9 are directly connected to the LAN, it is erroneously determined that they are not directly connected to the LAN. Therefore, in this embodiment, the types of packets used to determine the LAN direct connection are limited to ARP packets and IP packets.
[0029] In this embodiment, a method is adopted in which after linking up, each time a packet is received, whether or not the LAN direct connection state is determined. However, the timing for determining the LAN direct connection state is not limited to the timing exemplified, and the first LAN direct connection determination process may be performed after a predetermined time (e.g., several seconds) has elapsed after linking up. In this case, similar to the above method, the LAN direct connection determination process is performed by determining whether or not all packets received within this predetermined time are transmitted from the same device. In this case, after the first LAN direct connection determination process is performed, the LAN direct connection determination process may be performed each time a packet is received.
[0030] In addition, in this embodiment, the method of referring to the source MAC address of the received packet has been exemplified as the method of determining whether or not the LAN direct connection state is established, but other methods may be used. For example, when the information processing device 1 and the management device 9 are directly connected to the LAN by the administrator or when the direct LAN connection is released, the administrator may notify the information processing device 1 that the LAN direct connection has been established or that the LAN direct connection has been released (such as by sending a packet from the management device 9 side). In this case, the connection state determination unit 22 can determine (detect) whether or not the LAN direct connection state is established by receiving the notification from the administrator.
[0031] When the connection state determination unit 22 determines that the device is in a direct LAN connection state (when the device is directly connected to the LAN), the address setting unit 23 performs a process (hereinafter referred to as a "first setting process") of setting an address (hereinafter referred to as a "first IP address") that was set as a target IP address in an ARP request packet from the management device 9 received via the management port 171 in the direct LAN connection state (after the device is directly connected to the LAN) as the IP address of the management port 171. In this embodiment, the address setting unit 23 sets the first IP address that was set as a target IP address in an ARP request packet that was received for the first time (for the first time) via the management port 171 in the direct LAN connection state (after the device is directly connected to the LAN) as the IP address of the management port 171. In other words, when a plurality of ARP request packets are received from the management port 171 after the device is directly connected to the LAN, the first setting process is performed only for the ARP request packet that was received first. The ARP request packet received via the management port 171 in the LAN direct-connected state is an ARP request packet received after the last transition of the management port 171 from a link-down state to a link-up state before the point in time when the LAN direct-connected state was determined (after it was detected that the link has been up). The address setting unit 23 performs a first setting process and stores in the address storage unit 281 the IP address of the management port 171 before the first setting process (hereinafter referred to as the "original IP address").
[0032] Furthermore, when it is determined that the LAN direct connection state is not established (when the LAN direct connection is released), the address setting unit 23 cancels the setting of the first IP address by the first setting process. Specifically, the address setting unit 23 refers to the address information (original IP address) stored in the address storage unit 281, and cancels the setting of the first IP address by performing a process (hereinafter referred to as the "second setting process") of setting the IP address of the management port 171 before the first setting process (original IP address) again as the IP address of the management port 171.
[0033] The address setting unit 23 may set a default gateway and a subnet mask in the information processing device 1. In this embodiment, the address setting unit 23 sets the IP address of the management device 9 as the setting of the default gateway in the information processing device 1 (management port 171). As a result, even if the information processing device 1 in which the first IP address is set by the first setting process determines that the network address of the management device 9 is different from the network address of the device itself, it is possible to transmit an IP packet to the management device 9, which is the default gateway. In other words, no matter what subnet mask is set in the information processing device 1, it is possible to transmit an IP packet (return packet) to the management device 9 (IP address and MAC address of the management device 9), and the management device 9 can normally receive the IP packet from the information processing device 1. The address setting unit 23 sets the IP address of the management device 9 as the default gateway by, for example, accepting an input of the IP address of the management device 9 from a user as the IP address of the default gateway, or by referring to the source IP address of a packet (ARP packet or IP packet) received from the management device 9.
[0034] As described above, when setting the IP address of the management device 9 as the setting of the default gateway in the management port 171, the subnet mask set in the management port 171 may be any subnet mask. In this embodiment, as an example, " / 24 (255.255.255.0)" is set. The address setting unit 23 sets the subnet mask of the information processing device 1 (management port 171) by accepting input of the subnet mask from the user, for example.
[0035] In the conventional method, when devices are directly connected to a LAN, the subnet mask must be manually set to match the subnet masks of the information processing device 1 and the management device 9. However, as described above, by setting the IP address of the management device 9 as the default gateway setting in the management port 171, it becomes possible to normally communicate without matching the subnet masks of both devices, thereby eliminating the above-mentioned trouble. However, the setting of the default gateway and the subnet mask are not limited to the above-mentioned method, and conventional methods may be used. Therefore, the subnet mask set in the information processing device 1 (management port 171) may be manually set to the same subnet mask as that of the management device 9.
[0036] The ARP processing unit 24 performs processing related to ARP. Specifically, the ARP processing unit 24 judges whether a packet received from an external device (management device 9) via the management port 171 is an ARP packet and whether it is an ARP request packet. For example, the ARP processing unit 24 judges whether it is an ARP packet by referring to a type code in the Ethernet header (L2 header) of the received frame. If the type code is "0x0806", it is judged to be an ARP packet. Also, for example, the ARP processing unit 24 judges whether it is an ARP request or an ARP response packet by referring to an operation code in the data portion (received packet) of the received frame. If the operation code is 1, it is judged to be an ARP request, and if the operation code is 2, it is judged to be an ARP response. If the received packet is an ARP request, the ARP processing unit 24 also judges whether the received packet is the first ARP request received after link-up.
[0037] If the received packet is an ARP request, the ARP processing unit 24 generates an ARP response (ARP response frame) to the ARP request and transmits it to an external device (management device 9) via the management port 171. At this time, the ARP processing unit 24 stores the MAC address of the management port 171 as the source MAC address in the ARP response packet and the source MAC address in the Ethernet frame header. In addition, the ARP processing unit 24 stores the IP address set as the target IP address in the ARP request to be responded to as the source IP address of the ARP response. In this embodiment, when the ARP processing unit 24 determines that the LAN is in a direct connection state, it generates and transmits an ARP response in the above-mentioned manner for all received ARP requests. In other words, even if the target IP address of the received ARP request does not match the IP address of the management port 171, it transmits an ARP response frame (ARP response packet) in which the MAC address of the management port 171 is stored for the ARP request.
[0038] When the device is in a LAN direct connection state (when the device is determined to be in a LAN direct connection state), the address conversion unit 25 performs a conversion process of the address information stored (set) in the IP packet. The address conversion unit 25 includes a first address conversion unit 251 and a second address conversion unit 252.
[0039] When the received packet is an IP packet, the first address translation unit 251 performs an address translation process on the received packet. First, the first address translation unit 251 determines whether the received packet is an IP packet. For example, the first address translation unit 251 determines whether the received packet is an IP packet by referring to the type code in the Ethernet header (L2 header) of the received frame. When the type code is "0x0800 (IPv4)", it determines that the packet is an IP packet.
[0040] Then, the first address conversion unit 251 performs a process (hereinafter referred to as a "first address conversion process") of converting the IP address (hereinafter referred to as a "second IP address") stored as the destination IP address of an IP packet from the management device 9 received via the management port 171 in a LAN direct connection state into the first IP address set in the management port 171 by the first setting process. As a result, the first IP address is stored as the destination IP address in the IP packet from the management device 9.
[0041] In this way, the first address conversion process is performed on the received IP packet, and thus the information processing device 1 is able to normally receive the packet transmitted from the management device 9 as an IP packet addressed to its own device (its own IP address). This will be described in detail later. The first address conversion unit 251 may determine whether the first IP address set in the management port 171 matches the second IP address, and perform the first conversion process only when the first IP address does not match the second IP address as a result of the determination. The application data stored in the IP packet transmitted by the management device 9 may be arbitrary. For example, data used in maintenance work is stored in the application data.
[0042] Moreover, the first address translation unit 251 stores the translation information related to the first address translation process (destination IP addresses before and after the translation process) in the translation information storage unit 282. When the direct LAN connection is released (determined to be released), the first address translation unit 251 discards (deletes) the translation information related to the first address translation process.
[0043] The second address conversion unit 252 performs an address conversion process on a return packet (a return packet generated by the packet generation unit 26) for an IP packet received from an external device (management device 9). Specifically, the second address conversion unit 252 performs a process (hereinafter referred to as a "second address conversion process") of converting a first IP address (an IP address set in the management port 171) stored as a source IP address of the return packet into a second IP address (a destination IP address before the first address conversion process) by referring to the conversion information stored in the conversion information storage unit 282. As a result, the second IP address is stored as a source IP address in the return packet. Note that the second address conversion unit 252 may perform the second address conversion process only on a return packet for an IP packet on which the first address conversion process has been performed.
[0044] Then, when the second address translation unit 252 has performed the second address translation process, it transmits the return packet after the second address translation process to the transmission unit 27. Note that, when the second address translation unit 252 has not performed the second address translation process on the return packet, it transmits (transfers) the return packet, which has not been subjected to the second address translation process, to the transmission unit 27 as is.
[0045] Packet generation unit 26 generates a return packet for an IP packet received from an external device (management device 9) via management port 171, and transmits the generated packet to second address translation unit 252. Note that in the return packet transmitted from packet generation unit 26 to second address translation unit 252, the IP address (first IP address) set in management port 171 by the first setting process is stored as the source IP address. Furthermore, application data stored in the return packet may be arbitrary. For example, data used in maintenance work is stored as the application data.
[0046] The transmitting unit 27 transmits an IP frame (IP packet) to an external device (management device 9) in the same subnetwork via the management port 171. In this embodiment, the transmitting unit 27 transmits a return packet for an IP packet received from the management device 9 to the management device 9 via the management port 171. Specifically, the transmitting unit 27 transmits to the management device 9 a return packet on which the second address conversion process has not been performed (the return packet itself generated by the packet generating unit 26) or a return packet on which the second address conversion process has been performed.
[0047] The storage unit 28 stores various types of information. In this embodiment, the storage unit 28 includes an address storage unit 281 and a conversion information storage unit 282.
[0048] The address storage unit 281 stores (saves) information related to the network setting (IP address) of the information processing device 1. Specifically, the address storage unit 281 stores information on the IP address (original IP address) of the management port 171 before the automatic setting of the IP address for the information processing device 1 (management port 171) (first setting process by the address setting unit 23) is performed. In this embodiment, when it is determined that the management port 171 and the management device 9 are in a LAN direct connection state and the first setting process is performed, the address storage unit 281 stores (saves) the original IP address of the management port 171. Thereby, when the maintenance work or the like is completed and the LAN direct connection state is released, it becomes possible to return the information processing device 1 (management port 171) to the original network setting (original IP address) by using the stored information on the original IP address.
[0049] The conversion information storage unit 282 stores conversion information related to the address conversion process (first address conversion process) for the IP packet received from the management device 9. The conversion information storage unit 282 stores, as the conversion information, a second IP address (destination IP address before the first address conversion process) which is the destination IP address in the IP packet received from the management device 9, in association with a first IP address (destination IP address after the first address conversion process) which is the IP address of the management port 171 set by the first setting process. The conversion information is stored, for example, in an address conversion table. However, the storage format of the conversion information is not limited to the table format, and may be stored in any format.
[0050] FIG. 3 is a diagram for explaining information stored in the address conversion table according to the present embodiment. As shown in FIG. 3, the address conversion table stores (stores) as conversion information, in association with the type of communication protocol (TCP / IP, UDP, ICMP, etc.) related to the received IP packet, the destination IP address and source IP address of the received packet, and the destination IP address and source IP address of the received packet after the first address conversion process. In this way, the address conversion table stores the destination IP address before the first address conversion process and the destination IP address after the first address conversion process in association with each other. In the case of TCP / IP, UDP, etc., port numbers (destination port number, source port number) may be stored as conversion information, as shown in FIG. 3. The address conversion table is not limited to the example shown in FIG. 3. Therefore, the address conversion table may further include other information than the information shown in FIG. 3.
[0051] FIG. 4 is a diagram showing an example of the address conversion table according to the present embodiment. FIG. 4 illustrates an example of conversion information stored when the communication protocol is TCP / IP and the second IP address "192.168.0.2" which is the destination IP address in the received packet (TCP / IP packet) is converted to the first IP address "192.168.0.99" set in the management port 171 by the first address conversion process. The address conversion table may store one or more pieces of conversion information, and when multiple pieces of conversion information are stored, different pieces of conversion information may be stored in each row. Since the source IP address in the received packet is not the subject of conversion in the first address conversion process, as shown in FIG. 4, the source IP address does not change (is the same) before and after the conversion process. Therefore, the source address may be stored only for either before or after the conversion process. Similarly, since the port number (destination port number, source port number) is not the subject of conversion in the first address conversion process, as shown in FIG. 4, the port number does not change (is the same) before and after the conversion process. Therefore, the port number may be stored only for either before or after the conversion process.
[0052] In this embodiment, the second address conversion unit 252 performs the second address conversion process on the return packet generated by the packet generation unit 26 by referring to the address conversion table shown in FIG. 4. Specifically, (1) the second address conversion unit 252 compares the IP protocol of the return packet generated by the packet generation unit 26 with the IP protocol stored in the address conversion table. In addition, (2) the second address conversion unit 252 compares the source IP address (and source port number) of the return packet generated by the packet generation unit 26 with the destination IP address (and destination port number) after address conversion stored in the address conversion table. In addition, (3) the second address conversion unit 252 compares the destination IP address (and destination port number) of the return packet generated by the packet generation unit 26 with the source IP address (and source port number) after address conversion stored in the address conversion table. Then, it is determined whether or not there is conversion information in the address conversion table that matches the comparison results for all of the above (1) to (3). If there is a matching translation information as a result of the comparison, a second address translation process is performed so that the destination address before address translation in that translation information (for example, the translation information in the first row of FIG. 4) becomes the source IP address of the return packet. Hereinafter, the flow of packets between the information processing device 1 and the management device 9 will be described using a specific example.
[0053] Fig. 5 is a sequence diagram showing an example of a packet flow between the information processing device 1 and the management device 9 according to this embodiment. Fig. 5 illustrates an example of the information processing device 1 in which the IP address of the management port 171 is 0.0.0.0 (IP address not set) and the MAC address of the management port 171 is 11-11-11-11-11-11. The IP address and MAC address of the operation port 172 of the information processing device 1 are 172.16.0.100 and 33-33-33-33-33-33, respectively. Fig. 5 also illustrates an example of the management device 9 in which the IP address (e.g., the IP address of the communication unit 97) is 192.168.0.1 and the MAC address (e.g., the MAC address of the communication unit 97) is 22-22-22-22-22-22. In this embodiment, the MAC addresses of the management port 171 and the operation port 172 are different, but the MAC addresses of both may be the same. Also, the IP addresses and MAC addresses of the management port 171, the operation port 172, and the management device 9 are merely examples, and may be any other IP addresses and MAC addresses.
[0054] First, as shown in FIG. 5, the information processing device 1 (management port 171) and the management device 9 (communication unit 97) are directly connected to the LAN by the administrator (step S1). As a result, the connection state determination unit 22 detects a link-up at the management port 171. Note that, before the information processing device 1 (management port 171) is directly connected to the LAN, the IP address of the management device 9 may be set as a default gateway setting in the information processing device 1 (management port 171). Similarly, before the information processing device 1 (management port 171) is directly connected to the LAN, an arbitrary subnet mask may be set. When the information processing device 1 (management port 171) is directly connected to the LAN, one or more ARP requests are transmitted from the management device 9. In this embodiment, a case where multiple ARP requests are transmitted from the management device 9 is illustrated. However, only the ARP request 1 described below may be transmitted from the management device 9. The ARP request transmitted from the management device 9 is described below.
[0055] The management device 9 transmits (broadcasts) an ARP request in order to communicate with the information processing device 1 (to know the MAC address of the information processing device 1 (management port 171)). Hereinafter, the ARP request transmitted from the management device 9 with the intention of communicating with the information processing device 1 (to know the MAC address of the information processing device 1) is referred to as an ARP request 1. In the ARP request 1, an IP address (an IP address to be automatically set) intended to be automatically set in the information processing device 1 for performing maintenance work or the like is stored as a target IP address. Specifically, an IP address (e.g., 192.168.0.2) that is in the same subnet as the management device 9 and is other than the IP address of the management device 9 is determined as the target IP address included in the ARP request 1 and stored in the ARP request. The IP address intended to be automatically set in the information processing device 1 is an IP address intended to be used as a destination IP address when the management device 9 communicates with the information processing device 1.
[0056] The IP address to be automatically set in the information processing device 1 may be determined automatically in the management device 1 or by the administrator. In the example of Fig. 5, ARP request 1 stores 192.168.0.1 as the source IP address, 22-22-22-22-22-22 as the source MAC address, and 192.168.0.2 as the target IP address.
[0057] In addition to ARP request 1, the management device 9 may transmit (broadcast) one or more ARP requests (hereinafter referred to as "ARP request 2") that are not intended to communicate with the information processing device 1 (to know the MAC address of the information processing device 1). For example, when the management device 9 is connected to a network, an ARP request for an IP address cached in the management device 9 (an ARP request for obtaining the MAC address of a device (a device other than the information processing device 1) to which the IP address is assigned) may be transmitted. An ARP request transmitted in this manner is an example of the ARP request 2. In the example of FIG. 5, 192.168.0.1 is stored as the source IP address, 22-22-22-22-22-22 as the source MAC address, and 192.168.0.99 as the target IP address in the ARP request 2.
[0058] The information processing device 1 (receiving unit 21) receives ARP request 1 and ARP request 2 from the management device 9 via the management port 171. FIG. 5 illustrates a case where the information processing device 1 receives ARP request 2 for the first time after link-up and then receives ARP request 1. That is, FIG. 5 illustrates a case where an ARP request that is not intended to communicate with the information processing device 1 is received first. In this embodiment, the first setting process is performed by the ARP request received first, so the first setting process is performed by the ARP request 2. Therefore, an IP address (192.168.0.99) that is not an IP address (192.168.0.2) intended to be automatically set in the information processing device 1 is set in the information processing device 1. However, the present disclosure also applies to a case where the ARP request 1 is received before the ARP request 2. In this case, the ARP request 1 is received first, so the first setting process is performed by the ARP request 1 (a process in which the IP address set as the target IP address in the ARP request 1 is set as the IP address of the management port 171). However, when ARP request 1 is received first, the IP address intended to be used as the destination IP address when management device 9 communicates with information processing device 1 is set in information processing device 1 (management port 171), so address conversion processing (first address conversion processing and second conversion processing) does not need to be performed in steps S6 and S7 described below.
[0059] When the information processing device 1 receives the ARP request 2 (step S2), a LAN direct connection determination process is performed. After the link-up is detected in step S1, only the ARP request 2 is received at the management port 171, and therefore, the information processing device 1 and the management device 9 are in a LAN direct connection state (connected directly to the LAN). Then, since the ARP request 2 is the first ARP request received after the information processing device 1 is directly connected to the LAN (in a LAN direct connection state), a process (first setting process) is performed to automatically set the IP address (192.168.0.99) set as the target IP address in the ARP request 2 as the IP address of the management port 171. That is, the network setting (IPv4 network setting) on the information processing device 1 side is automatically performed in accordance with the network environment of the management device 9. At this time, the original IP address (0.0.0.0), which is the IP address set in the information processing device 1 (management port 171), is stored in the address storage unit 281.
[0060] Then, the information processing device 1 transmits an ARP response to the ARP request 2 (hereinafter referred to as "ARP response 2") to the management device 9 via the management port 171 (step S3). The ARP response 2 stores 192.168.0.99 as the source IP address, 11-11-11-11-11-11 as the source MAC address, 192.168.0.1 as the target IP address, and 22-22-22-22-22-22 as the target MAC address.
[0061] Next, when the information processing device 1 receives the ARP request 1 (step S4), the LAN direct connection determination process is performed again. After the link-up is detected in step S1, the management port 171 receives the ARP request 1 and the ARP request 2, and since the source MAC addresses of the ARP request 1 and the ARP request 2 are the same (22-22-22-22-22-22), it is determined that the information processing device 1 and the management device 9 are in a LAN direct connection state (the LAN direct connection state continues). Note that, in FIG. 5, the ARP request 1 is transmitted after the ARP response 2 is transmitted, but the timing of transmitting the ARP response 2 may be after the ARP request 1 is transmitted.
[0062] Then, the information processing device 1 transmits an ARP response to the ARP request 1 (hereinafter referred to as "ARP response 1") to the management device 9 via the management port 171 (step S5). In the ARP response 1, 192.168.0.2 is stored as the source IP address, 11-11-11-11-11-11 as the source MAC address, 192.168.0.1 as the target IP address, and 22-22-22-22-22-22 as the target MAC address. In this way, the information processing device 1 transmits ARP responses to all received ARP requests with the MAC address of the management port 171 of the information processing device 1. At this time, unlike a normal ARP response, the source IP address of the ARP response uses (stores) the target IP address of the ARP request to be responded to, rather than the IP address (192.168.0.99) set in the management port. This allows the management device 9 to associate the MAC address (11-11-11-11-11-11) of the information processing device 1 with all target IP addresses specified in the ARP request. That is, even if the information processing device 1 is not set to the IP address (192.168.0.2) intended by the management device 9, the management device 9 can receive an ARP response from the intended IP address (192.168.0.2) and associate the intended IP address with the MAC address of the management port 171. In other words, even if the information processing device 1 is not set to the IP address (192.168.0.2) intended by the management device 9, the management device 9 appears to the information processing device 1 to hold the intended IP address, and therefore it becomes possible to communicate IP packets using the intended IP address. Therefore, in this case, even if the management device 9 uses the intended IP address (192.168.0.2) as the destination IP address, it is possible to communicate IP packets by sending IP packets to the MAC address of the information processing device 1 (however, address conversion processing, described below, is required).Each of the information processing device 1 and the management device 9 may store data obtained by an ARP packet (data in which an IP address is associated with a MAC address) as an ARP cache (ARP table).
[0063] Next, the information processing device 1 receives a TCP / IP packet (IP packet) addressed to the information processing device 1 (addressed to the MAC address of the management port 171) from the management device 9 (step S6). The IP packet received in step S6 is, for example, an IP packet transmitted from the management device 9 in order to perform maintenance work. Here, the IP address intended to be used as the destination IP address when the management device 9 communicates with the information processing device 1 is the target IP address (192.168.0.2) stored in the ARP request 1. Therefore, the management device 9 transmits an IP packet for performing maintenance work to the IP address (192.168.0.2). Therefore, 192.168.0.2 is stored as the destination IP address in the IP packet received in step S6. More specifically, the IP packet stores 192.168.0.1:3333 as the source IP address (and port number), 22-22-22-22-22-22 as the source MAC address, 192.168.0.2:80 as the destination IP address (and port number), and 11-11-11-11-11-11 (the MAC address obtained by ARP response 1) as the destination MAC address. When the IP packet is received, the LAN direct connection determination process is performed again. After the link-up is detected in step S1, the management port 171 receives the ARP request 1, the ARP request 2, and the above IP packet. Since the source MAC addresses of the ARP request 1, the ARP request 2, and the above IP packet are the same (22-22-22-22-22-22), it is determined that the information processing device 1 and the management device 9 are in a LAN direct connection state (the LAN direct connection state continues).
[0064] Then, since the destination IP address (192.168.0.2) of the IP packet is different from the IP address (192.168.0.99) set in the management port 171 of the information processing device 1, the information processing device 1 performs a process (first address conversion process) of converting (changing) the destination IP address of the IP packet to 192.168.0.99. At this time, conversion information related to the first address conversion process is stored in the conversion information storage unit 282 (see FIG. 4). As a result, even if the information processing device 1 is not set to the IP address (192.168.0.2) intended by the management device 9, by performing the first address conversion process, the information processing device 1 can normally receive the IP packet as a packet addressed to the device itself (addressed to the IP address of the management port 171).
[0065] Next, the information processing device 1 transmits a return packet for the IP packet to the management device 9 via the management port 171 (step S7). First, the information processing device 1 (packet generating unit 26) generates a return packet for the IP packet. The return packet generated by the packet generating unit 26 stores 192.168.0.99:80 as the source IP address (and port number), 11-11-11-11-11-11 as the source MAC address, 192.168.0.1:3333 as the destination IP address (and port number), and 22-22-22-22-22-22 as the destination MAC address.
[0066] Then, the information processing device 1 performs the second address conversion process on the return packet generated by the packet generating unit 26 as necessary by referring to the conversion information stored in the conversion information storage unit 282. The address conversion table shown in FIG. 4 has conversion information corresponding to the return packet generated by the packet generating unit 26. Specifically, referring to the information on "IP protocol" and "after address conversion" in the address conversion table, there is conversion information in which the "IP protocol" is the same as the protocol of the return packet (TCP / IP), the "destination address" of "after address conversion" is the same as the source IP address of the return packet (192.168.0.99.80), and the "source address" of "after address conversion" is the same as the destination IP address of the return packet (192.168.0.1:3333). In this way, when conversion information corresponding to the return packet exists, the second address conversion process is performed. 5, the second address conversion process converts the source IP address of the return packet from 192.168.0.99 to 192.168.0.2, which is the "destination address" of the "before address conversion" of the corresponding conversion information. This allows the management device 9 to receive the IP packet from the information processing device 1 as a return packet from the destination IP address 192.168.0.2 of the IP packet transmitted in step S6. By transmitting and receiving IP packets according to the above flow, it becomes possible to perform communication required for maintenance work.
[0067] In addition, when the direct LAN connection is released (the LAN cable is disconnected), the information processing device 1 resets the original IP address (0.0.0.0) of the management port 171 that was stored as the IP address of the management port 171 (automatically cancels the automatically set IP address) and discards the conversion information.
[0068] Fig. 6 is a flowchart showing an outline of the flow of processing when a packet is received according to this embodiment. The processing shown in this flowchart is started every time a frame is received in the information processing device 1. In this embodiment, the processing of the flowchart shown in Fig. 6 is started every time a frame is received in the management port 171 of the information processing device 1.
[0069] In step S101, a frame (packet) is received. The receiving unit 21 receives the frame (packet) via the management port 171. After that, the process proceeds to step S102.
[0070] In step S102, a connection state determination process is performed. The connection state determination process is a process for determining whether or not the information processing device 1 and the management device 9 are in a LAN direct connection state. The connection state determination process will be described in detail later with reference to Fig. 7. After that, the process proceeds to step S103.
[0071] In step S103, the process branches depending on whether or not the LAN direct connection state is determined. If the LAN direct connection state is not determined in the connection state determination process in step S102 (No in S103), the process proceeds to step S104. On the other hand, if the LAN direct connection state is determined (Yes in S103), the process proceeds to step S105.
[0072] In step S104, a setting release process is performed. The setting release process is a process for releasing the setting (the setting by the first setting process) performed for communication in a LAN direct connection state. The setting release process will be described in detail later with reference to FIG. 8. Thereafter, the process shown in this flowchart ends.
[0073] In step S105, it is determined whether an ARP packet has been received. The ARP processor 24 determines whether the packet received in step S101 is an ARP packet. If it is determined to be an ARP packet (Yes in S105), the process proceeds to step S106. On the other hand, if it is determined not to be an ARP packet (No in S105), the process proceeds to step S110.
[0074] In step S106, it is determined whether an ARP request has been received. The ARP processing unit 24 determines whether the packet received in step S101 is an ARP request. As a result, if it is determined to be an ARP request (Yes in S106), the process proceeds to step S107. On the other hand, if it is determined not to be an ARP request (No in S106), the process shown in this flowchart ends. Note that it is assumed that the received packet is determined not to be an ARP request when it is an ARP response.
[0075] In step S107, an ARP response is transmitted. The ARP processing unit 24 generates an ARP response with the MAC address of the management port 171 as the source MAC address as the ARP response to the ARP request packet received in step S101. Then, the ARP processing unit 24 transmits the generated ARP response to the device (management device 9) that transmitted the ARP request via the management port 171. Note that the ARP processing unit 24 sets the IP address set as the target IP address in the ARP request received in step S101 as the source IP address in the ARP response to the ARP request. Also, the APP processing unit 24 sets the MAC address of the management port 171 as the source MAC address of the ARP response. After that, the process proceeds to step S108.
[0076] In step S108, it is determined whether this is the first ARP request after direct connection to the LAN. The ARP processing unit 24 determines whether the ARP request packet received in step S101 is the first ARP request (first ARP request) received after direct connection to the LAN. If it is determined to be the first ARP request (Yes in S108), the process proceeds to step S109. On the other hand, if it is not determined to be the first ARP request (No in S108), the process shown in this flowchart ends.
[0077] In step S109, the original IP address is saved and the IP address is set (changed). If there is an IP address (original IP address) originally set in management port 171, address setting unit 23 stores (saves) the original IP address in address storage unit 281. If an IP address has not yet been set in management port 171, IP address "0.0.0.0" may be stored. Also, in step S109, address setting unit 23 sets the IP address set as the target IP address in the ARP request received in step S101 (first ARP request) as the IP address of management port 171. Thereafter, the processing shown in this flowchart ends.
[0078] In step S110, it is determined whether an IP packet has been received. The first address conversion unit 251 determines whether the packet received in step S101 is an IP packet (TCP / IP packet). As a result, if it is determined to be an IP packet (Yes in S110), the process proceeds to step S111. On the other hand, if it is determined not to be an IP packet (No in S110), the process shown in this flowchart ends. Note that the IP packet received in step S110 from the management device 9 via the management port 171 is an IP packet addressed to the MAC address of the management port 171 from the management device 9, received after an ARP response was transmitted to the management device 9.
[0079] In step S111, the first address conversion process is performed. The first address conversion unit 251 performs the first address conversion process on the IP packet received in step S101, thereby correctly receiving the IP packet as an IP packet addressed to the management port 171. The first address conversion unit 251 may determine whether or not the destination IP address of the IP packet received in step S101 matches the IP address set in the management port 171 in step S109, and may perform the first address conversion process if the two addresses do not match as a result of the determination. In addition, in step S111, the first address conversion unit 251 stores (saves) the address conversion information in the conversion information storage unit 282. After that, the process shown in this flowchart ends.
[0080] 7 is a flowchart showing an outline of the flow of a connection state determination process according to this embodiment. The process shown in this flowchart is started when the information processing device 1 receives a frame (packet), etc.
[0081] In step S201, it is determined whether the management port 171 is linked up. The connection state determination unit 22 determines whether the management port 171 is in a link up state or a link down state by determining the link state of the management port 171. If it is determined to be in a link up state (Yes in S201), the process proceeds to step S202. On the other hand, if it is determined to be in a link down state (No in S201), the process proceeds to step S205. Note that the link state is determined in step S201 by receiving a packet in step S101 of FIG. 6, but the connection state determination unit 22 may detect (determine) the link state in the management port 171 and perform a LAN direct connection determination process (determine that the LAN direct connection state is not in a state (the LAN direct connection state has been released)) at a timing other than the timing at which the packet is received. For example, the connection state determination unit 22 may determine the link state at a predetermined time interval (for example, every few seconds), and determine (detect) that the LAN direct connection state is in a link down state (becomes a link down state), and determine that the LAN direct connection state is not in a state. In addition, the connection status determination unit 22 may determine (detect) that the link is down (that the link has become down) upon receiving a notification (interrupt notification) of a link down from another functional unit (not shown) of the information processing device 1, and determine that the LAN is not directly connected.
[0082] In step S202, it is determined whether the received packet is an ARP packet or an IP packet. The connection status determination unit 22 determines whether the packet received in step S101 is an ARP packet or an IP packet by determining the type of the packet received in step S101. If it is determined that the received packet is an ARP packet or an IP packet (Yes in S202), the process proceeds to step S203. On the other hand, if it is determined that the received packet is not an ARP packet or an IP packet (No in S202), the process shown in this flowchart ends.
[0083] In step S203, it is determined whether packets (frames) are received from only one device. The connection status determination unit 22 determines whether packets (frames) are received from only one device at the management port 171 by referring to the source MAC addresses of all ARP packets and IP packets received after link-up. If it is determined that packets are received from only one device (Yes in S203), the process proceeds to step S204. On the other hand, if it is not determined that packets are received from only one device (No in S203), the process proceeds to step S205.
[0084] In step S204, it is determined that the state is a LAN direct connection state. Since the management port 171 receives packets from only one device, the connection state determination unit 22 determines that the management port 171 and the other device (management device 9) are in a LAN direct connection state. After that, the process shown in this flowchart ends.
[0085] In step S205, it is determined that the LAN is not directly connected. Since the management port 171 receives packets from a plurality of devices, the connection status determination unit 22 determines that the management port 171 and the other device (management device 9) are not directly connected to the LAN (the direct LAN connection has been released or is not directly connected to the LAN). After that, the process shown in this flowchart ends.
[0086] Fig. 8 is a flowchart showing an outline of the flow of the setting release process according to this embodiment. The process shown in this flowchart is started when it is determined that the connection is not in a LAN direct connection state in the connection state determination process in step S102 in the flowchart shown in Fig. 6 (step S205 in the flowchart shown in Fig. 7), etc.
[0087] In step S301, the conversion information (IP address conversion information) is discarded. If there is conversion information stored in the conversion information storage unit 282, the first address conversion unit 251 discards (deletes) the conversion information from the conversion information storage unit 282. After that, the process proceeds to step S302.
[0088] In step S302, it is determined whether an IP address is stored in address storage unit 281. Address setting unit 23 determines whether information related to the IP address (IP address) originally set in management port 171 is stored by address storage unit 281. That is, address setting unit 23 determines whether the original IP address is stored by address storage unit 281 in step S109. If it is determined that the IP address is stored in address storage unit 281 (Yes in S302), the process proceeds to step S303. On the other hand, if it is determined that the IP address is not stored in address storage unit 281 (No in S302), the process shown in this flowchart ends.
[0089] In step S303, the IP address (original IP address) stored in address storage unit 281 is set to management port 171. Address setting unit 23 resets the original IP address as the IP address of management port 171 (performs the second setting process) to return to its own network setting that was saved, thereby canceling the address setting in the first address conversion process. After performing the second setting process, address setting unit 23 may discard (delete) the IP address information stored in address storage unit 281. Thereafter, the process shown in this flowchart ends.
[0090] 9 is a flowchart showing an outline of the flow of an IP packet transmission process according to this embodiment. The process shown in this flowchart is started when the packet generator 26 generates a return packet (IP packet) in response to an IP packet received from another device (management device 9), etc.
[0091] In step S401, the generated return packet (IP packet) is transmitted. The packet generating unit 26 transmits the generated return packet to the second address conversion unit 252. After that, the process proceeds to step S402.
[0092] In step S402, the second address conversion process is performed. The second address conversion unit 252 performs the second address conversion process on the return packet generated by the packet generation unit 26 by referring to the address conversion information stored in the conversion information storage unit 282 in step S111. This enables the management device 9 side to receive the return packet as a return packet transmitted from the intended destination (the destination of the IP packet transmitted by the management device 9). Note that, if the address conversion information corresponding to the return packet generated by the packet generation unit 26 is not stored in the conversion information storage unit 282, the second address conversion process does not need to be performed in step S402. After that, the process proceeds to step S403.
[0093] In step S403, the return packet is transmitted to the management device 9. The transmission unit 27 transmits the return packet that has been subjected to the second address conversion process in step S402 (the return packet whose source IP address has been converted) to another device (management device 9) via the management port 171. Note that if the second address conversion process is not performed in step S402, the transmission unit 27 transfers (transmits) the return packet transmitted in step S401 to the management device 9 as is. After that, the process shown in this flowchart ends.
[0094] As described above, according to this embodiment, when the communication port of the information processing device and the external device are directly connected to the LAN (when it is determined that the device is directly connected to the LAN), the address set as the target IP address in the ARP request packet received from the external device via the communication port is automatically set as the IP address of the communication port, thereby making it possible to easily perform network settings (setting of an IP address). This makes it possible to eliminate the trouble of checking the network environment in which the target device (information processing device 1) operates and the trouble of manually performing network settings to match the network environments of both devices during maintenance work, etc. In other words, when an information processing device such as an appliance device communicates with a management device, if the information processing device is directly connected to the LAN, it is possible to connect to the information processing device by being aware of only the network settings of the management device without being aware of the settings of the information processing device, and therefore connection is easy. In addition, according to this embodiment, when it is determined that the device is not directly connected to the LAN, the settings made by the first setting process are released, so that the address settings can be automatically restored when the direct LAN connection is released, and it is possible to eliminate the trouble of manually releasing (restoring) the network settings made to enable communication between the devices. As described above, according to this embodiment, it is possible to eliminate the trouble of the user (administrator) manually configuring the network settings, and it is possible to easily establish a network connection between devices. As a result, for example, the ease of use of the appliance device, which is the information processing device 1, is improved, and it is also possible to shorten the maintenance work time.
[0095] <Other embodiments> In the above embodiment, the information processing device 1 is illustrated as having a plurality of communication ports including a communication port for management work (management port 171) and a communication port for business use (operation port 172), which are different communication ports, but the information processing device 1 may be an information processing device having only one communication port. In the present embodiment, an example is illustrated in which the information processing device 1 has only one communication port, and this one communication port is used both during management work and during business.
[0096] Fig. 10 is a schematic diagram showing the configuration of a system according to this embodiment. The configuration of the system according to this embodiment is generally similar to the configuration of the system according to the above embodiment described with reference to Fig. 1, except for the communication interface 17. Therefore, only the configuration (communication interface 17) that differs from the above embodiment will be described below.
[0097] In this embodiment, the information processing device 1 includes one communication port 173 as the communication interface 17. The communication port 173 corresponds to a "first communication port" in this disclosure. The communication port 173 is a communication port used for both business and management operations. Therefore, when a management operation is to be performed, the communication port 173 may be in use for business. For example, the communication port 173 may be used for business because the communication port 173 is connected to a device other than the management device 9 via a LAN cable. That is, the communication port 173 may be used as the operation port 172 in the above-mentioned embodiment. In this case, the administrator disconnects the LAN cable or the device from the communication port 173 (disconnects the device from the currently connected network), and then uses the communication port 173 as the management port 171 in the above-mentioned embodiment. FIG. 10 shows a state in which the communication port 173 is connected one-to-one to the management device 9 using a wired cable, similar to the management port 171.
[0098] The functional configuration of the information processing device 1 according to this embodiment is roughly similar to the functional configuration of the information processing device 1 described in the above embodiment with reference to Fig. 2, so a detailed description will be omitted. However, in this embodiment, the "management port 171" in the description of the functional configuration in the above embodiment will be read as a "communication port 173".
[0099] Fig. 11 is a sequence diagram showing an example of a packet flow between the information processing device 1 and the management device 9 according to this embodiment. In Fig. 11, the information processing device 1 is exemplified as a device having an IP address of 172.16.0.100 and a MAC address of 11-11-11-11-11-11 for the communication port 173. Note that, as in the case of Fig. 5, the management device 9 is exemplified as a device having an IP address of 192.168.0.1 and a MAC address of 22-22-22-22-22-22.
[0100] First, as shown in FIG. 11, the information processing device 1 (communication port 173) and the management device 9 (communication unit 97) are directly connected to the LAN by the administrator (step S1). If the communication port 173 was used as an operational port before the information processing device 1 (communication port 173) and the management device 1 were directly connected to the LAN, the above-mentioned LAN cable or device is disconnected from the communication port 173 in the stage before step S1. The processes after step S1 are roughly similar to the flow of each process described in the above embodiment with reference to FIG. 5, and therefore detailed description will be omitted. However, in this embodiment, in step S2, the original IP address (172.16.0.100), which is the IP address set in the information processing device 1 (communication port 173), is stored in the address storage unit 281. Furthermore, when the direct LAN connection is released (the LAN cable is disconnected), the information processing device 1 resets the saved original IP address (172.16.0.100) of the communication port 173 as the IP address of the communication port 173 (automatically cancels the automatically set IP address), and discards the conversion information. As a result, even when the communication port 173 is used again as a business communication port, it is possible to perform communication using the IP address 172.16.0.100 that is originally set for the communication port 173.
[0101] Moreover, the flow of each process according to this embodiment is roughly similar to the flow of each process described in the above embodiment with reference to Figures 6 to 9, so detailed description will be omitted. However, in this embodiment, the "management port 171" in the description of the process in the above embodiment will be read as the "communication port 173." Furthermore, if the communication port 173 was used as an operation port before the information processing device 1 was directly connected to the management device 1 via LAN, the above-mentioned LAN cable or device will be disconnected from the communication port 173 before step S101 in Figure 6. [Explanation of symbols]
[0102] 1. Information processing device 9 Management device
Claims
1. one or more communication ports including a first communication port; a connection state determination means for performing a determination process for determining whether or not the first communication port of the one or more communication ports is in a one-to-one wired connection with an external device; an address setting means for performing a first setting process, when it is determined that the external device is in the wired connected state, of setting a first IP address, which is set as a target IP (Internet Protocol) address in an ARP (Address Resolution Protocol) request packet received from the external device via the first communication port in the wired connected state, as an IP address of the first communication port; An information processing device comprising:
2. the address setting means performs the first setting process on the ARP request packet that is first received via the first communication port in the wired connection state; The information processing device according to claim 1 .
3. the connection state determination means determines whether or not the first communication port and the external device are in a one-to-one wired connection state by using whether or not the source device of packets received via the first communication port up until the time when the determination process is performed is the same; 3. The information processing device according to claim 1 or 2.
4. The packet received via the first communication port is an ARP packet and / or an IP packet received via the first communication port. The information processing device according to claim 3 .
5. the connection state determination means determines that the first communication port and the external device are in a one-to-one wired connection state when the first communication port is in a link-up state and the source device of packets received via the first communication port up until the time when the determination process is performed is the same; The information processing device according to claim 4.
6. the connection state determination means determines that the first communication port and the external device are not in a one-to-one wired connection state when the first communication port is in a link-up state and the source device of packets received via the first communication port up until the time when the determination process is performed is not the same; The information processing device according to claim 4.
7. the connection state determination means determines that the first communication port and the external device are not in a one-to-one wired connection state when the first communication port is in a link-down state; 3. The information processing device according to claim 1 or 2.
8. the connection state determination means performs the determination process every time a packet is received via the first communication port.
3. The information processing device according to claim 1 or 2.
9. The ARP request packet received via the first communication port in the wired connected state is an ARP request packet received after the last transition of the first communication port from a link down state to a link up state that occurred before the time when the wired connected state was determined.
3. The information processing device according to claim 1 or 2.
10. a first address conversion means for converting a second IP address stored as a destination IP address of an IP packet received from the external device through the first communication port in the wired connection state into the first IP address set as an IP address of the first communication port, thereby storing the first IP address in the IP packet as a destination IP address; 3. The information processing device according to claim 1 or 2.
11. the first address conversion means determines whether the first IP address and the second IP address match, and when the result of the determination indicates that the first IP address and the second IP address do not match, performs the first conversion process; The information processing device according to claim 10.
12. a conversion information storage means for storing, as conversion information relating to the first conversion process, the second IP address which is a destination IP address before the first conversion process and the first IP address which is a destination IP address after the first conversion process in association with each other; A packet generating means for generating a return packet for the IP packet; and a second address conversion means for performing a second conversion process of converting the first IP address stored as a source IP address of the return packet to the second IP address based on the conversion information, thereby storing the second IP address as a source IP address in the return packet. The information processing device according to claim 10.
13. an ARP processing means for transmitting an ARP response packet, which stores a MAC (Media Access Control) address of the first communication port, to the external device via the first communication port; the ARP processing means transmits the ARP response packet, which stores the MAC address of the first communication port, in response to the ARP request packet even when the target IP address of the ARP request packet received via the first communication port does not match the IP address of the first communication port.
3. The information processing device according to claim 1 or 2.
14. When transmitting the ARP response packet, the ARP processing means stores, as a source IP address of the ARP response packet, an IP address set as a target IP address in the ARP request packet to which the ARP response packet is to be responded. The information processing device according to claim 13.
15. the address setting means, when it is determined that the device is not in the wired connection state, cancels the setting of the first IP address by the first setting process.
3. The information processing device according to claim 1 or 2.
16. further comprising an address storage means for storing the first communication port IP address before the first setting process; when it is determined that the first communication port is not in the wired connection state, the address setting means performs a second setting process to set the stored IP address of the first communication port before the first setting process as the IP address of the first communication port again, thereby canceling the setting of the first IP address. The information processing device according to claim 15.
17. the address setting means sets an IP address of the external device as a default gateway setting for the first communication port; 3. The information processing device according to claim 1 or 2.
18. a computer having one or more communication ports including a first communication port, a connection status determination step of performing a determination process of determining whether or not the first communication port of the one or more communication ports is in a one-to-one wired connection with an external device; an address setting step of performing a first setting process in which, when it is determined that the external device is in the wired connected state, a first IP address set as a target IP (Internet Protocol) address in an ARP (Address Resolution Protocol) request packet received from the external device via the first communication port in the wired connected state is set as an IP address of the first communication port; An information processing method.
19. A computer having one or more communication ports including a first communication port, a connection state determination means for performing a determination process for determining whether or not the first communication port of the one or more communication ports is in a one-to-one wired connection with an external device; an address setting means for performing a first setting process, when it is determined that the external device is in the wired connected state, of setting a first IP address, which is set as a target IP (Internet Protocol) address in an ARP (Address Resolution Protocol) request packet received from the external device via the first communication port in the wired connected state, as an IP address of the first communication port; A program to function as a
Citation Information
Patent Citations
Automatic setting method for ip address in tcp / Ip network
JP1999074915A