In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "DHCP server configuration method under linux system", the explanation content in the article is simple and clear, easy to learn and understand, please follow the idea of Xiaobian slowly in-depth, together to study and learn "DHCP server configuration method under linux system"!
1. Install dhcp server software
The Rhel4 system CD contains the dhcp server package in rpm format, package name dhcp-3.0.1-12_EL.i386.rpm
#rpm –ivh dhcp-3.0.1-12_EL.I386.rpm
2. Analysis of dhcpd.conf configuration file (1) dhcpd.conf configuration file dhcpd configuration file name is dhcpd.conf, should be located in the "/etc" subdirectory, but this file is not included in the dhcp package, need to be manually created, but in order to facilitate people to use, it provides a configuration sample file dhcpd.conf sample located in the "/usr/share/doc/dhcp-3.0.1/" directory (2) Create a configuration file administrator to manage dhcp server, dhcpd.conf needs to be created first, usually by copying the sample file dhcpd.conf.sample into the "/etc" directory as dhcpd.conf, and then using vi editor to modify the configuration file
#cp /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf#vi /etc/dhcpd.conf
(3) Basic format of configuration file In dhcp.conf configuration file, there are three basic formats: declaration, parameter and option. Declarations are used to describe the division of network layout in dhcpd servers and are logical ranges of network settings
Subnet 192.168.1.0 netmask 255.255.255.0 { ranga 192.168.1.2 192.168.1.128 ;……..}
Parameters are composed of setting items and setting values. Depending on where the parameters are located, parameter settings can be applied to global or specific declarations. Parameters always end with ";".
default-lease-time 21600;max-lease-time 43200;
Options are always guided by the option keyword, followed by specific options and their settings. Options can be applied globally or within a declaration, depending on where they are located. Options also end with ";".
option routers 192.168.1.1;option subnet-mask 255.255.255.0;
3. Multiple network interfaces are required to use configuration files. Hosts used as dhcp servers usually have multiple network interfaces, and dhcpp services may only need to provide services on one of the network interfaces. In this case, you can specify the network interface that needs to provide dhcp services in the "/etc/sysconfig/dhcpd" file.
#cat /etc/sysconfig/dhcpd#Command line options hereDHCPDARGS=
The default DHCPDARGS setting item in dhcpd file is empty, which can be modified to the specified network interface name, such as etch0, so dhcpd will only provide dhcpfuw on eth0 network interface.
DHCPDARGD=eth0
4. Start and stop of dhcpd service The startup script of dhcpd service is located in "/etc/init.d/" directory and named dhcpd. The functions of starting, stopping and restarting dhcpd service are implemented by this script. Start dhcpd service
service dhcpd restart Thank you for reading, the above is the "DHCP server configuration method under linux system" content, after learning this article, I believe we have a deeper understanding of the DHCP server configuration method under linux system, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.