Internet protocol address take-over system in a local area network and method thereof

Information

  • Patent Application
  • 20070291704
  • Publication Number
    20070291704
  • Date Filed
    June 14, 2006
    18 years ago
  • Date Published
    December 20, 2007
    16 years ago
Abstract
An Internet protocol (IP) address take-over system in a local area network and a method thereof are provided. The IP address take-over system takes over the IP addresses in a server connecting with a plurality of clients and containing a plurality of network interface cards, and automatically updates the media access control (MAC) addresses stored in the address resolution protocol (ARP) caches of the clients and corresponding to the IP address of the server, so as to guarantee the continuity of the network communication between the clients and the server, and improve the reliability of the server.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a block diagram of the system of the present invention; and



FIG. 2 is a flow chart of the method of the present invention.





DETAILED DESCRIPTION OF THE INVENTION

The preferred embodiment of the present invention will be described in detail with accompany drawings as below.


Referring to FIG. 1, it shows an IP address take-over system in a local area network of the present invention, which is used for taking over the IP addresses in a server 10 connecting with a plurality of clients 80 and containing a plurality of NICs. The system comprises a CPU 20, a network connection state detection module 30, an IP address take-over module 40, a unicast ARP requirement send module 50, a first NIC 60, and a second NIC 70.


The server 10 includes a CPU 20, a network connection state detection module 30, an IP address take-over module 40, a unicast ARP requirement send module 50, a first NIC 60, and a second NIC 70. The network connection state detection module 30 disposed between the CPU 20 and the first NIC 60 is used for detecting the network connection state of the first NIC 60 by receiving the signals sent by the first NIC 60, and sending a disconnection signal to the CPU 20 when the first NIC 60 is disconnected. The IP address take-over module 40, connected respectively with the CPU 20, the first NIC 60, and the second NIC 70, is used for receiving a control signal sent by the CPU 20, clearing the setting of the first NIC 60 according to the control signal, and setting the IP address of the first NIC 60 to be a slave IP address of a second NIC 70 which operates normally in the same or a different network segment. The unicast ARP requirement send module 50 disposed between the CPU 20 and the second NIC 70 is used for receiving the control signal sent by the CPU 20, and forcibly unicasting an ARP requirement containing the MAC address of the second NIC 70 to each client 80 through the second NIC 70 according to the control signal, so as to update the MAC address stored in an ARP cache of each client 80 and corresponding to the IP address of the first NIC 60.


The embodiment of the present invention will be described in more detail below.


The client 80 is connected with the first NIC 60 of the server 10 through an IP address, and the IP address of the server 10 and the MAC address of the first NIC 60 are stored in a correspondence list of the IP address and the MAC address stored in the local ARP cache. Meanwhile, the server 10 records the IP address and the MAC address of the client 80 connected with the first NIC 60. The network connection state detection module 30 receives the signals sent by the first NIC 60 continuously, so as to determine the network connection state of the first NIC 60. When the first NIC 60 is disconnected, the network connection state detection module 30 sends a disconnection signal to the CPU 20. The CPU 20 sends a control signal to the IP address take-over module 40 after receiving the disconnection signal. The IP address take-over module 40 clears the setting of the first NIC 60, and sets the IP address of the first NIC 60 to be a slave IP address of the second NIC 70 which operates normally in the same or a different network segment, according to the control signal. When the IP address of the first NIC 60 and the IP address of the second NIC 70 are in the same network segment, a route of the network segment is used; when the IP address of the first NIC 60 and the IP address of the second NIC 70 are in different network segments and there is no route there-between, a route of a master IP address of the second NIC 70 is used; when the IP address of the first NIC 60 and the IP address of the second NIC 70 are in different network segments and there are routes there-between, a route without the IP addresses of the routes connecting the two network segments is used. After a successful setting, the IP address take-over module 40 sends a successful setting signal to the CPU 20. The CPU 20 sends a control signal to the unicast ARP requirement send module 50 after receiving the successful setting signal. The unicast ARP requirement send module 50 traverses the IP address and the MAC address of the client 80 connected with the first NIC 60, which are recorded by the server 10, according to the control signal, and forcibly unicasts an ARP requirement including the IP address of the first NIC 60, the MAC address of the second NIC 70 set with the IP address, the IP address and the MAC address of the client 80 to the IP address of the client 80, so as to update the MAC address stored in the ARP cache of the client 80 and corresponding to the IP address of the first NIC 60.


Now referring to FIG. 2, it is a flowchart of the method of the present invention. As shown in the drawing, the method of the present invention comprises recording the IP address and the MAC address of the client 80 connected with the first NIC 60 of the server 10 (step S200); detecting the network connection state of the first NIC 60 (step S210); when the network of the first NIC 60 is disconnected, clearing the setting of the first NIC 60, and setting the IP address of the first NIC 60 to be the slave IP address of the second NIC 70 which operates normally in the same or a different network segment (step S220); and unicasting an ARP requirement including the IP address of the first NIC 60, the MAC address of the second NIC 70, the IP address of the client 80, and the MAC address of the client 80 to the client 80 (step S230).


