Configuring DHCP Server under Linux

xiaoxiao2021-03-05  31

RedHat provides DHCP services using the DHCPD process, and the DHCPD is automatically read when the DHCPD is automatically read. DHCPD Saves the customer's lease information in the /var/lib/dhcp/dhcpd.Leases file, which is constantly updated, and you can find the IP address assignment from this. DHCPD In order to provide services to a subnet, DHCPD needs to know the network address and network mask of the subnet, and also know the range of address assignments, and give a simple DHCPD.conf file below.

Subnet 192.168.100.0 Netmask 255.255.255.0 {Range 192.168.100.10 192.168.100.253;} DHCPD will assign the 192.168.100.0 to 192.168.100.10 to 192.168.100.253. Rental time can be from 0 seconds to infinity, and can be scheduled as needed. The default rental period is one day, ie 86400 seconds. Two lease lengths can be defined for the host: default-lese-time default rental time; max-lese-time users can get the maximum tenure time. The following configuration sets the default tenation time to 10 minutes, the maximum rental time is 1 hour: Subnet 192.168.100.0 Netmask 255.255.255.0 {Range 192.168.100.10 192.168.100.253; default-lease-time 600; max-leasee -time 3600;} DHCP can also provide more parameters to customers, which can be specified by option, for example: Subnet 192.168.100.0 Netmask 255.255.255.0 {Range 192.168.100.10 192.168.100.253; Default-Lease-Time 600; Max-Lease-Time 3600; Option Subnet-Mask 255.255.255.0; Option Routers 192.168.100.254; Default Route Option Domain-Name-Servers 202.102.134.68; DNS Server}

转载请注明原文地址:https://www.9cbs.com/read-33421.html

New Post(0)