Search
| The FPING |
|
|
|
| Networking - Basic Networking |
| Thursday, 09 July 2009 08:03 |
Inroduction In previous article we have seen the script using ping tool for determining which all systems are alive in a particular network. Ping have been scripted for this functions previously. But using the another tool which is an another advanced ping like tool which can determine all the system which are alive in a network using a single command. "fping is a like program which uses the Internet Control Message Protocol (ICMP) echo request to determine if a target host is responding. fping differs from ping in that you can specify any number of targets on the command line, or specify a file containing the lists of targets to ping. Instead of sending to one target until it times out or replies, fping will send out a ping packet and move on to the next target in a round-robin fashion. In the default mode, if a target replies, it is noted and removed from the list of targets to check; if a target does not respond within a certain time limit and/or retry limit it is designated as unreachable. fping also supports sending a specified number of pings to a target, or looping indefinitely (as in ping ). Unlike ping , fping is meant to be used in scripts, so its output is designed to be easy to parse."
OPTIONS -A Display targets by address rather than DNS name. -bn Number of bytes of ping data to send. The minimum size (normally 12) allows room for the data that fping needs to do its work (sequence number, timestamp). The reported received data size includes the IP header (normally 20 bytes) and ICMP header (8 bytes), so the minimum total size is 40 bytes. Default is 56, as in ping. Maximum is the theoretical maximum IP datagram size (64K), though most systems limit this to a smaller, system-dependent number. -Bn In the default mode, fping sends several requests to a target before giving up, waiting longer for a reply on each successive request. This parameter is the value by which the wait time is multiplied on each successive request; it must be entered as a floating-point number (x.y). The default is 1.5. -c Number of request packets to send to each target. In this mode, a line is displayed for each received response (this can suppressed with -q or -Q). Also, statistics about responses for each target are displayed when all requests have been sent (or when interrupted). -C Similar to -c, but the per-target statistics are displayed in a format designed for automated response-time statistics gathering. For example: % fping -C 5 -q somehost shows the response time in milliseconds for each of the five requests, with the “-” indicating that no response was received to the fourth request. -d Use DNS to lookup address of return ping packet. This allows you to give fping a list of IP addresses as input and print hostnames in the output. -e Show elapsed (round-trip) time of packets. -f Read list of targets from a file. This option can only be used by the root user. Regular users should pipe in the file via stdin: % fping < targets_file ex. To ping the class C 192.168.1.x, the specified command line could look like either: or fping -g 192.168.1.0 192.168.1.255 -h Print usage message. -in The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25). -l Loop sending packets to each target indefinitely. Can be interrupted with ctl-C; statistics about responses for each target are then displayed. -m Send pings to each of a target host’s multiple interfaces. -n Same as -d. -p In looping or counting modes (-l, -c, or -C), this parameter sets the time in milliseconds that fping waits between successive packets to an individual target. Default is 1000. -q Quiet. Don’t show per-target results, just set final exit status. -Qn Like -q, but show summary results every n seconds. -rn Retry limit (default 3). This is the number of times an attempt at pinging a target will be made, not including the first try. -s Print cumulative statistics upon exit. -tn Initial target timeout in milliseconds (default 500). In the default mode, this is the amount of time that fping waits for a response to its first request. Successive timeouts are multiplied by the backoff factor. -u Show targets that are unreachable. -v Print fping version information. Examples of Fping Commands This command is used to determine if the router is up: fping router Output: Router is alive
fping –g 192.168.1.1/24 Output: 192.168.1.1 is alive 192.168.1.33 is alive lengthy version: fping –g 192.168.1.0 192.168.1.255
|
| Last Updated on Thursday, 09 July 2009 16:43 |





