However there is nothing stopping you using such a free DHCP server setup on your home network as well. Another advantage is that all the settings are stored in one place so any changes can be done easily without having to reconfigure all of your computers.
Installing free DHCP server is easy, it is the configuration that takes some time and thought. That said, once you have installed and configured a DHCP server you are saved from all the chores like rotating IP addresses, keeping track of what IPs have been assigned and configuring each computer/device separately etc.
We will be looking at how you can configure a free DHCP server on your Linux computer. As always I will be demonstrating this using my Ubuntu Machine, but you can very well adapt it to be used with any other distribution. First and foremost you need to install a DHCP server on your computer. Doing so is simple, all you need to do is to issue the following command:
sudo apt-get install dhcp3-server
或者,您也可以通过突触包管理器来实现。请记住,您可能必须启用Universe和多版本存储库。 (为此,请在系统>管理>软件源中选中相应的复选框。)
安装完成后,您需要进行配置。配置DHCP服务器需要编辑配置文件,并且具有良好的网络知识也不会受到损害。也就是说,我将尝试引导您完成配置文件以及基本设置所需的全部更改,因此请遵循以下步骤:
子网10.5.5.0网络掩码255.255.255.224 –指定所有主机将属于的子网。例如,如果您要分配子网掩码为255.255.255.0的子网192.168.0.0的IP地址,则应将该行更改为子网192.168.0.0子网掩码255.255.255.0
< em> range 10.5.5.26 10.5.5.30 指定子网内的IP地址范围,该范围将分配给请求地址的任何计算机。在我们的情况下,我们可以将其更改为合适的范围192.168.0.10 192.168.0.50
The other lines are used to configure optional parameters like router address, DNS servers etc. You can specify them here to override the default ones you provided at the start of the file.
With a little configuration, the DHCP server is ready for work. All you need to do now is to start the server and configure the clients to request IP via DHCP from this server that you configured. As an option you can also use Webmin to configure your DHCP server using a web browser. If you have a router, it can do most things that you want to do with a DHCP server, in such a case you can access the router’s settings panel to specify things like how IP addresses are assigned, DNS servers and the likes.
Have you ever configured a DHCP server for your home network? Or do you use static IPs? Feel free to contribute your tips in the comments section.
标签: