DHCP server setup under CentOS 6.5

Source: Internet
Author: User

The previous article wrote about using CentOS as a router, and now I want the other VMS under ESXi to get the IP address of the route assignment by DHCP, then we need to build the DHCP service on the router machine:

Second, install DHCP
1. Yum install-y DHCP

Cd/usr/share/doc/dhcp-4.1.1/

Cp-ra dhcpd.conf.sample/etc/dhcp/dhcpd.conf
Vim/etc/dhcp/dhcpd.conf

Subnet 192.168.1.0 netmask 255.255.255.0 {range 192.168.1.100 192.168.1.200;  Option routers 192.168.1.1;  Option broadcast-address 192.168.1.255; Option Domain-name-servers 202.106.0.20,8.8.8.8;}

2. Start DHCP:

/ETC/INIT.D/DHCPD start

Log error: Can ' t chown new lease File:operation not permitted

Workaround: Modify the VIM/ETC/RC.D/INIT.D/DHCPD file

Modify these two parameters to:

User=root

Group=root

3. Start DHCP again:

/ETC/INIT.D/DHCPD start
Starting dhcpd: [OK]


4. Client testing:

Create a virtual machine under ESXi, the NIC is set to the same virtual network card mode as the DHCP server eth1: Get address mode is DHCP

This article is from the "david0512" blog, make sure to keep this source http://gjr0512.blog.51cto.com/6518687/1767924

DHCP server setup under CentOS 6.5

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.