Strange. Adding a gigabit switch is decreasing internet speeds on laptop connected through wifi

Ziembol25

Commendable
Nov 10, 2016
5
0
1,510
Hi,

The problem is as stated above so first let me provide some details.

I have a 250mb/s internet connection in my apartment which came with a Compal CH7486e router with built-in gigabit LAN. I recently connected a second router to it (TP-Link WR740N, with only 100mb/s LAN) through ethernet to extend the wifi range in my bedroom. This worked very well. On my laptop i got max signal connection to the router at 150mb/s (the original router was limited to only a 72mb/s connection on the 20mhz channel width since there are a lot of wifi networks around and it won't go to 40mhz as the TP-Link does) and I consistently achieved around 72mb/s on speedtest.net. BUT i also needed a gigabit wired connection for my second PC so i bought a TP-Link SD1005D gigabit switch and added it in between the two routers. The setup now looks like this:

MAIN ROUTER <---> GIGABIT SWITCH <---> SECOND ROUTER

The problem is when I connect my laptop with the second router in this configuration I only get max 45-50mb/s on speedtest.net. I know it's not a VERY significant drop but nevertheless it exists and it should't. When testing the wired connection to the second PC (hooked up to the switch) I get the full 250mb/s provided by my ISP. Does anyone have any idea what might be the issue here? Any help would be very appreciated.
 
Solution
It is hard to say using speedtest is a brute force tool that measure data transfer over a fairly long period of time. It does not actually measure packet loss or latency directly.

All current switches are considered wire speed. They can run all port at 1g up and 1g down all at the same time. They do not delay traffic. The do not even have enough internal buffers to delay traffic. If something would happen that too much data was to be sent out some port they would just discard the extra traffic. It is highly unlikely in his situation because he is nowhere close to transferring data at the full 1gbit line rate on a sustained basis. You would see this in something like a local NAS.

Pretty much this has to be data loss but...
Well, provided I am following the connectivity correctly, the bottleneck is the TP-Link WR740N at 100mb/s. And that would be wired.... And unlikely to be fully achieved even under ideal circumstances.

The network will only be as fast as the slowest link in the network.

So when you connect the second PC to the switch wired and main router you get those speeds.

Once the TP-Link WR740N comes into play its limitations apply.
 


The TP-Link is a bottleneck in a sense that I won't be able to get the full 250mb/s from the ISP but the issue is that there is a difference between the speeds I get when the TP-Link is connected directly to the main router vs when it's connected with a switch between them.
To be clear the connection goes like this: from the main router to the switch and from the switch it goes out to the second router and the second PC separately (the second router is somewhat an end device in the "wired" part of the network). I think you might have misread something but the second PC gets the full speed from my ISP, no issue there.
 


The second router is configured as an AP (no NAT and DHCP). When I hooked up my laptop through a wire I got the best result so far - 83mb/s. So the wifi speeds seem to be somehow hindered (despite the 150mb/s connection between the router and laptop).

 
Like this:

MAIN ROUTER <---> GIGABIT SWITCH <--ethernet cable -----> SECOND ROUTER <~~~~~~~ Wireless ~~~~~> Laptop
GIGABIT SWITCH <--ethernet cable -----> SECOND PC

Or

MAIN ROUTER <---> GIGABIT SWITCH <--ethernet cable -----> SECOND ROUTER
GIGABIT SWITCH <--ethernet cable -----> SECOND PC
GIGABIT SWITCH <--ethernet cable -----> Laptop

And you get full speeds with:

MAIN ROUTER <-----ethernet cable -----> SECOND ROUTER i.e. TPLINK <--------ethernet cable -----> SECOND PC.
 


I have tried both of the two first variants you described:
In the first (wifi to laptop) I get around 45-50mb/s.
In the second (ethernet to laptop) I get around 83mb/s.
The third option I haven't tried at all because that would obviously create a bottleneck with the TP-Link and I would only be able to get the 100mp/s (theoretical).

I get full speeds ONLY on the second PC (wired to switch) because it also has a gigabit LAN card but that is to be expected. I just mentioned the second PC for the sake of being thorough about my setup.
 
Therefore with all other things equal:

MAIN ROUTER --------->TP-LINK as AP ~~~~~~~~~> Wireless laptop @72 mb/s

MAIN ROUTER --------->GIGABIT SWITCH ---------TP-LINK as AP ~~~~~~~>Wireless laptop @45-50 mb/s

It could be that the bit of extra latency introduced by the Gigabit switch and/or the connecting ethernet cable (5e or better?) to the TP-Link AP is enough of a threshold to cause a disportionate performance drop at the laptop.

Sort of stuck for the moment. Hopefully someone will pick up on something I am missing.
 


Thanks for your input. I've considered the cable, got cat. 5e and it made no difference. If anyone has any other ideas I'm open :)
 
