Build DHCP server under Linux

Source: Internet
Author: User

I. DHCP-REQUIRED Packages

Dhcp-common-4.1.1-34.pl.el6.centos.x8664dhcp-4.1.1-34.pl.el6.centon.x8664

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 defines the supported DNS dynamic update type (required), generally we set to off, 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 7, option Domain-name-servers DNS server IP8, 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 statement, used to do the address and Mac bindings, hardware Ethernet for the hardware type of Ethernet 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, or configuration error, unable to start the service, the specific format is:

Shared-network the name of the superscope {global parameters, which take effect for all scopes, can write information such as DNS address, lease time, and so on, each line is finished with ";" End (first scope): Subnet network number netmask The subnet mask {scope parameter setting, Look at the individual situation to set up, each line finished with ";" End} (second scope): Subnet network number netmask subnet mask {Scope parameter settings, see the individual situation to set, each line finished with ";" End}} The format of writing 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.