DHCP server setup RHEL6

Source: Internet
Author: User

DHCP server:

1. ip Address Resolution

2. assign an ip address to the client

Install the dhcp software package:

 

After installing the dhcp service package, the system cannot start by default.

 

3. The dhcp service configuration file does not exist. The cp template is required:

4. Almost all the configuration files of the dhcp service are annotated, so there are several valid lines:

 

Ddns-update-style interim;/* Dynamic dns update mode supported by dhcp */
Ignore client-updates;/* ignore client DNS dynamic updates */

Subnet 192.168.1.0 netmask 255.255.255.0 {/* scope CIDR Block */
Range 192.168.1.11 192.168.1.100;/* IP address segment range */
Option routers 192.168.1.1;/* gateway address */
Option subnet-mask limit 255.0;/* subnet mask */
Option domain-name "koumm.com";/* domain name */
Option domain-name-servers 192.168.1.1, 202.103.24.68;/* dns IP */
Option broadcast-address 192.168.16.255;/* broadcast address */
Default-lease-time 86400;/* rent period 1 day, seconds */
Max-lease-time 172800;/* maximum lease period of 2 days */
/* Bind the IP address of the pc1 host */
Host pc1 {
Hardware ethernet 00: a0: cc: cf: 9C: 14;/* Binding host MAC address */
Fixed-address 192.168.1.20;/* maximum lease period of 2 days */
}
Host pc2 {
Hardware ethernet 04: 20: c1: f8: 37: 11;
Fixed-address 192.168.1.30;
}

You can also use the dhcp service to update the DNS Service:

 

 

 

 

The client configuration is to change the ip address to dhcp for dynamic retrieval.

Delete/etc/dhcp/dhcpclient-eth0.conf files

Vim/etc/dhcp/dhcpclient. conf

 

There are no reference files for these lines of files, and only manual input is allowed.

 

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.