Linux box + router + cable modem

Linux box + router + cable modem

Post by Steve Allgo » Wed, 19 Mar 2003 02:51:11



I just got cable internet service from Comcast (formerly AT&T) and I'm
using a Compaq CP-2E cable/DSL router.  Right now I have 2 machines
hooked up to the router:  Win98 & Linux-Debian-Woody.  The Win98
machine works fine with this connection.  I'm having trouble getting
the Linux box set up.

The router uses DHCP.  Here's the router's default settings:
LAN IP Address: 192.168.1.1
Subnet Mask:  255.255.255.0
DHCP start address: 192.168.1.11
DHCP end address:  192.168.1.254

The owner's manual says "...the default network IP address is
192.168.1.1.  This IP address is also the default gateway and DNS
server that local clients use to access the Internet..."

My big question is this:  Do I need to install the dhcp client on the
linux box if it isn't hooked directly into the cable modem?   I was
thinking the router would take care of fetching an address from
Comcast and I would configure computers on the network like they are
hooked to a server (the router).

When I type "ifconfig" it says eth0 has inet addr: 192.168.1.1, Bcast:
 192.168.1.255, Mask: 255.255.255.0...

I can ping 192.168.1.1.  The router LED shows a connection after I
boot up the linux box.

When I type "route" it shows one line for "localnet ..."

I'm a networking and linux newbie and I'm trying my best.  I've read
the cable-modem howto, the net howto, the dhcp mini howto and others,
but it's all swimming around in my head right now.

Any help would be greatly appreciated.

Thanks,
~Steve Allgood

 
 
 

Linux box + router + cable modem

Post by Linus Plu » Wed, 19 Mar 2003 07:55:07


Hi!

If you do not want to use a dhcp-client you may configure your linux-box by hand.
assign an ip-adress which is NOT in the range of 192.168.1.11 - 192.168.1.254!
e.g: ifconfig eth0 192.168.1.10
after that you must ad the default gateway, which equals the ip-adress of your router:
route add default gw 192.168.1.1
finally you  have to tell your linux box which dns-server to use (this is your router again!). therefor edit /etc/resolv.conf like this:
nameserver 192.168.1.1

Voila!
that should have done it.

SeeYa
Linus

On 17 Mar 2003 09:51:11 -0800


> I just got cable internet service from Comcast (formerly AT&T) and I'm
> using a Compaq CP-2E cable/DSL router.  Right now I have 2 machines
> hooked up to the router:  Win98 & Linux-Debian-Woody.  The Win98
> machine works fine with this connection.  I'm having trouble getting
> the Linux box set up.

> The router uses DHCP.  Here's the router's default settings:
> LAN IP Address: 192.168.1.1
> Subnet Mask:  255.255.255.0
> DHCP start address: 192.168.1.11
> DHCP end address:  192.168.1.254

> The owner's manual says "...the default network IP address is
> 192.168.1.1.  This IP address is also the default gateway and DNS
> server that local clients use to access the Internet..."

> My big question is this:  Do I need to install the dhcp client on the
> linux box if it isn't hooked directly into the cable modem?   I was
> thinking the router would take care of fetching an address from
> Comcast and I would configure computers on the network like they are
> hooked to a server (the router).

> When I type "ifconfig" it says eth0 has inet addr: 192.168.1.1, Bcast:
>  192.168.1.255, Mask: 255.255.255.0...

> I can ping 192.168.1.1.  The router LED shows a connection after I
> boot up the linux box.

> When I type "route" it shows one line for "localnet ..."

> I'm a networking and linux newbie and I'm trying my best.  I've read
> the cable-modem howto, the net howto, the dhcp mini howto and others,
> but it's all swimming around in my head right now.

> Any help would be greatly appreciated.

> Thanks,
> ~Steve Allgood


 
 
 

Linux box + router + cable modem

Post by Clive Dov » Wed, 19 Mar 2003 08:48:47



> I just got cable internet service from Comcast (formerly AT&T) and I'm
> using a Compaq CP-2E cable/DSL router.  Right now I have 2 machines
> hooked up to the router:  Win98 & Linux-Debian-Woody.  The Win98
> machine works fine with this connection.  I'm having trouble getting
> the Linux box set up.

> The router uses DHCP.  Here's the router's default settings:
> LAN IP Address: 192.168.1.1
> Subnet Mask:  255.255.255.0
> DHCP start address: 192.168.1.11
> DHCP end address:  192.168.1.254

