Ping |
Networking - Wide Area Network |
Ping- Used to insure connectivity between hosts. Ping is not near as effective as it once was because so many devices no longer allow ping to work to prevent intruders from gaining information or causing network attacks using ping. Ping works like sonar. The packet is sent to a workstation or server and then a return message is received to acknowledge the connection. ping Testing Network Connections. Purpose of ping This program will help determine if a computer is online by sending a ICMP ECHO_REQUEST. The expected response is in the form of ICMP ECHO_RESPONSE. In other words, there should be a return response from the machine that was contacted. Syntax ping [options] destination Example: ping -c 100 192.168.4.35 The -c option provides the ability to set how many pings should occur before the command stops. In this example the destination will be pinged 100 times as the count follows the option. Stopping the ping Command
ping Options Options -c count number of packets to send -s size determines the size of the packets to be sent -I Interface which network card to use -i interval time interval -f flood continuous stream of packets Count Option Example: ping -c 100 192.168.4.35 The -c option provides the ability to set how many pings should occur before the command stops. In this example the destination will be pinged 100 times as the count follows the option. Size Option Example: ping -s 100 192.168.4.35 The ICMP header data contains 8 bytes of data and 56 bytes are sent by default so 64 bytes is what is typically sent by ping. The example shows sending 100 bytes and so the added 8 bytes of data will send a total of 108 bytes. Interface Option Example: ping -I eth1 192.168.4.35 The interface option -I allows the user to choose which network card to use. network interfaces start with eth0 and increase. eth1 is the second network interface.
Interval Option Example: ping -i .2 192.168.4.35 The -i option allows a time interval change. the default time interval is 1 second. This interval may be dropped to .2. After that root rights must be used to decrease it further. Flood Option Example: ping -f 192.168.4.35 The -f option floods a destination with continuous pings. Users must be root to run this option. Be careful as there may be serious consequences to using this unwisely. ping is often used to establish that a network connection is actually up.
ping 192.168.5.222 PING 192.168.5.222 (192.168.5.222) 56(84) bytes of data. — 192.168.5.222 ping statistics — 18 packets transmitted, 0 received, 100% packet loss, time 16996ms This would suggest that the node or computer on the network does not have a functioning network connection, possibly because of a network configuration issue or the computer is off. Again, another look at this output and you would think the computer is down when in fact the computer is blocking pings from the network. Notice the output is exactly the same as the output if the computer was off. This makes this test a questionable evaluation unless you know for sure the computer is not blocking pings from the network. Keep this in mind when making decisions about your network. ping 192.168.5.222 PING 192.168.5.222 (192.168.5.222) 56(84) bytes of data. — 192.168.5.222 ping statistics — 18 packets transmitted, 0 received, 100% packet loss, time 16996ms
|