1

Our office is fairly small. We previously had a 2wire gateway that came when we ordered our DSL connection. I recently decided to upgrade to a router that could support DD-WRT since the 2wire was very lacking in features. I purchased a new router and a new modem (which is actually a DSL modem with 1 port router). I got DD-WRT flashed onto the router successfully, and configured the gateway to work with our ISP (and I confirmed that it is working by connecting it to a single computer and checking out the internet). Additionally, I disabled the modem's DHCP server since I intend for DD-WRT to cover that.

Now, my goal here is to have the DD-WRT router between the gateway and the switch (all servers and workstations are connected to the switch, the gateway is connected to the router's WAN port) where it can act as firewall in addition to everything else. The modem came with a default IP of 192.168.0.1, which is outside my network, so I changed it to 192.168.1.254 (the DD-WRT router is 192.168.1.253). On the initial setup page of DD-WRT, I plugged in a gateway IP of 192.168.1.254.

After doing this and restarting all required equipment, no machines have internet access. They can ping both the router and the gateway successfully. I tried everything I could think of. I noticed that the router is handing out it's own IP of 192.168.1.253 as the gateway address. If I set up a workstation to use a static IP and set the gateway IP to 192.168.1.254, the machine gets internet access, but I don't think that is what I want since I believe that bypasses the router's firewall and such.

What am I doing wrong? I'm not the most knowledgeable networking guy around, I have a feeling I'm missing something really obvious here.

DWilliams
  • 953
  • 2
  • 20
  • 28
  • The base networks must be different - leave 192.168.0.* to the connection between the DSL and DD-WRT and 192.168.1.* to the rest. Consider setting up a DMZ on the DSL modem pointing to the DD-WRT's WAN address, so that you have port mapping available in the future. – Zdenek Nov 15 '20 at 14:51

3 Answers3

3

You want to put the router between your gateway and the switch as mentioned. In this typical setup, all traffic between the internet and your local network runs through the router and gateway, which allows you to control the traffic using either device.

internets---------[gateway]---------[router]------[switch]---local network
              192.168.0.1 (lan)   192.168.1.253              192.168.1.XXX
              XXX.XXX.X.X (public)

Your second setup could allow all connections through the gateway, but this would mean that you would not be able to force control traffic from your router and your router would just be a DHCP server.

internets---------[gateway]---------[switch]------[router]
             192.168.1.254 (lan)       |       192.168.1.253
             XXX.XXX.X.XXX (public)    |
                                       +---local network
                                           192.168.1.XXX

There is a third possible setup and one that I actually use at my place. In this mode, the DSL modem only acts in a pass-thru/bridge manner (like a dumb modem). We use PPPoE for DSL connections and DD-WRT supports it. As a result of this setup, the Internet connection interface is actually on the router instead of the gateway, which allows further control over the traffic.

internets------bridge---------[router]---------[switch]---local network
               (modem)     192.168.1.254 (lan)              192.168.1.XXX
                           XXX.XXX.X.XXX (public ip)
sybreon
  • 7,357
  • 1
  • 19
  • 19
  • +1 for suggesting bridge mode. It is often quite beneficial since most the modems are pretty crappy, and can get a noticeable performance boost when in pass through mode. – Kevin Nisbet Dec 15 '09 at 03:07
  • Bridge mode is exactly what I was looking for. I spent some time configuring it and got it to work, although with some other problems that are unrelated to this question specifically. – DWilliams Dec 17 '09 at 20:42
1

I have a similar setup to you.

I have the modem (in my case, FiOS) set up to use 192.168.1.0 network, and the Router (I used Tomato, which is a 3rd party firmware similar to DD-WRT) is using 192.168.2.0 as its network on the LAN side. The WAN side of the router picks up an IP from the modem's network using 192.68.1.2.

So in effect I have two networks

Internet <---> Modem | 192.168.1.1 <------> 192.168.1.2 | Router | 192.168.2.1 <-----> Switch + Rest of network

The router hands out IPs using DHCP, with the gateway being itself (192.168.2.1).

I hope that clarifies things a bit, let me know if you have any specific questions.

Dave Drager
  • 8,315
  • 28
  • 45
0

You need to put the modem and the router on on their own separate network and then plug the switch just into the router, so all traffic goes from the switch to the router to the modem.

Let the modem be 192.168.0.1, let the router's external interface be 192.168.0.2. Let the router's internal interface be the internal gateway: 192.168.1.254. So traffic comes to the internal gateway address, the router has a default route to 192.168.0.1, and the modem takes it from there. Put whatever filtering you want on the router.

pjz
  • 10,497
  • 1
  • 31
  • 40