Experimental environment: The company requires a Linux host that is idle to be configured as a DHCP server, so that the local Area network staff office to automatically assign IP address, improve network management and maintenance efficiency.
Requirements Description: The DHCP server host name is: dhcp.benet.com IP address set to 192.168.80.87/24
Used to automatically assign IP address ranges to hosts in a local area network: 192.168.8.100-192.168.8.200
The default gateway is 192.168.80.1.
The DNS used is 2.2.2.2.
Boss Reserved Address 192.168.80.188
First give the server an IP address
Modify Host Name
Vi/etc/sysconfig/network Modify configuration file
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/
Vi/etc/hosts
Hostname dhcp.benet.com, and then you reboot.
Then install the DHCP service
root@dhcp~]# df-th
File system type capacity used available with percent mount point
/dev/sda2 ext4 9.7G 2.5G 6.7G 27%/
Tmpfs tmpfs 504M 420K 503M 1%/DEV/SHM
/DEV/SDA1 ext4 4.9G 158M 4.5G 4%/boot
/dev/sda3 ext4 2.0G 35M 1.8G 2%/opt
/dev/sr0 iso9660 2.9G 2.9G 0 100%/media/rhel_6.1 i386 Disc 1 mounted discs
[root@dhcp~]# mount/dev/sr0/mnt
Mount:block Device/dev/sr0 is write-protected, mounting read-only
[Root@dhcp ~]# rpm-ivh/mnt/packages/dhcp-4.1.1-19.p1.el6.i686.rpm installation is OK.
Warning:/mnt/packages/dhcp-4.1.1-19.p1.el6.i686.rpm:header V3 rsa/sha256 Signature, key ID Fd431d51:nokey
Preparing ... ########################################### [100%]
1:dhcp ########################################### [100%]