Build DHCP server under Linux

Source: Internet
Author: User

I. DHCP-REQUIRED Packages
Dhcp-common-4.1.1-34.pl.el6.centos.x86_64
Dhcp-4.1.1-34.pl.el6.centon.x86_64
Two. Edit the master configuration file

vi/etc/dhcp/dhcpd.confddns-update-style interim;ignore client-updates;shared-network ifs {        option domain-name      "ifs.com";        option domain-name-servers 192.168.0.1;        default-lease-time 21600;       max-lease-time  43200;subnet 192.168.0.0 netmask 255.255.0.0 {        option routers                192.168.0.1;       option subnet-mask            255.255.0.0;       option  time-offset           -18000;        range dynamic-bootp 192.168.0.10 192.168.0.15;}} 

1, Ddns-update-style type definition supported DNS dynamic update type (required), generally we set to off
closed, interim and none are closed meaning,
2, subnet network number netmask subnet mask This is used to indicate the scope of
3, option routers Gateway
4, Option subnet-mask Subnet mask
5, Option Nis-domain NIS, if not commented out
6, option Domain-name Domain name
7, option domain-name-servers DNS server IP
8, range DYNAMIC-BOOTP IP address ranges
9, Default-lease-time 21600; Address lease Time
10, max-lease-time 43200, lease maximum time
11, host NS {
next-servermarvin.redhat.com;
Hardware Ethernet 12:34:56:78:AB:CD;
Fixed-address 207.175.42.254;
} This is a special declaration, used to do the address and Mac binding, hardware Ethernet for the hardware type Ethernet
Network and then write the MAC address, fixed-address is to bind to the above Mac IP address.

Note: After each line of the parameters must have ";" to end, otherwise is the configuration error, unable to start the service, with the
Body format is:

Shared-network The name of the superscope {
Global parameters, for all scopes to take effect, You can write the
DNS address, the lease time, and so on, each line is finished with ";" End
(first scope): Subnet network number netmask subnet mask {
Scope parameter settings, see the individual situation to set, each line finished with ";" End
}
(second scope): Subnet network number netmask subnet mask {
The parameter settings of the scope, see the individual situation to set, each line finished with ";" End
}
}
The format is like this, the wording is more flexible.
Three. Start the DHCP service

Service DHCPD Start

Four. DHCP Log debug

Tail-20/var/log/messages


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.