Method for judging connection state of network device and network device
A technology of network equipment and connected state, applied in the field of network communication, can solve the problems of poor user experience and high after-sales cost, and achieve the effect of improving work efficiency, improving user experience, and low investment cost
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0042] Such as figure 1 As shown, the embodiment of the present invention provides a method for determining the connection state of a network device, the WAN port of the network device is provided with a two-color indicator light, including the following steps:
[0043] S1: The network device detects whether to obtain the operator's IP address, and if so, sends a request message to the operator's gateway;
[0044] S2: The network device receives the response message returned by the operator gateway;
[0045] S3: The network device judges the connection state of the network device according to the received response message, and controls the display of the two-color indicator light according to the different connection states of the network device, and the two-color indicator light displays The color indicates the connectivity status of the network device.
[0046] Further, the response message includes a response message and a non-response message, wherein the non-response me...
Embodiment 2
[0059] On the basis of Embodiment 1, in step S110, it is determined whether there is connectivity between the network device and the gateway address of the broadband operator in the following manner:
[0060] The network device invokes the Ping process, and sends N (for example, N=4) PingRequest messages to the remote host whose gateway address belongs to the operator. If the network device receives the PingRequest messages returned by the remote host whose gateway address belongs to the operator If the network device receives N reply response messages corresponding to the PingRequest message returned by the remote host whose gateway address belongs to the network device, it is determined that the network device and the gateway address of the broadband operator are connected. If it is Requesttimedout (request timeout) or DestinationhostUnreachable (target host is unavailable) or Unknownhostname (unknown hostname), it is determined that there is no connection between the network...
Embodiment 3
[0062] On the basis of embodiment 2, the execution steps of the Ping process wherein are as follows:
[0063] (1) Create a raw socket whose protocol type is IPPROTO_ICMP (IP protocol_Internet Control Message Protocol);
[0064] (2) Create and initialize an ICMP (InternetControlMessageProtocol, Internet Control Message Protocol) packet;
[0065] (3) calling the sendto function to send an ICMP request to the remote host to which the gateway address of the broadband operator belongs;
[0066] (4) Call the recvfrom function to receive the ICMP response.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com