# cable modem and multiple router setup

## devsk

I have a motorola surfboard modem (referred as MOTO) which I want to use as a wireless router in one part of the house. This is connected to internet through comcast cable.

It is connected (wired) to a netgear wireless router which serves the other part of the house.

The MOTO has 192.168.100.1 as its IP, and its DHCP leases out 192.168.100.2-50. The netgear has 192.168.100.3 on wan side from MOTO and its LAN side IP is 192.168.0.1. Netgear leases from 192.168.0.1-50.

The machines behind netgear can see all machines behind MOTO (ping and ssh works) but the machines behind MOTO can not ping anything on 192.168.0.X subnet.

I know I need to add a route to 192.168.0.0/24 network on the MOTO to use 192.168.100.3 as the default gateway but I can't find a setting to setup such a route.

Any ideas how I can achieve this? I want all my computers to be able to freely see and reach each other. I thought this would be very typical and trivial setup for largish homes, but its a pain to set it up correctly.

----------

## MacGyver031

What you are trying to do is impossible.

I would suggest that you deactivate dhcp-server on Netgear and use the first LAN port to connect to MOTO.

----------

## devsk

 *MacGyver031 wrote:*   

> What you are trying to do is impossible.
> 
> I would suggest that you deactivate dhcp-server on Netgear and use the first LAN port to connect to MOTO.

 I am not sure I understand. Can u elaborate?

Are u saying connect first LAN port on the netgear to a LAN port on MOTO? How will this setup work? How do computers connected to netgear get IPs from MOTO?

Currently, WAN port of the netgear is connected to the first LAN port on MOTO.

----------

## MacGyver031

The problem is that the Netgear router is designed to route packets from WAN to LAN. The otherway can only be done by assigning WAN:port -> LAN:port.

If you would like to send packets freely, then you need a gateway not a router.

What I have suggested is to use your Netgear as a switch and wlan accesspoint, while leaving your MOTO as the default gateway. You will achieve what you want, but you will have only one network. I have done this with two (D-Link and Netgear) "quasi routers", quasi because I do not use the routing part.

There is an other way: If you get sources and can build firmware for your Netgear, then you could use ip-forwarding WAN-port to LAN port and achieve what you have asked in the first place.

----------

## devsk

 *MacGyver031 wrote:*   

> There is an other way: If you get sources and can build firmware for your Netgear, then you could use ip-forwarding WAN-port to LAN port and achieve what you have asked in the first place.

 What sources are you talking about? Does Netgear release the sources for their firmware?

So, in the setup you suggested, all machines that connect to wired (or wireless) port of the netgear will get their IP from MOTO because DHCP is off on netgear. Is it automatic or do I need to set something up? I don't mind this setup if it makes all my computers see all of them (although it reduces the number of wired ports on netgear and I will need to find a way to put my printer on the network but that's fine).

Let me try this setup when I go back home.

----------

## Simba7

I have a setup similar like this.

Basically:

Cable Modem -> Server/Router (My Dual P3) (eth0)

Server/Router (eth1) -> 8 port switch

2 AP's (connected through LAN, not WAN) -> Switch

Just make sure you disable DHCP on the access point(s). The server/router acts as a DHCP server. So the AP(s) are just that.. AP(s).. and do no actual routing.

I am curious on what kind of cable modem you are using. Usually the cable modem issues a public IP address, not a private one.

----------

## devsk

 *Simba7 wrote:*   

> I am curious on what kind of cable modem you are using. Usually the cable modem issues a public IP address, not a private one.

 Its a motorola surfboard and is configured in NAPT mode.

----------

## devsk

Ok. I moved netgear into "switch mode". I am getting DHCP assigned addresses over 192.168.100.x subnet from MOTO when wired to netgear. Wireless computers don't get any IP. Any ideas why?

----------

## devsk

Seems like laptop wasn't running dhcp client daemon for some reason. Things look good! This is exactly what I needed. A single network for my whole home.

----------

