关于DHCP的简单理解

1、DHCP这个在网络中的高频词是什么?(what)

DHCP:动态主机配置协议(Dynamic Host Configuration Protocol),从名称中我们可以看出,这是一个协议,并且该协议的工作任务是主机配置 ,方式是动态的!,这就是我们一开始的印象 !

接下来,我们在进一步探究:
动态主机配置协议

Dynamic – Automatically
Host – Any computer that is connected to the network
Configuration – To configure a host means to provide network information(ip address,subnet mask,Gateway address) to a host
Protocol – Set of rules

2、DHCP 是 怎么工作的?(how)

在探究DHCP是怎么工作之前,我们需要看一看DHCP是由什么的?

Components of DHCP:
DHCP server: A networked device running the DCHP service that holds IP addresses and related configuration information. This is most typically a server or a router but could be anything that acts as a host, such as an SD-WAN appliance.
DHCP client: The endpoint that receives configuration information from a DHCP server. This can be a computer, mobile device, IoT endpoint or anything else that requires connectivity to the network. Most are configured to receive DHCP information by default.
IP address pool: The range of addresses that are available to DHCP clients. Addresses are typically handed out sequentially from lowest to highest.
Subnet: IP networks can be partitioned(分割) into segments(部分、段) known as subnets. Subnets help keep networks manageable.
Lease: The length of time for which a DHCP client holds the IP address information. When a lease(租期) expires(到期), the client must renew it.
DHCP relay: A router or host that listens for client messages being broadcast on that network and then forwards them to a configured server. The server then sends responses back to the relay agent(中继代理) that passes them along to the client. This can be used to centralize(中心化) DHCP servers instead of having a server on each subnet.

了解到dhcp的组成之后我们以图示的方式展示dhcp的工作过程:
关于DHCP的简单理解
关于DHCP的简单理解
dhcp服务器设置
关于DHCP的简单理解
下图中除了客户端的请求与服务器端的响应之外,还展示了dhcp的状态转换:initializing(初始化)、selecting(选择)、requesting(请求)、bound(绑定)、[renewing(续租)、rebinding(重新绑定)],具体细节自己查询资料。关于DHCP的简单理解

3、我们作为是怎么成为dhcp client?在哪配置的?(where)

关于dhcp的配置如下图:
关于DHCP的简单理解
上面是我电脑上的关于以太网的network information,我们也可以 观察到,默认网关和DHCP服务器是同一个ip地址关于DHCP的简单理解