requirements, 1 , DHCP of the IP192.168.1.252
2 , Distribution 192.168.1.10-200 of the IP address,
3 , A Host, fixed IP
A 00:0c:29:a8:43:f0 192.168.1.100
Steps:
First, installation DHCP Service
RPM-IVH dhcp-3 (tab)
Second, the configuration file
1 , configure the native IP Address
Vim/etc/sysconfig/network-scripts/ifcfg-eth0 Permanent Configuration
Device=eth0
Bootproto=static
ipaddr=192.168.1.252
netmask=255.255.255.0
gatemay=192.168.1.1
Hwaddr=00:0c:29:a8:43:f0
Onboot=yes
ifconfig eth0 192.168.1.252/24 Temporary configuration (invalid restart)
1 , Configuration DHCP
vim/etc/dhcpd.conf DHCP Master configuration file
Ddns-update-style Interim;
Ignore client-updates;
Subnet 192.168.1.0 netmask 255.255.255.0 { network segment
option routers 192.168.1.1; Gateway
option Subnet-mask 255.255.255.0; Mask
Optionnis-domain "domain.org";
option Domain-name "tarena.com"; Domain name
Option Domain-name-servers 202.160.0.20; Dns
Option time-offset-18000; # Eastern Standard Time
range DYNAMIC-BOOTP 192.168.1.20 192.168.1.200; Address Pool
default-lease-time 21600; Default Lease Period
max-lease-time 43200; Maximum lease period
# We want the nameserver to appear at a fixed address
Host NS {
Next-server marvin.redhat.com;
Hardwareethernet 12:34:56:78:AB:CD;
Fixed-address 207.175.42.254;
}
}
Host Post {
Next-server marvin.redhat.com;
hardware Ethernet 00:0c:29:a8:43:f0; // Specify MAC address, assigning it the following IP
Fixed-address 192.168.1.100;
}
Service DHCPD Restart Restart Service
CHKCONFIGDHCPD on Power-on self-booting
Service Dhcpdconfigtest Troubleshooting (failed record)
Third, client authentication
Linux :
Vim/etc/sysconfig/network-scripts/ifcfg-eth0 Permanent Configuration
Device=eth0
Bootproto=dhcp
# dhclient-d Eth0 Temporary Access
# dhclient-r Eth0 Release
Ifconfig eth0 View IP
Windows :
Cmd>ipconfig/release Release IP
cmd>ipconfig/renew re-fetch
Cmd>ipconfig View IP
Preparation:
/etc/sysconfig/network-scripts/ifcfg-eth0 NIC Configuration
cat/etc/sysconfig/network Computer name
cat/etc/hosts Local DNS Record
cat/etc/resolv.conf DNS configuration file
Service Network Restart Restart Network Service