DHCP搭建

上传人:ths****59 文档编号:44449284 上传时间:2018-06-09 格式:DOCX 页数:6 大小:75.36KB
返回 下载 相关 举报
DHCP搭建_第1页
第1页 / 共6页
DHCP搭建_第2页
第2页 / 共6页
DHCP搭建_第3页
第3页 / 共6页
DHCP搭建_第4页
第4页 / 共6页
DHCP搭建_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《DHCP搭建》由会员分享,可在线阅读,更多相关《DHCP搭建(6页珍藏版)》请在金锄头文库上搜索。

1、实验 25:DHCP1.实验目的 通过本实验可以掌握: DHCP 的工作原理和工作过程; DHCP 服务器的基本配置和调试; 客户端配置。 2.拓扑结构 实验拓扑图如图10-1 所示。图10-1 DHCP 基本配置 3.实验步骤 (1)步骤1:配置路由器R1 提供DHCP 服务 R1(config)#service dhcp /DHCP 服务 R1(config)#no ip dhcp conflict logging /关闭DHCP 冲突日志 R1(config)#ip dhcp pool ccie /定义地址池 R1(dhcp-config)#network 192.168.1.0 /24

2、 /DHCP 服务器要分配的网络和掩码 R1(dhcp-config)#domain-name /域名 R1(dhcp-config)#default-router 192.168.1.1 /默认网关,这个地址要和相应网络所连接的路由器的以太口地址相同 R1(dhcp-config)#netbios-name-server 192.168.1.2 /WINS 服务器 R1(dhcp-config)#dns-server 192.168.1.4 /DNS 服务器 R1(dhcp-config)#option 150 ip 192.168.1.3 /TFTP 服务器 R1(dhcp-config

3、)#lease infinite /定义租期 R1(dhcp-config)#ip dhcp excluded-address 192.168.1.1 192.168.1.5 /排除的地址段 (2)步骤2:设置Windows 客户端 首先在Windows 下把TCP/IP 地址设置为自动获得(如图10-2),如果DHCP 服务器还提 供DNS 和WINS 等,也把它 们设置为自动获得。图10-2 修改TCP/IP 属性 4.实验调试 (1)在客户端测试 在”命令提示符”下,执行C;/ipconfig/renew 可以更新IP 地址;而执行C;/ipconfig/all 可以看到IP 地址、WI

4、NS、DNS 和域名是否正确;要释放地址用C;/ipconfig/release 命令。 C;ipconfig/renew Windows IP Configuration Ethernet adapter 本地连接; Connection-sepecific DNS Suffix .; IP Address.; 192.168.1.7 Subnet Mask.; 255.255.255.0 Default Gateway.; 192.168.1.1 C;ipconfig/all Windows IP Configuration Ethernet adapter 本地连接; Connectio

5、n-sepecific DNS Suffix .; Description.;Realtek RTL8139/810x Family Fast Ethernet NIC Physical Address.;00-60-67-00-DD-5B Dhcp Enabled.;YES Autoconfiguration Enabled.;YES IP Address.;192.168.1.7 Subnet Mask.;255.255.255.0 Default Gateway.;192.168.1.1 DHCP Server.;192.168.1.1 DNS Servers.;192.168.1.4

6、Primary WINS Server.;192.168.1.2 Lease Obtained.;2007 年2 月22 日 13;01;01 Lease Expires.;2038 年1 月19 日 11;14;07 (2)show ip dhcp pool 该命令用来查看DHCP 地址池的信息。 R1#show ip dhcp poolPool ccie; Utilization mark(high/low) ;100/0 Subnet size(first/next) ;0/0 Total addresses ;254 /地址池中共计254 个地址 Leased addresses ;2

7、 / 已经分配出去2 个地址 Pending event ;none 1 subnet is currently in the pool; Current index IP address range Leased addresses 192.168.1.8 192.168.1.1 -192.168.1.254 2 /下一个将要分配的地址、地址池的范围以及分配出去的地址的个数 (3)show ip dhcp binding 该命令用来查看DHCP 的地址绑定情况。 R1#show ip dhcp binding Bindings from all pools not associated wi

8、th VRF; IP address Client-ID/ Lease expiration Type Hardware address/ Username 192.168.1.6 0063.6973.636f.2d Infinite Automatic 192.168.1.7 0100.6067.00dd.5b Infinite Automatic 以上输出表明 DHCP 服务器自动分配给客户端的 IP 地址以及所对应的客户端的硬件地址。DHCP 中继1.实验目的 通过本实验可以掌握通过DHCP 中继实现跨网络的DHCP 服务。 2.拓扑结构 实验拓扑图如图10-3 所示。图10-3 DHC

9、P 中继配置 在本实验中,R1 仍然担任DHCP 服务器的角色,负责向PC 所在网络和PC2 所在网络的 主机动态分配IP 地址,所以, R1 上需要定义两个地址池。整个网络运行RIPv2 协议,确保网络IP 连通性。3.实验步骤 (1)步骤1:配置路由器R1 提供DHCP 服务 R1(config)#interface gigabitEhternet0/0 R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config)#router rip R1(config-router)#ve

10、rsion 2 R1(config-router)#no auto-summary R1(config-router)#network 192.168.1.0 R1(config-router)# network 192.168.12.0 R1(config)#service dhcp R1(config)#no ip dhcp conflict logging R1(config)#ip dhcp pool ccie /定义第一个地址池 R1(dhcp-config)#network 192.168.1.0 /24 R1(dhcp-config)#default-router 192.168

11、.1.1 R1(dhcp-config)#domain-name R1(dhcp-config)#netbios-name-server 192.168.1.2 R1(dhcp-config)#dns-server 192.168.1.4 R1(dhcp-config)#option 150 ip 192.168.1.3 R1(dhcp-config)#lease infinite R1(dhcp-config)#ip dhcp excluded-address 192.168.1.1 192.168.1.5 R1(config)#ip dhcp pool ccnp /定义第二个地址池 R1

12、(dhcp-config)#network 172.16.1.0 255.255.255.0 R1(dhcp-config)#domain-name R1(dhcp-config)#default-router 172.16.1.2 R1(dhcp-config)#netbios-name-server 192.168.1.2 R1(dhcp-config)#dns-server 192.168.1.4 R1(dhcp-config)#option 150 ip 192.168.1.3 R1(dhcp-config)#lease infinite R1(dhcp-config)#ip dhc

13、p excluded-address 172.16.1.1 172.16.1.2 (2)步骤2:配置路由器R2 R2(config)#interface gigabitEhternet0/0 R2(config-if)#ip address 172.16.1.2 255.255.255.0 R2(config-if)#ip helper-address 192.168.12.1 /配置帮助地址 R2(config-if)#no shutdown R2(config)#router rip R2(config-router)#version 2 R2(config-router)#no auto

14、-summary R2(config-router)# network 192.168.12.0 R2(config-router)# network 172.16.0.0 【技术要点】路由器是不能转发”255.255.255.255”广播的,但是很多服务(如DHCP 和 TFTP 等)的客户请求都是以 泛洪广播的方式发起的,我们不可能将每个网段都旋转这样的服务器,因此使用Cisco IOS 帮助地址特性是很好的选择。通过使用帮助地址,路由器可以被配置为接受对UDP 服务的广播请求,然后将之以单点传 送的方式发给某个具体的IP 地址,或者以定向广播形式向某个网段转发这些请求,这就是中继。 4.实验调试 (1)show ip dhcp binding 在PC1 和PC2 上自动获取IP 地址后,在R1 上执行: R1#show ip dhcp binding Bindings from all pools not associated with VRF; IP address Client-ID/ Lease expiration Type Hardware addres

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号