Problem: Linux box as cable router

Problem: Linux box as cable router

Post by Eric Schel » Sun, 27 Oct 2002 01:31:29



I'm setting up a linux (rh 7.3 kernel 2.2.5) box ("merle") as a cable
router for my home
network.  merle has 3 nic cards: one connected to "clyde" (winNT), one
connected to "*" (RH8.0),
and one connected to the cable modem (roadrunner).

What works:
merle successfully gets set up by the roadrunner server dhcp
Each box can access the internet and dns
Each box can ping the box it's connected to directly ( *<->merle,
clyde <--> merle)

What doesn't work:
clyde and * aren't talking.  They cannot ping each other ("host
unreachable").

I think I have the route tables on merle set up correctly to provide the
correct gateway
interface for clyde and *.  I have default gateways set up on clyde
and * to merle.

I hope I'm missing something obvious (and easy).  Dumps of merle's setup
follow
(hosts, ifconfig, route, ipchains).

Help???
Thanks!
Eric Schell
(email address:  replace "nospam" with "eschell")
----------------------------------------------------------------------------

/etc/hosts
-----------------
0.0.0.0  merle-gw
127.0.0.1 localhost
192.168.0.1 merle
192.168.0.2 merle2
192.168.0.10 clyde
192.168.0.3 *
---------------------------------------------------
---------------------------------------------------
ifconfig
----------------
eth0      Link encap:Ethernet  HWaddr 00:02:96:00:5F:A8
          inet addr:66.25.132.169  Bcast:66.25.143.255
Mask:255.255.240.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:339905 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4468 errors:0 dropped:0 overruns:0 carrier:0
          collisions:22 txqueuelen:100
          Interrupt:11 Base address:0x6000

eth1      Link encap:Ethernet  HWaddr 00:50:BF:3A:0E:F4
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4350 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3827 errors:0 dropped:0 overruns:0 carrier:0
          collisions:297 txqueuelen:100
          Interrupt:10 Base address:0x6100

eth2      Link encap:Ethernet  HWaddr 00:02:96:00:6E:36
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:9 Base address:0x6200

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:78 errors:0 dropped:0 overruns:0 frame:0
          TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
---------------------------------------------------
---------------------------------------------------
route -n
--------------
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.0.10    192.168.0.1     255.255.255.255 UGH   0      0        0
eth1
192.168.0.1     0.0.0.0         255.255.255.255 UH    0      0        0
eth1
192.168.0.3     192.168.0.2     255.255.255.255 UGH   0      0        0
eth2
192.168.0.2     0.0.0.0         255.255.255.255 UH    0      0        0
eth2
66.25.128.0     0.0.0.0         255.255.240.0   U     0      0        0
eth0
192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0
eth1
192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0
eth2
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0
lo
0.0.0.0         66.25.128.1     0.0.0.0         UG    0      0        0
eth0
---------------------------------------------------
---------------------------------------------------
ipchains -L
--------------
Chain input (policy ACCEPT):
target     prot opt     source                destination
ports
ACCEPT     udp  ------  anywhere              anywhere
bootps ->   bootpc
Chain forward (policy DENY):
target     prot opt     source                destination
ports
MASQ       all  ------  192.168.0.0/24        anywhere              n/a
Chain output (policy ACCEPT):

 
 
 

Problem: Linux box as cable router

Post by Duncan Thomso » Sun, 27 Oct 2002 01:49:13



> I'm setting up a linux (rh 7.3 kernel 2.2.5) box ("merle") as a cable
> router for my home
> network.  merle has 3 nic cards: one connected to "clyde" (winNT), one
> connected to "*" (RH8.0),
> and one connected to the cable modem (roadrunner).

OK, snipping out relevant pieces of your config, you have

Quote:> ---------------------------------------------------
> ifconfig
> ----------------
> eth1      Link encap:Ethernet  HWaddr 00:50:BF:3A:0E:F4
>           inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.0.0

                                                             ^^^^^^^^^^^

This netmask says that eth1 is connected to a subnet containing all addresses of
the form 192.168.*.*

Then you have:

Quote:> /etc/hosts
> -----------------
> 192.168.0.10 clyde
> 192.168.0.3 *
> ---------------------------------------------------

Both of those addresses are on the 192.168.*.* subnet, aren't they?

That explains why you are all hosed up!

If you want to have two internal network cards, you need them to be on different
subnets (unless you want major headaches!)

Set up, for example, eth1 as 192.168.1.1/255.255.255.0 and eth2 as
192.168.2.1/255.255.255.0.  

Everthing else should then become much clearer.

Make sense?

Duncan

 
 
 

Problem: Linux box as cable router

Post by Eric Schel » Sun, 27 Oct 2002 03:42:40


Thanks! Duncan.  All is in order now.  The only additional thing I did
was add some rules to the firewall (ipchains) to allow forwarding traffic between
the
subnets. Now we're pinging happily away.  Now on to samba, mounting remote file
systems, etc...
ES


> > I'm setting up a linux (rh 7.3 kernel 2.2.5) box ("merle") as a cable
> > router for my home
> > network.  merle has 3 nic cards: one connected to "clyde" (winNT), one
> > connected to "*" (RH8.0),
> > and one connected to the cable modem (roadrunner).

> OK, snipping out relevant pieces of your config, you have

> > ---------------------------------------------------
> > ifconfig
> > ----------------
> > eth1      Link encap:Ethernet  HWaddr 00:50:BF:3A:0E:F4
> >           inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.0.0
>                                                              ^^^^^^^^^^^

> This netmask says that eth1 is connected to a subnet containing all addresses of
> the form 192.168.*.*

