Patent ID: 7990886

Claim:
A network device to detect connection between the network device and a partner network device, the network device comprising a processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and operable to be executed by the processor, the programs comprising: a recording module operable to record a number of data packets transmitted between the network device and the partner network device, wherein the number of data packets recorded by the recording module at the beginning of a detection cycle, between the network device and the partner network device, is defined as a first packet number, and the number of data packets recorded at the conclusion of the detection cycle is defined as a second packet number; a communication module operable to transmit detection packets to the partner network device and receive response packets corresponding to the detection packets from the partner network device during the detection cycle, wherein the recording module is further operable to record a number of the detection packets without corresponding response packets; a packet determination module operable to determine if the number of the detection packets without corresponding response packets exceeds or equals a preset value at the end of the detection cycle, the recording module further to record the second packet number when the number of the detection packets without corresponding response packets exceeds or equals the preset value, and the packet determination module further to determine if the second packet number is equal to the first packet number when the number of the detection packets without corresponding response packets exceeds or equals the preset value; and a determination module operable to determine that the network device is disconnected from the partner network device when the second packet number is equal to the first packet number.