Solved

what does a switch do or how does it work?

Posted on 2008-10-08
3
2,102 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 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When posting a question about a Cisco ASA, Cisco Router or Cisco Switch, it can aid diagnosis if a suitably sanitised copy of the config is provided. It is much better to leave as much of the configuration as original as possible, as it could be tha…
#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now