Why the ping reply time from switch is higher than that from devices on it?

1

I have a question which might be stupid but I am curious.. I have a simple network: DSLMODEM (192.168.0.1) <> TL-SG108E (192.168.0.30) <> Laptop (192.168.0.54) There are some other devices on the switch and another switch (TL-SG105E) on another room connected directly to the TL-SG108E switch. All connections are with CAT6 cable.

When I ping from my laptop the DSLMODEM I get this reply:

Pinging 192.168.0.1 with 32 bytes of data:
Reply from 192.168.0.1: bytes=32 time<1ms TTL=64
Reply from 192.168.0.1: bytes=32 time<1ms TTL=64
Reply from 192.168.0.1: bytes=32 time<1ms TTL=64

When I ping from my laptop the SWITCH (108E) i get this reply:

Pinging 192.168.0.30 with 32 bytes of data:
Reply from 192.168.0.30: bytes=32 time=7ms TTL=64
Reply from 192.168.0.30: bytes=32 time=4ms TTL=64
Reply from 192.168.0.30: bytes=32 time=4ms TTL=64

The same happens if I ping a TL-SG105E (192.168.0.31) which is also somewhere on the network:

Pinging 192.168.0.31 with 32 bytes of data:
Reply from 192.168.0.31: bytes=32 time=4ms TTL=64
Reply from 192.168.0.31: bytes=32 time=1ms TTL=64
Reply from 192.168.0.31: bytes=32 time=1ms TTL=64

while the devices on the TL-SG105E reply with <1ms:

Pinging 192.168.0.91 with 32 bytes of data:
Reply from 192.168.0.91: bytes=32 time<1ms TTL=64
Reply from 192.168.0.91: bytes=32 time<1ms TTL=64
Reply from 192.168.0.91: bytes=32 time<1ms TTL=64

I wonder why when I ping any of the devices the time is <1ms as I would expect and when I ping the switch it is variable higher than 1ms?? The default gateway on the laptop where I do the pings from is 192.168.0.1 (if that has anything to do with it).

Thanks a lot!

MerNion

Posted 2017-01-11T09:08:20.300

Reputation: 25

Answers

3

Switches are amazingly good at switching. Their hardware is entirely designed to switch packets as quickly and efficiently as possible. Typical small switches, whether managed or unmanaged, have efficient hardware that switches packets at wire speed with minimal latency.

Sadly, they tend to be lousy ping responders. To respond to a ping, their puny CPU has to process the inbound ping, form a reply, send it out, and so on. All that takes a lot more time than their awesomely efficient switching engine takes to switch packets -- what it was specifically built to do at wire speed.

David Schwartz

Posted 2017-01-11T09:08:20.300

Reputation: 58 310

So this is normal and I shouldn't pay any attention for a defective switch? – MerNion – 2017-01-11T13:15:02.487

Right. It's switching just fine. It has a very puny CPU, and its CPU has to do a lot of work to respond to a ping. (Even many high end routers are lousy ping responders and it's not unusual to see fast machines way past the router having faster ping times than the router, even though the traffic goes past the router to the fast machine. They sometimes even drop packets bound for the router while switching billions of them passing though without a hiccup.) – David Schwartz – 2017-01-11T13:15:20.223

Thanks a lot! I can't say for sure but i believe when i first bought them they times were <1ms but maybe i didn't have any other devices connected on them yet.. I can't remember.. – MerNion – 2017-01-11T13:17:36.830

1It can depend on what else the CPU has to do. If you're using its user interface, if it's handling multicast filtering, if it's doing spanning tree, and so on, those things will add jitter and latency to pings. The actual switching of packets is usually handled without the CPU's involvement. – David Schwartz – 2017-01-11T13:19:08.030