Dynamic Host Configuration Protocol (DHCP) is an Internet standard that defines a method by which computers in a network are automatically given Internet Protocol (IP) addresses for them to effectively participate in network activities. For you to be able to safely use DHCP, you need to understand a little bit of IP addressing.
If you're using a wireless network in your home, you are probably using a default IP address that allows a lot of computers to be included in your network. For example, if you're using a DLink DIR-300 wireless router, your router address is 192.168.0.1. This means that your network address is 192.168.0.0 and your broadcast address is 192.168.0.255. A total of 254 computers can theoretically join your network so in this sense, it is not so safe.
The network 192.168.0.0 belongs in a set of network addresses that are not routable in the Internet. These networks have been set aside for use in private networks. The total number of IP addresses included in this allocation is called the private address space. There are many addresses that can be used depending on the number of computers that needs to connect to your network.
The subnet mask is a nifty little trick that is used to divide a big network into smaller ones. If for example, I use the IP address 192.168.0.1 and use the subnet mask 255.255.255.0, then my network address is 192.168.0.0 and my broadcast address is 192.168.0.255. In between these two address numbers are the numbers 1 to 254 which we can use to distribute to the computers that are inside our network. Routers are not really concerned about the address of each computer in the network. All they want to know is the network address. By using the subnet mask, the router is able to determine what the address of a network is.
We can divide our big network consisting of more than 200 computers into two subnetworks by using the 255.255.255.128 subnet mask. Here we have two networks, one ranging from 192.168.0.0 up to 192.168.0.127 and the other ranging in addresses from 192.168.0.128 to 192.168.0.255. The lowest address in the network is considered the network address and it cannot be used to assign to any device inside the network. The broadcast address is the highest address in the network and it also cannot be assigned to any computer. Thus we are left with 126 addresses that we can use in each subnet.
One way of making your network relatively safe is to limit the number of computers that can access your network. You don't need more than 200 addresses if you are doing wireless home networking in your house. There is a subnet mask that you can use that would allow you to limit the number of addresses that can be assigned inside your network.
Suppose that you think long and hard and came up with the idea that there can be no more than 30 computers connected to my home network at any one time. You hit exactly the right number because you can use the subnet mask 255.255.255.224 to divide the large 256 member network into eight little subnets. Each of these subnets can then include a total of 30 computers. You can then choose one of these eight network address space as the valid IP address range for your home network.
One address space that you can use is from 192.168.0.0 up to 192.168.0.31. Your network address in this case is 192.168.0.0 and your broadcast address is 192.168.0.31. You can then use the address range 192.168.0.1 up to 192.168.0.30 as addresses for the computers in your network. You still can use the IP address 192.168.0.1 for your wireless router and assign the remaining 29 addresses to the computers in your home network.
Say I have chosen to use the IP address space 192.168.0.160 to 192.168.0.191 for my wireless network at home. Here, I will assign the IP address 192.168.0.161 to my wireless router and leave the remaining numbers except the last one to the DHCP server of my router for assignment to the rest of computers in my network. Now I have 29 more addresses that can be used in my network. So if I hold a party with friends and relatives, a total of 29 laptops, tablets or smart phones can be hooked up to my network.
You can try this on your DLink DIR-300 wireless router if you're using one. I must remind you that this can be tricky so you must know before you do this how to reset your router physically to its factory setting. Typically, there is a button at the back of your router that would enable you to reset the router to its factory setting if you messed up your router configuration. If you reset your router, you will have to redo all the configuration settings that you have made before.
To avoid having to perform your router configuration once again, save your settings first before you make any changes on your router. Open the DIR-300 router configuration page on your browser and click on Maintenance at the top portion of the window. Click on Save and Restore on the top left hand side of the page. Click on the button Save and save the config.bin file on your laptop. Then if something goes wrong, reset your router to factory settings, access it using the default IP address of 192.168.0.1 and then go back to the Save and Restore page of your router's configuration settings, click on the Browse button and select the config.bin file on your hard disk, and then click on Upload Settings.
I must also remind you that if the network address of the laptop that you're using had been set manually, you need also to assign to it a new address that is within the range of the valid addresses for your subnetwork. You can no longer access your wireless router once you have changed its setting if you're still using your old manually configured IP address. If, on the other hand, you're using DHCP in your network, you have to reboot your laptop for you to be able to connect to your network again. If done correctly, the DHCP server in your router is going to assign a new IP address to your computer.
To use the new address space in your DLink DIR-300 wireless router, open your router configuration page on your Internet browser. Click on Setup near the top of the window and then click on LAN Setup on the left hand side. Enter 192.168.0.161 on the blank opposite Router IP Address and type 255.255.255.224 opposite the Default Subnet Mask. On the DHCP Server Settings, check the Enable DHCP Server and on the two blanks opposite DHCP IP Address Range, type 162 on the first blank and 190 on the next blank space. Double check that you have entered the correct numbers and then click on the Save Settings button at the top or bottom of the window.
Let the router make configuration changes for a couple of minutes. After a few minutes, restart your laptop and open an MS-DOS prompt. Type ipconfig /all and press the enter key. Verify that the IP address of the wireless adapter in your laptop has a new IP address that belongs in the range 192.168.0.162 and 192.168.0.190. Test if you can access the Internet by browsing for websites. If you have done it correctly, computers that are using the 255.255.255.0 subnet mask settings will not be able to access your network. Outsiders will have one more hurdle to pass and that is to guess correctly the network address and the correct subnet mask for your network.
From now on, if you want to check up the status or configure other settings in your DLink DIR-300 wireless router, you will have to use its new IP address: http://192.168.0.161.
Read my other article on how to setup DHCP in your DLink DIR-300 wireless router at: http://publishtoweb.blogspot.com/2012/01/how-to-setup-dhcp-in-your-dlink-dir-300.html.
Read my other article on surfing the Internet faster by using OpenDNS on your DLink DIR-300 wireless at: http://publishtoweb.blogspot.com/2011/12/surf-internet-faster-by-using-opendns.html.
Read my other article on using DHCP to minimize unauthorized connections to your DLink DIR-300 wireless router at: http://publishtoweb.blogspot.com/2012/01/use-dhcp-reservation-to-minimize.html.