LinuxQuestions.org
Visit Jeremy's Blog.
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 07-31-2004, 02:04 PM   #1
anders_ant
LQ Newbie
 
Registered: Jul 2004
Location: Minneapolis, MN
Distribution: Slackware 9.1
Posts: 20

Rep: Reputation: 0
How does a hub work?


I have a question about hubs and sharing an internet connection through a hub.

My ISP provides a cable modem which uses DHCP and I recently got my internet connection working on my Slackware 9.1 box. However, I am only able to get connected when I am connected directly to the modem. When I try connecting through a hub (EtherFast® 10/100 5-port Auto-Sensing Hub) and sharing the connection with a Windows box, I cannot get an internet connection and dhcpcd will not pickup my IP and DNS. The Windows box, however, has no problems getting an internet connection. Why is this? I guess I don't fully understand how a hub works and if it is suitable for sharing an internet connection.

Can anyone tell me more about a hub and, if this is suitable, help me troubleshoot the problem.

Thanks in advance.
 
Old 07-31-2004, 02:34 PM   #2
BrianWGray
Member
 
Registered: Oct 2003
Posts: 54

Rep: Reputation: 15
maybe this will help

Most Internet service providers provide you with a single ip address for your account. if you are connecting a hub it usually will not have routing functionality. Your windows box is picking up the address that your isp is providing you and your Linux box is left without an address. I bet if you go to the console and use ifconfig it will show your eth0 with an address of 0.0.0.0

You will want to use a router. The routers function would be to take the one address that your ISP provides you and share that address with both of your computers. The router assumes the address that is given to you then provides a gateway for your computers to talk to the internet through. By default most home routers will assign your computer an address from it's own range of ip addresses.

For example your ISP may give you the address 24.12.51.6 your router will use this address and will also have an address like 192.168.1.1 then it will give your computers addresses of it's own. Example 192.168.1.3 and 192.168.1. 4 your computers will talk with the address 192.168.1.1 when ever they want to communicate with the internet. and the router will translate what you want and send it out as if it was from 24.12.51.6


When you have a hub none of the above is done it simply connects both computers to the modem and which ever computer requests an address from your isp first, gets it. Your ISP will use the machine address from your Network card (a hard coded address) to assign your IP address. DHCP keeps a database of what Machine address it has given an address to and can tell the difference between your two computers. this is why only one gets an address at a time.

I hope I made that clear enough.
 
Old 07-31-2004, 04:41 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,115

Rep: Reputation: 3386Reputation: 3386Reputation: 3386Reputation: 3386Reputation: 3386Reputation: 3386Reputation: 3386Reputation: 3386Reputation: 3386Reputation: 3386Reputation: 3386
Futhermore the modem remembers the network cards MAC. If you want to connect to the internet with the other PC before you install a router you will need to recycle power on the modem prior to initializing the network card.
 
Old 07-31-2004, 05:40 PM   #4
anders_ant
LQ Newbie
 
Registered: Jul 2004
Location: Minneapolis, MN
Distribution: Slackware 9.1
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for your help. That clears things up considerably and explains a lot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Is it possible to make a pc work as a router/hub funkatron Linux - Hardware 1 07-14-2005 06:25 AM
fedora core hub / no hub problem plu5even Linux - Networking 3 02-28-2005 02:30 PM
How to make work a Direct Connect client and a DC Hub on the same box? 4mix Linux - Software 0 10-30-2004 04:32 AM
Switching Hub?? blackzone Linux - Networking 2 09-10-2004 02:12 AM
what is dmz hub cmardhekar Linux - General 1 08-25-2001 09:02 AM

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

All times are GMT -5. The time now is 04:38 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration