0% found this document useful (0 votes)
18 views6 pages

Hubs Vs Switches

Uploaded by

Arixson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

Hubs Vs Switches

Uploaded by

Arixson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

Hubs vs.

Switches

If you're going to be using an Ethernet network you're going to have some box in
the middle that we call a hub or a switch.

Now I know in other episodes I talk about the fact that hubs are pretty much
obsolete.

However they are on the exam.

So let's make sure we understand very clearly the difference between a hub versus a
switch.

Now right in front of me I've got all kinds of hubs and switches I've got.

This is just a regular switch.

Here's a switch.

This is a cable modem with a built in it's seals yellow ports that's a switch built
into it.

Here's a little tiny 5 port switch so switches are everywhere and we see them all
over the place but we don't see hubs very often.

Now what I want you to do is take a look at these two blue boxes one of these boxes
is a hub and the other one is a switch.

So if we could look really really carefully it's tiny letters even standing up
close I can barely read it.

But if we look very very closely we'll see one actually says hub and the other one
says switch.

So simply by looking at a box you can't tell the difference between a hub or a
switch.

And more important than that wire switches now pre-dominant and hubs all but
obsolete.

So in order to make sure we understand the difference of hubs versus switches Let's
take a look at this little diagram that I've got.

So what I've got right here this little rectangle.

We're going to start off by saying that it is a 8 port hub so there's eight
connections in here.

And then I've got four computers that make up this particular network.

So let me go ahead and get these guys plugged in.

So for starters I'm going to run a cable out of here and I'm going to plug this guy
into port number one and I'm going to pop this guy to port number three.

Remember it doesn't really matter where you plug these things into a hover switch.

So you know we're here and able to get to seven in the sky over here.
We'll put it in Number Six.

OK.

So what I've done is I have now created a network using a hub.

A hub is nothing more than a multi port repeater.

So let me show you how this works.

So let's just say this computer right here sends out a frame.

So he sends the frame out and it comes into the repeater the hub.

Once it gets in here the hub's job is to make multiple copies of it.

It's not an amplifier it's a repeater.

It sees a signal and recreates it but it doesn't recreate just one.

It's going to recreate the exact same frame for everybody who's plugged in.

So the frame gets created.

And then they move over to the individual computers.

Now obviously these would all be moved at once

but I've only got two hands so I had to do one at a time and that's all that a hub
does.

There's some real downsides to a hub.

So for example let's say that this is a 10 base t hub.

The problem with a 10 base t hub is that it's maximum what we call bandwidth

is 10 megabits per second now.

So let's just say these two lower computers are having a conversation and these two
upper computers are having a conversation.

As that's taking place the throughput for each conversation is half of the total
bandwidth or only five megabits per second and that's only with two conversations
going.

Imagine if I had five six seven eight conversations going all simultaneously.

So with the hub you get a big degradation of the overall throughput because you
have lots of people talking with a hub.

We use something called carrier since multiple access collision detection.

Let me explain how this works.

So what's going to happen is these two computers want to talk to each other.

So this guy starts sending out a free and although the frame will go out to
everybody.
It will come to this guy as well it will be repeated.

And it comes to this guy.

That works out great.

But what are these two guys start talking at the same time.

The problem with a hub is that only one conversation can take place at any given
instant.

So if these two guys by coincidence this computer in this computer start talking at
the exact same time their frame's can potentially have a collision.

A collision is when two people start talking at once.

Now as human beings if you and I start talking at once oh excuse me part of it.

That kind of thing with CSM a CD you go through a very different process.

Basically built into the network cards of every Ethernet computer on earth is a set
of electronic dice.

So what will happen first they detect the collision.

CSM they see the collision detection and it's easy to detect a collision because
just like when you drop two stones into a pond the waves when they come together
get twice as high.

Sort of the same thing happens with electricity.

So it's easy to electrically go.

I have a collision.

If they do that all of these guys have built an electronic device.

Now these electronic dice have about 15 million sides to the dice it's a random
number generators.

Really what's happening.

And one of each one of these devices who detects the collision will roll the dice
and everybody gets a different number and that's how long they wait in milliseconds
before they go ahead and reset their data.

That's how they get around collisions in an Ethernet Network.

Collisions are a common thing it happens five percent of the time maybe as high as
10 percent of the time.

And it's designed to deal with that because of C-s and a CD.

Now also CSA stands for carrier sense multiple access.

