DHCP配置实例
Posted 可我浪费着我寒冷的年华
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DHCP配置实例相关的知识,希望对你有一定的参考价值。
配置DHCP的思路:
1.创建dhcp服务
2.添加一个网络号(或者说地址池)
3.排除路由器的网管
4.排除DHCP的网关
代码:
Router>enable
Router#config
Router#configure t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fa0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#ip dhcp??
dhcp
Router(config)#ip dhcp ?
excluded-address Prevent DHCP from assigning certain addresses
pool Configure DHCP address pools
Router(config)#ip dhcp pool test //创建名为test的dhcp服务
Router(dhcp-config)#network 192.168.1.1 255.255.255.0//添加网络号
Router(dhcp-config)#defa
Router(dhcp-config)#default-router 192.168.1.1 //排除路由的网关
Router(dhcp-config)#exit
Router(config)#ip dhcp
Router(config)#ip dhcp e
Router(config)#ip dhcp excluded-address 192.168.1.1 //排除DHCP的网关
Router(config)#exit
以上是关于DHCP配置实例的主要内容,如果未能解决你的问题,请参考以下文章