思科路由器如何配置DHCP实例?今天给大家分享一下思科路由器配置成DHCP服务器;由于实例很简单,于是精简单讲解;如图示:
如图示:
路由0:F0/0:59.40.78.185/28;
DHCP:192.168.1.0/24 GW:192.168.1.1;
配置如下:
outer(config)#ip dhcp pool DHCPLIST
Router(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
Router(dhcp-config)#def
Router(dhcp-config)#default-router 192.168.1.1 ?
? <cr>
Router(dhcp-config)#default-router 192.168.1.1
Router(dhcp-config)#dns-server
Router(dhcp-config)#dns-server 8.8.8.8
Router(dhcp-config)#network
Router(dhcp-config)#network ?
? A.B.C.D ?Network number in dotted-decimal notation
Router(dhcp-config)#network 192.168.1.0 ?
? A.B.C.D ?Network mask
Router(dhcp-config)#network 192.168.1.0 255.255.255.0 ?
? <cr>
Router(dhcp-config)#network 192.168.1.0 255.255.255.0
Router(dhcp-config)#end
如上配置所示:可以看到DHCP配置起来只有几步,很容易实现;
那么现在让我们来验证;
在路由器通过命令:show ip DHcp binding可以查到一个客户端已经获取了IP地址:192.168.1.1 255.255.255.0 网关192.168.1.1;DNS:8.8.8.8;
思科路由器如何配置DHCP实例_dhcp配置
PC>ipconfig /all
Physical Address................: 0030.A3A1.776B
IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.1
DNS Servers.....................: 8.8.8.8
由此思科路由器的DHCP服务已经设置成功;
总结:有些路由器DHCP功能默认是关闭的,可以通过:service DHCP 开启DHCP服务,然后再做配置;其实原理都一样,配置DHCP几个步骤:建议DHCP分配池,网关,分配的IP段,DNS;就这么几个设置;