Network speed with different NICs

Usernameis

Honorable
Nov 22, 2013
36
0
10,530
All network equipment (Router, WiFi AP and Switch) supports 1Gb/s full duplex. Fiber optic internet and CAT5e for LAN. Computers - some wired, some wifi, various speed NICs.
1. There are two PCs next to each other, one wifi card support 1Gb/s, other 100Mb/s, will the data be transferred at different or the same (in theory ~100Mb/s) speed at both machines?
2. The same scenario with wired.ones?

Can anyone explain, do switches or routers adjust speed of each port individually comparing both sides or choose the fastest speed of the slowest NICs to all the ports?

Thank you.
 
Solution
In almost every switch, each link/cable runs at the slower of the two end device's speeds.

Most switches have different colour lights for each speed, one per port.

Data from A to B has to move at the same speed throughout the whole network, usually limited by the slowest link (which may be the endpoint, if it's a slow USB stick).

WiFi is a bit more of a mess than ethernet, because the rated speed is the total for all on that WAP, with time shared between them. Plus, the data has to go from one device to the hub, then from the hub to the other. Therefore, speeds between WiFi devices are quite slow.
 
Do you mean if you have a 100m device connected to a switch and a 1g device connected to a switch why does it only run at 100m for traffic BETWEEN them? Of course it will only run at 100m the 100m devices of course can never send more. The 1g device if you get very picky actually transmits at 1g all times but the switch then buffers the data and send it to the other end device at 100m. Of course if the 1g device attempt to send too much then the switch will drop the traffic since it runs out of buffers.

Now if you mean you have a 1g port and 100m port and they are talking to say 2 other devices that each have 1g ports then the 1g port can run at full 1g and the 100m will run at 100m all at the same time.

 

Urumiko

Distinguished
Dec 28, 2013
505
0
19,160


As usual I agree with bill001g :)
A switch will allow each port to run at its own speed. if you are trying to send from 1g to 100mb TCP will typically realise there is a bottleneck and throttle the connection to 100mb for that perticular transfer.

As for WIFI it is a lot more complicated, it depends what wireless standards e.g 802.11n or 802.11AC you are using. wifi is different to a switch where each device has its own bit of wire to talk on. In wifi only one device can talk at a given time so everybody has to take turns, typically they will have a set window where that device is allowed to talk, and everyone else must stay silent. The amount of data they can send in that time depends on the standard. the amount of time you get to talk or have to wait depends on the lowest compatible standard in a group of devices.
 

Urumiko

Distinguished
Dec 28, 2013
505
0
19,160


Generally speaking yes the timings all have to be backwards compatible with other standards.
It's been a long time since i wrote my paper on wifi and how it all works but I think when i was looking at N, and possibly even G, it had green field modes etc which you could switch on in areas where they didn't been to be backwards compatible and it altered the frame gaps and things? Cant really remember? Anyhoo shared medium/not shared medium is the important point for the purposes of this topic :D lol
 

Usernameis

Honorable
Nov 22, 2013
36
0
10,530
The last bit.
PC1 communicate with PC2 through Switch (all port 10/100/1000)

PC1 1Gb >> Switch >> PC2 100Mb.The speed will be?

PC1 >> Switch = 1Gb? and Switch >> PC2 100Mb?

Or all the time 100Mb? Does the switch speed up the data if it gets from 100Mb and sends to device, supporting 1Gb?
 

Urumiko

Distinguished
Dec 28, 2013
505
0
19,160


It will be 100mb between those 2 computers. Think about it.. If you were sending from the 100mb PC to the 1gb pc, and the switch receives 1 block of data at 100mbps, it will send it on to the 1gb PC. Though it will technically travel up the 1gb connection faster than it did on the 100mb connection, it will still have to wait for the 100m pc to send the next block of data before it can pass it on, so the effective throughput will still be 100mb. The difference is because the 1gb connection is 10x faster it is actually transmitting 1/10 of the time and doing nothing 9/10 of the time. so theoretically 10 100mb PCs could talk to the 1gb pc without issue.

If you want to know how it works in more detail check out TCP windowing.

I think that's what you are asking?

If not you were asking will the 1gb PC still be able to talk to other 1gb PC's at 1gb if it is also tlaking to a 100mb one? the answer is yes if they are connected via a switch.
 

