Posted: Mon Mar 02, 2020 16:39 Post subject: Getting incorrect IP addresses from DHCP
Hi all.
As the title says. I am getting incorrect IP addresses given out by the DHCP on my R7000P.
My setup was as follows
IP - 192.168.1.1 (router)
mask - 255.255.252.0 (i have seperate modem on *.*.2.1 and other stuff on *.*.3.1)
DHCP - 192.168.1.100 for 25 leases.
all devices are set up like this and everything was working fine.
Now all my leases are getting their IP addresses as 192.168.0.1** instead of 192.168.1.1** and I could not work out why.
I tried restoring defaults, updating the firmware to latest beta, starting with fresh config but I could not get it to stay on 192.168.1.1**
So I thought I would try putting the mask back to 255.255.255.0 and that seems to have sorted it out but that doesn't work accessing the rest of my network on different subnets.
The only thing can think of is that I installed flashrouters.com privacy VPN app
but that slowed the connection right down, but I think the problems started then. Even after a firmware update, there still seems to be a gremlin in there somewhere.
Looks like you're trying to build a CIDR supernet. With that subnet mask 192.168.0.0 - 192.168.3.255 is your range. Not sure what the plan is, but bridging the subnets might be a cleaner approach. Much more expertise here than I on the subject.
http://www.subnet-calculator.com/cidr.php
Looks like you're trying to build a CIDR supernet. With that subnet mask 192.168.0.0 - 192.168.3.255 is your range. Not sure what the plan is, but bridging the subnets might be a cleaner approach. Much more expertise here than I on the subject.
http://www.subnet-calculator.com/cidr.php
Thats cool like calc thanks.
Yeah many different reasons. Bascially wanted subnets for homenetwork, CCTV, Modem and also when abroad to VPN into the network and still be able to use the correct ip address. Have 2 modems connect via VPN on the same subnet conflicts when trying to access files. it also allows all the above to be on the same hardwired network and all talk to each other.
got it to work and keeping the router on 255.255.255.0 seems to nbe working ok for now.
When you have a single subnet (no matter how big the mask is), all devices on that subnet communicate via layer 2 (arp'ing for the MAC address).
☝️ This is what you've created with your 255.255.252.0 subnet mask. There is no separation between devices in this sort of network.
When you have multiple subnets, a client device will send packets to its default gateway (for destination that are on a different subnet), and the default gateway sends (routes) the packet to the appropriate subnet. People typically do this on their private networks when they want some devices segregated from other devices.
To properly achieve this segregation, however, you'd need to:
1) create a VLAN for each subnet and place each device on the appropriate subnet (layer 2 segregation).
2) assign an IP range and subnet to each VLAN...
3) create layer 3 rules in your gateway to control the traffic between these subnets
4) since the subnets are both on the same gateway device, no special routing rules need to be created (the gateway already knows).
When you have a single subnet (no matter how big the mask is), all devices on that subnet communicate via layer 2 (arp'ing for the MAC address).
☝️ This is what you've created with your 255.255.252.0 subnet mask. There is no separation between devices in this sort of network.
When you have multiple subnets, a client device will send packets to its default gateway (for destination that are on a different subnet), and the default gateway sends (routes) the packet to the appropriate subnet. People typically do this on their private networks when they want some devices segregated from other devices.
To properly achieve this segregation, however, you'd need to:
1) create a VLAN for each subnet and place each device on the appropriate subnet (layer 2 segregation).
2) assign an IP range and subnet to each VLAN...
3) create layer 3 rules in your gateway to control the traffic between these subnets
4) since the subnets are both on the same gateway device, no special routing rules need to be created (the gateway already knows).
cool, thanks man, going to save the current config and have a play around with this.
Originally it was on stock firmware so was config was limited.
Back in the day I had my main net on a /23 (255.255.254.0) netmask and it all worked great
but I decided I really didn't need 512 IPs to play with so its only the /24 net mask now days.
However, best I remember DD-WRT had some quirks / limitations on any DCHP that might allow more...
...such as the /22 (255.255.252.0) which should have total of 1024 IPs per that netmask. Seems I remember it would hand out weird IPs
or maybe the first unused IPs NO matter what you set for start DHCP IP.
That was several years back and don't know if that was ever fixed but whomever runs this firmware don't really need it to hand out more than a few hundered IPs per subnet anyways I reckon.
Back in the day I had my main net on a /23 (255.255.254.0) netmask and it all worked great
but I decided I really didn't need 512 IPs to play with so its only the /24 net mask now days.
However, best I remember DD-WRT had some quirks / limitations on any DCHP that might allow more...
...such as the /22 (255.255.252.0) which should have total of 1024 IPs per that netmask. Seems I remember it would hand out weird IPs
or maybe the first unused IPs NO matter what you set for start DHCP IP.
That was several years back and don't know if that was ever fixed but whoever runs this firmware don't really need it to hand out more than a few hundred IPs per subnet anyways I reckon.
Yeah, that's what I found weird. The DHCP was giving out the first available IP in the subnet mask rather than what the actual set start point was. glad I wasn't the only one.
I originally configured due to VPN from abroad and it didn't like having the same subnets connected together but I had no control over changing it from abroad. Then just separated everything for the sake of it I guess. I very much doubt id ever need 1024 addresses let alone 100!