I have a small network with a modem, a WRT54GL router and my laptop. When I connect my laptop directly to the modem I can access the web interface of the modem by navigating to 192.168.1.1 (this cannot be changed). When I connect my router (192.168.1.2) to the modem and then connect my laptop to the router I can not access the modem any longer.
I have confirmed that I do not have an IP conflict. I'm able to get on the web and access the DD WRT UI of my router but I can't access the modem any longer.
Here is the WAN Connection info from the router:
Connection Type: Automatic Configuration - DHCP
IP Address: xxx.xx.xxx.xx
Subnet Mask: 255.255.255.252
Gateway: 148.63.162.29
DNS: 1148.78.249.200
DNS: 2148.78.249.201
And here is my Network Adapter info (ipconfig):
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.102(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.2
DHCP Server . . . . . . . . . . . : 192.168.1.2
DNS Servers . . . . . . . . . . . : 192.168.1.2
NetBIOS over Tcpip. . . . . . . . : Enabled
I see that the subnet mask is different and I suspect that essentially means I have two networks: My modem-router network and my router-laptop network, however this is just a guess and I'm reluctant to change things I don't understand.
If the subnet masks are the reason I can't get to the modem from the router is the solution to update the DHCP configuration on the router to use the same subnet mask as the modem is handing down to the router?
Best Answer
The reason you can't reach the modem, is because the IP address of the modem is on the same network as your LAN, but isn't connected to the LAN (its connected to the WAN). The easy fix, if you can't change your modem IP, is to change your LAN IP range. Use something like
192.168.0.0/255
instead of192.168.1.0/255
. Basically change your router IP to192.168.0.1
and your DHCP server to serve IPs in the192.168.0.X
range.Detailed Explaination
Right now you actually have 3 different networks:
As you can see in the image, the LAN and modem are on the same network, but separated by the router. The reason this is a problem is because when you send a packet to
192.168.1.1
from your computer on the LAN, the netmask (255.255.255.0
) says that any IP from192.168.1.0
-192.168.1.255
should be on the LAN, so it performs an ARP query to find the MAC address of the machine with that address, but no machine on the network has that address, so it fails.However, if they are different networks, they packet will always get sent to the default gateway(the router) which will then send it out the WAN port since it not destined for any of the devices on the LAN.