LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-10-2002, 08:22 PM   #1
loganwva
Member
 
Registered: Jul 2001
Location: West Virginia
Distribution: SuSE 9.1
Posts: 117

Rep: Reputation: 15
router or hub


I have two PC’s connected together with a cross over cable. One of the PC’s is running Windows 2000 Pro and the other is a Linux box. The Linux box has removable drives and I’m thinking of trying to setup Windows 2000 server on it also. I have a cable modem and share my Internet connection through the Windows 2000 Pro machine using ICS.

What I’d like to do is do away with the cross over cable and replace it with a hub or router. From my understanding with a router you can share files and Internet, but with a hub you can share files and to share your Internet connection you need a proxy server.

From what I know it sounds like I should buy the router, but a router cost $100 and a hub is $20. That a big difference for a starving student.

Which would best meet my needs?
 
Old 04-10-2002, 08:44 PM   #2
safrout
Member
 
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Rep: Reputation: 30
as i know..........

that the Hub also can exchange files and internet
but i am not sure
 
Old 04-10-2002, 08:55 PM   #3
trusouthrnplaya
Member
 
Registered: Jun 2001
Location: (Cashville) Nashville, TN
Distribution: CentOS 4.0, Slackware 10.2,
Posts: 223

Rep: Reputation: 30
router comes with a built in firewall (NAT) a hub dosen't; but a hub will boost ur internet speed. To me they both do the same thing except for miner differences.
 
Old 04-10-2002, 10:20 PM   #4
therion12
Member
 
Registered: Dec 2001
Location: chicago, IL
Distribution: Gentoo 1.4_rc1
Posts: 913

Rep: Reputation: 30
Well i use a Hub and it does a good job sharing internet pretty equally, but its very hard to do networking with it.

I installed a Router on a pc and its very nice, you can easily exchange files between pcs too (this was in windows 2000).

If you have the $$$ then Router, if not then a hub should do the same thing but with much more hassle.
 
Old 04-10-2002, 10:48 PM   #5
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
You basically have it right, save for that all hubs these days are really switches, but the jargon just hasn't kept up with the engineering. You can share the internet over a hub. You can turn the Linux box effectively into a Router using NAT/Masq. Its really easy. Actually, it was the first job I had for Linux at the time. Technically it can be done with only 1 NIC, but that makes for an armfull of packet collisions. Then again a NIC these days runs $5 used and $15 new. A second NIC and a hub, $35 or a el cheapo Linksys Router at around $80 (Pricewatch).

Cheers,

Finegan
 
Old 04-11-2002, 03:13 PM   #6
loganwva
Member
 
Registered: Jul 2001
Location: West Virginia
Distribution: SuSE 9.1
Posts: 117

Original Poster
Rep: Reputation: 15
If I go with a hub will I still need the two nics in the Win2000 box for Internet connectivity for the Linux box? Or does the cable modem hook into the hub, along with my two PC's.
 
Old 04-11-2002, 03:30 PM   #7
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
Basically:

A hub is very dumb. It is just a repeater. It takes wat it receives on one port and just sends it out the other ports.

A switch is a little smarter. It knows the MAC addresses of all the connected ports and unless it is a broadcast packet it will only send to the correct port. Some switches also come with the ability to make VLANS and other such fancy features.

A router can actually make decisions and can pass traffic between subnets.

These are somewhat simplified (on purpose), so if you want more details let me know.

--jeremy
 
Old 04-11-2002, 03:40 PM   #8
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
Not unless you can get multiple IPs from your cable service, which I largely doubt, but there are a few that will do it, a rare few. Dual NIC'ing the Win box will work, and if you're more familiar with that, its probably more easily done. I recommend using the Linux box as the router as... well, to put it bluntly I distrust windows, and Linux makes for one heck of a router. There, I'm biased. The setup would be something like the following:

4-8 port hub

Dual NIC machine (either win or linux)
card 1: set-up to get the IP from the cable modem, DHCP, pppoe, whatever. Plugged directly into the cable modem.

card 2: running on a reserved subnet, 192.168.x.1 is the most common. Plugged into the hub.

Single NIC machine

card 1: set-up on another IP of 192.168.x.2. Plugged into the hub.

If The dual NIC machine is a Linux box, it would be very easy, i.e. 1 single line command of iptables to have it forward all traffic from any machine on the 192.168.x.x subnet (not all that secure, but you can tweak as you learn). Also its incredibly easy to set up a dhcp server so that IPs are handed out dynamically; making it so friends can bring over a linux/win/mac box, whatever and have internet connectivity in 1-2 minutes.

The same thing could probably be done easily enough with 2k server, but I have a P 133Mhz 24Mb RAM laptop that has been doing this exact job (with one end of the network being wireless), for 147 days of uptime.

Cheers,

Finegan
 
Old 04-11-2002, 06:24 PM   #9
loganwva
Member
 
Registered: Jul 2001
Location: West Virginia
Distribution: SuSE 9.1
Posts: 117

Original Poster
Rep: Reputation: 15
Guys thanks for the great information. What I’m going to do is get the router, but before I do I’m going to buy the $20 hub and play around with it for a couple of weeks and see what I can make it do. My brother said he would buy it from me when I was ready for a router. I have to say this is a great forum.

finegan i'll use you instructions. Thanks
 
Old 04-11-2002, 06:42 PM   #10
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
With the hub, you can only connect machines that are on the same network/subnet, so you won't be able to directly connect your cable modem to it to share Internet access between your two computers. That's where the Linksys router that Finegan mentioned comes in. It's a gateway router with a built-in 4-port hub/switch, which means that you can connect up to four machines on your LAN to the hub, and the router part of it will take care of connecting those boxen to the the outside world via the cable modem. If you aren't eventually planning on using the Linux box as your firewall/router, you'll need a dedicated hardware router like the Linksys.

I've been using a Netgear RT314 gateway router for a couple of years, and it's been totally rock-solid. Setting the box up was a piece of cake, too. Friends of mine who use the Linksys say the same thing about that box.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Router vs hub vs swtich? JCdude2525 Linux - Networking 31 10-11-2008 05:25 PM
Hub or router? kuplo Linux - Wireless Networking 1 11-26-2005 03:39 PM
networking with router+hub mithereal Linux - Networking 3 10-30-2005 05:22 PM
hub vs. router mikeshn Linux - Networking 16 11-08-2004 10:33 AM
Using PC as an Ethernet hub (and router) damon12campagna Linux - Networking 1 02-23-2004 12:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration