当前位置:网站首页>Concept and principle of DHCP
Concept and principle of DHCP
2022-07-27 06:41:00 【Thousand tears 1999】
Tips : When the article is finished , Directories can be generated automatically , How to generate it, please refer to the help document on the right
List of articles
One 、 What is? DHCP
DHCP—— Dynamic Host Configuration Protocol
DHCP:( Dynamic Host Configuration Protocol ) Is a LAN network protocol . It refers to a period of time controlled by the server IP Address range , When the client logs in to the server, it can automatically get the server assigned IP Address and subnet mask . By default ,DHCP As Windows Server A service component of will not be automatically installed by the system , It also needs to be manually installed and configured by the administrator .
1.dhcp The role of
1. Automatically assign... To internal network or network service providers IP Address
2. For users or internal network administrators as a means of central management of all computers
2.DHCP working principle
1.DHCP The client sends DHCP discovery request . notes :DHCP The client is going to DHCP Server send DHCP request , To request IP
2. So... In the LAN DHCP The server will reply DHCP offer, Provide... For clients IP Address
3. The client selects the first DHCP The server replied IP Address , And send DHCP request Notify all in the LAN DHCP The server , Which one did it choose IP With which DHCP The server
remarks : The client sends DHCP request There are two reasons for the announcement , The first level is to inform all DHCP The server , Let others not selected DHCP The server recycles unused addresses , The second time is to announce to the selected DHCP The server , This address DHCP Our client is about to use .
4. Selected DHCP Server received DHCP request After the news , Will give DHCP The client replies with a DHCP ack, Officially confirm this IP Can be used by clients ,DHCP The client will this IP With your own MAC Bind it so that you can continue to use it next time , Others DHCP The server will assign to DHCP Of the client IP Recycling .
3.DHCP The server assigns IP There are three forms of address :
DHCP The server assigns IP There are three forms of address :
Automatic allocation method (Automatic Allocation),DHCP The server specifies a permanent IP Address , once DHCP The first successful client from DHCP Server side lease to IP After the address , You can use the address permanently .
Dynamic distribution mode (Dynamic Allocation),DHCP The server specifies a time limited IP Address , When the time expires or the host explicitly gives up the address , This address can be used by other hosts .
Manual allocation method (Manual Allocation), Client's IP The address is specified by the network administrator ,DHCP The server will only specify IP Address to client host .
1、 The administrator will a IP The address is assigned to a client .
2、 Randomly and permanently assign addresses to clients .
3、 Randomly assign the address to the client for a period of time .
The third is the most common form of use . The effective use period of an address is called the lease period , Before the lease expires , The client must request the server to continue renting . The server can continue to use after accepting the request , Otherwise, give up unconditionally .
4.DHCP The benefits of
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
5.DHCP Lease term of species
DHCP The client uses IP The address is limited . Generally speaking DHCP The client uses DHCP Allocated IP The address is within the lease term 50% when , Will take the initiative to DHCP The server sends a renewal request ,DHCP After the server receives the request ,DHCP The server will check this IP The address has not been changed DHCP The client preempted , If not, the contract will be renewed successfully , If it is occupied, the renewal fails , here DHCP The client will restart DHCP discovery Request to get new IP Address
6.DHCP Function and characteristics
DHCP Can be automatically assigned IP、 Subnet mask 、 gateway 、DNS.
DHCP Port used by the client 68, The server uses port 67, The use of UDP Application layer protocol .
DHCP Generally, servers are not allocated IP, Because they want to use fixed IP, therefore DHCP Generally, it is only allocated to the host of the office environment IP.
DHCP The server and client need to be in a LAN , Allocating IP You need to broadcast many times . but DHCP It can also be allocated to hosts in other network segments IP, As long as the router between the two network segments is connected, it can forward DHCP Configure the request , But this requires the router to configure the relay function .
7.DHCP The pattern of (C/S Pattern )
In the network, suppose a dedicated DHCP The server , Responsible for centralized allocation of various network address parameters ( It mainly includes IP Address 、 Subnet mask 、 Default gateway address 、DNS Server address 、 Broadcast 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 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 : Monitor ruikou 68 ( bootpc)
边栏推荐
- Function call of shell script
- Basic knowledge of English: juxtaposition structure
- RAID详解与配置
- KVM command set management virtual machine
- Launch file of ROS operation management
- ArcGIS for JS API (1) get all field names of FeatureLayer
- shell--循环语句(for、while、until)
- 英语基础知识:非谓语使用规则上篇
- Related knowledge of internal classes
- rsync远程同步
猜你喜欢

Shell script loop

Random points in non overlapping rectangle (force deduction daily question)

DNS域名解析服务

七大排序详解

logging日志的封装

Seven sorting details

Cesium tutorial (1) interface introduction -3dfiles loading - change mouse operation settings

Launch file of ROS operation management

Detailed explanation of thread safety problems

Introduction to hash table
随机推荐
Launch file of ROS operation management
Establishment of FTP server
Random points in non overlapping rectangle (force deduction daily question)
ArcGIS for JS API (1) get all field names of FeatureLayer
iptables防火墙
Ram of IP core
ROS node name duplicate
RAID详解与配置
项目实训经历2
Shell脚本备份MySQL数据库
Shell script one click configuration lamp
Programming learning records - Lesson 3 [first knowledge of C language]
Sexy prime number (acwing daily question)
PLL of IP core
系统安全与应用
兼容性测试知识点
Function call of shell script
Shell Scripting format
Knowledge supplement of multithreading
Shell script backup MySQL database