情景:拓扑很简单,用户准备测试 3560X 的性能,PC1 -- 3560X -- PC2,PC1和PC2在同一个VLAN/或者不同VLAN,PC1 ping PC2 发现延迟比较高,可能150ms, 或者200ms。用户认为正常延迟在 2-10ms。
解释:ping/ICMP 包 只是用来测试连通性,在不丢包情况下,ICMP 延迟浮动是很正常的现象,不会影响设备任何性能
,思科官网有对应document,延迟在 1-10S 之内属于正常现象。
ICMP 数据包本身优先级也低,设备会优先处理其他数据包。
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750x_3560x/software/release/12-2_53_se/configuration/guide/3750xscg/swtrbl.html Understanding PingThe switch supports IP ping, which you can use to test connectivity to remote hosts. Ping
sends an echo request packet to an address and waits for a reply. Ping returns one of
these responses:
• Normal response—The normal response (hostname is alive) occurs in 1 to 10 seconds,
depending on network traffic.
• Destination does not respond—If the host does not respond, a no-answer message is
returned.
• Unknown host—If the host does not exist, an unknown host message is returned.
• Destination unreachable—If the default gateway cannot reach the specified network, a
destination-unreachable message is returned.
• Network or host unreachable—If there is no entry in the route table for the host or
network, a network or host unreachable message is returned.
其他信息:影响ping的time值的因素有很多,思科官方网站上说了depending on network traffic,而实际上影响ping
time值的因素有很多,针对pc机ping网关这种例子来说:在ping的时候,其实是pc机向网关发送一个icmp请求,首先这个icmp在发出去之前,会做数据包的封装,而这个封装会有延迟,这些延迟包括:处理延迟(封装数据包),队列延迟(发之前需要排队),串行化延迟(将数据帧转化成二进制比特流所需要的延迟),线路延迟(与您物理线路质量以及性能有关),这些中
的任何一个因素都会导致导致time 值的浮动。