预配置
在R1上的配置
Int e1/0
Ip add 192.168.1.1 255.255.255.0
No sh
在Pc上的配置服务器
实验过程:
第一步:在R1上配置DHCP服务
R1(config)#ip dhcp pool libo
//配置一个DHCP地址池,名称为libo
R1(dhcp-config)#default-router 192.168.1.1
//配置默认网关
R1(dhcp-config)#network 192.168.1.0 /24
//配置一个dhcp分配的网段
R1(dhcp-config)#dns-server 1.1.1.1
//配置一个dns域名解释服务器地址
R1(dhcp-config)#domain-name www.good.com
//配置域名为
R1(dhcp-config)#lease 1 (infinite)
//配置租期为1天(无限)
R1(config)#ip dhcp excluded-address 192.168.1.1
//配置不发放地址
第二步:查看dhcp地址池
R1#sh ip dhcp pool libodom
Pool libo :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 1
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
192.168.1.1 192.168.1.1 - 192.168.1.254 1
//最近的一个未租用地块,地址范围, 租用了一个
R1#sh ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
192.168.1.2 0102.004c.4f4f.50 Mar 02 1993 12:06 AM Automatic
租用地址的mac地址 终止时间:这里为时间是1993年
(为路由器的时间)
//咱们看到了地址为的被租用了,看看是否是被pc租用了ide
第三步:咱们再在看看PC上的信息3d