Q: How do you run a continuous ping on the NetScaler with different packet sizes and source IP addresses?
A: The number of packets sent by a ping by default is infinite. The –s parameter can be used to specify the data size in bytes.
Note: The default packet size is 56 bytes. The –S parameter can be used to specify the source IP address to be used for the outgoing ping packets. If the source IP address is not one of sending machine’s addresses, an error is returned and nothing is sent.
Example 1: Sending continuous ping packets with a data size of 55 bytes each (press CTRL+C to stop the ping):
root@nsjose# ping -s 55 10.251.30.105
PING 10.251.30.105 (10.251.30.105): 55 data bytes
63 bytes from 10.251.30.105: icmp_seq=0 ttl=255 time=0.100 ms
63 bytes from 10.251.30.105: icmp_seq=1 ttl=255 time=0.063 ms
63 bytes from 10.251.30.105: icmp_seq=2 ttl=255 time=0.067 ms
63 bytes from 10.251.30.105: icmp_seq=3 ttl=255 time=0.063 ms
63 bytes from 10.251.30.105: icmp_seq=4 ttl=255 time=0.078 ms
63 bytes from 10.251.30.105: icmp_seq=5 ttl=255 time=0.077 ms
63 bytes from 10.251.30.105: icmp_seq=6 ttl=255 time=0.069 ms
63 bytes from 10.251.30.105: icmp_seq=7 ttl=255 time=0.063 ms
63 bytes from 10.251.30.105: icmp_seq=8 ttl=255 time=0.069 ms
63 bytes from 10.251.30.105: icmp_seq=9 ttl=255 time=0.058 ms
63 bytes from 10.251.30.105: icmp_seq=10 ttl=255 time=0.053 ms
63 bytes from 10.251.30.105: icmp_seq=11 ttl=255 time=0.063 ms
63 bytes from 10.251.30.105: icmp_seq=12 ttl=255 time=0.078 ms
63 bytes from 10.251.30.105: icmp_seq=13 ttl=255 time=0.062 ms
^C
--- 10.251.30.105 ping statistics ---
14 packets transmitted, 14 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.053/0.069/0.100/0.011 ms
root@nsjose#
Example 2: Sending five ping packets with a data size of 120 bytes each:
root@nsjose# ping -c 5 -s 120 10.251.30.105
PING 10.251.30.105 (10.251.30.105): 120 data bytes
128 bytes from 10.251.30.105: icmp_seq=0 ttl=255 time=0.101 ms
128 bytes from 10.251.30.105: icmp_seq=1 ttl=255 time=0.048 ms
128 bytes from 10.251.30.105: icmp_seq=2 ttl=255 time=0.075 ms
128 bytes from 10.251.30.105: icmp_seq=3 ttl=255 time=0.065 ms
128 bytes from 10.251.30.105: icmp_seq=4 ttl=255 time=0.079 ms
Example 3: Sending 10 ping packets with a data size of 100 bytes and a source IP address of 10.251.30.58, where 10.251.30.58 is the NetScaler IP address (NSIP):
root@nsjose# ping -c 10 -s 10 -S 10.251.30.58 10.251.30.105
PING 10.251.30.105 (10.251.30.105) from 10.251.30.58: 10 data bytes
18 bytes from 10.251.30.105: icmp_seq=0 ttl=255 time=0.193 ms
18 bytes from 10.251.30.105: icmp_seq=1 ttl=255 time=0.062 ms
18 bytes from 10.251.30.105: icmp_seq=2 ttl=255 time=0.065 ms
18 bytes from 10.251.30.105: icmp_seq=3 ttl=255 time=0.063 ms
18 bytes from 10.251.30.105: icmp_seq=4 ttl=255 time=0.091 ms
18 bytes from 10.251.30.105: icmp_seq=5 ttl=255 time=0.073 ms
18 bytes from 10.251.30.105: icmp_seq=6 ttl=255 time=0.066 ms
18 bytes from 10.251.30.105: icmp_seq=7 ttl=255 time=0.060 ms
18 bytes from 10.251.30.105: icmp_seq=8 ttl=255 time=0.069 ms
18 bytes from 10.251.30.105: icmp_seq=9 ttl=255 time=0.066 ms
--- 10.251.30.105 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.060/0.081/0.193/0.038 ms
root@nsjose#
Example 4: Sending continuous ping packets with the default data size and a source IP address of 10.251.30.59, where 10.251.30.59 is the mapped IP address (MIP) on the NetScaler:
root@nsjose# ping -S 10.251.30.59 10.251.30.105 PING 10.251.30.105 (10.251.30.105) from 10.251.30.59: 56 data bytes
64 bytes from 10.251.30.105: icmp_seq=0 ttl=255 time=0.181 ms
64 bytes from 10.251.30.105: icmp_seq=1 ttl=255 time=0.065 ms
64 bytes from 10.251.30.105: icmp_seq=2 ttl=255 time=0.083 ms
64 bytes from 10.251.30.105: icmp_seq=3 ttl=255 time=0.063 ms
64 bytes from 10.251.30.105: icmp_seq=4 ttl=255 time=0.062 ms
64 bytes from 10.251.30.105: icmp_seq=5 ttl=255 time=0.062 ms
64 bytes from 10.251.30.105: icmp_seq=6 ttl=255 time=0.084 ms
64 bytes from 10.251.30.105: icmp_seq=7 ttl=255 time=0.067 ms
64 bytes from 10.251.30.105: icmp_seq=8 ttl=255 time=0.064 ms
64 bytes from 10.251.30.105: icmp_seq=9 ttl=255 time=0.079 ms
64 bytes from 10.251.30.105: icmp_seq=10 ttl=255 time=0.064 ms
^C
--- 10.251.30.105 ping statistics ---
11 packets transmitted, 11 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.062/0.079/0.181/0.033 ms
root@nsjose#
More Information
The usage information of the ping command is as follows:
Usage: ping [-c <Number of packets to send (default is infinite)>]
[-i <Waiting time in seconds (default is 1 sec)>]
[-I <Network interface on which to ping>]
[-n <Numeric output only (no name resolution)>]
[-p <Pattern to fill in packets (max to 16 bytes)>]
[-q <Quiet mode (only summary is printed)>]
[-s <Data size in bytes(default is 56)>]
[-S <src_addr>]
[-t <timeout in sec>]