Switch, Hub and Router

H

Herb Martin

Steve gave you a link to another source.
What is the different between Switch, Hub and Router?

First, distinguish a Router, Bridge, Hub.

[Then understand a Switch -- why? Switches are
a complex hybrid of one or more of these.]

We must also define a "hub" correctly. Many
newcomers to networking use this term loosely
to mean a 'switch' (remember this is a fancy hybrid
device we are not yet discussing) because it sits
in the middle -- or hub position -- of a network.

Those who have doing networking longer usually
reserve this term for a simpler device, which is
properly termed a "Multiport Repeater" -- a device
that plugs all of its devices into the same segment
(effectively) where they share the bandwidth and
can 'collide'.

Technically, a repeater extends the 'collision domain'
(and the 'broadcast domain').

Ok, then what's a bridge? A bridge does NOT extend
the collision domain because the devised ('nodes')
on one side don't directly use the same segment -- but
it does forward all traffic destined for another segment
to that segment and since broadcasts are for "every
device" it does extend the broadcast domain.

This is a KEY property: Bridges forward broadcasts
(by default.)

Bridges use the Hardware or MAC address (of the NICs)
to decide "which machnes are on the same segment" and
which are NOT so as to forward only traffic where it is
necessary and not when the machines are adjacent.

[Because they use the MAC address they are said to
be "layer 2 devices" -- from the OSI model]

Router do NOT forward broadcasts by defaults and
this is THE MOST IMPORTANT (non-obvious)
difference between Routers and Bridges.

There are other differences though -- routers are always
protocol specific (IP vs. Appletalk vs. NWLink) even
if the same "box" does more than one -- they are SEPARATE
routers inside that box for each protocol it supports.

Routers pick the "best path" through the network using
the FINAL destination as the target -- for IP this means
the IP addreses is used to pick the next (best) hop.

[Because they use the Network address they are said to
be "layer 3 devices" -- from the OSI model]

Switchs are analogous to the old telephone plug board
where as long as two stations are plugged into the same
"pair" through the "switchboard" they can talk directly.

But how does a switch "known" which stations to plug
together?

The answer to this question explains why switches are
hybrid devices: They make these decisions using two
primary AND DIFFERENT mechanisms.

Some switches use the bridge (MAC address) method
and others use the network address (IP etc.) Routing
method...

It isn't surprising that switches are commonly called:

Layer-2 (bridge type switches)
Router-Switches, Switch-Routers (or Layer 3 type switches)

[I tried to list most common name first but all are used.]

Then we have the even more modern swiches which are
further hybrids.

They do Swithing of course but can be configured to
use either Bridging or Routing methods to make those
decisions, in fact some are called VLAN switches
because the ADMIN can configure certain ports/NICs
to be on the SAME "bridged VLAN" (or broadcast
segment) and others to be on different "bridged VLAN"
segments.

Between such segments the bridge must ROUTE.
 
J

Joseph Hume

Jim said:
What is the different between Switch, Hub and Router?

Thanks,
Jim
In a nutshell

A hub is a simple network concentrator operating in half duplex (I talk,
you listen - you talk, I listen) mode. Switches have no packet
processing capabilities. A packet received on one port is re-broadcast
to every other port on the switch. Usually cheaper than a switch of the
same port density (count).

A switch is also a network concentrator but it has some basic processing
capabilities. When it receives a packet on any port, it opens it enough
to read the destination mac address to determine what destination port
it needs to route the packet to by an internal MAC address lookup table
it builds as end nodes come online. Each port has the ability to
operate in full duplex (we both talk, we both listen) mode increasing
network speed. You will pay more for a switch with the same port
density as a hub.

A router is kind of like a doorway. A router seperates traffic into
rooms. By design it keeps all inter-room traffic in it's room meaning
no other room knows about traffic in any other room. When a packet is
received by a router, it opens it up enough to determine the destination
ip address. If the address is on the router's IP address routing table
it will forward it to the appropriate room, otherwise it will send it
back to the sender stamped 'destination unknown'

Hope this helps...
 
G

Guest

yes, thanks for all your help...

Joseph Hume" <"moscowhippy at adelphia.n said:
In a nutshell

A hub is a simple network concentrator operating in half duplex (I talk,
you listen - you talk, I listen) mode. Switches have no packet
processing capabilities. A packet received on one port is re-broadcast
to every other port on the switch. Usually cheaper than a switch of the
same port density (count).

A switch is also a network concentrator but it has some basic processing
capabilities. When it receives a packet on any port, it opens it enough
to read the destination mac address to determine what destination port
it needs to route the packet to by an internal MAC address lookup table
it builds as end nodes come online. Each port has the ability to
operate in full duplex (we both talk, we both listen) mode increasing
network speed. You will pay more for a switch with the same port
density as a hub.

