思科路由器DHCP配置

 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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章