当前位置:网站首页>DHCP principle and configuration
DHCP principle and configuration
2022-07-28 06:55:00 【Direction of light 79】
Catalog
What is? DHCP
DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol ) By Internet Designed and developed by the task force , Used exclusively for TCP/IP Computers in the network automatically assign TCP/IP Protocol of parameters , It's an application layer protocol , Use UDP Of 67 and 68 port .
DHCP The predecessor was BOOTP agreement (BootstrapProtocol),BOOTP It is created to automatically assign addresses to devices connected to the network , Was later DHCP To replace the ,DHCP Than BOOTP More complicated , More powerful .
DHCP The benefits of
Due to the uncertainty of online time and the different technical level of users , Assign a fixed... To each user IP Address , It's not just about IP Waste of address , For ISP Service providers bring high maintenance costs . While using DHCP Services have the following benefits :
Reduce the workload of Administrators
Avoid the possibility of input errors
avoid IP Address conflict
When changed IP Address segment , There is no need to reconfigure each user's IP Address
Improved IP Address utilization
Facilitate client configuration
DHCP The pattern of
Set up a dedicated computer in the network DHCP The server , Responsible for centralized allocation of various network address parameters ( It mainly includes IP Address 、 Subnet mask 、 Broadcast address 、 Default gateway address 、DNS Server address ); Other hosts act as DHCP The client , Configure the network card to get the address automatically , Can be with DHCP The server communicates , Complete the automatic configuration process .
DHCP yes C/S Pattern ,DHCP The server and client need to maintain communication ,DHCP be based on UDP agreement , Both sides may initiate communication with each other , Therefore, both sides need to listen to the port .
- Server End :DHCP Server( function dhcp service )
- UDP service : Listening port 67(bootps)
- Client End :DHCP Client( function dhcp Program )
- UDP service : Listening port 68 (bootpc)
DHCP The way of distribution
- Automatically assigned : Assigned to a IP Permanent use after address
- Manually assign : from DHCP The server administrator specifically specifies IP Address
- Dynamic allocation : Release the after use IP, For other clients
DHCP Lease process
Client from DHCP Server get IP The process of addressing is called DHCP Lease process
It is divided into 4 A step
1. The client searches the network for servers
2. The server responds to the client service
3. The client sends a service request to the target server
4. The server provides services to the client
① When one DHCP When the client starts , The client has not IP Address , So the client has to go through DHCP Get a legal address
here DHCP The client sends... By broadcast DHCP Discover Find information to look for DHCP The server
②DHCP The server received a request from the client lP Address information when , In their own IP Check the address pool to see if there is any legal IP Address to client
If there is ,DHCP The server will IP Mark the address , Add to DHCP Offer In the news of , Then broadcast a DHCP Offer news
③DHCP The client receives the first DHCP Offer Extract... From the message IP Address , issue IP Address of the DHCP The server keeps the address , In this way, the address can no longer be assigned to another DHCP The client
④DHCP The server receives DHCP Request After the news , With DHCPACK Broadcast a successful acknowledgement to the client in the form of a message , The message contains IP Valid lease and other configurable information for the address
When the client receives DHCPACK When the news , To configure IP Address , complete TCP/IP The initialization
DHCP Every time a client logs back into the network , There is no need to send DHCPDiscover Information , Instead, send directly containing the last assigned IP Address of the DHCP Request Request information
DHCP service
DHCP service
- Automatically assign addresses to a large number of clients , Provide centralized management
- Reduce management and maintenance costs 、 Improve network configuration efficiency
The assignable address information mainly includes
- NIC IP Address 、 Subnet mask
- Corresponding network address 、 Broadcast address
- Default gateway address
- DNS Server address
experiment :


Configure the layer 2 switch

Set the interface type , Divide vlan, configure gateway



Set the network connection mode for the virtual machine 


After changing the configuration , Turn on the virtual machine , At this time, the virtual machine cannot log in , Must use root Sign in . Restart NIC , View network card information .

install dhcp


Get into DHCP Configuration file for , Modify the configuration





边栏推荐
- Traversal binary tree
- It is recommended to wear air conduction earphones, which do not need to wear in ear
- Network - network layer
- Mongo SSL configuration practice
- Question brushing record ---- reverse the linked list (reverse the whole linked list)
- HDU-5805-NanoApe Loves Sequence(思维题)
- 等保3.0-服务器三权分立配置
- VMware Workstation 配置net模式
- yapi漏洞挂马程序chongfu.sh处理
- Gerapy use
猜你喜欢

shell脚本——“三剑客”之awk命令
![Implementation of simple address book in [c language]](/img/75/8f2f4dd1c166808047cda6bea5a746.png)
Implementation of simple address book in [c language]

JS reverse question 100 - question 1

DHCP原理与配置

Technology sharing | send requests using postman

VMware Workstation 配置net模式

Archery database audit platform deployment

Ten thousand words summarize and realize the commonly used sorting and performance comparison

cocos2d-x 学习笔记——瓦片地图TiledMap

浅谈Cookie和Session
随机推荐
prometheus监控nacos
QT uses MSVC compiler to output Chinese garbled code
Life cycle (process) of software testing
Mongo SSL configuration practice
PKU-2524-Ubiquitous Religions(并查集模板)
How about air conduction Bluetooth headset? It's the most worthwhile air conduction headset to start with
JS reverse question 100 - question 1
Which brand of air conduction earphones is good and highly praised
什么是线性表?
How to store floating point data in memory
CentOS7部署MySQL数据库服务器
软件测试的生命周期(流程)
Create, traverse and search nodes as required for single linked list
HDU-2036-改革春风吹满地(多边形面积模板)
Prometheus monitoring Nacos
一、PXE概述和安装
[explain in detail how to realize Sanzi chess step by step]
MySQL master-slave
Test life | second tier cities with an annual salary of more than 40W? How did you achieve 100% salary increase under the epidemic?
Iptables firewall