> The owner's manual says "...the default network IP address is
> 192.168.1.1.  This IP address is also the default gateway and DNS
> server that local clients use to access the Internet..."

> My big question is this:  Do I need to install the dhcp client on the
> linux box if it isn't hooked directly into the cable modem?   I was
> thinking the router would take care of fetching an address from
> Comcast and I would configure computers on the network like they are
> hooked to a server (the router).

> When I type "ifconfig" it says eth0 has inet addr: 192.168.1.1, Bcast:
>  192.168.1.255, Mask: 255.255.255.0...

> I can ping 192.168.1.1.  The router LED shows a connection after I
> boot up the linux box.

> When I type "route" it shows one line for "localnet ..."

> I'm a networking and linux newbie and I'm trying my best.  I've read
> the cable-modem howto, the net howto, the dhcp mini howto and others,
> but it's all swimming around in my head right now.

> Any help would be greatly appreciated.

> Thanks,
> ~Steve Allgood

The Comcast ip address belongs to the router on the WAN side.  This
address is not passed through to the computers.
If you use DHCP on the WAN side, the router will assign ip addresses to
the computers in the private ip range 192.168.1.x.  This is the
simplest way of doing it.
Linux comes complete with a DHCPCD which enables you to connect to your
router by simply telling linux to get the ip address automatically.
You do NOT assign parameters to the computers.  The router will assign
ip addresses from its pool of private ip addresses, pass on two or
three DNS addresses from Comcast, pass its own LAN side ip address of
192.168.1.1 as the gateway address and set the netmask 255.255.255.0

The whole idea of DHCP is that the client computer simply plugs in and
asks for the parameters and it is up to the router to supply them.
Makes life a lot simpler for the client and the system administrator.

The idea in an ip masquerading router (Network Address Translation
router) is that the computers use ip addresses that cannot be seen by
the internet. The computers don't care what public ip address is
assigned by the service providers, they exist on a private network, not
on the public network except through the router.

You can configure the router to use static ip addresses on the LAN side
but that would mean that you would have to manually set the parameters
on each computer.  Unnecessary drudgery.

 
 
 

Linux box + router + cable modem

Post by Steve Allgo » Thu, 20 Mar 2003 11:45:43




> > I just got cable internet service from Comcast (formerly AT&T) and I'm
> > using a Compaq CP-2E cable/DSL router.  Right now I have 2 machines
> > hooked up to the router:  Win98 & Linux-Debian-Woody.  The Win98
> > machine works fine with this connection.  I'm having trouble getting
> > the Linux box set up.

> > The router uses DHCP.  Here's the router's default settings:
> > LAN IP Address: 192.168.1.1
> > Subnet Mask:  255.255.255.0
> > DHCP start address: 192.168.1.11
> > DHCP end address:  192.168.1.254

> > The owner's manual says "...the default network IP address is
> > 192.168.1.1.  This IP address is also the default gateway and DNS
> > server that local clients use to access the Internet..."

> > My big question is this:  Do I need to install the dhcp client on the
> > linux box if it isn't hooked directly into the cable modem?   I was
> > thinking the router would take care of fetching an address from
> > Comcast and I would configure computers on the network like they are
> > hooked to a server (the router).

> > When I type "ifconfig" it says eth0 has inet addr: 192.168.1.1, Bcast:
> >  192.168.1.255, Mask: 255.255.255.0...

> > I can ping 192.168.1.1.  The router LED shows a connection after I
> > boot up the linux box.

> > When I type "route" it shows one line for "localnet ..."

> > I'm a networking and linux newbie and I'm trying my best.  I've read
> > the cable-modem howto, the net howto, the dhcp mini howto and others,
> > but it's all swimming around in my head right now.

> > Any help would be greatly appreciated.

> > Thanks,
> > ~Steve Allgood

> The Comcast ip address belongs to the router on the WAN side.  This
> address is not passed through to the computers.
> If you use DHCP on the WAN side, the router will assign ip addresses to
> the computers in the private ip range 192.168.1.x.  This is the
> simplest way of doing it.
> Linux comes complete with a DHCPCD which enables you to connect to your
> router by simply telling linux to get the ip address automatically.
> You do NOT assign parameters to the computers.  The router will assign
> ip addresses from its pool of private ip addresses, pass on two or
> three DNS addresses from Comcast, pass its own LAN side ip address of
> 192.168.1.1 as the gateway address and set the netmask 255.255.255.0

