Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

what does a switch do or how does it work?

Posted on 2008-10-08
3
Medium Priority
?
2,112 Views
Last Modified: 2012-05-05
what does a switch or a hub do, how does it work?
0
Comment
Question by:pcask
3 Comments
 
LVL 58

Accepted Solution

by:
tigermatt earned 150 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

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

Question has a verified solution.

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

Hello All, I have been training on Multicast for a while now and whenever I start the topic , I find out that my friends /  Colleagues mention that they do not know how to test Multicast Joins. As most of the multicast would be video traffic and …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month12 days, 10 hours left to enroll

578 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