100 mbps hub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 29 Jul 2003, Glenn Ervin wrote:

> You are probably right Luke, as I really don't know the difference between a
> router, hub, and a gateway.

Ok, well a gateway can, technically be a router, a hub, a switch, a bridge 
... anything that connects 2 disparate networks together.

A hub is simply a repeater, i.e. it just takes packets and re-broadcasts 
them, with no regard to their destination address.


As to the difference between a router and a switch:

If we assume that a packet (it doesn't have to be tcp/ip but for example's 
sake w'll say it is) is made up of 7 different parts or layers, with layer 
7 being the top (data) layer and layer 1 being the bottom 
(physical) layer.  This is referred to as the OSI model.

When an application (let's say an email client) sends a packet for 
transmition, here's what happens:

The data (layer 7) is encapsulated (has a header added) which contains 
information to enable another mail client to interpret and display the 
data.  This packet is then passed along, via the operating system, to the 
ip stack, where such control information as source and destination ip 
address are added.  Then it is passed on, at each stage more data is added 
to the front of the packet, as control data for any receipient at the same 
level (i.e. layer 3 control data for decapsulating machines at level 3).  
Eventually, it gets to level 1, the physical layer.  This is where the 
packet is converted into electrical impuolses (light in the case of 
fibre), and transmitted.

When it reaches, let us say, a device, the device looks at the packet.  
Let us say that this device is a router, which usually operate at level 4.  
In order to get to the level 4 data, it must remove (decapsulate) all data 
for levels 1, 2, and 3 before getting to the level 4 data.  Then, if the 
packet needs to be redirected, before this can be done, data for levels 3, 
2 and 1 must be added by each stage as the packet heads back onto the 
transport medium, copper or fibre.

The difference between routers and switches is that switches operate for 
the most part at a lower level, usually level 2, which deals with things 
like device (mac) addresses etc.  Because it directs traffic based on a 
lower level in the OSI model, less encapsulation and decapsulation needs 
to take place, thus a switch will route traffic much faster than a router, 
for the same levels of traffic and same speed of links.


I hope this rather convoluted explanation has been of some use to someone, 
oh and I hope I got it right, as some of it is a bit hazy for me. (grin)

Cheers.

-- 
Toby Fisher	Email: toby at tjfisher.co.uk
Tel.: +44(0)1480 417272	Mobile: +44(0)7974 363239
ICQ: #61744808
   Please avoid sending me Word or PowerPoint attachments.
   See http://www.fsf.org/philosophy/no-word-attachments.html
 




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux