OSPF、RIP、DHCP综合实验

一、实验目的

1、掌握OSPF动态路由多区域、特殊区域STUB和TOTAL STUB的基本配置方法和工作原理。
2、掌握RIP动态路由的基本配置方法和工作原理。
3、掌握含中继的DHCP的基本配置方法和原理及基本架构。
4、掌握OSPF、RIP、DHCP综合组网的基本架构。

二、实验内容

完成如图所示的拓扑的基本配置和结果验证。

三、实验流程

(一)配置任务说明
如图所示,拓扑包含14个不同网段,其中R1~R6路由器的loopback地址分别为:1.1.1.1/32、2.2.2.2/32、3.3.3.3/32、4.4.4.4/32、5.5.5.5/32、6.6.6.6/32,OSPF的STUB区域Area 10025网段为:173.25.3.0/30,TOTAL STUB区域Area 20025网段为:173.25.5.0/32,骨干区域Area 0网段为:173.25.1.0/30、173.25.2.0/30,RIP区域网段为:173.25.4.0/30、173.25.7.0/24,6个路由器启用DHCP协议,R4、R5、R6分别作为中继路由器,PC1、PC2、PC3分别使用DHCP动态协议自动获取IP地址,完成相关的OSPF配置、RIP配置、DHCP配置,并进行结果验证。
在这里插入图片描述
(二)实验配置过程
(1)R1的基本配置:

// R1的基本配置:
R1#config t
R1(config)#ip routing
R1(config)#interface loopback 1
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#exit
R1(config)#interface f0/0
R1(config-if)#ip address 173.25.1.2 255.255.255.252
R1(config-if)#exit
R1(config)#interface f1/0
R1(config-if)#ip address 173.25.2.1 255.255.255.252
R1(config-if)#exit
R1(config)#interface f2/0
R1(config-if)#ip address 173.25.4.1 255.255.255.252
R1(config-if)#exit

R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 173.25.1.0 0.0.0.3 area 0
R1(config-router)#network 173.25.2.0 0.0.0.3 area 0
R1(config-router)#redistribute connected subnets
R1(config-router)#redistribute rip subnets
R1(config-router)#exit

R1(config)#router rip
R1(config-router)#no auto-summary
R1(config-router)#version 2
R1(config-router)#network 1.1.1.1
R1(config-router)#network 173.25.1.0
R1(config-router)#network 173.25.2.0
R1(config-router)#network 173.25.4.0
R1(config-router)#redistribute ospf 1 metric 2
R1(config-router)#exit

R1(config)#service dhcp
R1(config)#ip dhcp pool lzcu
R1(dhcp-config)#network 173.25.7.0 255.255.255.0
R1(dhcp-config)#default-router 173.25.7.1
R1(dhcp-config)#dns-server 173.25.7.1
R1(dhcp-config)#exit
R1(config)#ip dhcp excluded-address 173.25.7.1
R1(config)#exit

(2)R2的基本配置:

// R2的基本配置:
R2#config t
R2(config)#ip routing
R2(config)#interface loopback 1
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#exit
R2(config)#interface f0/0
R2(config-if)#no shutdown
R2(config-if)#ip address 173.25.1.1 255.255.255.252
R2(config-if)#exit
R2(config)#interface f1/0
R2(config-if)#no shutdown
R2(config-if)#ip address 173.25.3.1 255.255.255.252
R2(config-if)#exit

R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R2(config-router)#network 173.25.1.0 0.0.0.3 area 0
R2(config-router)#network 173.25.3.0 0.0.0.3 area 10025
R2(config-router)#area 10025 stub 
R2(config-router)#exit

R2(config)#service dhcp
R2(config)#ip dhcp pool lzcu
R2(dhcp-config)#network 173.25.6.0 255.255.255.0
R2(dhcp-config)#default-router 173.25.6.1
R2(dhcp-config)#dns-server 173.25.6.1
R2(dhcp-config)#exit
R2(config)#ip dhcp excluded-address 173.25.6.1
R2(config)#exit

(3)R3的基本配置:

// R3的基本配置:
R3#config t
R3(config)#ip routing
R3(config)#interface loopback 1
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#exit
R3(config)#interface f0/0
R3(config-if)#no shutdown
R3(config-if)#ip address 173.25.2.2 255.255.255.252
R3(config-if)#exit
R3(config)#interface f1/0
R3(config-if)#no shutdown
R3(config-if)#ip address 173.25.5.1 255.255.255.252
R3(config-if)#exit

R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
R3(config-router)#network 173.25.2.0 0.0.0.3 area 0
R3(config-router)#network 173.25.5.0 0.0.0.3 area 20025
R3(config-router)#area 20025 stub no-summary
R3(config-router)#exit

