linux setup dhcp server

DHCP server configuration method under linux system

1, install dhcp server software

Rhel4 system CD-ROM contains dhcp server software package in rpm format, package name is dhcp-3.0.1-12_EL.i386.rpm

#rpm- ivhdhcp-3.0.1-12_EL.i386.rpm

2. dhcpd.conf Configuration File Analysis (1) dhcpd.conf Configuration File dhcpd’s configuration file is called dhcpd.conf, and should be located in the “/etc” subdirectory, but the file is not included in the dhcp package, you need to create it manually, but in order to make it easier for people to use, it provides a sample configuration file dhcpd.conf.sample located in the “/usr/share/doc/dhcp-3.0.1/” directory (2) To create a configuration file for administrators to manage the dhcp server, you first need to create a dhcpd.conf, you can usually copy the sample file dhcpd.conf.sample to the “/etc” directory as the dhcpd.conf, and then use a vi editor to configure the file. Modify


(3) Basic Format of Configuration Files The dhcp.conf configuration file can contain declarations, parameters, and options in a dhcp.conf configuration file. Declarations are used to describe the division of the network layout in the dhcpd server, and are the logical scope of the network settings

Subnet192.168.1.0netmask255.255.255.0{ ranga192.168.1.2; … …..}

Parameters consist of a set item and a set value, and depending on where the parameter is located, the setting of the parameter can act on global or formulated declarations. Parameters are always terminated with a “;”.

default-lease-time21600; max-lease-time 43200;

Options are always guided by the option keyword, followed by the specific option and the value of the option’s setting. Options can act globally or in a declaration depending on where they are located. Options are also terminated with a “;”.

optionrouters192.168.1.1; optionsubnet-mask255.255.255.0;

3. Multiple network interfaces are required to use the configuration file used as a dhcp server hosts usually have more than one network interface, and the dhcpp service may need to provide services on only one of these network interface to provide services, you can specify in the “/etc/sysconfig/dhcpd” file need to provide dhcp services network interface.


The default DHCPDARGS setting in the dhcpd file is null, and it can be changed to the name of the specified network interface, such as etch0, so that dhcpd will provide services only on the eth0 network interface. eth0 network interface to provide dhcpfuw


4. Starting and stopping the dhcpd service The startup script for the dhcpd service is located in the “/etc/init.d/” directory under the name dhcpd. The functions of starting, stopping and restarting the dhcpd service are all realized by this script. Starting the dhcpd service servicedhcpdrestart

How to configure dhcp relay in linux, specific commands?

1, ready to PE maintenance USB flash drive, image president software (network can be searched for download). First use the install command to install the DHCP server package dhcp3-server, after the installation is complete, edit /etc/default/isc-dhcp-server use the INTERFACES option to define the interface used by DHCPD to respond to DHCP requests.

2, this question includes linuxdhcp in addition to relay most of the functions, I first one by one to help you explain, and finally give the configuration file.

3, to install the DHCP server service, please perform the following steps: Run the “Control Panel” and select “Network”. Select Add Software. In the Add Network Software dialog box, select TCP/IP Protocol and Related Components, and then select Continue.

4, DHCP is a common network protocol in the LAN, we can realize the DHCP relay to realize the DHCP service across the network. Here is my carefully organized for you on how to configure Cisco DHCP relay, I hope to help you.