> The whole idea of DHCP is that the client computer simply plugs in and
> asks for the parameters and it is up to the router to supply them.
> Makes life a lot simpler for the client and the system administrator.

> The idea in an ip masquerading router (Network Address Translation
> router) is that the computers use ip addresses that cannot be seen by
> the internet. The computers don't care what public ip address is
> assigned by the service providers, they exist on a private network, not
> on the public network except through the router.

> You can configure the router to use static ip addresses on the LAN side
> but that would mean that you would have to manually set the parameters
> on each computer.  Unnecessary drudgery.

Weeeeheeeee!!!  I'm writing this message to you from my Linux box!!!

Thanks for your answers.  They helped clear some things up.  So the
router is a dhcp client when it fetches a WAN address from Comcast?
The it can be a dhcp server for my LAN?

I was able to get it working by going to the dhcp settings of the
router setup and using a feature called "Reserved IP table", "assigns
a specific IP address to a PC on [my] local network based on its MAC
address."  So I used the Hardware Address that I got on the linux box
from typing ifconfig" for eth0.  Then I put that in the Reserved IP
table with the address 192.168.1.200.  Then I followed Linus's
instructions and it worked!  Now what's the best way to make it work
every time I boot up?  Do I just put the commands in a script and
stick it in the /etc/rc2.d directory? (I boot into runlevel 2).

Also, I did try installing the dhcp client with synaptic.  It looks
like there are 2 versions of it, something like: dhcp-client and
dhcp3-client. There was a help file in the docs section that talked
about which one to use depending on which kernel version you have.  I
tried installing both of them at separate times (after uninstalling
the other) and couldn't get them to work.  I wasn't quite sure what to
do with them.  Any suggestions?

~Steve

 
 
 

Linux box + router + cable modem

Post by Clive Dov » Thu, 20 Mar 2003 17:31:51






>> > I just got cable internet service from Comcast (formerly AT&T) and
>> > I'm
>> > using a Compaq CP-2E cable/DSL router.  Right now I have 2 machines
>> > hooked up to the router:  Win98 & Linux-Debian-Woody.  The Win98
>> > machine works fine with this connection.  I'm having trouble
>> > getting the Linux box set up.

>> > The router uses DHCP.  Here's the router's default settings:
>> > LAN IP Address: 192.168.1.1
>> > Subnet Mask:  255.255.255.0
>> > DHCP start address: 192.168.1.11
>> > DHCP end address:  192.168.1.254

>> > The owner's manual says "...the default network IP address is
>> > 192.168.1.1.  This IP address is also the default gateway and DNS
>> > server that local clients use to access the Internet..."

>> > My big question is this:  Do I need to install the dhcp client on
>> > the
>> > linux box if it isn't hooked directly into the cable modem?   I was
>> > thinking the router would take care of fetching an address from
>> > Comcast and I would configure computers on the network like they
>> > are hooked to a server (the router).

>> > When I type "ifconfig" it says eth0 has inet addr: 192.168.1.1,
>> > Bcast:
>> >  192.168.1.255, Mask: 255.255.255.0...

>> > I can ping 192.168.1.1.  The router LED shows a connection after I
>> > boot up the linux box.

>> > When I type "route" it shows one line for "localnet ..."

>> > I'm a networking and linux newbie and I'm trying my best.  I've
>> > read the cable-modem howto, the net howto, the dhcp mini howto and
>> > others, but it's all swimming around in my head right now.

>> > Any help would be greatly appreciated.

>> > Thanks,
>> > ~Steve Allgood

>> The Comcast ip address belongs to the router on the WAN side.  This
>> address is not passed through to the computers.
>> If you use DHCP on the WAN side, the router will assign ip addresses
>> to
>> the computers in the private ip range 192.168.1.x.  This is the
>> simplest way of doing it.
>> Linux comes complete with a DHCPCD which enables you to connect to
>> your router by simply telling linux to get the ip address
>> automatically.
>> You do NOT assign parameters to the computers.  The router will
>> assign ip addresses from its pool of private ip addresses, pass on
>> two or three DNS addresses from Comcast, pass its own LAN side ip
>> address of 192.168.1.1 as the gateway address and set the netmask
>> 255.255.255.0

>> The whole idea of DHCP is that the client computer simply plugs in
>> and asks for the parameters and it is up to the router to supply
>> them. Makes life a lot simpler for the client and the system
>> administrator.