R3(config)#service dhcp
R3(config)#ip dhcp pool lzcu
R3(dhcp-config)#network 173.25.8.0 255.255.255.0
R3(dhcp-config)#default-router 173.25.8.1
R3(dhcp-config)#dns-server 173.25.8.1
R3(dhcp-config)#exit
R3(config)#ip dhcp excluded-address 173.25.8.1
R3(config)#exit

(4)R4的基本配置:

// R4的基本配置:
R4#config t
R4(config)#ip routing
R4(config)#service dhcp
R4(config)#interface loopback 1
R4(config-if)#ip address 4.4.4.4 255.255.255.255
R4(config-if)#exit
R4(config)#interface f0/0
R4(config-if)#no shutdown
R4(config-if)#ip address 173.25.3.2 255.255.255.252
R4(config-if)#exit
R4(config)#interface f1/0
R4(config-if)#no shutdown
R4(config-if)#ip address 173.25.6.1 255.255.255.0
R4(config-if)#ip helper-address 173.25.3.1
R4(config-if)#exit

R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 4.4.4.4 0.0.0.0 area 10025
R4(config-router)#network 173.25.3.0 0.0.0.3 area 10025
R4(config-router)#network 173.25.6.0 0.0.0.255 area 10025
R4(config-router)#area 10025 stub
R4(config-router)#exit
R4(config)#

(5)R5的基本配置:

// R5的基本配置:
R5#config t
R5(config)#service dhcp
R5(config)#ip routing
R5(config)#interface loopback 1
R5(config-if)#ip address 5.5.5.5 255.255.255.255
R5(config-if)#exit
R5(config)#interface f0/0
R5(config-if)#no shutdown
R5(config-if)#ip address 173.25.5.2 255.255.255.252
R5(config-if)#exit
R5(config)#interface f1/0
R5(config-if)#no shutdown
R5(config-if)#ip address 173.25.8.1 255.255.255.0
R5(config-if)#ip helper-address 173.25.5.1
R5(config-if)#exit

R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 5.5.5.5 0.0.0.0 area 20025
R5(config-router)#network 173.25.5.0 0.0.0.3 area 20025
R5(config-router)#network 173.25.8.0 0.0.0.255 area 20025
R5(config-router)#area 20025 stub no-summary
R5(config-router)#exit
R5(config)#exit

(6)R6的基本配置:

// R6的基本配置:
R6#config t
R6(config)#service dhcp
R6(config)#ip routing
R6(config)#interface loopback 1
R6(config-if)#ip address 6.6.6.6 255.255.255.255
R6(config-if)#exit
R6(config)#interface f0/0
R6(config-if)#no shutdown
R6(config-if)#ip address 173.25.4.2 255.255.255.252
R6(config-if)#exit
R6(config)#interface f1/0
R6(config-if)#no shutdown
R6(config-if)#ip address 173.25.7.1 255.255.255.0
R6(config-if)#ip helper-address 173.25.4.1
R6(config-if)#exit

R6(config)#router rip
R6(config-router)#no auto-summary
R6(config-router)#version 2
R6(config-router)#network 6.6.6.6
R6(config-router)#network 173.25.4.0
R6(config-router)#network 173.25.7.0
R6(config-router)#exit
R6(config)#exit
四、查看和验证

(一)实验结果查看
(1)查看路由器R1的路由和DHCP地址池:
#show ip route
在这里插入图片描述
在这里插入图片描述
(2)查看路由器R2的路由和DHCP地址池:
在这里插入图片描述
在这里插入图片描述

(3)查看路由器R3的路由和DHCP地址池:
在这里插入图片描述
在这里插入图片描述

(4)查看路由器R4的路由:
在这里插入图片描述
(5)查看路由器R5的路由:
在这里插入图片描述
(6)查看路由器R6的路由:
在这里插入图片描述
(二)实验结果验证
PC1(DHCP地址:173.25.6.2)分别 ping PC2、PC3可以ping通,实验结构如下所示:
在这里插入图片描述
PC2(DHCP地址:173.25.7.2)分别 ping PC1、PC3可以ping通,实验结构如下所示:
在这里插入图片描述
PC3(DHCP地址:173.25.8.2)分别 ping PC1、PC3可以ping通,实验结构如下所示:
在这里插入图片描述

五、实验总结

本次试验的主要目的是掌握OSPF动态路由、RIP动态路由以及DHCP中继动态获取IP地址等的基本配置及其工作原理,主要知识点就是OSPF特殊区域STUB区域和TOTAL STUB区域、配置RIP动态路由以及DHCP中继的配置方法试验,本次实验遇到的问题是刚开始配置完成后PC1、PC3分别不能和PC2相互通信,经检测是没有给RIP路由重分发OSPF路由造成的错误,改正后,实现了三台主机之间可以相互通信。

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值