Solved

What's the difference between a switch and a hub?

Posted on 2006-07-06
10
1,665 Views
Last Modified: 2008-01-09
What's the difference between a switch and a hub?

And how do you know which one is best to use for a paticular network?
0
Comment
Question by:Axter
  • 2
  • 2
  • 2
  • +4
10 Comments
 
LVL 2

Assisted Solution

by:chris_bol
chris_bol earned 100 total points
ID: 17051321
0
 
LVL 9

Accepted Solution

by:
jjoseph_x earned 150 total points
ID: 17051351
You should always use a switch instead of a hub unless you need for the data to be replicated out every port (e.g.: you want be to able to sniff the traffic of all connected stations).  Even then, a decent, managed switch will allow you to replicata the traffic from one port to another.
0
 
LVL 1

Assisted Solution

by:xmaveric
xmaveric earned 100 total points
ID: 17051395
When you send data to a hub, the hub forwards it to all attached computers.

When you send data to a switch, it only forwards the data to the specific computer the data is meant for.


Now that switches are as cheap as hubs, most people use switches because they provide a faster, more reliable network.
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 13

Assisted Solution

by:prashsax
prashsax earned 150 total points
ID: 17051600
The basic difference between HUB and switch is like this:

On a HUB when a machine send a packets, this packet is send to all machines connected to this HUB irrrespective of the IP address of MAC address of destination machine.
So anyone connected to this HUB can listen any conversation happening on any of the machines on this HUB.

On a switch, when a machine send out a packet, the switch looks at the destination MAC address and send the packet to only that port where the destination machine is connected. So here even if many machines are connected to a switch only the destination machine will receive the packet and not all machines.

Now, generally you should use Switch in a network as it is safer then HUB and provides more speed.(Less packet collisions).

But in some cases you can use HUB. Like if you want to monitor all the traffic going and coming to your internet connection. So here you can plug a HUB between your internet router and network. Now connect a machine to this hub and  you can look at all the traffic passing thru the HUB.
0
 
LVL 30

Author Comment

by:Axter
ID: 17051845
How about if you're using old style video games like Duke Nukem on a multiplayer game, where the packets are being sent to multiple machines.  Would a HUB then be faster then a switch?
0
 
LVL 13

Assisted Solution

by:prashsax
prashsax earned 150 total points
ID: 17052215
No, HUB will not be faster then switch.

One thing you need to consider is that even if HUB is sending a single packet to all ports but other machines connected to it will discard the packet (in normal mode). Because the destination IP address on that packet differs from that they have assigned to them. Only one machine which has same IP address as mentioned in the packet will repond to it.

So, switch is still faster.

0
 
LVL 4

Expert Comment

by:xcromx
ID: 17052963
Switches have a different interfaces then hubs
meaning each port on a switch has its own mac address
hub only has one mac address..

Use the switch in all your networking needs..faster and more reliable
0
 
LVL 17

Expert Comment

by:Jared Luker
ID: 17054143
If you want to watch the traffic on your network than a hub is not your answer.  I agree that you should ALWAYS use a switch.

You can use sniffing programs such as SNORT if you want to sniff the traffic on your network.
0
 
LVL 9

Assisted Solution

by:jjoseph_x
jjoseph_x earned 150 total points
ID: 17054505
Actually hubs are stricly layer 1 devices, so they don't have MAC addresses.  Actually, neither do switch ports... they just receive and transmit the bits, they don't require MAC addresses either (though managed switches do have MACs on some of their ports).

Also, you can't use a sniffing program very effectively with a switch unless you're able to mirror ALL of the data to one port.  If your machine is connected to a switch, it will only receive traffic destined to its MAC address (so even if your NIC is in promiscuous mode, it will only get data that's destined to your machine)... that's fine if you want to sniffer traffic between your machine and another workstation, but it won't like you sniff traffic for the entire network.

0
 
LVL 30

Author Comment

by:Axter
ID: 17055830
Thank you all
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IPv6 and IPv4 Subnetting scheme 4 47
VLAN Question! 9 62
Multiple MPLS Circuits Connecting to LAN 3 43
VLAN Configuration on Cisco Switch 8 21
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question