> Then you have:

> > /etc/hosts
> > -----------------
> > 192.168.0.10 clyde
> > 192.168.0.3 *
> > ---------------------------------------------------

> Both of those addresses are on the 192.168.*.* subnet, aren't they?

> That explains why you are all hosed up!

> If you want to have two internal network cards, you need them to be on different
> subnets (unless you want major headaches!)

> Set up, for example, eth1 as 192.168.1.1/255.255.255.0 and eth2 as
> 192.168.2.1/255.255.255.0.

> Everthing else should then become much clearer.

> Make sense?

> Duncan

 
 
 

Problem: Linux box as cable router

Post by Grahame Coope » Sun, 03 Nov 2002 06:33:58


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I'm setting up a linux (rh 7.3 kernel 2.2.5) box ("merle") as a cable
> router for my home
> network.  merle has 3 nic cards: one connected to "clyde" (winNT), one
> connected to "*" (RH8.0),
> and one connected to the cable modem (roadrunner).

> What works:
> merle successfully gets set up by the roadrunner server dhcp
> Each box can access the internet and dns
> Each box can ping the box it's connected to directly ( *<->merle,
> clyde <--> merle)

> What doesn't work:
> clyde and * aren't talking.  They cannot ping each other ("host
> unreachable").

> I think I have the route tables on merle set up correctly to provide the
> correct gateway
> interface for clyde and *.  I have default gateways set up on clyde
> and * to merle.

> I hope I'm missing something obvious (and easy).  Dumps of merle's setup
> follow
> (hosts, ifconfig, route, ipchains).

> Help???
> Thanks!
> Eric Schell
> (email address:  replace "nospam" with "eschell")

-
----------------------------------------------------------------------------

- Show quoted text -

Quote:

> /etc/hosts
> -----------------
> 0.0.0.0  merle-gw
> 127.0.0.1 localhost
> 192.168.0.1 merle
> 192.168.0.2 merle2
> 192.168.0.10 clyde
> 192.168.0.3 *
> ---------------------------------------------------
> ---------------------------------------------------
> ifconfig
> ----------------
> eth0      Link encap:Ethernet  HWaddr 00:02:96:00:5F:A8
>           inet addr:66.25.132.169  Bcast:66.25.143.255
> Mask:255.255.240.0
>           UP BROADCAST RUNNING  MTU:1500  Metric:1
>           RX packets:339905 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:4468 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:22 txqueuelen:100
>           Interrupt:11 Base address:0x6000

> eth1      Link encap:Ethernet  HWaddr 00:50:BF:3A:0E:F4
>           inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.0.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:4350 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:3827 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:297 txqueuelen:100
>           Interrupt:10 Base address:0x6100

> eth2      Link encap:Ethernet  HWaddr 00:02:96:00:6E:36
>           inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.0.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:54 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:100
>           Interrupt:9 Base address:0x6200

> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:3924  Metric:1
>           RX packets:78 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
> ---------------------------------------------------
> ---------------------------------------------------
> route -n
> --------------
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 192.168.0.10    192.168.0.1     255.255.255.255 UGH   0      0        0
> eth1
> 192.168.0.1     0.0.0.0         255.255.255.255 UH    0      0        0
> eth1
> 192.168.0.3     192.168.0.2     255.255.255.255 UGH   0      0        0
> eth2
> 192.168.0.2     0.0.0.0         255.255.255.255 UH    0      0        0
> eth2
> 66.25.128.0     0.0.0.0         255.255.240.0   U     0      0        0
> eth0
> 192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0
> eth1
> 192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0
> eth2
> 127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0
> lo
> 0.0.0.0         66.25.128.1     0.0.0.0         UG    0      0        0
> eth0
> ---------------------------------------------------
> ---------------------------------------------------
> ipchains -L
> --------------
> Chain input (policy ACCEPT):
> target     prot opt     source                destination
> ports
> ACCEPT     udp  ------  anywhere              anywhere
> bootps ->   bootpc
> Chain forward (policy DENY):
> target     prot opt     source                destination
> ports
> MASQ       all  ------  192.168.0.0/24        anywhere              n/a
> Chain output (policy ACCEPT):

With this set up, eth1 and eth2 seem to be on the same subnet. They will
need to be on different subnets or else clyde will not know that packets
for cissy have to be forwarded to Merle and similarly Cissy won't know
that packets for Clyde should be forwarded to Merle. I can see this from
you subnet masks (255.255.0.0) in the ifconfig output.

You haven't shown the subnet masks that are set on clyde and cissy, but
they do need to be set up correctly for the routing to work.

If you put clyde and cissy on different subnets (e.g.
192.168.0.10/255.255.255.0 and 192.168.1.3/255.255.255.0) then I think
things ought to work out OK. (Haven't checked the routing table in
detail though.)

Cheers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://www.veryComputer.com/

iD8DBQE9wvNFqa5Q84ryhtkRAhLlAKC9BzIxz9uRaPb84Yvu9rmewmNSGwCeIcZl
r3yVRSpTrpum/NH4D3hm6rQ=
=1r+4
-----END PGP SIGNATURE-----

 
 
 

1. Linux box + router + cable modem

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

2. Portmap - pls explain

3. Router to linux box cabling

4. Les cartes X25 sous Linux ???

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

6. Web server test software

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

8. Java IDEs and Tools ?

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

10. Router = black box + cables

11. Linux Box to NT Box using crossover cable

12. Connecting a WinDoze box to a Linux (2.0.34) box with a paralell cable.

13. ADSL thourgh hardware router to a linux box router