How to stop and start DHCP service

  
                  

Here we are the first to introduce the content of the suspension and start of the DHCP service. In order to simplify the maintenance of future IP address resources, we need to set up a DHCP server to automatically complete the task of maintaining the IP address allocation of the internal LAN computers. The Dynamic Host Configuration Protocol (DHCP) enables network maintainers to centrally maintain a network system and perform automatic assignment of IP addresses in the network. About the configuration of the DHCP server under the more common Windows system, there have been quite a few introductions in the previous newspapers. This article will first discuss how to install and configure a Linux server on a Linux server. For information about DHCP, please refer to its official address is http//www. Isc. Org/index. Pl? /sw/dhcp/. In addition, it is necessary to indicate that the system used in this article is the default Redhat Linux 9.0 system.

Installation

The default Redhat 9.0 system is only required to be a DHCP client. There is no server and you need to download and install it.

[root@rh9 test]# rpm -qa grep dhc//Displays the software name of the previously installed software that contains the dhc string. Dhcp-3.0pl1-23 dhclient-3.0pl1-23 dhcp-devel-3.0pl1-23 [root@rh9 test]#

Confirm that the installation is complete.

Suppose you want to install in the original code, please download the DHCP package

tar vxzf dhcp-3.X.tar.gz cd dhcp-3.X ./configure make make install Cp ./server/dhcpd.conf /etc touch /var/state/dhcp/dhcpd.leases

Then edit the configuration file dhcpd.conf and execute the configuration

1. The primary file

The default DHCP installation does not have the /etc/dhcpd.conf file.

[root@rh9 test]# rpm -ql dhcp /etc/rc.d/init.d/dhcpd /etc/rc.d/init.d/dhcrelay /etc/sysconfig/dhcpd /etc/Sysconfig/dhcrelay /usr/bin/omshell /usr/sbin/dhcpd /usr/sbin/dhcrelay /usr/share/doc/dhcp-3.0pl1 /usr/share/doc/dhcp-3.0pl1/CHANGES /usr/share/Doc/dhcp-3.0pl1/README /usr/share/doc/dhcp-3.0pl1/RELNOTES /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample /usr/share/man/man1/omshell.1 .gz /usr/share/man/man5/dhcp-eval.5.gz /usr/share/man/man5/dhcpd.conf.5.gz /usr/share/man/man5/dhcpd.leases.5.gz /usr/share/man/man8/dhcpd.8.gz /usr/share/man/man8/dhcrelay.8.gz /var/lib/dhcp /var/lib/dhcp/dhcpd.leases

Careful readers will find that in the above example, the dhcp package gives an example: /usr/

share/doc/dhcp-2.0pl5/dhcpd.conf.sample, this file needs to be copied by hand. . The command is as follows: [root@rh9 test]# cp /usr/share/doc/

dhcp-3.0pl1/dhcpd.conf.sample etc/dhcpd.conf. So we have the most original dhcpd configuration file. Dhcpd keeps the customer's lease information in the /var/lib/dhcp/dhcpd.leases file, which is updated from time to time, from which the IP address allocation can be found.

2. Suspending and starting the DHCP service

In Redhat 9.0, the command to start/stop the DHCP service is as follows

/etc/rc.d/init.d/dhcpd start


/etc/rc.d/init.d/dhcpd stop

(Multiple NICs, suppose you want to start dhcpd on eth1 equipment, then #/usr/sbin/dhcpd eth1) .

Suspending and starting the DHCP service summary

After the above steps are resolved, we have completed the DHCP server installation task. In the next issue, we will give you a detailed introduction to how to configure the DHCP server to make it more suitable for the unique needs of different office environments.

Copyright © Windows knowledge All Rights Reserved