LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ping -t (https://www.linuxquestions.org/questions/linux-newbie-8/ping-t-730055/)

imprise 06-02-2009 01:50 AM

ping -t
 
Hi all;

I am using SUSE Linux Enterprise Server 10 with SP2.

My problem is that the -t option if the ping command does not work. Please look at the following:

Before using the "-t" option:

Code:

linux-bhpq:~ # ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=0.174 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=0.090 ms

--- 192.168.1.100 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.090/0.132/0.174/0.042 ms
linux-bhpq:~ #

After using the "-t" option:

Code:

linux-bhpq:~ # ping -t 100 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=3.69 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=0.112 ms

--- 192.168.1.100 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.112/1.902/3.693/1.791 ms
linux-bhpq:~ #

Can anyone help me?

Thanks

Tinkster 06-02-2009 01:56 AM

What do you expect it to do?

man ping
/TTL


The value you see is the ttl returned from the host you
pinged, not your own.



Cheers,
Tink

cgtueno 06-02-2009 03:36 AM

Hi

May I refer you to:
http://fgouget.free.fr/bing/ping_src-man.shtml
and the TCP/IP specification documentation;
or alternatively refer to the copy of man supplied with your distribution. ("man ping" and look at /TTL section)

In general:

* TTL field value in an IP packet represents the maximum number of IP routers that the packet may pass through before the packet is discarded. (Packets are discarded when the count reaches 0)
* Each router through which the packet passes decrements the TTL field value by one.
* Normally ping prints the TTL field value contained in the packet it receives from the system being ping'ed.
* On receiving a ping packet a remote system can alter the TTL field in its response:

The system (being pinged) receiving the packet may:
(1) leave the value unaltered:
Final value received by sending system
= base value
- (IP routers in outbound leg)
- (IP routers in the return leg)
(2) set the value to a base value (eg. 255*)
Final value received by sending system
= base value
- (IP routers in the return leg)
(3) set the value to some other value
(of meaning to the remote system)

Note: *Typically Unix and Unix like systems set the TTL field of ICMP ECHO_REQUEST (ping) packets to a value of 255.

In the example you specify the TTL field value in the packet received by the sending (ping'ing) system from the receiving (ping'ed) system is a count of 64.

The meaning of the value depends on how the receiving system is configured to handle the incoming ping packets.

Hope that helps

Chris


All times are GMT -5. The time now is 03:59 PM.