DHCP service configuration for Linux

Source: Internet
Author: User

1. First, we need to install the package required for the service:

#yum-y Install DHCP

2. Create/Modify configuration file:

#vim/etc/dhcp/dhcpd.conf


Default-lease-time 7200;

Max-lease-time 14400;

Subnet 192.168.4.0 netmask 255.255.255.0 {

Option routers 192.168.4.1;

Option Domain-name "Xxxxx.xxxx";

Option Domain-name-servers 202.106.0.20,8.8.8.8;

Range 192.168.4.28 192.168.4.54;

}



# Service DHCPD Restart

#chkconfig DHCPD on

# Netstat-anptu | grep DHCP


3. Keep the fixed IP address:

#vim/etc/dhcp/dhcpd.conf


Host pc205 {

Hardware Ethernet MAC address;

Fixed-address IP address;

}


#service dhcpd Restart

DHCP service configuration for Linux

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.