Solved

what does a switch do or how does it work?

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
catalyst 6500 - recover from corrupted IOS 4 61
traffic flow without STP 9 52
Internet Protocol Security question 3 68
UPS and BTU calculation 3 24
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…
I eventually solved a perplexing problem setting up telnet for a new switch.  I installed a new Cisco WS-03560X-24P switch connected to an existing Cisco 4506 running a WS-X4013-10GE Sup II-Plus. After configuring vlans and trunking,  I could no…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 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