DHCP IP Range help

Aunnix

Distinguished
Jul 24, 2012
202
0
18,680
Hello,

I was wondering if someone can provide details on configuring my DHCP IP range? I can't seem to find many resources about this, but I was wondering how the IP range works.

I know you can set the range so that only a number of devices can be assigned IP addresses, but I'm not sure what ranges are associated with how many devices. For example, I assume a range of 192.168.1.2 - 192.168.1.20 allows for the connection of up to 18 (there are 18 IP addresses between .2 and .20...?) devices but I've seen a few examples where people are adjusting this for up to 500, 1000, and more devices. But, this confused me as I'm only allowed have a range up to 254 (ie: 192.168.1.1 - 192.168.1.254).

Also, when setting the range is better to be on the lower side (as I infer the smaller the range the better the security?)? Like, should I do 192.168.1.1 - 192.168.1.10 compared to 192.168.1.50 - 192.168.1.60?

I'm trying to setup my old Wireless B router as an access point and I'm trying to understand the basics of the whole DHCP IP Range so that I don't have to constantly make adjustments everytime I add a new device or switch or something... Any explanations are appreciated.

Thanks!
 
A /24 network, like 192.168.1.1 has 254 usable addresses including the gateway of 1.1 because 1.0 cannot be used and 1.255 is the general broadcast address. This is the "standard" home router type of network range.

The most practical setup for a home network is usually to save a few static addresses and let the DHCP service of the router control the rest. You need static addresses for your APs (one each for their own address) and for anything else that likes a static address (such as a printer). Your router will assign the addresses to devices that attach through the AP though so you don't need to do that.

No real security advantage to using only a small number of addresses compared to the whole 254 available on a /24 network. Your security is using WPA2/AES with WPS disabled to avoid a potential Reaver attack on your PIN code.

You can supernet (sort of like add network ranges together) using classless inter domain routing (CIDR), by using the subnet mask to borrow network bits to use as host bits and have large numbers of clients on a single network.

It may make a little more sense if you think of it in binary terms. The IPv4 address has 32 bits, and in a /24 network 24 are used for the network and 8 for the hosts. So you can have 2^8 (256) hosts minus the first and last, so 254 usable.

To see how this applies to allowing more hosts, think about borrowing one network bit using CIDR, so now you have a /23 network and the extra bit gives you 9 host bits now, so you can have 2^9 (512) host minus the first and last again, so 510 usable addresses. This would have a mask of 255.255.254.0 and would use the IP range of 192.168.0.0 - 192.168.1.255. You don't need that kind of stuff for home network, but it might help make sense of your network compared to a big one with lots of hosts.
 
It really doesn't matter, but you do want to have enough addresses assigned to cover all devices on the network -- if the DHCP server runs out of addresses you will not get connections and will have instability.

No particular set is better and the newer routers easily handle the routing for their network. The only significant limitation in home networks is that the radio of the wireless will only make a limited number of connections before it starts dropping its clients. Depending on your bandwidth use by device it usually runs 8-12 before problems start, although a single gaming connection may require all the available wireless bandwidth to play without lag.
 



Just so I'm sure... By radio, do you mean the 2.4ghz and 5ghz frequencies? I have seen people refer to these frequencies/signals as radios. If so, if a gaming PC was on the 5ghz radio and it required all of the bandwidth... would the devices on the 2.4ghz line be affected by the gaming PC? I do have a dual band router, but I do not plan to run any gaming devices wirelessly so this is just a hypothetical, lol. Just asking questions...

Basically, to account for another AP or bridge or something (anything that requires static IPs) I have cut my IP address range in half. I'm running the range of my gateway from 192.168.1.2 - 192.168.1.127. So, that leaves me a range of 192.168.1.128 - 192.168.1.254 for any devices using static IPs such as the B access point which I've given the IP address of 192.168.1.130. I assume this range should leave enough room for a number devices (couple laptops, couple phones, 3-4 streaming devices, printer(?))?
 
No, the 2.4GHz and 5GHz have separate radios inside the router, so use of one does not affect the other.

Nope, the AP only requires a single address for itself. All devices that connect to the AP will be given an address by the router's DHCP service. You do not need to slice your network up into subnets.
 


Ok, I assumed they didn't but figured I'd ask for sure.





So, should I increase the range and only leave a handful of IP addresses available outside of it? For example, set the range at like .1.2 - .1.240 and have a range of .1.241 - .1.254 static IPs?