Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am observing anomalous behavior Cisco concerning routers.

Scenario 1:

  • Ping from Server A to Cisco Router 1905 - 0.3 ms
  • Ping from Server A through Cisco Router 1905 to Server B - 3.2 ms

Scenario 2:

  • Ping from Server A to Cisco Router 1700 - 1 ms
  • Ping from Server A through Cisco Router 1700 to Server B - 3.3 ms

When I try to ping Lan interface of 1905 from Server A I am getting 0.3-0.5 ms but when I try to ping LAN Interface of 1700 router from Server A I am getting 1.02ms.

Can any one explain why this difference of .7 ms is not reflected when I try to Ping Server B from Server A, I am getting constant of 3.2 -3.3 ms

share|improve this question

3 Answers 3

If you are pinging the router itself, you are interacting with the IOS management plane. So the operating system needs to be woken up and respond to your ICMP query. If you have two different platforms (1700 and 1905), possibly with differing versions and feature sets, and different configurations to keep it busy, you should expect differing results. Forwarding traffic between servers, using the routers forwarding plane, is probably getting hardware assistance and is going to be less varying.

That all said, why are you even interested in a few milliseconds here? Don't you have more important things to worry about ;-)

share|improve this answer
    
I am trying to understand latencies in the network. This has completely stumped my understanding of networks. If ping time to router is 0.3 ms and to server B is 3.3 ms, then ping time from Router to Server B is 3 ms. In second case, by same logic, ping time from Router to Server B is 2.3 ms. But that network is essentially the same. So how does one reconcile this? –  Shoonya May 12 '12 at 14:46
    
I guess what I was trying to say is that pinging to the router is a different function from pinging through the router. When you ping from server A to server B, the router management function is not involved, just the forwarding function. When you ping between servers, the router (normally) will just treat this like any other IP packet. Ping the router address however means the management process have to spend a little time interpreting the ping (ICMP) packet and then respond. Most routers will treat management functions like this at a lower priority, than forwarding. –  martyvis May 13 '12 at 3:11
    
I think you are right - supportforums.cisco.com/thread/206613. However then how do i estimate the latency of the network? –  Shoonya May 13 '12 at 3:47
    
The latency of the network is what you saw in your ping from server A to server B. If there are more than one router or switch between the two, then you should install another device at a close point to point that, that way you can determine the latency at each hop. You might also consider using traceroute, which uses a slightly difference mechanism. You have to be a little careful using ICMP to measure latency, as being a management protocol packet it might be treated differently. For instance you might be better using a "TCP ping", measuring the ACK response to the SYN in a TCP handshake. –  martyvis May 13 '12 at 5:35

Trying to find where latency in the network happens using ping is, at best, tricky. At worst, not possible. In the best case, you simply have to account for the fact that the router responding to ping is completely unrelated to how fast the router can send a ping packet from one interface to another (most routers respond to ping with close to the least priority, so ping response times tend to vary a lot and are usually much higher than the latency introduced when just forwarding).

The 0.7 ms you have seen can probably be accounted for by the 1905 having more space CPU cycles than the 1700.

Using traceroute (or similar) to find the path a connection takes through the network may be useful, followed by checking traffic levels on intermediate hops. However, that will only reveal delays introduced at routing points. There may be slow-down in switches as well as routers. On the whole, 3 ms is probably not too much of an issue and if it is, there may be other ways of alleviating that. In the past, I've seen (some) OLTP applicatiosn getting slow when FE/BE delay has increased by a few ms, but making sure they can have multiple outstanding queries took care of a lot of that (parallel queries instead of strict serialisation). I'd say it's more common that varying latency usually causes more problem than a constant (although possibly higher) latency.

share|improve this answer

Don't ever use a ping to a Cisco router interface for anything other than diagnosing general connectivity. Responding to ICMP messages is (and has always been) just about the lowest priority on the box. This is true from the smallest to the largest routers and is called out. Ping -through- the router to something else (i.e. some sort of host). This is incidentally true not only of Cisco routers but plenty of others.

The only exception to this is using SLA monitoring, which is a set of features that run at a higher priority to measure the latency of a given link. This is a very different animal than pinging a router interface, though.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.