How to build a DHCP server under Linux

Source: Internet
Author: User
Tags file system linux

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%]

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.