In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the introduction of DHCP service and the detailed configuration process of dhcp relay service". The explanation in this article is simple and clear and easy to learn and understand. please follow the editor's train of thought to study and learn "the introduction of DHCP service and the detailed configuration process of dhcp relay service".
Introduction and configuration details of DHCP service
1. Brief introduction of DHCP service
DHCP (Dynamic Host Configuration Protocol, dynamic Host configuration Protocol) is a network protocol of a local area network. It works with UDP protocol and has two main uses: automatically assigning IP addresses to internal networks or network service providers, and giving users or internal network administrators as a means of central management of all computers.
2. The role of DHCP service
(1) automatically assign addresses to a large number of clients and provide centralized management
(2) reduce management and maintenance costs and improve network configuration efficiency
3. Address information master that can be assigned by DHCP service
(1) IP address and subnet mask of the Nic
(2) corresponding network address and broadcast address
(3) default gateway address
(4) DNS server address
(5) Boot file, TFTP server address
4. The principle of DHCP
(1) the client is looking for a device for IP request
(2) address information provided by the server
(3) accept and broadcast (client selects IP)
(4) the server confirms the lease (DHCPACK)
(if the DHCP client cannot find the DHCP server, it will select an IP from the class B network segment 169.254.0.0 and 16 of the TCP/IP as its IP address and continue to try to communicate with the DHCP server every 5 minutes.)
Renewal of 5.DHCP client:
DHCP customers send DHCPREQUEST message packets directly to the DHCP server that provides them with an IP address at the end of the 50% lease. If the client receives the DHCPPACK message packet responded by the server, the client updates its configuration according to the new lease period and other updated TCP/IP parameters provided in the package, and the IP lease update is completed. If no reply is received from the server, the client continues to use the existing ip address because there is still 50% left in the current lease.
If it is not updated during the past 50% of the lease, the DHCP client contacts the DHCP server that provided it with the IP address again during the past 87.5% of the lease. If it is not successful, the DHCP client must give up the IP address and reapply at 100% of the lease. If no DHCP server is available at this time, the DHCP client will use a random address in 169.254.0.0swap 16 and try again every 5 minutes.
6. Configuration files related to DHCP
Main configuration file: / etc/dhcp/dhcpd.conf
Template file: / usr/share/doc/dhcp-4.2.5.example
View the lease file: / var/lib/dhcpd/dhcpd.lease
Troubleshooting logs for many web services: / var/log/messages
Dhcp Service Relay configuration
Experimental environment
Host corresponds to vlan10
Host2 corresponds to vlan20
Host3 corresponds to vlan100
Server address 192.168.100.100
1. Open GNS3 and prepare 2 router devices and 3 user devices
A routing device is changed to a switch, named sw1
A routing device is changed to layer 3 switching, named sw2
One of the users was changed to a server.
two。 Create the vlan10 vlan20 vlan100 in sw1, and divide the f1Accord into the vlan
3. Turn off sw1 routing
4. Set the f1ap4 interface to trunk
5. Enter the sw2, create the vlan10,20100, set f1ap4 to trunk, and set the gateway address and subnet mask to the vlan10,20100.
6. Set up Relay
7. Open the virtual machine centos7 and install the dhcp service with yum install dhcp-y
8. Connect the network card to vmnet8, set it to host-only mode, and turn off dhcp's automatic access to ip.
9. Set static ip 192.168.100.100
10. Restart the service to make ip effective
11. Copy dhcp service profile template
twelve。 Modify dhcp service profile
13. Start the dhcp service
14. Open 2 win10 and connect to vmnet1,vmnet2 respectively for verification
Both win10 are automatically assigned ip addresses, and dhcp relay service is implemented.
Thank you for your reading. the above is the content of "the introduction of DHCP service and the detailed configuration process of dhcp relay service". After the study of this article, I believe you have a deeper understanding of the introduction of DHCP service and the detailed configuration process of dhcp relay service, and the specific usage needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.