Link to home
Start Free TrialLog in
Avatar of ibradshaw
ibradshaw

asked on

Switches and Hubs...

I was recently asked what the difference was between a switch and a hib. I wasn't totally sure, but as the informal IT guy in the office no-one else was going to venture a response(!). I came up with the following...

HUB - Connects multiple PCs in a small office. All connections get access to all resources (i.e. bandwidth) all the time, so if two PCs send a packet at the same time then they 'collide' and have to be resent. On small networks this is better than using a switch since collisions are rare and therefore the retransmission is not a problem.

The SWITCH definition I'm a little more unsure on...

SWITCH - Enables connections from multiple sources (usually other hubs, rather than PCs). Switches allocate the available resources via (in effect) time slicing the available bandwidth between connections, i.e. a 100MB switch with 4 connections will give each connection a 100MB link for 1/4 of the time. This eliminates collisions so on busy networks this is better than retransmissions, ie. when the available bandwidth is being used almost all the time to the maximum.

Therefore hubs are used in small offices and switches for connecting multiple offices together (usually over a remote link) or many departments to one server. If a switch was used in an office instead of a hub, althought there would be no 'collisions' overall speed will be slower since the switch is only offering a % of all resources to each user, rather than all of it all the time.

Therefore a good time to use a switch is when network collisions mean that the throughput of the hub is less than if the bandwidth was timesliced between connections.

Am I anywhere near?

Thanks!

Ian.

SOLUTION
Avatar of dis1931
dis1931

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dis1931
dis1931

Basically it makes direct connections on the backend of the switch.  So if port 1 sends a packet intended for port 10...the switch makes a direct connection between these ports so that other ports don't need to hear unnecessary traffic.
allmost,

a switch is allways better than a HUB.

"If a switch was used in an office instead of a hub, althought there would be no 'collisions' overall speed will be slower since the switch is only offering a % of all resources to each user, rather than all of it all the time."

Not Quite, a switch "time Slicing"  is so fast you can't really notice it, A 100Mb switch will provide 100MB for any port at any time.
a hub will share the speed with all ports + collisions (retransmiting packets will make it even more problematic) + unsecured (you can listen to anything that goes through the hub from any port)

basically the decision for HUB or Switch depends on office requirements and money issue.
a switch is a bit more expensive but more efficient. I would use a switch anytime i need to connect more than 2 computers rather then a HUB.


SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

a switch won't provide the whole 100MB any time. Assume You want to connect a 10Mbit NIC, all traffic going to-and-from that NIC will have the speed of 10MBit ! As said, the network-connection will be directly connected with no other seeing it.
But if You compare to a HUB, the HUB would reduce speed of ALL other NICs to 10MBit, as all NICs have to listen all the time to this noise - the Hub has no intellignence at all and only the NICs will know if they are meant.

For security reason, switches should be preferred over hubs, as these direct connections couldnt be noticed (so easily)

Holger
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Another great things about hubs, is that you can throw a device on a hub with a protocol analyzer and look at the same packets that the device is receiving.

This isn't nescessary that often since there are great free protocol analyzers available in software now, but it still comes in handy once in a while.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't think that switches are somewhat slower in response-time.  Yes there is a time associated with "switching" but it is negligible...aka...you won't even notice.
with any decent switch, I'd have to say that Layer2 switching is always faster than a hub. as far as overflowing the switch buffer, if you have that many clients, you should be using multiple switches that are connected to each other.  Otherwise I still say that the amount of dropped frames pales in comparison to the amount of collisions you would have with all those machines on a single collision domain.

The switching is almost instantaneous, and fast enough to deliver full bandwidth to all the ports. There are many types of buffering, defining how much of the packet is read before forwarding.  Store and Forward always has the longest lag.  

Any delay caused by buffering, interogating, and forwarding is still quicker than a hub with more than 3 or 4 computers on it.
A hub connects all of the computers on the segment.  A switch connects each pair of computers that need to talk at the moment.  So while an 8-port 10/100 hub supports ONE stream at any moment at up to 100 Mbps (half duplex), an 8-port switch could have EIGHT full-duplex 100 Mbps streams going on.  (To be fair, you'd hardly ever see that full theoretical utilization...)

The slight latency introduced by a switch is not due to "time slicing", but to avoiding collisions by storing and forwarding each packet.  (Some switches can be configured so the head of the packet can start being forwarded before the tail arrives, but there is still some delay that you wouldn't see on a hub.)

but you have to agree PennGwyn that even with the delay, it's still tons faster than a hub.  "delay" has such a negative connotation.
Avatar of ibradshaw

ASKER

Thanks for all your help! Still a lot for me to learn...

I'll try and explain this in the office! :) Wish me luck!

Thanks again,

Ian.

P.S. I'll split the points based on LeoTer's comments.