Ping.Send Method (IPAddress)
Attempts to send an Internet Control Message Protocol (ICMP) echo message to the computer that has the specified IPAddress, and receive a corresponding ICMP echo reply message from that computer.
Assembly: System (in System.dll)
address is Nothing.
A call to SendAsync is in progress.
address is an IPv6 address and the local computer is running an operating system earlier than Windows 2000.
An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.
This object has been disposed.
This method sends to the host that is specified by address a 32 Byte data buffer with the ICMP echo message. The method waits five seconds for an ICMP echo reply message. If it does not receive a reply in that time, the method returns and the Status property is set to TimedOut.
This overload uses default settings for packet fragmentation and packet forwarding. The packet that contains the ICMP echo message can be fragmented in transit if the total packet size exceeds the maximum packet size that can be transmitted by one of the routing nodes between the local and remote computers. To prevent fragmentation, use one of the Send methods that takes an options parameter, and set the DontFragment property to true. When DontFragment is true and the total packet size exceeds the maximum packet size that can be transmitted by one of the routing nodes between the local and remote computers, the ICMP echo request fails. When this happens, the Status is set to PacketTooBig. The packet or packet fragments (if fragmented) can be forwarded by routing nodes 128 times before being discarded. To change this setting, use a Send overload that takes an options parameter, and set the Ttl property to the desired value. If the packet does not reach its destination after being forwarded the specified number of times, the packet is discarded and the ICMP echo request fails. When this happens, the Status is set to TtlExpired.