C:\>ping 192.168.0.1
Pinging 192.168.0.1 with 32 bytes of data:
Reply from 192.168.0.1: bytes=32 time<10ms TTL=128
Reply from 192.168.0.1: bytes=32 time<10ms TTL=128
Reply from 192.168.0.1: bytes=32 time<10ms TTL=128
Reply from 192.168.0.1: bytes=32 time<10ms TTL=128
Ping statistics for 192.168.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
TTL:生存时间(time to live)
指定数据包被路由器丢弃前允许通过的网段数量。TTL是由发送主机设置的,以防止数据包不断在IP互联网上永不终止地循环。转发IP数据包时,要求路由器至少将TTL减小1。
使用PING时涉及到的ICMP报文类型:
一个为ICMP请求回显(ICMP Echo Request)
一个为ICMP回显应答(ICMP Echo Reply)
TTL字段值可以帮助我们识别操作系统类型。
UNIX及类UNIX操作系统ICMP回显应答的TTL字段值为255
Compaq tru64 5.0 ICMP回显应答的TTL字段值为64
Microsoft windows NT/2K操作系统ICMP回显应答的TTL字段值为128
Microsoft windows 95/98/ME操作系统ICMP回显应答的TTL字段值为32
但有些情况下有所特殊:
LINUX Kernel 2.2.x & 2.4.x ICMP 回显应答的 TTL 字段值为 64
FreeBSD 4.1, 4.0, 3.4;
Sun Solaris 2.5.1, 2.6, 2.7, 2.8;
OpenBSD 2.6, 2.7,
NetBSD
HP UX 10.20
ICMP 回显应答的 TTL 字段值为 255
Windows 95/98/98SE
Windows ME
ICMP 回显应答的 TTL 字段值为 32
Windows NT4 WRKS
Windows NT4 Server
Windows 2000
ICMP 回显应答的 TTL 字段值为 128
备注:
TTL
LINUX 64
WIN2K/NT 128
WINDOWS 系列 32
UNIX 系列 255


