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