METHOD FOR ESTABLISHING NETWORK CONNECTION BETWEEN SERVER AND NETWORK DEVICE

A method is used for establishing network connection between a server and a network device, wherein the network device uses a dynamic host configuration protocol to obtain a network address in a specific network segment. After the server obtains a parameter set related to the network device and starts to establish a network connection to the network device, whether the network connection is stable is checked. When it is determined that the network connection is unstable and the server fails to connect to the network device, the server automatically searches the network addresses in the specific network segment to locate the network device, and connects to the network device when the network device is found.

FIELD OF THE INVENTION

The present invention relates to a method for establishing network connection, and more particularly to a method for establishing network connection between a server and a network device. The present invention also relates to a network connection system, in which the method for establishing network connection is used.

BACKGROUND OF THE INVENTION

In order to take advantage of capability of a server of centrally processing data and conducting calculations, a server is conventionally connected to multiple network devices via a network to process data generated by the multiple network devices and performing various types of calculations in response to requirements from the multiple network devices. For establishing network connections of the server and the network devices, the server reads predetermined network addresses to connect to the network devices. However, such a network connection establishment method cannot be easily applied to network devices that use Dynamic Host Configuration Protocol (DHCP) to obtain network addresses. Since a network device that obtains the network address through the dynamic host configuration protocol may be assigned thereto a different network address whenever it is started, it is necessary to frequently manually update the network address for the server to connect to the network device.

SUMMARY OF THE INVENTION

Therefore, an object of the present invention is to provide a method for establishing network connection between a server and a network device, by which the server is capable of automatically locating and connecting to the network device.

The present invention provides a method for establishing network connection between a server and a network device, wherein the network device uses a dynamic host configuration protocol to obtain a network address in a specific network segment. The method comprises: the server obtaining a parameter set related to the network device, and starting to establish a network connection to the network device; checking whether the network connection is stable; and when it is determined that the network connection is unstable and the server fails to connect to the network device, the server automatically searching the network addresses in the specific network segment to locate the network device, and connecting to the network device when the network device is found.

The present invention provides a network connection system, which includes a server; a network; and a network device optionally connecting to the server via the network. For connecting to the server, the network device uses a dynamic host configuration protocol to obtain a network address of the network in a specific network segment, the server obtains a parameter set related to the network device and starts to establish a network connection to the network device. When the server determines that the network connection is unstable and the server fails to connect to the network device, the server automatically searches network addresses in the specific network segment to locate the network device, and connects to the network device when the network device is found.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Please refer toFIG. 1. The network connection system includes a server10, a network device14and a DHCP server16, which are interconnected via a network12. Therefore, the server10and the network device14can obtain a network address based on the DHCP algorithm.

Further refer toFIG. 2. For connecting to the network device14, the server10first obtains a parameter set100related to the network device14(Step S200). The parameter set100may be previously stored in the server10or obtained from an external source. Alternatively, the parameter set100may be dynamic data inputted into the server10via a user input interface. The parameter set100, for example, may include various data useful for identifying the network device14, such as a specific network segment where the network device14is located, a Media Access Control (MAC) address of the network device14, and/or a network address assigned to the network device14by default.

After obtaining the parameter set100, the server10starts to establish network connection to the device14according to the parameter set100(Step S202). For example, if the parameter set100includes a MAC address of the network device14and a specific network segment, the server10can search each of the MAC addresses in the specific network segment, and compares the MAC addresses with the MAC address contained in the parameter set100. Once the server found an MAC address in compliance with the MAC address contained in the parameter set100, it is determined the network device14to be connected is located. In another example, if the parameter set100includes a network address assigned to the network device14by default, the server10can directly connect to the network device14at the assigned network address. Of course, for reconfirmation, it is preferable that the parameter set100includes not only the assigned network address but also a MAC address of the network device14. Then the searching process of consistent MAC address can be performed for double check. The searching process, for example, may be executed according to an Address Resolution Protocol (ARP), and the MAC address of the network device14and the located MAC address by searching can be recorded in an ARP Table.

