//1.进入全局配置视图
router#config t

//2.开启DHCP服务
router(config)#service DHCP

//可选:关闭DHCP冲突日志
router(config)#no ip dhcp conflict logging

//3.配置DHCP地址池名称(本例为:myPool)
router(config)#ip dhcp pool myPool

//4.配置DHCP地址(本例为:192.168.1.0/24)
router(dhcp-config)#network 192.168.1.0 255.255.255.0

//5.配置DHCP默认网关(本例为:192.168.1.1)
router(dhcp-config)#default-router 192.168.1.1

//6.配置DHCP DNS
router(dhcp-config)#dns-server 192.168.1.1

//7.退出DHCP配置
router(dhcp-config)#exit

//8.配置排除地址段
router(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.10

//9.配置Ethernet0/0为192.168.0.1/24的网关
router(config)#interface e0/0

//10.配置Ethernet0/0 IP地址
router(config-if)ip address 192.168.1.1 255.255.255.0

//相邻路由器可以通过进入对应接口, 通过:ip address dhcp获得IP地址