To configure the DHCP server using DHCP in RHEL5.4, follow these steps: 1. install DHCP Server software check whether dhcprpm-qdhcpmount/dev/cdrom/mediarpm-ivh/media/Server/dhcp-3.0.5-21.el5.i386.rpm2, modify the DHCP master configuration file is: /etc/dhcpd. to configure the DHCP server using DHCP in RHEL5.4, follow these steps:
1. install DHCP server software
Check whether dhcp is installed
Rpm-q dhcp
Mount/dev/cdrom/media
Rpm-ivh/media/Server/dhcp-3.0.5-21.el5.i386.rpm
2. modify the DHCP master configuration file
The main configuration file is/etc/dhcpd. conf.
Configuration parameters can be generated through the DHCP template configuration file
Cat/usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample>/etc/dhcpd. conf
Range dynamic-bootp 192.168.100.100 192.168.100.200;
Default-lease-time 21600;
Max-lease-time 43200;
}
4. start the DHCPd service
Service dhcpd start
Check whether the service port is on: netstat-anpu | grep dhcpd
5. configure the DHCP client
-- Windows client configuration
-- Linux client configuration, you can use the dhclient command
6. view the lease file on the DHCP server
Cat/var/lib/dhcpd. leases
############################ Split line, basic DHCP configuration complete #########################
7. configure the DHCP server to retain the host
Modify the main configuration file:
Ddns-update-style interim;
Ignore client-updates;
Range dynamic-bootp 192.168.100.100 192.168.100.200;
Default-lease-time 21600;
Max-lease-time 43200;
Host linux01 {
Hardware ethernet 00: 0c: 29: fc: 68: 14;
Fixed-address 192.168.100.188;
}
}
The host declaration is used here for configuration!
8. release the IP address on the client and obtain it again.
-- Windows client configuration
Ipconfig/release
Ipconfig/renew
-- Linux client configuration
Ifdown eth0
Ifup eth0
Default-lease-time 21600;
Max-lease-time 43200;
}
If there are other scopes, use the subnet declaration to create them! The method is similar!
10. DHCP relay proxy configuration is required for implementation and testing of multiple DHCP scopes
(Network environment required to complete the DHCP relay proxy experiment)
11. assume that the IP address of the DHCP relay proxy server is 172.16.1.2.
12. enable route forwarding
There are two ways to enable the linux kernel route forwarding function
# Method 1:
Vi/etc/sysctl. conf
Net. ipv4.ip _ forward = 1
Run the sysctl-p command.
# Method 2:
Echo 1>/proc/sys/net/ipv4/ip_forward
(Either of the two methods can be implemented)
13. install the dhcp software package on the relay proxy server because the software program for configuring the DHCP relay proxy is in this package.
(Install DHCP software package omitted)
16. start the dhcrelay relay service
Service dhcrelay start
Set dhcrelay to automatically start the relay service at runtime level 35
Chkconfig -- level 35 dhcrelay on
17. test the function of obtaining an IP address on the client!
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.