Usernameis

Honorable
Nov 22, 2013
36
0
10,530




Just thought.
If PC1 connects to PC2 through switch, the first bits going from 1G PC to switch are transmitted at 1Gb speed, because switch doesn't know yet where the data will be passed. When it sees outgoing MAC, it passes data to 100M PC at 1G speed as well, because switches don't record MACs speed. So when PC2 replies at 100M speed, then switch understands that speed is decreased and starts communicate at 100M in both ways. It is my assumption.
But logically, why switches can't communicate at maximum speed on each individual link (port), where PC1 at 1G and PC2 100M.
 


It does work second way all the time. You are confusing a number of functions in the switch. The speed a port runs at is not in anyway related to a mac address. The speed/duplex is done sending a totally different type of signalling.

Switches all work in store and forward mode. Old cut though switch don't really exist. So a packet comes into the switch at whatever speed the port is running at. The complete packet is received and checked to ensure it was not damaged.
Now if the destination mac address is not in the switches forwarding table what it does is copy this packet to the output buffer on every port in the switch. Then each port assuming there are no other packets already queued in the output buffer starts sending simultaneously. So this very same packet is being transmitted to multiple machines some at 100m and other at 1g. The speed the packet arrived makes no difference and the speed it is transmitted on other ports makes no difference. Even when the mac addresses are known it still works the same way.

Now life is never this simple. If the 1g link keeps trying to send traffic to the 100m link eventually it will fill up the output queue in the port on the switch. This means the machine on the 100m side will lose data. Depending on the application it will tell the machine on the 1g side about this. How exactly the software tries to resolve this varies but as urumiko points out TCP windowing is one of the common ones. What this does is attempt to send data just fast enough that it can use all the buffers in the switch without taking loss. Problem is the end machines and the switch do not communicate about this. They just brute force try to see how much they can get though until the detect errors. The switch itself has no idea what the end machines are doing. Some very advanced switches do have option related to QoS to help pick which packets are discarded when the queue is full.

This tends to get extremely complex very fast. You need a very strong understanding of how TCP windowing works and the concept of "burst rate". TCP window size is just one solution to this these all are a form of traffic shaping which is another very advanced topic.

 
Solution

Usernameis

Honorable
Nov 22, 2013
36
0
10,530
So in conclusion.

Switch support 10/100/1000.
All machines at the network with 1gb NIC will communicate at 1gb/s speed through the switch with each other and fiber optic internet.
Devices with 100mb NIC at 100mb/s speed.
Devices with different speed NICs will communicate at 100mb/s.(all the way, since very first electron left even 1gb NIC)
 
Only if you over simplify things. From a APPLICATION standpoint yes they will only communicate at 100m between 2 particular machines. This only because the computer software is running like this. The network equipment is actually running at different speeds.

Because different application run differently ie video streaming app will do something different than a file copy app about this problem it gets very tough to make generalization.

Network guys like the one you see on this forum tend to only think about things from a network equipment prospective. We hate the application guys in a way because they can write really bad code and then try to say the network is slow when it is their particular implementation that is causing problems. The throughput on the exact same network can vary greatly because of how a application works

I see you updated your post after I put this up about the electron travels.

This is absolutely incorrect. Go back and read my other post very carefully. The switch is buffering data. Go read the topic serialization delay
 

Urumiko

Distinguished
Dec 28, 2013
505
0
19,160

bill001g already answered your question.

To try and simplify it more, the 1gb PC does not know the other PC is 100mb. it might well try to send data at 1gb by default. If this happens the switch (which knows the other link is only 100mb), will start dropping frames as the transmit buffer fills up. The switch has to know the difference as the electrical signalling for 100mb and 1gb is completely different.

It is the job of TCP to deal with this problem. TCP recognizes that packets are dropping and not being received, so it throttles back the file transfer until it finds a speed that works without dropping packets.

TCP will often try and accelerate or decelerate a file transfer to see if a connection can handle it. This is what gives rise to the "Microsoft time" phenomenon where you see the estimated transfer time doubling or halfing constantly in a very short space of time. This is due to TCP trying to speed up or slow down the transfer in this way.

It might sound alarming that packets are being dropped in this way but TCP also will re transmit any packets that were dropped so nothing is actually lost.