Linux-DHCP host settings

Source: Internet
Author: User
Linux-DHCP host settings-Linux Enterprise Application-Linux server application information. For details, refer to the following section. 1. Verify that the DHCP suite has been installed

Rpm-qa | grep dhcp

2. DHCP suite Structure

/Etc/dhcpd. conf: This is the main configuration file of dhcp! This file may not exist. Please create it manually!

/Usr/sbin/dhcpd: DHCP daemon file!

/Var/lib/dhcp/dhcpd. leases: the start and expiration dates of the lease are recorded in this file!

3. Host settings

[Root @ test root] # vi/etc/dhcpd. conf

# Set the lease term

Default-lease-time 295200; # minimum lease period, in seconds

Max-lease-time 518400; # The lease can be renewed after the lease time expires. However, the maximum time is 518400 seconds!

# Set domain name and DNS

Option domain-name "chen.org"; # Set the domain name for each host

Option domain-name-server 58.22.96.66, 218.104.128.106; # Set DNS

# Setting Dynamic IP addresses

Subnet 192.168.0.0 netmask 255.255.255.0

{

Range 192.168.0.5 192.168.0.105; # Set the IP range

Option broadcast-address 192.168.0.255; # Set broadcast

Option routers 192.168.0.1; # Set the Route IP Address

}

# Set static IP addresses

Host fengxzhz

{

Hardware ethernet 00-00-00-00-00-00; # Set the MAC address

Fixed-address 192.168.0.200; # set a fixed IP address

Option broadcast-addredd 192.168.0.255;

Option routers 192.168.0.1;

}
Related Article

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.