Implementing ICMP network Protocols using Visual C #

Source: Internet
Author: User
Tags ftp

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.