LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-04-2003, 04:03 AM   #1
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
few IP questions on setting up broadband.


Hi, im a bit of a newbie when it comes to networks...
BUT, i have got my LAN working 100%

my questions, are on the setting i need to enter to access the internet
through a cable modem connected to my eth0 network card.

my network card itself is working 100%, i can FTP and play network games with other pc's on the lan. my ip adress is 192.168.0.12
this is the pc that needs to connect ot the internet (subnet is 255.255.255.0)

my questions are.....

1) do i need to re-assign IP's so that My ip address is 192.168.0.1 ? to make the
cable modem wok with this machine ?

2) i know a gateway computer is an IP of a computer that the internet connection goes through..... since there is only 1 machine accesssing the internet, do i need to set this ?
if so, do i set it to 127.0.0.1 (loopback) 192.168.0.x(this machines's eth0 IP)
OR the broadband cable modems IP ????

3) does the cable modem have its own Ip ? if so, what is it ? do i need to set it as a gateway ?


Thankyou for any help...
ive the only advice other forums give me is to just insert the CD that NTL (my ISP) gave me, but thats a windows only disk (im on redhat linux 9)

thankyou all..
 
Old 12-04-2003, 04:35 AM   #2
jfdlrr
LQ Newbie
 
Registered: Dec 2003
Location: Tampa, FL
Posts: 6

Rep: Reputation: 0
A few questions:

1) Your cable modem is connected to eth0. How is the computer also connected to other pc's on your lan? Do you have a second interface (eth1) on the machine and a hub to connect to the other machines, or do you have just the one interface (eth0) which is connected to the cable modem via a hub or a router?

2) How did eth0 get the IP address 192.168.0.12? Did you assign it manually, or was it obtained automatically through some method?

3) What does your /etc/sysconfig/network-scripts/ifcfg-eth0 file look like?

I'll give you an answer assuming that the cable modem is directly connected to eth0 and you manually assigned the ip address to eth0. If this isn't the case, you should try it like this first, just to make sure it works properly. You can then let me know if you need a different answer

The easiest way to get this thing working is to set eth0 to use DHCP to get its IP address. DHCP is a good thing, because it will also set DNS servers and lots of other stuff that you really need to be able to connect to the Internet, but that you might not care to know about at this point.

To do this (you have redhat 9, right?):
Edit the file:

/etc/sysconfig/network-scripts/ifcfg-eth0

Make sure there is a line in there that says:

BOOTPROTO=dhcp

(you might want to back up the file or at least document your changes if you are not comfortable modifying the file)

and that you are NOT assigning it an IP address manually with a line like:

IPADDR=192.168.0.12

After you add that line, restart the interface like so:

/etc/sysconfig/network-scripts/ifup eth0

It should say something like:

Determining IP information for eth0... Ok

And you should be up and running...maybe. Isn't Linux fun?

Jason
 
Old 12-04-2003, 04:48 AM   #3
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Original Poster
Rep: Reputation: 47
DCPH always fails, but this may be due to me using the wrong netmask at first...

anyway, to answer your questions.... lol

i have 1 ethernet network card with connects to a switch,
the other PC's on the lan also connect to the switch, and so deos the Modem.

my adress is 192.168.0.12 because when i first installed my network card,
i was at a LAN party, i was the 12th person to arrive, so i was assigned that IP (entered manually with redhat-config-network)

i cant tell you what my /etc/sysconfig/network-scripts/ifcfg-eth0 looks like, im not home at the moment.

i tried to use DHCP, but it failed... could this be due to me forcing the .0.12 ip on the network card ??

plus i read that dhcp requred a DHCP server....
which i dont have installed... (or maybe the modem acts as a DHCP server ???)

but thanks for the help so far.

yeah, linux is great.... i just discovered i can set Quake2 as my Window's manager....makes logging in fun !!!!!
 
Old 12-04-2003, 06:06 PM   #4
jfdlrr
LQ Newbie
 
Registered: Dec 2003
Location: Tampa, FL
Posts: 6

Rep: Reputation: 0
Your ISP most likely has a DHCP server on the other side of the cable modem. The problem is that the switch is too dumb to properly communicate with the DHCP server through the cable modem.

So...

The switch isn't going to be able to communicate properly with the modem and pass Internet traffic appropriately. The cable modem needs to be plugged directly into the network adapter on the pc or into a router (which is basically just a stripped down computer...some of them even run Linux).

Try this if you haven't already:
Unplug the cable modem and the pc from the switch and plug the cable modem directly into the pc. Try the dhcp thing and see if you can get that working.

Of course, now your pc is no longer connected to the lan. There are 2 ways to make the "right thing" happen for you, assuming you can get the pc to work with the modem.

1. Get a router and replace your switch with the router. The router will allow you to share the internet connection among all of your pcs.

2. Add a second network interface to your internet-connected pc. One interface will connect to the lan, and the other will connect to the cable modem and the Internet. You can even configure your pc to act as a gateway and route Internet traffic to the other pcs on the lan (but that's a whole other story).

Option 1 is probably simpler, but will probably cost you more money. Option 2 will cost you the price of a new network card and the time it takes you to get it up and running, which is a good thing to know how to do, and shouldn't be too complicated if you get a relatively popular card.

But the first thing to do is see if you can get your pc to work just with the cable modem, without the lan and the switch involved.
 
Old 12-04-2003, 07:29 PM   #5
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Original Poster
Rep: Reputation: 47
ok i will try that...
but origonally windowsXP was connected directly to the modem..
when i put a switch between the modem and windowsXP. it still worked fine.

anway, thanks for the help.
 
Old 12-04-2003, 07:34 PM   #6
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Original Poster
Rep: Reputation: 47
oh, one more question...

what if i was to connect the modem directly up to the linux machine (no switch)
then connect to the internet (allowing dhcp to work) then went back to my current setup
with the dhcp info saved, so i dont need dchp to connect...

would that work ???
 
Old 12-04-2003, 08:19 PM   #7
jfdlrr
LQ Newbie
 
Registered: Dec 2003
Location: Tampa, FL
Posts: 6

Rep: Reputation: 0
Give it a try and let me know how it goes. I can't think of a really good reason why that shouldn't work (which doesn't mean there isn't one ).
 
  


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
setting up broadband for linux + windows jimjamjahaa Linux - Newbie 4 05-15-2005 02:39 PM
Questions about setting up X n00btothemax Slackware 3 03-07-2005 11:00 PM
Problem Setting Telewest Broadband On Redhat 9.0 kamal2099 Red Hat 0 03-01-2004 03:27 PM
finally setting up broadband!! N_A_J_M Linux - General 15 04-30-2003 06:00 PM
Setting BIND/Sendmail behind a broadband router/firewall ppuddick Linux - Networking 1 03-27-2003 06:20 PM

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

All times are GMT -5. The time now is 04:13 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
Open Source Consulting | Domain Registration