And what we're saying here is everybody can access the same carrier the same bus.

In essence this brings up an interesting term.


The term is called collision domain.

Basically anybody who's plugged into this one hub who can hear the same collision.

So if these two guys have a collision he can hear it too.

So anybody that's plugged into this one hub is in what we call a collision domain.

Now let's do this again.

But let's make it a switch.

So what I'm going to do is get rid of just generic frames.

A switch is also a multi-port repeater but it's different what a switch does that.

The other ones don't do is that it looks at MAC addresses.

Remember every network card on earth has a MAC address.

So I've got three of these and this is built into the network card.

Now when a switch is first turned on in the morning or whenever it's first turned
on it acts like a hub at first but what it will do is it will quickly figure out by
looking at the frames going back and forth that it'll sit there and go.

This MAC address is plugged into me at port 1 and it will memorize that and it's
built in to the switch in a little table that it builds itself and it stays in
there.

Make sure you get that right.

So in essence what we do is we build a Mac table which says this MAC address is
plugged into my port one.

This MAC address is plugged to my port three.

This one is plugged in my port seven.

If you unplug something you plug it back in it'll take it a few milliseconds but it
will update itself very very quickly.

Now by knowing this we have a huge advantage over a regular old hub.

First of all let's go ahead and watch this in action.

So what I'm going to do is I'm going to do this as a frame again.

So it's from 80.

I'm just looking at the last two numbers for ease.

So we know that 80 is plugged into here that's how you to put it here.

And he wants to send it to one B which is one be here.

He wants to send it to here.


So what will happen now is that when this switch receives this guy right here the
beautiful part is is that it doesn't make a copy for everybody because it knows who
it's supposed to go to.

It just sends it to him.

This is a big advantage over a hub.

Because with this switch what you're making is in essence a point to point
connection with a switch.

If I've got these two guys talking and I've got these two guys talking they will
still each run at 10 megabits because it's a river the old time telephone operators
were the you see some gal and she'd be like hers and ever do what you're trying to
connect and they plug those plugs into the wall kind of thing.

It's kind of like that.

They literally plug a hardware connection between these two devices.

Now the moment this guy sends another packet to a different MAC address he'll
unplug and plug it to somebody else.

Now there's one thing that is kind of interesting here and I want to show you.

In this case I have what's known as a broadcast.

There's a lot of traffic that takes place in a network where you want to send a
piece of information to everybody but say you want to announce what your network
name is to everybody.

Or you're trying to find a specific computer.

We call these broadcasts now in a broadcast.

It is a very specific mac address it's all efes.

So you can never have a network card with all F's.

It's reserved for broadcast.

So if this device wants to broadcast it will come in and because it's a broadcast
who act just like a switch I'm sorry.

Like just like I.

He will make multiple copies just like we saw a moment ago and send them on to
every single computer that he's connected to.

The beauty of this is that we're now in a situation where collisions don't happen
very often once in a great while.

But because we have hardwired connections the idea of a collision domain doesn't
really happen very much.

What we have instead is a group of computers that are hooked to this switch that
hear each other's broadcasts.

So the idea of a broadcast domain is you're hooked to a switch and any computer
that can hear anybody else's broadcast is a member of the same broadcast domain.

So typically when we're talking about collision domain we need hubs and when we say
broadcast domain we mean switches more often than not when we get these out of
here.

The power of a switch is so intense that there's really no good reason to use hubs
anymore.

There are a couple of places where hubs can be convenient for example if I wanted
to listen in on the conversations going on in a hub it's easy.

I can just plug it into another port and I can listen in to everything that's going
on with a switch that's pretty much impossible because there's hardware
connections.

If I plugged into port 5 I wouldn't be able to hear it.

So I'll use a hub sometimes if I want to be a little bit sneaky and listen in.

I can also get switches which have what we call maintenance ports and a maintenance
port is basically saying I don't care what's happening.

You give me a copy of all traffic that's taking place.

So even switches can take over some of the functions of hubs today.

The bottom line is is that if you had to run into a situation where you have a hub.

Probably the best single thing you can do to improve a network is to just unplug
the hub and throw in a switch and you will instantly dramatically improve your
network throughput.

Make sure you're comfortable with the concept of hubs and switches.

Switches forward frames based on MAC addresses

Hubs use CSMA/CD to avoid collisions

Switches create and use MAC address tables to map ports and host devices

You might also like