R(config)#ip dhcp ?               //DHCP命令

  excluded-address  Prevent DHCP from assigning certain addresses
  pool                           Configure DHCP address pools
R(config)#ip dhcp pool ?        
  WORD  Pool name
R(config)#ip dhcp pool test           //定义为test名字的dhcp地址此名字
R(dhcp-config)#?                             //此模式下可以使用的命令  
  default-router  Default routers
  dns-server      Set name server
  exit                    Exit from DHCP pool configuration mode
  network            Network number and mask
  no                     Negate a command or set its defaults
  option               Raw DHCP options
R(dhcp-config)#network 172.16.10.0 ?           
  A.B.C.D  Network mask
R(dhcp-config)#network 172.16.10.0 255.255.255.0 ?
  <cr>
R(dhcp-config)#network 172.16.10.0 255.255.255.0            //关联IP地址与子网掩码
R(dhcp-config)#default-router ?
  A.B.C.D  Router's IP address
R(dhcp-config)#default-router 172.168.10.254 ?
  <cr>
R(dhcp-config)#default-router 172.168.10.254               //定义网关
R(dhcp-config)#dns-server 222.222.222.222 ?
  <cr>
R(dhcp-config)#dns-server 222.222.222.222                 //定义dns
R(dhcp-config)#exit
R(config)#ip dhcp excluded-address 172.16.10.251?
A.B.C.D  
R(config)#ip dhcp excluded-address 172.16.10.251 ?
  A.B.C.D  High IP address
  <cr>
R(config)#ip dhcp excluded-address 172.16.10.251 172.16.10.254 ?
  <cr>
R(config)#ip dhcp excluded-address 172.16.10.251 172.16.10.254        //除外的地址,先低后高,注意模式
R(config)#
 
R#show run
Building configuration...
 
Current configuration : 942 bytes
!
version 12.4
!
ip dhcp excluded-address 172.16.10.251 172.16.10.254
!
ip dhcp pool test
 network 172.16.10.0 255.255.255.0
 default-router 172.168.10.254
 dns-server 222.222.222.222