>> The idea in an ip masquerading router (Network Address Translation
>> router) is that the computers use ip addresses that cannot be seen by
>> the internet. The computers don't care what public ip address is
>> assigned by the service providers, they exist on a private network,
>> not on the public network except through the router.

>> You can configure the router to use static ip addresses on the LAN
>> side but that would mean that you would have to manually set the
>> parameters
>> on each computer.  Unnecessary drudgery.

> Weeeeheeeee!!!  I'm writing this message to you from my Linux box!!!

> Thanks for your answers.  They helped clear some things up.  So the
> router is a dhcp client when it fetches a WAN address from Comcast?
> The it can be a dhcp server for my LAN?

> I was able to get it working by going to the dhcp settings of the
> router setup and using a feature called "Reserved IP table", "assigns
> a specific IP address to a PC on [my] local network based on its MAC
> address."  So I used the Hardware Address that I got on the linux box
> from typing ifconfig" for eth0.  Then I put that in the Reserved IP
> table with the address 192.168.1.200.  Then I followed Linus's
> instructions and it worked!  Now what's the best way to make it work
> every time I boot up?  Do I just put the commands in a script and
> stick it in the /etc/rc2.d directory? (I boot into runlevel 2).

> Also, I did try installing the dhcp client with synaptic.  It looks
> like there are 2 versions of it, something like: dhcp-client and
> dhcp3-client. There was a help file in the docs section that talked
> about which one to use depending on which kernel version you have.  I
> tried installing both of them at separate times (after uninstalling
> the other) and couldn't get them to work.  I wasn't quite sure what to
> do with them.  Any suggestions?

> ~Steve

OK.it looks like your router is still using DHCP on the LAN side to
assign ip addresses to any box connecting to it, but in respect of your
linux box you have told it to always assign ip address 192.168.1.200 to
it based on it having probed for a MAC address and having found that
the station requesting the ip address has that MAC address.

Of course this means that your windows box will never be assigned ip
address 192.168.1.200 as it has been reserved for a different MAC. You
could set your router to fix the address that it assigns to the windows
box as well.

So far as the computers are concerned, they are still talking to a
router that uses DHCP to assign ip addresses, but you have, following
linus's instructions, told your linux box to treat the static ip of
192.168.1.200 as its own.

At this point I am going to cop out and refer you to Chapter 25 of the
Linux Rute User's Tutorial and Exposition, a copy of which is online
here:
http://www.icon.co.za/~psheer/book/index.html

But nobody configures current systems at this low level anymore.  Most
distributions have a GUI configuration tool and most such tools are
accessed either through the desktop or from a command line.

In Mandrake, the desktop tool is called the Mandrake Control Center and
within it you can select Network and Internet then Connect which will
give you a menu driven set-up tool.

You can get to the same tool from a root command prompt in Mandrake by
entering drakconnect.

I am sure that your distribution has the same utility.  If so, it would
then be a matter of selecting the options to tell it that you are on a
lan and to get the ip address automatically using bootp/dhcp/zeroconf
and NOT entering parameters.

 
 
 

Linux box + router + cable modem

Post by Sundial Service » Fri, 21 Mar 2003 05:16:22



> I just got cable internet service from Comcast (formerly AT&T) and I'm
> using a Compaq CP-2E cable/DSL router.  Right now I have 2 machines
> hooked up to the router:  Win98 & Linux-Debian-Woody.  The Win98
> machine works fine with this connection.  I'm having trouble getting
> the Linux box set up.

> The router uses DHCP.  Here's the router's default settings:
> LAN IP Address: 192.168.1.1
> Subnet Mask:  255.255.255.0
> DHCP start address: 192.168.1.11
> DHCP end address:  192.168.1.254

> The owner's manual says "...the default network IP address is
> 192.168.1.1.  This IP address is also the default gateway and DNS
> server that local clients use to access the Internet..."

> My big question is this:  Do I need to install the dhcp client on the
> linux box if it isn't hooked directly into the cable modem?   I was
> thinking the router would take care of fetching an address from
> Comcast and I would configure computers on the network like they are
> hooked to a server (the router).

> When I type "ifconfig" it says eth0 has inet addr: 192.168.1.1, Bcast:
>  192.168.1.255, Mask: 255.255.255.0...

> I can ping 192.168.1.1.  The router LED shows a connection after I
> boot up the linux box.

