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? |
You just need a crossed RJ45 cable.
|
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.
|
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.
|
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.
|
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.
|
Quote:
|
Quote:
|
Quote:
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? |
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.
|
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? |
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> |
Quote:
Quote:
http://www.linuxquestions.org/questi...6/#post3804866 (probably easier for them to buy an off-the-shelf router for like 40 bucks). |
@frieza:
I'm telling you. It has one and only one Ethernet jack and one (empty, i.e., not used) USB jack. |
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.
|
Quote:
the easiest thing to do would probably be to buy a router and the necessary cables (probably a 802.11n wifi router). the cheapest thing to do would probably be to transform an old pc into a router using something like smoothwall linux (but that would require basic system administration knowledge). |
Quote:
Quote:
|
So the fact it (the Motorola) has only one RJ45 jack means nothing. Alright! However the manual, for which I thank you very much, does not apply to the SB5101i. Could this mean the SB5101i is not a modem-router?
|
any reason why a switch would be preferable over a wifi router ?
|
According to this link, http://forums.whirlpool.net.au/archive/1483426 the difference between the SB5101i and the SB5101u is just the stand-by button. The SB5101i has it, the other has it not. They are identical units otherwise, according to the poster. So, I'm already buying cables and switch. Thanks again, TobiSGD.
|
Quote:
|
Member Response
Hi,
You can extend the LAN using a Network Switch. Network Switch; Quote:
Router Quote:
|
if look at start scenario, that can be done with ethernet switch: on the computer where must be internet connection, do aliase for ethernet, like as eth0:0 192.168.1.1 asides of another ethetrnet address, given to it, with cable modem for internet, and configure eth on another computer somehow a-la eth0 192.168.1.2, then put all three etjhernet cables to switch. but on many things is not best solution. hardware router is better, and put additional ethernet card in one of computers, and use them as router ( with iptables and packet forwarding) is also good variant, imho.
|
Quote:
I'm reading The Network Administrator's Guide (The Linux Documentation Project) and really all this is for the benefit of the book I am about to begin reading. That is, so I can see the examples working. But, if things are so simple, perhaps I can make the thing work right now! A question: what is, or how do I do an alias of the type eth0:0 192.168.1.1. From the man page for ifconfig, I can do 'ifconfig eth0 <some address>'. Do you mean the alias builtin command? |
Quote:
* at home, I have one of these: http://www.amazon.com/TP-Link-TL-WR3...words=TL-WR340 (cheapest I've found, at the time I've bought it [two years ago...]) |
Quote:
So, yes, they are significantly cheaper. |
By chance, do they use infrared technology? Some part of the electromagnetic spectrum has to be used. Infrared would make them very poorly efficient.
|
TobiSGD, you would not be so kind to write two or three command lines so I can see the thing in action? It would highly motivate me.
|
I don't quite get what you mean with that. Wifi routers (aka WLAN routers) use radio transmission. I am quite sure you have heard about WLAN earlier, I would think.
What commands do you mean? |
Well, about network aliases (ifconfig eth0:0 192.168.111) I think they're used only for security reasons, so for the moment I could dispense with them. I see, you posted while I was writing and I was not aware of that. Suppose I have things as in post #24. Some elementary procedure, that is the minimal one that would make one machine connect to internet while talking to the other machine? The machine I am using right now to post let it be A. I presume some ifconfig commands alone would make the three things, A, B and the ISP to be connected together, where B is the other machine. Am I right?
EDIT: in an electronics forum, they told me it is as easy as electrically connecting the two hosts and the switch.But there is post #23, showing things are a little more complex. |
If you want to let the machines connect with each other you have to know the IPs for those machines. So you either have to tell the router that the specific machines always get the same IPs from its DHCP server or you use static IPs for those machines.
In my network (about 16 machines) I use a mixed approach, the Windows machines of my friends get their IPs from the DHCP server of the router, since they don't have the need to let their machines communicate (except with the file-server). My machines (all Linux) have static IPs. I don't use aliases or something similar, just plain static IPs, set up with NetworkManager on the Slackware systems and /etc/network/interfaces on the CLI-only Debian machine. |
Quote:
|
I donot want to confuse you so I use another post. The IPs I simply can get them with ifconfig. That's very easy. For instance:
Code:
root@darkstar:~# ifconfig |
Quote:
|
|
Quote:
a typical home setup would look something like this Code:
+- in this case, the IP your computer(s) has is separate from the one your ISP hands you and the communication between the internet and your devices is handled by the router, this is referred to as a NAT (network address translation) this also has the added benefit of preventing any unwanted traffic from entering your network (as any inbound traffic has to be explicitly assigned a computer before it is allowed in) (this is called port-forwarding) granted a significant portion of households are more like Code:
<ISP>---/---<modem>---[PC] |
Quote:
#!/bin/sh #setting up IP alias interfaces echo "Setting 172.16.41.2, 172.16.41.3, 172.16.41.x IP Aliases ..." /sbin/ifconfig lo 127.0.0.1 /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo /sbin/ifconfig eth0 up /sbin/ifconfig eth0 172.16.41.2 echo " up aliases" /sbin/ifconfig eth0:0 172.16.41.3 /sbin/ifconfig eth0:1 172.16.41.4 /sbin/ifconfig eth0:2 172.16.41.5 /sbin/ifconfig eth0:3 172.16.41.6 /sbin/ifconfig eth0:4 172.16.41.7 /sbin/ifconfig eth0:5 172.16.41.8 /sbin/ifconfig eth0:6 172.16.41.9 /sbin/ifconfig eth0:7 172.16.41.10 /sbin/ifconfig eth0:8 172.16.41.11 /sbin/ifconfig eth0:9 172.16.41.12 /sbin/ifconfig eth0:10 172.16.41.13 /sbin/ifconfig eth0:11 172.16.41.14 /sbin/ifconfig eth0:12 172.16.41.15 /sbin/ifconfig eth0:13 172.16.41.16 /sbin/ifconfig eth0:14 172.16.41.17 /sbin/ifconfig eth0:15 172.16.41.18 /sbin/ifconfig eth0:16 172.16.41.19 /sbin/ifconfig eth0:17 172.16.41.20 if you can do net aliase, you can write string similar this ( for your situation) in /etc/rc.d/rc.local file. after restart it can be done setting aliase. PS aliases not using "in security reasons" - contrary, configuration with cable modem and local machines in one switch is some insecure way to do all. for security networks must be separated and filtereed throught iptables with correct rules. aliases is used for assign more than one ip address to one ethernet interface. sometimes it be need... |
Quote:
|
interesting, however i fail to see where interface aliases has ANYTHING to do with the OP's question, the answer is a simple,
modem-router/switch-pc1/2, done maybe one or both machines need static IP address, but still each machine needs only ONE IP address per machine, interface aliases here would be superfluous. Quote:
|
Quote:
|
Member Response
Hi,
For a SOHO LAN you can setup '/etc/host' to help facilitate; Quote:
Quote:
Quote:
|
Quote:
you can't plug more than one device into ONE physical port, no matter how many aliases that port HAS, you need a switch. a router can hand numbers via DHCP and has a built in switch, which covers BOTH requirements, both machines talk to each other, AT LEAST one has internet.. note the original verbiage was AT LEAST ONE, not ONLY ONE. anyone who says anything about interface aliases are over-complicating the matter for someone who already admits to being a novice. the next step would be to learn to flash DD-WRT or openwrt on the router and learn how to use iptables to DENY internet access to the other one, but that's a project perhaps for the future.. get the simplest setup working FIRST, then make it more complicated. |
OK. I have just called (not trying to contradict anyone) my technician and he says: with the modem and the switch you can do the following: communicate one computer to the other, with one of them enjoying internet (or even the other one too if I remember well). But the machine with internet must be on all the time. That is, if I turn it off, I can't use the other.
Let that be so. Then I do not need anything else. Every time I enter the room with the computers, I just turn "the one" on, and voila! Now, how to set up the software to do it, is something I do not know yet, but methinks it must be extremely easy. |
Quote:
as far as software goes maybe if you post the output of lspci, ifconfig, ifconfig -a ... of the pc sharing the internet connection maybe someone can suggest a method of getting online on both pc's (the link i provided in my first response to this thread details what i did to get my blu-ray player (netflix/ pandora) to work thru my htpc). |
Quote:
most home routers are just plug and go and should work sufficiently out of box to satisfy the average home user, with that, you can have BOTH machines plugged into the router the reason for this being, as the technician said, the modem is Quote:
essentially the router talks to the modem and 'hides' the rest of rest of the computers behind insofar as the modem thinks there is only one computer in your house as the modem can only see the router, it can't see past the router. they talk to each other, and both talk to the internet. you can have one or both on as long as the router and modem have power you have internet. simple as that. |
1 Attachment(s)
I see two drawbacks to wifi. First it is infrared, and so, very easily blocked by walls, etc. Second, I already bought the switch. If what "the technician said" (see post #43) is true, then the power consumption does not matter, for I am always on computer A. There will be no excess power at all...
OK. You beat me, guys. I choose the router method. Would a Zeppelin 740N (wifi) do? EDIT: I deleted the (old) second paragraph. |
Quote:
absolutely wrong. wifi work in 2.4 GHz range http://en.wikipedia.org/wiki/Wi-Fi it is some nlocking from walls, especially concrete with steel, but in general, it is not bad technology for internet access point at home. for share internet to another computer, as i say earlier, you must be use iptables for network address translation. it is not bad thing, if you want a learn yourself small about networking and so on, but in general, i agree, is be better to purchase wifi router. it has be prices from approh 15 - 20 usd... |
Quote:
|
Quote:
fyi: wifi uses rf. so you are set up at this point, correct ? if not all you need to do is plug a cat-5 cable from the internet transceiver to the correct port of the switch (usually colored yellow). then plug a cat-5 cable from the swicth to pc-a and pc-b. then plug in the switch into a wall outlet. not sure what software you needed... |
Quote:
Quote:
second of all, wi-fi is OPTIONAL unless you have a LAPTOP, TABLET or other portable device, otherwise two PCs in close proximity should be attached to a WIRED router such as a Linksys BEFSR41, which has a 4 port switch, plus a wan port (technically a 5 port switch , with 4 lan ports and the 5th port segmented off as a wan port) doing it with just the modem and a switch might work but it's wrong. |
All times are GMT -5. The time now is 03:38 AM. |