主权项 |
1. A computer program product for double IP address recovery, wherein double IP address is a situation of a same IP address for a first host and a second host, wherein the double IP address recovery resolves the double IP address, the computer program product comprising a non-transitory computer readable storage medium having embodied program code on the first host in a network, the program code executable to:
collect, by the first host, system state information of the first host, wherein the system state information of the first host includes a state of the first host and a value of the first host, wherein the state of the first host is one of active and passive states, wherein the value of the first host is uptime of the first host; generate, by the first host, a packet, the packet comprising rules of the double IP address recovery, the system state information of the first host, and a fuzziness value, wherein the fuzziness value offsets uptime difference due to transmission latency; store, by the first host, in a packet buffer on the first host, the packet; broadcast, by the first host, the packet to the second host; receive, by the first host, an answer packet from the second host, the answer packet comprising system state information of the second host, wherein the system state information of the second host includes a state of the second host and a value of the second host, wherein the state of the second host is one of active and passive states, wherein the value of the second host is uptime of the second host; store, by the first host, in the packet buffer on the first host, the system state information of the second host; determine, by the first host, whether the double IP address is detected; retrieve, by the first host, from the packet buffer on the first host, the rules, the system state information of the first host, and system state information of the second host, in response to determining that the double IP address is detected; determine, by the first host, an action of the double IP address recovery on the first host, based on the rules of the double IP address recovery the system state information of the first host, and system state information of the second host; and execute, by the first host, the action on the first host. |