A router is kind of like a doorway. A router seperates traffic into
rooms. By design it keeps all inter-room traffic in it's room meaning
no other room knows about traffic in any other room. When a packet is
received by a router, it opens it up enough to determine the destination
ip address. If the address is on the router's IP address routing table
it will forward it to the appropriate room, otherwise it will send it
back to the sender stamped 'destination unknown'

Hope this helps...
 
G

Glenn L

I think you mis-interpreted Bruce's reply.

His reply gave you a legitimate link with useful information to answer your
question.. http://www.cisco.com/warp/public/473/lan-switch-cisco.shtml

The following is just Bruce's 'ounce of wisdom' that you will see under his
signature to all his posts.
"It is perfectly useless to know the right answer to the wrong question."

I'm doubt his intention with this is to be arrogant, and I'm pretty certain
he was not trying to insult or offend you.
 
R

Roland Hall

in message
: What is the different between Switch, Hub and Router?

You mean what is the difference between a switching hub, shared hub and
router?!

Shared Hub:
Multiport repeater that forwards a packet to all ports, also called
flooding. With shared hubs, there is a 5-4-3 rule; 5 segments, 4 repeaters,
only 3 segments can contain users. Ethernet uses CSMA/CD (Carrier Sense
Multi Access with Collision Detection) It senses the line to transmit and
detects if there are collisions, two packets colliding. I believe AppleTalk
uses CSMA/CA (Carrier Sense Multi Access with Collision Avoidance) where a
RTS (Request To Send) is sent to the target and it waits for a CTS (Clear To
Send) signal and there is a random timing involved also.

Bridge:
We also need to cover bridges. A bridge connect two segments. If a
computer on Segment A needs to talk to a computer on Segment B, the bridge
will forward the packet. It keeps track of who is on which segment. If a
computer on Segment A needs to talk to another computer on Segment A, the
bridge will filter the packet instead of forwarding it to Segment B. Shared
hubs operate in Half Duplex mode where one sends while one receives similar
to a walkie talkie or CB radio.

Switching Hub:
A layer-2 switching hub is a multi-port bridge. There are also layer-3 and
layer-4 switches, network and transport layers respectively. Generally
today, switches can operate in 3 modes. They are cut-thru, fragment free,
and store and forward. Cut thru forwards the packet when the destination
address is known. Fragment free forwards the packet after the header and
part of the data has been read which offer better reliability but increases
latency. Store and forward reads the whole packet before forwarding the
packet onto its destination address. It is the most reliable and also the
slowest performer.

Switches can operate in Full Duple mode where both devices send/receive at
the same time so CSMA/CD is no longer required.

Switches allow for multiple connections at the same time, as long as they
are not to the same target. Computer A can be printing, while Computer B
talks to Server C and Computer D surfs the net. A switch has taken the
linear bus design and moved it inside the box. As a bridge, it keeps track
of which address/es is/are connected to each port. It's self-learning. If
a destination address is unknown, the switch will flood all ports, as a
shared hub does.

Layer-3 switches allow switches to be grouped in VLANs. These switches have
trunk ports that allows switches on the same VLAN to talk to each other.
However, this can cause a problem since packet could get put into an
endless loop. The spanning tree algorithm keeps this from happening.
Spanning tree causes a latency for logons in a Windows network where the
first attempt will result in error because the timeout at the OS is shorter
than the one on the wire. Therefore, layer-3 switches can be set with
portfast enabled. This eliminates the timeout on the wire allowing the
workstation access to the domain without error. With VLANs users ports can
be moved electronically, as they move physically to different offices.

Layer-4 switches actually allow filtering at the transport layer so
decisions can be made by identifying which application protocol is being
used, i.e. HTTP, SMTP, FTP. This would allow in-house application traffic
to get higher priorities than regular Internet traffic, resulting in better
performance.

Routers:
Routers connect networks. Routers are slower than hubs, bridges and
switches because they store and forward each packet. They also have to
determine the path to forward the packet based upon the destination.
Routers only know their neighbors. A router will look at static/dynamic
routes in its routing table and if the destination network is not known, it
will choose a default path, called the default gateway. For networks
connected to the Internet, the default gateway is generally the Internet,
where most unknowns are. Routers only forward packets transmitted over
routed protocols. Protocols that do not support routing are dropped, like
NetBIOS, NetBEUI, LAT, SNA, etc. There are hybrid routers called brouters
or Bridging Routers. They can forward packets that are not transported over
routed protocols but as a bridge to connect segments.

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Online Support for IT Professionals -
http://support.microsoft.com/servicedesks/technet/default.asp?fr=0&sd=tech
How-to: Windows 2000 DNS:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;308201
FAQ W2K/2K3 DNS:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;291382
 