> When I type "route" it shows one line for "localnet ..."

> I'm a networking and linux newbie and I'm trying my best.  I've read
> the cable-modem howto, the net howto, the dhcp mini howto and others,
> but it's all swimming around in my head right now.

> Any help would be greatly appreciated.

I presume that you have the cable modem connected to the router.  In this
case, the router should handle all the details of talking to Comcast.  All
you need to do is to talk to the router.

The router probably provides DHCP service to the internal network (no matter
how it's set up to talk to Comcast).  Therefore you want your Linux box to
be set up to be a DHCP client.

When all is set up correctly, you should be able to talk to the Internet and
also to the configuration-address (e.g. "http://192.168.254.254" on my
Siemens box) of the router.  The router should have assigned you some
internal address e.g. "192.168.254.2," _and_ it should have, through DHCP,
advised your box of the "gateway address" which is the router's own
internal address.  

"Through the magic of DHCP," the connection should be essentially
self-configuring.

If it's any consolation ... :-) ... I am using Red Hat Linux, through
Comcast, through a Siemens router and a cable-modem ... right now.

----------------------------------
Fast automatic Paradox/Delphi table repair at a click of a mouse!
http://www.sundialservices.com/products/chimneysweep

 
 
 

1. Cable modem with Linux Router Project & Fireplug Edge Router - help with wierd ports!


router running on the Edge router floppy.  Normal traffic goes through
just fine (http, smtp, ftp, etc).  The problem comes in with games and
the default behavior of this friewall/router solution.  It is geared
towards security and defaults to deny everything and then let in things
on an as specified basis.  I would like this to be reversed - accept
everything in both directions and allow me to lock down individual ports
as needed.  This is how my previous Cisco 766 ISDN router worked (using
PAT - little brother to full-blown NAT - same function essentially; lets
multiple machines hide behind one valid IP).  I had no problems with
BattleZone or Quake2 or any other games with the Cisco but this Linux
router just refuses to play BattleZone.  I can enter the Internet lobby,
connect to the server, see active games, click join game, see the
players in the game, pick a tank and then try to launch and whamo - it
bangs on the connect a while (longer than it should or ever has) and
evetually just sits there forcing me to ALT-TAB to the desktop and do a
CTRL-ALT-DEL to kill the BattleZone task as the game will never launch.
I have experimented with the userin.txt and portfw.txt files and have
issued some "ipchains" commands in an attempt to work around this.

The lines I have put into /etc/userin.txt (commented out all others):

tcp             -d PUBLICIP 00000:65535
udp             -d PUBLICIP 00000:65535
icmp            -d PUBLICIP 00000:65535
tcp             -s PUBLICIP 00000:65535
udp             -s PUBLICIP 00000:65535
icmp            -s PUBLICIP 00000:65535

The way I'm understanding this, this should open up all ports in the
range of 0-65535 for all protocols.  Does this look right?

I have also experimented with the ipchains command.  I noticed that an
"ipchains -L" command would list a lot of default behaviors apparently
setup to filter out "unwanted" traffic.  I used an "ipchains -F" to
flush all settings out completely and the issued:

ipchains -A forward -s 10.1.1.0/24 -j MASQ -b

This sets up a bi-directional rule that *should* allow all protocols to
go in both directions (be MASQ forwarded to original host) but it
doesn't seem to matter much.  In fact with nothing but that rule
established I can do normal tasks just fine (like the post I'm writing
right now is being done in this mode).  Anyone have an idea why this
rule would allow normal traffic but *still* not allow game traffic to
get back and forth?  Seeing as I already have security inside the LAN
(PDC) I am not very concerned with that and would rather have the thing
wide open to the net, and *then* lock down ports that are potentially
troublesome (like udp 138/139 used to be on Win boxes).  What am I doing
wrong???

2. Yacc Documentation

3. why does freesco router box lose connection from Road Runner cable modem?

4. Copy cut and paste in XWindow

5. linux problems - LAN ipmasqed by linux box to cable modem, also linux locking up (??!!)

6. Linux as SLIP Router

7. Router to linux box cabling

8. Kermit obtained for RS/6000--thank you for replies

9. Problem: Linux box as cable router

10. Cable modem..56 modem dial up, 500K cable modem download stream...

11. Linux box + Speedtouch Pro router: how to do firewall on Linux box

12. Linux as a Router with Cable Modem

13. Cable Modem, IP, default router, and linux