Linux DHCP service

Source: Internet
Author: User

1 DHCP service

controlled by the server for a period IP address range, the IP address and subnet mask assigned by the server can be automatically obtained when the client logs on to the server .

/etc/dhcpd.conf master configuration file

Ddns-update-styleinterim; /*DHCP supported DNS Dynamic Update method */
Ignore client-updates; /* Ignore client DNS Dynamic Update */

Option Domain-name "benet.com"; /* Domain name */
Option Domain-name-servers 192.168.1.1,202.103.24.68; /*dns ip*/
Option Broadcast-address 192.168.1.255;/* broadcast address */
default-lease-time86400; /* Rental period 1 days, number of seconds */
max-lease-time172800; /* Maximum rental period 2 days */

Subnet 192.168.1.0 netmask 255.255.255.0 {/*Scope Network Segment*/
Range 192.168.1.11 192.168.1.100; /*ipAddress segment Range*/
Option routers192.168.1.1; /*Gateway address*/
Option Subnet-mask 255.255.255.0; /*Subnet Mask*/

/*bindingPc1HostIpaddress configuration*/
Host pc1{
Hardware Ethernet 00:a0:cc:cf:9c:14; /*Binding MachineMacAddress*/
fixed-address192.168.1.20; /*Maximum rental period2days*/
}

}

/var/lib/dhcpd/dhcp.leases Server Lease file

Server DHCPD Start

DHCP relay

/etc/sysconfig/dhcrelay master configuration file

# Command Line Optionshere
interfaces= "Eth1 eth2"
Dhcpservers= "192.168.1.1"

Vim/etc/sysct1.conf

Net.ipv4.ip_forward=1

Sysct1-p


This article is from a "little progress every Day" blog, make sure to keep this source http://2589903.blog.51cto.com/2579903/1569753

Linux DHCP service

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.