P

Phillip Windell

They are called "tag lines", and they appear under all messages. You have
to be careful in NGs to also not read emotions into a message when the
emotions may not have been there.
 
R

Roland Hall

in message
: Thanks, but no thanks for your arrogantly useless answer.

The link is the answer and even if he was being arrogant and it wasn't just
a tag line, the answer is what you're after. I have found it is better to
clarify before condemning someone to death, unless of course they're French,
last name Chirac or German, last name Schroeder.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Online Support for IT Professionals -
http://support.microsoft.com/servicedesks/technet/default.asp?fr=0&sd=tech
How-to: Windows 2000 DNS:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;308201
FAQ W2K/2K3 DNS:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;291382
 
B

Bruce Sanderson

Thank you Glenn, Phillip and Roland for coming to my defence. Arrogant is
the last thing I want to be, but sometimes it seems that not appearing
arrogant to others is a difficult thing to achieve, at least for me.

My "tag line" is taken from the book "The Left Hand of Darkness" by Ursula
K. Le Guin (ISBN 0-441-47812-3 1969).

I've been in the computer/software business since 1967, which doesn't
necessarily qualify me as an expert in anything, but I have discovered over
the years that if you don't ask the right question, you don't necessarily
find out what you what or need to know.

I guess I could have provided some details, such as others have done in this
thread, but when I read the question I thought that this must be a pretty
common question and there must be answers and explanations that are much
more comprehensive and understandable than I could produce by regurgitating
the facts I have in my head. The page at the link I provided appears to
have a good, clear explanation of what hubs, switches and routers are, so I
though it would be better to provide that link. If I was wrong about this,
I appologize.
 
P

Phillip Windell

Bruce Sanderson said:
Thank you Glenn, Phillip and Roland for coming to my defence. Arrogant is
the last thing I want to be, but sometimes it seems that not appearing
arrogant to others is a difficult thing to achieve, at least for me.

Oh,...heck,..you should look at some of the responses I've been getting
lately and the beatings I've been taking. I'm still using the Newsgroup
Crutches,..I just got the Cast off yesterday :)

I'm ready to look for a safer "sport" than trying to help in NGs.
 
B

Bruce Sanderson

Well, so far I've avoided actual injury, except perhaps to my eqo and
willingness to help! I trust you are recovering rapidly :)
 
P

Phillip Windell

Bruce Sanderson said:
Well, so far I've avoided actual injury, except perhaps to my eqo and
willingness to help! I trust you are recovering rapidly :)

You know, the more I see that tagline, the more I like it. It describes
exactly how I get in "trouble" when I reply to people,...because I don't try
to tell them how to complete their "method" when I think the method is not
right or not the best way to do it. Instead I will try to correct the method
so that it is more correct, more efficient, and usually...also simpler to
deal with,...then they get mad because I didn't tell them what they wanted
to hear.
 
R

Roland Hall

: : > Well, so far I've avoided actual injury, except perhaps to my eqo and
: > willingness to help! I trust you are recovering rapidly :)
: >
: > --
: > Bruce Sanderson MVP
: >
: > It's perfectly useless to know the right answer to the wrong question.
:
: You know, the more I see that tagline, the more I like it. It describes
: exactly how I get in "trouble" when I reply to people,...because I don't
try
: to tell them how to complete their "method" when I think the method is not
: right or not the best way to do it. Instead I will try to correct the
method
: so that it is more correct, more efficient, and usually...also simpler to
: deal with,...then they get mad because I didn't tell them what they wanted
: to hear.

It must just be the two of you because I never piss anyone off and if I do,
f'em!
Ok, seriously, it is easy to mistake someone's response in a NG because
you're only using one sense, sight. Of course hand signals wouldn't be much
better...
http://www.jokes.nu/joke-5063.shtml

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Online Support for IT Professionals -
http://support.microsoft.com/servicedesks/technet/default.asp?fr=0&sd=tech
How-to: Windows 2000 DNS:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;308201
FAQ W2K/2K3 DNS:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;291382
 
R

Roland Hall

: I'll have to start using hand signals and body language.
:
NOW I'm skeered!

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Online Support for IT Professionals -
http://support.microsoft.com/servicedesks/technet/default.asp?fr=0&sd=tech
How-to: Windows 2000 DNS:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;308201
FAQ W2K/2K3 DNS:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;291382
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top