Afterwards, the server10determines whether the connection to the network device14is stable or not (Step S204). If the network connection cannot be successfully established, the connection status is, of course, determined to be unstable. Furthermore, the connection status can be determined, for example, according to a data packet transmission condition. Concretely, if the server10successfully receives required data from the network device14. In response to different requirements, the criteria for determining whether the connection in a network is stable or not may vary. For example, the server10may determine whether the connection to the network device14is stable or not according to a transmission condition of data packets and continuity of contents of the received data packets. If the server10receives no response to a connecting requirement from the network device14, or some contents of the received data are missing, it is determined that the connection is unstable. It is understood that those skilled in the art may refer to other parameters to determine whether the connection is established or stable depending on practical requirements. For example, the network device14may automatically and regularly or optionally send a state-indicating signal to the server10to show a stable or unstable state thereof.

Provided that the connection between the server10and the network device14is stable enough for qualified data transmission, whether a firmware version of the network device14is supported by the server10is determined (Step S206). In practical, firmware versions which are surely supported by the server10are first obtained. For example, there may be a file recording a list of firmware versions supported by the server10. Then the firmware version of the network device14is compared with the recorded firmware versions. If it is found to be in the list, it is determined that the firmware version of the network device14is supported by the server10. Then after a period of time, the flow proceeds to Step S204again to recheck the connection condition between the server10and the network device14. It is understood by those skilled in the art, the length of the period of time may be predetermined according to practical requirements. On the contrary, if it is determined in Step S206that the server10cannot support the firmware version of the network device14, the server14issues and sends a first warning signal to notify a manager of the situation (Step S208).

On the other hand, if it is determined in Step S204that the connection between the server10and the network device14is unstable, a series of checks and actions to respond to the unstable connection are automatically performed. It is understood that effective communication between the server10and the network device14requires, for example, unblocked network, successful connection of the network device14to the network, active state of the network device14, common communication protocol between the server and the network device14, etc. Therefore, one or more of the above-described factors may be checked in order to automatically perform trouble-shooting tasks.

For example, as illustrated inFIG. 2, the flow proceeds to Step S210, in which whether the server10is effectively connected to the network device14is checked, when it is determined in Step S204that the connection between the server10and the network device14is unstable. If it is determined in Step S210that the server10is not effectively connected to the network device14, the server10issues a second warning signal to notify the manager of the situation (Step S212). Meanwhile or when triggered, the server10checks the previously obtained network addresses in the specific network segment (Step S218, which will be described in more detail later) in order to locate the network device and start to establish the connection to the network device again (Step S220). In this embodiment, Step S218may be suspended and then triggered under a certain condition. For example, the condition may be under approval of the manager or after a predetermined period of time. On the contrary, if it is determined in Step S210that the server10is effectively connected to the network device14, while the connection status is unstable due to, for example, incapability of receiving data, high data-drop rate, low data flow, setting failure, etc., the network device14is restarted automatically or manually by the server10via proper means (Step S216). For example, if the network device14works with Power Over Ethernet (POE), the server10can restart the network device14by briefly cutting a power supply to the network device14. Alternatively, the server10can control the network device14to restart by way of a Common Gateway Interference (CGI). Furthermore, a third warning signal may be issued and sent to notify the manager of the situation (Step S214).

Hereinafter, the detail of Step S218is described. Basically, the server10searches network addresses by way of the Address Resolution Protocol (ARP). The server10queries one of the network addresses based on ARP to request a MAC address of the network device corresponding to this network address. If there is no such network device existing, the server10would not receive any response. On the other hand, if a specified network device responds to the query with its MAC address, the server10would receive the MAC address and updates the MAC address recorded in the ARP Table and corresponding to the specified network address with the received MAC address. Meanwhile, the server10compares the newly updated MAC address with the MAC address included in the parameter set100to identify whether the specified network device is the network device14or not. Upon finding the network device14, the flow proceeds from Step S220to S202to restart the establishment of connection. If the network device14is found after all the network addresses included in the specific network segment are checked, the flow proceeds from Step S220to Step S212, i.e. issuing and sending the second warning signal to the manager. Desirably but not necessarily, the current network address of the network device14is stored into the parameter set100for possible restarting later.

It is understood from the above descriptions that by way of the method for establishing network connection between a server and a network device according to the present invention, the DHCP network address of the network device can be automatically found. Therefore, the problems encountered in the prior art can be solved, so it is not necessary to frequently manually update the network address for the server to connect to the network device.