Solved

what does a switch do or how does it work?

Posted on 2008-10-08
3
2,107 Views
Last Modified: 2012-05-05
what does a switch or a hub do, how does it work?
0
Comment
Question by:pcask
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 58

Accepted Solution

by:
tigermatt earned 50 total points
ID: 22671670
A Switch and a Hub are two completely different things, but both fundamentally link two or more devices to each other, be those devices computers, printers or other switches/hubs.

A switch works by receiving a packet from one device, say the one in port 1. It reads the destination and forwards the packet on to the appropriate device on the appropriate port. Using microsegmentation computers in ports 1 and 2 and the computers in ports 3 and 4 can essentially communicate at the same time with full bandwidth.

A hub is an older device which is seldom used today. A hub merely receives incoming traffic on one port, and forwards it out on all other ports to every other device connected to it. Every device shares the bandwidth. In the above example, computers 1, 2, 3 and 4 would all receive the same transmission, even if it is only intended for computer 2. This results in collisions, the bandwidth must be shared and many other issues, which is why Ethernet Hubs are seldom used.

-tigermatt
0
 
LVL 50

Expert Comment

by:Don Johnston
ID: 22672182
What tigermatt says is basically correct with a minor caveat.

since switches are layer 2 devices (unless we're talking about layer 3 switches) they forward FRAMES not packets. The forwarding process is done based on the MAC addresses and not the IP addresses.
0
 
LVL 16

Expert Comment

by:Aaron Street
ID: 22685375
lets have a brief history :)

its correct what is said above. however to put it in order.

you first had bus networks. here a packet of data when round the network from one pc to the next. no real "switches" and this made the network very slow and limited its size.

next came along hubs... these simple could receive packets on one port, and then flood them to all the other ports. this meant networks could be much larger. but there was a problems. in fact 2 problems. first the packet might come in to the hub on port 1 and the end station might be on port 2.. but the hub will still forward the packets to all the other ports. so using up network bandwidth needlessly. and secondly because they flood packets you get a high number of collisions and this limits the size of network you can have.

so along came the switch. with a switch does is read each source mac address of packets coming in to a port. and builds up a data base of what port each mach address is on. if its connected to and end station it will have  one mac address linked to that port. if it is connected to a second switch it may have hundreds. but the fact is it will know where a packet needs to go by looking in its database. so in the case the hub faced above. it would only forward the packet to port 2, and not flood it to any others.
most switches can hold 500+ mac address in there data base, and can filter the packets at wire speed. (ie at the same speed the travel down a wire) this requires a lot of computing power and complex hardware and software. so it was not until this could be made cheaper that switches could take over from hubs.

hubs and switches can be used on the same network. however just remember hubs create collisions domains, switches do not. I would only use a hub at the edge of a network, maybe to split a single network point on a desk in to two for a pc and printer...
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you with short command examples how to obtain a packet footprint of all traffic flowing thru your Juniper device running ScreenOS. I do not know the exact firmware requirement, but I think the fprofile command is availab…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

749 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