First, the client 80 is connected with the first NIC 60 of the server 10 through an IP address, and the IP address of the server 10 and the MAC address of the first NIC 60 are stored in a correspondence list of the IP address and the MAC address stored in the local ARP cache. Meanwhile, the server 10 records the IP address and the MAC address of the client 80 connected with the first NIC 60 through the IP address (step S200). Then, the network connection state detection module 30 receives the signals sent by the first NIC 60 continuously so as to determine the network connection state of the first NIC 60 (step S210). When the first NIC 60 is disconnected, the network connection state detection module 30 sends a disconnection signal to the CPU 20. The CPU 20 sends a control signal to the IP address take-over module 40 after receiving the disconnection signal. The IP address take-over module 40 clears the setting of the first NIC 60, and sets the IP address of the first NIC 60 to be a slave IP address of the second NIC 70 which operates normally in the same or a different network segment, according to the control signal (step S220). At this time, when the IP address of the first NIC 60 and the IP address of the second NIC 70 are in the same network segment, a route of the network segment is used; when the IP address of the first NIC 60 and the IP address of the second NIC 70 are in different network segments and there is no route there-between, a route of a master IP address of the second NIC 70 is used; when the IP address of the first NIC 60 and the IP address of the second NIC 70 are in different network segments and there are routes there-between, a route without the IP addresses of the routes connecting the two network segments is used. After a successful setting, the IP address take-over module 40 sends a successful setting signal to the CPU 20. The CPU 20 sends a control signal to the unicast ARP requirement send module 50 after receiving the successful setting signal. The unicast ARP requirement send module 50 traverses the IP address and the MAC address of the client 80 connected with first NIC 60, which are recorded by the server 10, according to the control signal, and forcibly unicasts an ARP requirement to the IP address of the client 80 (step S230). The ARP requirement includes the IP address of the first NIC 60, the MAC address of the second NIC 70, the IP address and the MAC address of the client 80, so as to update the MAC address stored in the ARP cache of the client 80 and corresponding to the IP address of the first NIC 60.

Claims
  • 1. An Internet protocol (IP) address take-over system in a local area network, for taking over the IP addresses in a server connecting with a plurality of clients and containing a plurality of network interface cards (NIC), the system comprises: a central processing unit (CPU);a network connection state detection module for detecting the network connection state of a first NIC of the server and sending a state signal to the CPU;an IP address take-over module for receiving a control signal sent by the CPU, clearing the setting of the first NIC according to the control signal, and setting the IP address of the first NIC to be a slave IP address of a second NIC which operates normally in the same or a different network segment; anda unicast address resolution protocol (ARP) requirement send module for receiving a control signal sent by the CPU and unicasting an ARP requirement including the IP address of the first NIC, a media access control (MAC) address of the second NIC, the IP address of each of the clients, and the MAC address of each of the clients to each of the clients, according to the control signal.
  • 2. The IP address take-over system in a local area network as claimed in claim 1, wherein the network connection state detection module is used for detecting the network connection state of the first NIC by receiving the signals sent by the first NIC continuously.
  • 3. The IP address take-over system in a local area network as claimed in claim 1, wherein when the IP address take-over module clears the setting of the first NIC, and sets the IP address of the first NIC to be the slave IP address of the second NIC which operates normally in the same or a different network segment, further comprising: when the IP address of the first NIC and the IP address of the second NIC are in the same network segment, using a route of the network segment;when the IP address of the first NIC and the IP address of the second NIC are in different network segments and there is no route there-between, using a route of a master IP address of the second NIC; andwhen the IP address of the first NIC and the IP address of the second NIC are in different network segments and there are routes between each other, using a route without the IP addresses of the routes connecting the two network segments.
  • 4. An IP address take-over method in a local area network for taking over the IP addresses in a server connecting a plurality of clients and containing a plurality of NICs, the method comprises the following steps: recording the IP addresses of the plurality of clients connected with a first NIC of the server and a MAC address of each of the clients;detecting a network connection state of the first NIC;when the network of the first NIC is disconnected, clearing the setting of the first NIC, and setting the IP address of the first NIC to be a slave IP address of a second NIC which operates normally in the same or a different network segment; andunicasting an ARP requirement including the IP address of the first NIC, a MAC address of the second NIC, the IP address of each of the clients, and the MAC address of each of the clients to each of the clients, so as to update the MAC address stored in an ARP cache of each of the clients, wherein the MAC address corresponds to the IP address of the first NIC.
  • 5. The IP address take-over method in a local area network as claimed in claim 4, wherein the detection of the network connection state of the first NIC is completed by detecting the signals sent by the first NIC.
  • 6. The IP address take-over method in a local area network as claimed in claim 4, wherein when the network of the first NIC is disconnected, clearing clear the setting of the first NIC and setting the IP address of the first NIC to be the slave IP address of a second NIC which operates normally in the same or a different network segment further comprising: when the IP address of the first NIC and the IP address of the second NIC are in the same network segment, using a route of the network segment;when the IP address of the first NIC and the IP address of the second NIC are in different network segments and there is no route there-between, using a route of a master IP address of the second NIC; andwhen the IP address of the first NIC and the IP address of the second NIC are in different network segments and there are routes there-between, using a route without the IP addresses of the routes connecting the two network segments.