The actual environment does not have to specifically set up DHCP services, usually through the switch or router to do DHCP. However, using CentOS as a DHCP is actually very simple, and at night do a DHCP entertainment. Refer to the article "Bird Brother's private food", Thank you brother Bird.
1. First, we check whether DHCP is already installed, the command is as follows: RPM -QA |GREP DHCP2. If not installed, install with Yum (Local source Erection reference previous), command as follows: Yum install dhcp 3. Install DHCP, set/etc/dhcp/dhcpd.conf, command as follows:vim /etc/dhcp/dhcpd.conf ddns-update-style none; Do not update ddns ignore client-updates; Ignore terminal DNS updates default-lease-time 259200; Default Lease Time max-lease-time 518400; Maximum lease time option routers 192.168.1.254; Default Gateway, Please pay attention to this address. option domain-name am.centos; freely write the domain name optons domain-name-servers 192.168.1.1 dns Address subnet 192.168.1.0 netmask 255.255.255.0{ range 192.168.1.100 192.168.1.200 } after the above settings are complete, a simple DHCP is set up, below we start. 4. Start DHCP. before we start DHCP, we notice that we first change the address of our CentOS eth0 or eth1 command as follows: ifconfig eth0 192.168.1.254 255.255.255.0 Please note this address. then start with the command as follows: service dhcpd start 5. Check if the service starts OK, the command is as follows: Service dhcpd status netstat -tnlup |grep dhcp 6. View the startup log under the following command: cat /var/log/messages |grep dhcp 7. End.
This article is from the "Gome Learning" blog, so be sure to keep this source http://goome.blog.51cto.com/4045241/1719362
centos6.4 erecting DHCP