ICMP is the so-called Internet Control Messaging Protocol (PROTOCOL), which is commonly used to transmit error messages and other information that should be noted in the network. ICMP is generally considered to be the same level as the IP protocol, IMCP packets are usually used by IP layer or higher level protocol (such as TCP or UDP), ICMP for the internet and other ip-based network based on the normal operation of the system plays a very important role. There are many important network programs are based on the ICMP protocol, the most famous such as Ping and tracert. This article describes a method for using Visual C # to implement network command pings that are important for ICMP protocols.
The ping command can be said to be a "cross-platform" program because the ping command exists not only on the Windows system, but also on Unix systems, and it is generally available to other operating systems that support the network as well. The primary role of the ping command is to detect the status of hosts on the network. If a few years ago, we can also under this assertion, if you can not ping a host, then can not telnet or FTP to this host, but with the increase in security awareness of the Internet, there are access control lists of routers and firewalls, because the ICMP message is transmitted in the IP packet, Reaching a host depends not only on whether the IP layer arrives, but also on which protocol and port to use. For example Jinshan Company's Jinshan Dart can forbid other machines ping this host. So in the present case, instant Ping is not a machine, but there is also the possibility of FTP landing on the machine, or through HTTP to browse the Web page on this machine.
A Introduction to ping commands
First enter the command prompt on the Windows system and enter "ping/?" , click the ENTER key to learn how to use the various parameters of the ping command. The most common use is to ping the name of the remote computer (or the IP address of the remote computer), and if you have "Reply from" in the return character of the ping command, this host is online, as shown in Figure 01:
Figure 01:ping Run interface when the host
If there is a "Request timeout" in the return character, this host is not in the line, as shown in Figure 02:
Figure 02:ping Run interface when the host is not