Detailed configuration of Dhcp servers in CentOS

Source: Internet
Author: User

Detailed configuration of Dhcp servers in CentOS

1. Install dhcp

Yum install dhcp. x86_64


Ii. Modify the dhcp master configuration file

Vim/etc/dhcp/dhcpd. conf


Dns-update-style interim; # indicates the dynamic information update mode of the dhcp server and dns server. This line must have a dhcp server before it can be started.

Ignore client-updates; # ignore client updates

Subnet 192.168.1.0 netmask 255.255.255.0 {# indicates that the IP address I allocated is in the CIDR block of 192.168.1.0 and the subnet mask of 255.255.255.0.

Option routers 192.168.1.1; # The Gateway assigned to the client is 192.168.1.1

Option nis-domain ning.com; # assign the nis domain to the client

Option domain-name ning.com; # domain name for the client

Option subnet-mask subnet mask 255.255.0; # assign the subnet mask of the IP address

Option ntp-servers 192.168.1.22; # Send it to the ntp server of the Client

Option netbios-name-servers 192.168.1.22; # server address

Option domain-name-servers 192.168.1.21; # default domain name Service IP Address

Option time-offset-18000; # time offset

Range dynamic-bootp 192.168.1.50 192.168.1.254; # assigned IP address range

Default-lease-time 21600; # default lease time

Max-lease-time 43200; # maximum lease time

Sometimes we need to configure a fixed IP address for a machine, and the following configuration options meet this requirement:

Host ning {
Hardware ethernet 52: 54: 00: fa: bb: 29;
Fixed-address 192.168.1.66;

}

}

Client: dhclint or ifdown eth0; ifup eth0;

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.