LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Sharing internet without a router or wireless? (http://www.linuxquestions.org/questions/linux-wireless-networking-41/sharing-internet-without-a-router-or-wireless-646700/)

Anithen 06-03-2008 11:03 AM

Sharing internet without a router or wireless?
 
Good afternoon.

I have 2 routers and they are all completely used up in my apartment. I have an old computer that I would like to still have online with 3 webcams hooked up to it with 3 instances of motion running. I would just leave the computer offline, but my script uses nail to e-mail images and video zip files to a gmail account periodically throughout the day using cron.

I wasn't even planning on using X on this machine or having a monitor hooked up to it once it's setup.

My question is how do I get internet to this computer without any space on my routers and without buying a wireless card for it? I would like to use a method that I am unable to find with google, because I forgot what this process is officially called. It's when you run cable from one computer to another to provide a connection. I think I could do this with a USB cable, but I'm not sure.

Again, I would just get wireless and deal with ndiswrapper, but that seems too involving,especially since I won't be able to use any of the graphical utilities for setting up wireless. Also, I'm new to linux wireless, and don't want to mess around with it on a security/life-timelapse video box, because it would be bad if someone was snooping around on that box.

Thanks for any help you can provide.

Emerson 06-03-2008 11:38 AM

Regardless how many computers you have you need one router (why you have 2?) and a switch. A simple 8-port switch can be obtained for as little as $10.

Anithen 06-03-2008 02:19 PM

Thanks for replying. 3 machines are used by the router, and I connect the router's 4th port to the WAN port of the switch. The switch is currently maxed out by 4 other machines. I see what you are saying, though... I should replace that switch with an 8 port switch... That is acceptable, I suppose. I didn't even think of that. Probably because I haven't seen them at any stores around here.

Thanks.

Emerson 06-03-2008 03:07 PM

I bought an 8-port Zonet myself for $8 from some internet store, it was a couple of years ago, can't recall the place.

Shugotenshi 06-03-2008 03:53 PM

You could create a "network bridge" from any of your computers that either have USB, or an extra LAN card. I believe this is what you desired as per your original post. Costs $0. If you do it over USB you'll have to get a USB "A" to "A" type cable......unless I've confused the types and it's "B" to "B". Ah, you'll know it when you see it. Got mine at the Dollar Tree, works great. As to how to set it up in Linux, I am not very familiar (new convert), but I use it with M$, and should not be difficult on any particular Linux OS. Just lookup "Network Bridging" on Google or the forums for your OS, you'll get what you need.

Good Luck

michaelk 06-03-2008 04:06 PM

FYI you can not use a standard USB cable to connect two PCs together. You need a special cable known as a USB host to host, USB link , USB data transfer etc. I believe that Belkin, Netgear and IOgear are the big names that make this type of cable. linux has USB support but I do not remember what chipset. The module name is usbnet.

Anithen 06-05-2008 03:05 AM

Hey, everyone, thanks! I'm working on the bridging solution right now. @ the same time I'm kind of sidetracked because the gspca driver is not playing from 2 devices at once. If I try, it will say "No space left on device," so I'm working on that before I do the whole process.

Thanks everyone for your replies and help.

Anithen 06-08-2008 04:16 PM

Hey, everyone. I have a little bit of follow up for this. It turns out that the switch I was using had 5 ports in addition to wan input, but when I put the old computer in port 5 internet didn't work

http://www.linuxquestions.org/questi...n-12.1-647741/

and also all other computers connecting through the switch (Linkys Fast Ethernet 10/100 5-Port Hub, model NH1005 or NH1008, version 2) started to experience great lag in browsing and ssh. I got around to pinging the main router (not the Hub) that feeds into the Hub's wan port, and I was surprised to see 52% packet loss. I pinged google and got the same thing. I read the Hub's User Guide, and it said "If you use the uplink port (which I've been calling the Wan) on the 5 port Hub, port 5 will be disabled, and if you use the uplink port on the 8 port Hub, Port 8 will be disabled." I guess they forgot to mention that if you leave the 5th or the 8th port connected to anything it will cause great packet loss for all of the other ports I hope this helps those who run into this.

As for the LQ post I referred to above, I am not sure if the 5th port is why I am getting the tulip driver error message, but I'll be experimenting and will report back.

lazlow 06-08-2008 04:57 PM

Are you using a hub or a switch? They are not the same thing. Hubs will see a lot of collisions, which lead to resending of packets, causing a general slowdown. Switches do not suffer from this issue.

Anithen 06-08-2008 05:44 PM

Good evening, lazlow. The manual refers to it as a Hub.

lazlow 06-08-2008 06:44 PM

IF it really is a hub the only real thing you can do to solve the problem is to replace it with a switch. Hubs basically have one channel that every device on the hub shares. If you want to send a file from computer A to computer B, the hub sends everything to every computer hooked to the hub (very messy). A switch on the other hand has a channel for each computer. So sending a file from A to B only involves computer A, computer B, and the switch(pretty clean). When the load (total load) on the entire hub was only 10, then hubs were fine (not enough packets to really cause collision problems). When 100 nics became the standard hubs really became obsolete (despite many who claim otherwise). With the common file size being in the gigabyte range there is very little argument.

The one argument I do hear is whether to go with one large switch or a series of small switches. I prefer a series of smaller switches. If one unit fails you can rearrange things to get by until a replacement comes along. It also gives one greater flexibility. I moved a server into the basement a few years ago (ran cat6). It worked so well I moved a lot of the machines downstairs. If I had one large switch I would have had a big problem. Since I had multiple switches, I just moved a couple of them downstairs (and left one upstairs).

Anithen 06-08-2008 11:04 PM

Thanks for the explanation. I ended up messing up the kernel compile and now I can't boot the regular kernel either. It seems like after slack 11 I cannot successfully compile anything. This is the first time I was trying to compile using the sources from the install rather than downloading them. I'll be reinstalling slackware 12 on that box and seeing if the setup works. All I have is a router and those 2 hubs at the moment, so now my setup is like:

internet -> router -> machine1, machine2, machine3 -> Hub1 -> machine4, machine5, machine6 -> Hub 2 -> machine7, machine8

lazlow 06-08-2008 11:59 PM

You would probably have fewer collisions if you swapped machine3 and Hub2(assuming from your diagram that Hub2 goes through Hub1).

Anithen 06-09-2008 10:53 AM

Hey, there. I would experiment with this, but those machines are in different parts of the apartment. Things kind of expanded slowly -- kind of like what you experienced in your cellar. The setup is now working great, anyhow. I'm glad to know that it can possibly work even better with some rearranging and maybe getting switches instead.

I'm about to post in my Tulip driver error post that discontinuing use of port 5 in the Linkys Fast Ethernet 10/100 5-Port Hub, model NH1005 or NH1008, version 2 fixed my problem.

farslayer 06-09-2008 01:49 PM

usually when there is an 'uplink port' it is physically the same port as the port next to it, just wired differently to allow it to connect to another switch or hub without the need for a special crossover cable. connecting a PC to both of those connectors would cause trouble as you have discovered..

Most switches manufactured these days automatically determine if they should operate in 'normal mode' or 'crossover mode'

Here, a picture is worth a thousand words..

http://www.securityexploits.net/ethernetexplained.htm


All times are GMT -5. The time now is 05:25 PM.