For details, refer to "11"-"linux Enterprise Application"-"Linux server application. Today, let's talk about the configuration of the dhcp service.
1. Install the latest version at www.isc.org.
2. [root @ zy jishu] # tar zxvf dhcp-3.0.6.tar.gz decompress this file
3. [root @ zy jishu] # cd dhcp-3.0.6 to enter this directory
4. [root @ zy dhcp-3.0.6] #./configure Installation
[Root @ zy dhcp-3.0.6] # make
[Root @ zy dhcp-3.0.6] # make install
[Root @ zy dhcp-3.0.6] # man dhcp. conf view configuration help
5. the dhcp server must have one address that is allocated to the address pool that is not allocated. The default address is/var/state/dhcp/dhcpd. leases.
If you do not have them, you must create them by yourself.
[Root @ zy dhcp-3.0.6] # touch/var/state/dhcp/dhcpd. leases
6. [root @ zy dhcp-3.0.6] # vi/etc/dhcpd. conf edit the main configuration file, dhcpd. conf is not by default, you need to create your own
Ddns-update-style none; Dynamic dns operation method must be written
Default-lease-time 43200; default address Validity Period
Max-lease-time 432000; maximum service life
Subnet 192.168.1.0 netmask 255.255.255.0 {working network segment
Option routers 192.168.1.144; Gateway
Option subnet-mask limit 255.0; subnet mask
Option domain-name "zhaoyong.com"; domain name
Option domain-name-servers 192.168.1.144; dns server address
Range 192.168.1.155 address pool allocated by 192.168.1.254
Host mail {host mail
Hardware ethernet 12: 34: 56: 78: AD: CB; when the NIC mac address is
Fixed-address 192.168.1.122; the address assigned to it is
}
}
Wq
7. Start the server
[Root @ zy etc] #/usr/sbin/dhcpd or service dhcpd restart
If an error occurs, it is displayed on the desktop.
Make sure that no other dhcp service is running in the LAN.
The responsible person may not be able to run
If you want it to start up
[Root @ zy etc] # vi/etc/rc. local
/Usr/sbin/dhcpd write this sentence
8. Test now
For a linux client, we need the netconfig command to select Dynamic dhcp
Then restart the network service network restart.
The windows host is automatically obtained by changing it to the network neighbor.
Study hard and continue to work hard
This will be a bit of fun. I don't want to reply to this post. Haha, I want to count the number of demon people. Hey
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