CPC H04L 61/103 (2013.01) [H04L 2101/622 (2022.05)] | 6 Claims |
1. A reverse address resolution method, comprising:
broadcasting, by a sender electronic device, a first request packet in a local area network, wherein the first request packet comprises a request identifier indicating that the first request packet is used to request an internet protocol (IP) address according to a media access control (MAC) address, a first proxy forwarding identifier indicating that a gateway server in the local area network needs to forward the first request packet as a proxy, and a first Ethernet payload with a MAC address associated with a target electronic device in the local area network;
receiving, by the sender electronic device, a first reply packet returned by the gateway server in the local area network, wherein the first reply packet comprises a second proxy forwarding identifier indicating that the gateway server in the local area network needs to forward the first reply packet as a proxy and a second Ethernet payload with an IP address of the target electronic device;
obtaining, by the sender electronic device, the IP address of the target electronic device from the first reply packet;
broadcasting, by the sender electronic device, a second request packet for requesting IP addresses of all electronic devices in the local area network, wherein the second request packet comprises a second request identifier, an Ethernet header with a broadcast MAC address and a third Ethernet payload, wherein the third Ethernet payload includes a target Ethernet address field with a value of null to indicate the IP addresses of all electronic devices are requested;
receiving, by the sender electronic device, multiple second reply packets returned by multiple electronic devices in the local area network, the multiple second reply packets including IP addresses of the multiple electronic devices; and
refreshing, by the sender electronic device, an online status of at least one of the multiple electronic devices to online and an online status of an electronic device that does not reply with a second reply packet to offline, wherein the online status of the at least one of the multiple electronic devices being online indicates that the at least one of the multiple electronic devices is in a state in which a communication connection to the at least one of the multiple electronic devices can be established, the online status of the electronic device being offline indicates that the electronic device is in a state in which a communication connection to the electronic devices can't be established.
|