Went back and perused some articles regarding switches and latency.

Here is one link:

http://www.plexxi.com/wp-content/uploads/2016/01/Latency-in-Ethernet-Switches.pdf

Actually I just did think of something.....

Try some internal pings, tracerts, pathpings to the Main router's IP via your wireless laptop. With and without the switch.

Keep every thing else constant as best you can. See if there is any notable delay when the switch is present.

Then try the same process with some other devices such as the second PC doing some high bandwidth work.

The idea is to quantify (if possible) any delay introduced by the switch.

Just an experiment of sorts but may be helpful.

Likewise, because the laptop is wireless, you may identify some differences via

"netsh wlan show" via the command prompt.

Reference this link:

http://www.tenforums.com/tutorials/47080-wlan-report-create-windows-10-a.html

Again with and without the switch being present.

Experimented a bit with the command some months back but only just tinkering some. Not sure if netsh (or some similar diagnostic option) will reveal anything pertinate with respect to your network situation. Hard to determine....

Anyway, I tend to be curious and like to figure things out. Unfortunately, no switches on hand to test directly.

However, still felt it best to pass along the additional thoughts.
 
You have to be careful to not jump down the rabbit hole of over analyzing stuff. Sure there is a delay in a gigbit switch. Since all switches are store and forward you have to completely copy the packet into a buffer. So a maximum size packet of 1500 bytes take .012ms to be clocked into the memory. So just over 1/10 of 1ms. Smaller packets of course take less time.

There is no way you are going to measure that with anything other than specialized lab equipment.

Whats next worrying that 1 inch of extra cable is going to delay your signal because data only travels at 2/3 the speed of light in copper and that extra inch is adding delay.

Pretty much if the switch is not broken they are completely transparent and are consider non delaying device.
 
Must agree with bill001g - I do have a tendancy to dive in a bit too far sometimes.

However, my thought is/was that if there were some problem with the switch or cable would that problem at least manifest via some latency beyond the < 1 ms value via ping etc.?

Is the subject loss of performance just to be expected with the switch in place or should the switch be considered broken because it does appear to be delaying signals? Even at unmeasurable values sans any specialized equipment.?

Just trying to reason this all out. Thanks.

 
It is hard to say using speedtest is a brute force tool that measure data transfer over a fairly long period of time. It does not actually measure packet loss or latency directly.

All current switches are considered wire speed. They can run all port at 1g up and 1g down all at the same time. They do not delay traffic. The do not even have enough internal buffers to delay traffic. If something would happen that too much data was to be sent out some port they would just discard the extra traffic. It is highly unlikely in his situation because he is nowhere close to transferring data at the full 1gbit line rate on a sustained basis. You would see this in something like a local NAS.

Pretty much this has to be data loss but the only way to confirm that is to run data captures and see if there is data re transmission. Then after that you would have to find it. The switch itself is extremely simplistic. It generally is a single asic chip that does all the work. It would be more likely a bad cable or for some reason the connection is negotiating to something like 100m half duplex.

The only way to find stuff like this is to do directly transfers between machine inside the house using other tools that speedtest.
 
Solution
Thanks.

Data loss: bad/not up to spec cable, some physical difference in the locations of the devices with and without the switch. Just enough to experience some small level of interference.

Maybe experiment with the frequency and channels...

Will defer to Ziembol25's preferences regarding further troubleshooting and testing. Hopefully something will turn up.

Thanks again.