LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-08-2012, 12:35 AM   #1
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
What's the difference between a hub and a switch?


Trying to learn the basics of setting up a LAN here....


Thx.
 
Old 03-08-2012, 12:39 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
AIUI a hub is a dumb broadcast device, sending all packets to all connected hosts, whereas a switch is smart and learns which MAC addresses are associated with IPs so directs traffic to only the intended host.

EDIT: lots of answers here.

Last edited by catkin; 03-08-2012 at 04:17 AM.
 
Old 03-08-2012, 02:24 AM   #3
prowla
Member
 
Registered: Feb 2011
Location: UK
Distribution: RHEL 5 & 6, Ubuntu 10
Posts: 93

Rep: Reputation: 3
A switch may also be managed, whereas a hub tends to be dumb.
 
Old 03-08-2012, 06:17 AM   #4
nano101
LQ Newbie
 
Registered: Apr 2011
Posts: 6

Rep: Reputation: 0
with a hub you only have 1 collision domain, which means that only one person (pc/laptopm whatever) can "talk" at the same time. If more that one device tries to transmit packets a hub a collision can occur. Each device then has a random countdown timer until it can re-transmit (google csma/cd).

On switches, there are multiple collision domains, each switchport is its own collision domain which means that each device connected to a switchport and transmit packets no matter what another device connected to another switchport is doing.

hope that helps somewhat.

It doesn't matter about manageability. You can have a managed or unmanaged switch. (don't know about hubs, they're before my time)
 
Old 03-08-2012, 06:45 AM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
I have seen managed and unmanaged hubs. I'm not sure what the boundary of defining "managed" is for switches. I don't recall using any switches that were entirely lacking in management features.

I think the fundamental difference is in collision domains as nano101 described. With a hub, only one packet can go through the entire hub at a time. With a typical switch, any combination of ports could be sending and receiving packets at the same instant and an individual port could be both sending and receiving. For that to be effective, the switch needs to remember MAC addresses as described by catkin, except I think it is MAC addresses by port it must remember. Many switches are unaware of any IP address other than its own. If the MAC address is remembered, the switch can forward the packet to only the port connected to that MAC address. Otherwise the switch must forward the packet to all other ports, making the switch as inefficient as a hub for that packet.

Last edited by johnsfine; 03-08-2012 at 09:24 AM. Reason: typo
 
1 members found this post helpful.
Old 03-08-2012, 07:02 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Thanks for the correction johnsfine
 
Old 03-08-2012, 08:26 AM   #7
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
thanks guys
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between Repeater,hub,bridge, switch,router and gateway sulekha Linux - Networking 3 11-26-2008 07:40 AM
tell me the process router to router, hub to hub and switch to switch communication. yakuza003 Linux - Networking 4 06-21-2008 07:55 AM
hub vs switch me99 Linux - Hardware 3 02-02-2008 05:15 PM
How to detect whether a hub or switch is used ? antonypaul Linux - Networking 1 12-02-2005 08:47 AM
connect switch to hub? ody1 Linux - Networking 3 04-12-2004 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration