LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   What is the necessary hardware to connect two computers in a LAN configuration? (https://www.linuxquestions.org/questions/linux-hardware-18/what-is-the-necessary-hardware-to-connect-two-computers-in-a-lan-configuration-4175449922/)

stf92 02-12-2013 11:30 PM

What is the necessary hardware to connect two computers in a LAN configuration?
 
Hi: The scenario:

(a) No knowledge whatsoever about LAN.
(b) Two desktops at home, one of them connected to the internet by only using a cable modem.
(c) The other one stands alone, up to now.
(d) Each machine has only one LAN chip.

I aim at:
(d) Having communications between both computers.
(e) At least one computer must have internet.

Some questions: What is the minimum hardware I need to make the connection? Do I need a router? And the cables? Are they commercially available?

Stéphane Ascoët 02-13-2013 01:37 AM

You just need a crossed RJ45 cable.

stf92 02-13-2013 02:12 AM

OK. I see in the internet that from each computer a cable goes to the hub or switch. I guess from the hub a cable goes to the cable modem. But then these are three cables. I'm afraid I did not get you.

EDDY1 02-13-2013 02:14 AM

You may have to get an additional network card for the computer that is already connected to network so as to use crossover cable. Or you can get another router with atleast 2 ports.

displace 02-13-2013 02:23 AM

A switch is normally used on an internal network. You could connect both computers and a modem via a switch, but you would have to setup internet access on both desktops. A typical NAT setup is to use a router, connect the modem to its WAN port and the desktop computers to its LAN ports. The computers are configured with DHCP, and the router connects to the internet.

TobiSGD 02-13-2013 05:39 AM

Most modern cable modems act already as router, not as modem. You can easily check that with checking how your machine gets the network interface set up. If the network interface is using DHCP to get its settings the modem acts as router. In that case you need nothing but a switch (hubs are outdated and should not be used) and three cables (Cat5-E). All of these are commercially available.

stf92 02-13-2013 05:55 AM

Quote:

Originally Posted by displace (Post 4890503)
A switch is normally used on an internal network. You could connect both computers and a modem via a switch, but you would have to setup internet access on both desktops. A typical NAT setup is to use a router, connect the modem to its WAN port and the desktop computers to its LAN ports. The computers are configured with DHCP, and the router connects to the internet.

So the connection via a switch and the connection via router are two different approaches, or is the router scenario a particular case of the switch connection?

TobiSGD 02-13-2013 06:34 AM

Quote:

Originally Posted by stf92 (Post 4890650)
So the connection via a switch and the connection via router are two different approaches, or is the router scenario a particular case of the switch connection?

You can see the router as a device that connects different networks, for example the Internet and your local network, while a switch is used to extent an existing network. If your cable modem acts as router you already have a separate home netwrok and just need to extend it with a switch.

stf92 02-13-2013 07:43 AM

Quote:

Originally Posted by TobiSGD (Post 4890634)
Most modern cable modems act already as router, not as modem. You can easily check that with checking how your machine gets the network interface set up. If the network interface is using DHCP to get its settings the modem acts as router. In that case you need nothing but a switch (hubs are outdated and should not be used) and three cables (Cat5-E). All of these are commercially available.

Alright. Then:
Street cable goes to MODEM which goes to SWITCH which goes to both computers A and B. Cat5-E is needed for all connections except street to modem, which is a coaxial cable provided by the company.

This, provided I use DHCP, and I have done so up to the present. I can get the Cat5-E cables and, about the switch: they offer me for 10/100Mbits/s. My ISP is presently giving me 1Mbit/s. Does this mean that switch is 100 times faster than I need?

michaelk 02-13-2013 07:54 AM

Depends on your ISP but typically in the US basic home cable setup only provides one DHCP IP address. If this is true and your MODEM is not also a router then a switch will not work.

stf92 02-13-2013 08:03 AM

A physical inspection of the modem reveals it has one I/O connector for the coaxial cable, and two I/O connectors, one labeled USB, the other, Ethernet. I guess this is not enough to know if it is also a router.

I certainly have the model. It's a Motorola Surfboard SB5101i. If I look in google or go to the motorola.com site, what should I look for to know it is also a router?

frieza 02-13-2013 08:08 AM

it depends, if your modem has only one ethernet plug on the back (which is the likely situation), then you need a router

typical home routers (I would recommend a Linksys router) have a built in 4 port switch
(actually it's a 5 port switch, but to all intents and purposes it's a 4 since port 5 is separated by the router's firmware used as the WAN port, but that's neither here nor there)

thus your network diagram would look something like this

Code:

<wall plug>
    |
    |
 <coax> 
 {modem}
<ethernet>
    |
    |
  <wan>{router}<sw1><sw2><sw3><sw4>
                |    |    |    |
                |    |    +----+--{empty}
                |    |
                |    +--{computer 2}
                |
              {computer1}


schneidz 02-13-2013 08:13 AM

Quote:

Originally Posted by Stéphane Ascoët (Post 4890483)
You just need a crossed RJ45 cable.

not necessarily true:
Quote:

Originally Posted by lazlow (Post 3798085)
If either end is GigE then the above statement is not true. GigE will automatically handle doing this without using a crossover cable.

however passing internet packets between the 2 pc's will require the op to know about iptables rules:
http://www.linuxquestions.org/questi...6/#post3804866
(probably easier for them to buy an off-the-shelf router for like 40 bucks).

stf92 02-13-2013 08:16 AM

@frieza:

I'm telling you. It has one and only one Ethernet jack and one (empty, i.e., not used) USB jack.

stf92 02-13-2013 08:23 AM

The following link, http://www.ehow.com/how_8540501_conf...rd-router.html, by its name is telling the sb5101 is a router too! However its the only place where the word "router" is mentioned.


All times are GMT -5. The time now is 02:20 AM.