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