我在 Win XP 上使用 netstat 检查 TCP、IP 和 ICMP 的协议传输详细信息。只有 TCP 中有传输。ICMP 没有传输是可以理解的,因为它是用于错误的,而且我认为没有错误,但为什么没有通过 IP 进行传输?
答案1
netstat -s
显示每个协议的统计数据,包括 IP 的统计数据。
在我的 XP PC 上(见下文)IP 输出请求=已发送 ICMP 消息+已发送的 TCP 段+重新传输 TCP 段+UDP 数据报已发送。
C:\>netstat -s
IPv4 Statistics
Packets Received = 857789
Received Header Errors = 0
Received Address Errors = 0
Datagrams Forwarded = 0
Unknown Protocols Received = 0
Received Packets Discarded = 5
Received Packets Delivered = 857784
Output Requests = 857442
Routing Discards = 0
Discarded Output Packets = 44
Output Packet No Route = 0
Reassembly Required = 0
Reassembly Successful = 0
Reassembly Failures = 0
Datagrams Successfully Fragmented = 0
Datagrams Failing Fragmentation = 0
Fragments Created = 0
ICMPv4 Statistics
Received Sent
Messages 8 30
Errors 0 0
Destination Unreachable 0 22
Time Exceeded 0 0
Parameter Problems 0 0
Source Quenches 0 0
Redirects 0 0
Echos 2 6
Echo Replies 6 2
Timestamps 0 0
Timestamp Replies 0 0
Address Masks 0 0
Address Mask Replies 0 0
TCP Statistics for IPv4
Active Opens = 656
Passive Opens = 360
Failed Connection Attempts = 4
Reset Connections = 28
Current Connections = 32
Segments Received = 857250
Segments Sent = 856900
Segments Retransmitted = 62
UDP Statistics for IPv4
Datagrams Received = 495
No Ports = 50
Receive Errors = 9
Datagrams Sent = 450