swithch and hub question
Madison Kelly
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Mon Jun 7 17:22:26 UTC 2004
hui xu wrote:
> All,
>
> I am building a home network using two computers. One
> computer having two network cards are used as server,
> the other has only one network card are used as client
> computer. My question is :
>
> 1.should I use a switch or hub between them? I tried
> directly connect these two computers without switch or
> hub. It seem that this structure doesn't work. both
> light on these network card are not on.
>
> 2. If the switch or hub is need, why and which kind is
> better?
>
> Best regards!
> Louie
Hi!
As others have mentioned, you need a cross-over when directly
connecting two computers. This is because one pair of wires is used for
sending data and the other pair is for receiving. Computers (and similar
devices) are called DTE devices and they all have the same pins/wires
for transmitting and receiving. Hubs and switches are known as DCE
equipment and use the opposite pins for transmitting and receiving.
Because the vast majority of the time people go from DCE <-> DTE
straight (patch) cables work perfectly (pin 1-8 of each end of the cable
are the same wires).
When you want to go between two DCE or two DTE devices you need to
"cross-over" the wires so that the wires on one side which are at pins
1/2 go to the other side on pine 3/6 and vice versa. This gets around
the problem that the two devices share the same transmit and receive lines.
Between the question of hubs and switches; as others have mentioned
the price is negligible these days that you might as well go for a
switch. Technically though the difference is that hub by taking whatever
is received on one port and blindly pushing it back out all other ports.
This means then that only one device can communicate at a time. A switch
on the other hand can track what devices are on what ports and will
intelligently route a packet coming in off of one port back out the
proper port leading to the destination. Now if you have say a server
where every other computer on the LAN is talking to it and not to each
other you will see no benefits at all because each line (in this case
the port the server is on) can still only by used one packet at a time.
Where switches become beneficial is where you have four or more
computers on a network where you may have at any one time A -> B while C
-> D or A -> C while B -> D and so on. This is because the converstion
between one pair doesn't interfere with the conversation of the other pair.
Another benefit of switches (though it is not a feature "technically"
of switches alone) is that they almost always support full-duplex while
hubs usually only support half-duplex. What this means is that with full
duplex data can be flowing both into and out of a computer at the same
time (send while receiving). With hubs (and half-duplex) you can only do
one or the other at a time.
To answer Ivan's question: Some higher end network cards (ie:
anything from Intel labeled "server" (or 'S' in the model name/number)
can automatically tell when it is talking to a device through the wrong
cable and adjust logically it's pins to compensate (the MDI to MDIX
auto-detection).
HTH,
Madison
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list