DHCP server configuration in RHEL5.7

Source: Internet
Author: User
The DHCP server is set up in linux. In fact, setting up a DHCP server in linux is very simple, not complicated at all. In windows, just a few mouse clicks, while in linux, a few digits are changed. Next let's take a look at the detailed configuration of DHCP in linux! 1. Install the DHCP software package because the software package is included in the installation CD, so we must first load the CD and quickly mount the CDmount to study the DHCP server setup in the linux environment. In fact, setting up a DHCP server in linux is very simple, not complicated at all. In windows, just a few mouse clicks, while in linux, a few digits are changed. Next let's take a look at the detailed configuration of DHCP in linux! 1. Install the DHCP Software Package   Because the software package is attached to the installation disc, we must first load the disc   Fast CD mounting Mount/dev/cdrom Cd/media/cdrom

 

  Mount a DVD Mkdir/mnt/dvdrom Mount-o loop-t iso9660/dev/cdrom/mnt/dvdrom Cd/mnt/dvdrom   Enable/disable a single Nic Ifup eth0 Ifdown eth0   Check whether the software package is installed Rpm-q dhcp   View the software package that comes with the System Rpm-qa | grep dhcp   Go to the Server folder of the installation disc to install the dhcp rpm package: Rpm-ivh dhcp-3.0.5-29.e15.i386.rpm   After the installation is complete, view all files installed by the software package. Rpm-ql dhcp

Copy the dhcpd. conf. sample file to the/etc directory. This is a DHCP configuration template file.   Cp/usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample/etc/dhcpd. conf   2. Configure dhcpd. conf   Edit this file and modify the network segment, gateway, DNS, and address pool for DHCP allocation.   Vi/etc/dhcpd. conf  

View DHCP service status Service dhcpd status   Enable DHCP service Service dhcpd start   Use a windows terminal to test and obtain the address.  

 

View DHCP lease Cat/var/lib/dhcpd. leases  

 

3. configure a DHCP retained address   Edit dhcpd. conf   Vi/etc/dhcpd. conf

Bind the MAC address and IP address, save and quit, and restart the DHCP service. Service dhcpd restart   Obtain the address again on the windows terminal.

We can find that the address is fixed to 192.168.10.100. Okay, these are the basic DHCP server configurations. If you have any questions, you can discuss them together!

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.