一.环境:cisco 模拟器
二.拓扑图:
三.配制过程
1.先对Rouetr0 进行配制
Router>en
Router#conf t
Router(config)#
1>配置ip地址池并进入DHCP Pool配置模式
Router(config)#ip dhcp pool dg <--地址池名称
Router(dhcp-config)#ip dhcp pool 289 <--地址池名称
#注:地址池名称可以用字母,也可以用数字,如上
2>配置ip地址池和子网掩码
Router(dhcp-config)#network 192.168.10.0 255.255.255.0
Router(dhcp-config)#exit
3>配制不用于动态分配的ip地址
Router(config)#ip dhcp ex ßTab键补全
Router(config)#ip dhcp excluded-address 192.168.10.20 192.168.10.30
#↑排除192.168.10.20 到192.168.10.30的一段地址
Router(config)#ip dhcp pool dg
4>配制ip地址池的缺省网关
Router(dhcp-config)#default-router 192.168.10.1
5>配制ip地址池的域名服务器的ip地址
Router(dhcp-config)#dns
Router(dhcp-config)#dns-server 192.168.10.40
Router(dhcp-config)#exit
6>配制端口ip
Router(config)#int f0/0
Router(config-if)#ip add 192.168.10.1 255.255.255.0
Router(config-if)#no shut
Router#wr
Building configuration...
[OK]
7>查看配制情况
Router#show running-config
Building configuration...
Current configuration : 694 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
ip dhcp excluded-address 192.168.10.20 192.168.10.30
!
ip dhcp pool dg
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 192.168.10.40
ip dhcp pool 256
network 192.168.10.0 255.255.255.0
ip dhcp pool 289