1. install and configure dhcp [root @ localhost ~] # Yum-yinstalldhcp [root @ localhost ~] # Cd/usr/share/doc/dhcp-4.1.1/[root@localhostdhcp-4.1.1] # cp-radhcpd.conf.sampl/etc/dhcp/dhcpd. conf [roo
1. install and configure dhcp
[Root @ localhost ~] # Yum-y install dhcp
[Root @ localhost ~] # Cd/usr/share/doc/dhcp-4.1.1/
[Root @ localhost dhcp-4.1.1] # cp-ra dhcpd. conf. sampl/etc/dhcp/dhcpd. conf
[Root @ localhost ~] # Vim/etc/dhcp/dhcpd. conf
Option domain-name "wxw.com"; DNS server domain name
Option domain-name-servers 192.168.1.24; IP address of the DNS server
Default-lease-time 360000; default lease time
Max-lease-time 720000; max lease time
Ddns-update-style none;
Log-facility local7;
# Address pool configuration
Subnet 192.168.1.0 netmask 255.255.255.0 {allocated network segment 192.168.1.0/24
Range 192.168.1.100 192.168.1.230; allocated IP address range;
Option routers 192.168.1.1; gateway ip address;
Option broadcast-address 192.168.1.255; broadcast address;
}
# Assign an ip address to a host
Host boss {boss is the host name;
Hardware ethernet 00: 0C: 29: 6C: A6: F8; mac address of the host Nic;
Fixed-address 192.168.1.10; ip address assigned to it;
}
2. start the dhcpd server
[Root @ localhost ~] #/Etc/init. d/dhcpd restart
Disable dhcpd: [OK]
Starting dhcpd: [OK]
3. view the port listening status
[Root @ localhost ~] # Netstat-ltunp | grep dhcpd
Udp 0 0 0.0.0.0: 67 0.0.0.0: * 5346/dhcpd