-   Linux - Networking (
-   -   few IP questions on setting up broadband. (

qwijibow 12-04-2003 04:03 AM

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
this is the pc that needs to connect ot the internet (subnet is

my questions are.....

1) do i need to re-assign IP's so that My ip address is ? 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 (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..

jfdlrr 12-04-2003 04:35 AM

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 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:


Make sure there is a line in there that says:


(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:


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?


qwijibow 12-04-2003 04:48 AM

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 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 !!!!!

jfdlrr 12-04-2003 06:06 PM

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.


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.

qwijibow 12-04-2003 07:29 PM

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.

qwijibow 12-04-2003 07:34 PM

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 ???

jfdlrr 12-04-2003 08:19 PM

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 :) ).

All times are GMT -5. The time now is 09:52 AM.