C-Data Training Courses - DHCP Principle
C-Data Training Courses - DHCP Principle
DHCP Principle
Shenzhen C-Data Technology Co., Ltd.
Part 1
DHCP
Introduction
What is DHCP Protocol
01 02 03 04
Automated configuration Save IP address resources: Improve network security: The DHCP protocol has a
of network parameters: In Through the DHCP The DHCP protocol can wide range of application
large networks, manually protocol, the server can prevent unauthorized scenarios, including but
configuring the network dynamically allocate IP computers from accessing not limited to home
parameters of each addresses, avoiding the the network, thereby networks, enterprise
computer is a tedious and waste caused by static improving network networks, school
error-prone task. Using allocation of IP addresses. security. networks, etc. In these
the DHCP protocol, scenarios, using the DHCP
network parameters can protocol can greatly
be automatically assigned simplify the workload of
to the required network configuration
computers, greatly and management, and
improving work efficiency. improve network
availability and security. 。
Part 2
DHCP
Protocol
Introduction
IP address Allocation Method
Static Allocation
In static IP address allocation, each device is
Dynamic Allocation
In dynamic IP address allocation, a DHCP server
networks.
DHCP Server Deployment and Function
The client sends the DISCOVER message to After receiving the DHCP DISCOVER
find an available DHCP server. message, the server will send the message to
provide the client with network configuration
information such as the IP address.
When the client obtains an IP address from DHCP When the lease expires, the client negotiates with the
server, it does not own this address permanently. DHCP server to renew the lease. If the client still needs
This IP address is leased to the client. After the to use the original IP address, it will send a
lease expires, it needs to be renewed or reapplied. DHCPREQUEST message to the DHCP server to request a
lease renewal. If the DHCP server agrees to renew the
lease, it will send a DHCP OFFER message to the client,
containing the new lease period and configuration
information. The client will accept the new lease and
update its configuration information
Part 3
DHCP
Security &
Reliability
Security of DHCP protocol
※op : The operation type of the message is divided into request message and response message. 1 is the request message; 2 is the response
message. The specific message type is marked in the option field.
knowledge.
※hlen : Hardware address length. The system currently only supports Ethernet, and the hardware address length is fixed at 6.
※hops : The number of DHCP relays that DHCP messages pass through. Each time the DHCP request message passes through a DHCP relay, this
field will increase by 1.
※xid : Random numbers generated by client software and used to match request and response messages.
※secs : The time when the client enters the IP address application process or the time when the IP address is updated; it is set by the client
software according to the situation. Currently not used and fixed to 0.
※flags : flag field. The first bit is the broadcast response flag, which is used to identify whether the DHCP server response message is sent in
unicast or broadcast mode. 0 indicates unicast mode and 1 indicates broadcast mode. The remaining bits are reserved.
DHCP Message Format Analysis
The specific description of each field of the DHCP message is as follows:
※siaddr : The server IP address from which the DHCP client obtains information such as IP address.
※giaddr : The IP address of the first DHCP relay that the DHCP client passes through after sending a request message.
※sname : The name of the server from which the DHCP client obtains information such as IP address.
※file : The startup configuration file name and path information specified by the DHCP server for the DHCP client.
※options : Optional variable-length option field, including configuration information such as message type, valid lease period, DNS server IP
address, WINS server IP address, etc.
Part 5
DHCP Packet
Capture Example
DHCP Packet Capture Example
Through the wireshark packet capture software, DHCP messages can be filtered out
DHCP DISCOVER
Thank you !
(86)755-26014509
www.cdatatec.com