In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
DHCP is an acronym for Dynamic Host Configuration Protocol (dynamic Host configuration Protocol), its predecessor is BOOTP. It is a TCP/IP protocol standard that simplifies host IP configuration management. The DHCP protocol standard provides an effective way for the use of DHCP servers, that is, to manage the dynamic allocation of IP addresses and other configuration information related to enabling DHCP clients on the network. Each computer on the TCP/IP network must have a unique computer name and IP address. The IP address (and the associated subnet mask) is used to identify the host computer and the subnet to which it is connected. When you move a computer to a different subnet, its IP address must be changed. DHCP allows administrators to dynamically assign IP addresses to clients from the IP address database of the DHCP server on the local network.
Four simple steps to get an address:
1. Dhcpdiscover: this is the first request message for the client to start DHCP, which is sent as a broadcast. Every host installed with TCP/IP protocol in the same broadcast domain will receive this broadcast packet, but only the dhcp server will respond.
2. Dhcpoffer: this is the response of server to the dhcpdiscover message. The packet contains information such as IP address, lease term and gateway.
3. Dhcprequst: this is the response of client to the dhcpoffer message, which is sent by broadcast. The packet contains the IP address it selected, and so on.
4. Dhcpack: the response of server to the dhcprequst message is an acknowledgement packet. Only after client receives this message can the IP address and relevant configuration information be obtained.
1.2.1. Mount the CD
[root@localhost ~] # mkdir / mnt/cdrom
[root@localhost ~] # mount / dev/cdrom / mnt/cdrom/
1.2.2. Install server components
[root@localhost Server] # rpm-ivh dhcp-3.0.5-21.el5.i386.rpm
1.2.3. Modify DHCP configuration file
[root@loaclhost Server] cp- p / usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample / etc/dhcpd.conf
/ / Tip: the DHCP server does not have a configuration file by default. You need to copy the sample from the / usr directory and then modify it.
[root@localhost ~] # vim / etc/dhcpd.conf
#
Ddns-update-style interim
Ignore client-updates
Shared-network user {
Subnet 192.168.2.0 netmask 255.255.255.0 {
Option routers 192.168.2.1;-default route
Option subnet-mask 255.255.255.0
Option domain-name "zzdx.com"
Option domain-name-servers 192.168.2.100
Range dynamic-bootp 192.168.2.1 192.168.2.253
Default-lease-time 21600;-default lease
Max-lease-time 43200;-maximum lease
Host ns {
Next-server marvin.redhat.com
Hardware ethernet 00VOCVERV 29RU 1DRO 88RH 6F;-client MAC
Fixed-address 192.168.2.100 Matsumi-give a fixed IP address
}
}
Subnet 192.168.3.0 netmask 255.255.255.0 {
Option routers 192.168.3.1
Option subnet-mask 255.255.255.0
Option domain-name "abc.com"
Option domain-name-servers 192.168.2.100
Range dynamic-bootp 192.168.3.1 192.168.3.253
Default-lease-time 21600
Max-lease-time 43200
}
1.2.4. Set the boot to start the dhcp service automatically
[root@localhost ~] # chkconfig dhcpd on
[root@localhost ~] # service dhcpd start
1.3.1 Verification of the result of automatic address acquisition by network card in Windows system
1.3.2 Verification of automatic address acquisition in Linux system
Modify the configuration file / etc/sysconfig/network-scripts/ifcfg-eth0 to obtain the IP address automatically
View the contents of the / etc/resolv.conf file as follows:
Search zzdx.com
Nameserver 192.168.2.10
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.