Playing with default subnet mask: understanding the consequences

1

I'm playing with my router configuration, and I want to understand what happens from changing the default subnet mask from 255.255.255.0 to 255.255.0.0 is expected to do

More details, I had

Router IP Address: 192.168.0.1
default subnet gateway: 255.255.255.0

enable DHCP Server: check
DHCP IP Address Range: X to Y (addresses within the LAN subnet)

So X and Y just parametrize the last byte in the ip address of the nodes, in fact other machines get local ip from 192.168.0.X going up

However, I want to know if what I understand about subnet masks is correct, so I changed the subnet gateway to 255.255.0.0

I was hoping that the X and Y parameters would allow the address ranges to be of from 192.168. X0.0 to 192.168.X1.0 or something, but after releasing and renewing the DHCP leases on connected machines, the IP are still on the 192.168.0.X range

So either I'm not understanding what default subnet gateway actually is, or there is some other problem I'm not seeing?

lurscher

Posted 2011-05-16T00:55:47.307

Reputation: 312

Added http://superuser.com/questions which explains IPv4 subnetting in detail. (Question is a copy of the canonical answer on Serverfault).

– Hennes – 2016-07-27T16:32:53.463

Answers

4

The subnet mask shows the break point for the network side and the host side of a subnet so 255.255.255.0 for a 192.168.0.0 subnet would allow a range of 192.168.0.1 to 192.168.0.254. Changing the subnet to 255.255.0.0 will allow a range of 192.168.0.1 to 192.168.255.254. in ether case 192.168.0.1 is a usable address for a host in the subnet. I hope this helps.

http://www.topwebhosts.org/tools/netmask.php

N4TKD

Posted 2011-05-16T00:55:47.307

Reputation: 979

yes, but the first IP assigned is still 192.168.0.X where X is non-zero, so i presume that the router X,Y address range parameters are parametrizing only the lowest significant byte in the address range, so it seems to be useless to parametrize the rest – lurscher – 2011-05-16T02:00:00.927

3The mask does not do that in most home router setups alone, some setting in your router is setting a parameter for IP address besides the mask. The mask only states host address can be from A to Z in this subnet. You can use a mask to limit that range. In my home router the DHCP settings is used to set the IP pool range in addition to the mask, the mask must allow for that IP range (starting point and ending point) or my home system would not work. – N4TKD – 2011-05-16T02:14:33.617