实验四 路由协议.doc

上传人:飞****2 文档编号:79045911 上传时间:2023-03-19 格式:DOC 页数:12 大小:121.50KB
返回 下载 相关 举报
实验四 路由协议.doc_第1页
第1页 / 共12页
实验四 路由协议.doc_第2页
第2页 / 共12页
点击查看更多>>
资源描述

《实验四 路由协议.doc》由会员分享,可在线阅读,更多相关《实验四 路由协议.doc(12页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、实验四 路由协议4.1实验目的(1)了解路由协议的功能与原理;(2)掌握静态路由协议配置;(3)掌握RIP协议的基本配置;(4)掌握OSPF协议的基本配置。4.2实验内容(1)静态路由协议配置;(2)RIP协议的配置;(3)OSPF协议的配置。4.3 实验环境与分组(1)Quidway S3026C交换机2台,Quidway R2611路由器2台,PC机4台,配置电缆2条,网线6条,V.35或V.24电缆一对;(2)每4人一组,每2人作为一小组,每小组共同配置一台路由器;(3)4人协同完成该实验。4.4 实验组网图图4-1 路由协议实验组网图4.5 实验步骤实际组网中路由器是用来连接两个物理网

2、络的,为了模拟实际环境,我们在实验室中采用背靠背直接相连来模拟广域网连接。模拟实验环境组网如图4-1。为了不受路由器原来配置的影响,在实验之前请先将所有路由器的配置数据擦除后重新启动。交换机在此只用作连接主机和路由器用,以便全采用标准网线连接,不需配置。4.5.1 静态路由协议配置第一步:清空路由器的原有配置,重新启动路由器后,查看初始配置并显示路由表如下:RouterAdisplay current-configuration Now create configuration. Current configuration ! version 1.74 sysname RouterA fire

3、wall enable aaa-enable aaa accounting-scheme optional ! interface Aux0 async mode flow link-protocol ppp ! interface Ethernet0 ! interface Ethernet1 ! interface Serial0 clock DTECLK1 link-protocol ppp ! interface Async0 physical-mode async async mode protocol link-protocol ppp ! interface Async1 phy

4、sical-mode async async mode protocol link-protocol ppp ! interface Async2 physical-mode async async mode protocol link-protocol ppp ! interface Async3 physical-mode async async mode protocol link-protocol ppp ! interface Async4 physical-mode async async mode protocol link-protocol ppp ! interface As

5、ync5 physical-mode async async mode protocol link-protocol ppp ! interface Async6 physical-mode async async mode protocol link-protocol ppp ! interface Async7 physical-mode async async mode protocol link-protocol ppp ! returnRouterAdisplay ip routing-tableRouting Tables: Destination/Mask Proto Pref

6、Metric Nexthop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0 127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0第二步:按图4-1所示配置各路由器接口和各PC的IP地址和缺省网关。为了标识路由器,我们修改路由器名称分别为RouterA、RouterB并完成IP地址的配置,其中RouterA的参考配置命令如下: RouterAinterface e0RouterA-Ethernet0ip address 202.0.0.8 255.255.255.0RouterA-Ethernet0in

7、terface s0RouterA-Serial0ip address 192.0.0.1 255.255.255.0RouterB可以参照RouterA进行设置。第三步:查看完成配置命令后的RouterA的配置信息和路由表信息如下:RouterAdisplay current-configuration Now create configuration. Current configuration ! version 1.74 sysname RouterA firewall enable aaa-enable aaa accounting-scheme optional ! interfa

8、ce Aux0 async mode flow link-protocol ppp ! interface Ethernet0 ip address 202.0.0.8 255.255.255.0 ! interface Ethernet1 ! interface Serial0 clock DTECLK1 link-protocol ppp ip address 192.0.0.1 255.255.255.0 ! interface Async0 physical-mode async async mode protocol link-protocol ppp ! interface Asy

9、nc1 physical-mode async async mode protocol link-protocol ppp ! interface Async2 physical-mode async async mode protocol link-protocol ppp ! interface Async3 physical-mode async async mode protocol link-protocol ppp ! interface Async4 physical-mode async async mode protocol link-protocol ppp ! inter

10、face Async5 physical-mode async async mode protocol link-protocol ppp ! interface Async6 physical-mode async async mode protocol link-protocol ppp ! interface Async7 physical-mode async async mode protocol link-protocol ppp ! returnRouterAdisplay ip routing-tableRouting Tables: Destination/Mask Prot

11、o Pref Metric Nexthop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0 127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 192.0.0.0/24 Direct 0 0 192.0.0.1 Serial0 192.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 202.0.0.0/24 Direct 0 0 202.0.0.8 Ethernet0 202.0.0.8/32 Direct 0 0 127.0.0.1 LoopBack0与第一步骤显示的

12、配置信息和路由信息进行比较,注意它们之间的不同。RouterB的相关信息类似RouterA,可以自己在实验中显示比较。注意:串口的配置需要在接口配置模式下完成shutdown和undo shutdown命令之后才生效。第四步:完成上述配置之后,用ping命令测试网络互通性,会发现两个以太网段不能互通。仔细看看路由表就可以明白,路由器还没有相关的路由。第五步:在这里我们采用配置静态路由的办法来添加路由。分别在RouterA和RouterB上配置到对端以太网段的静态路由,在此只列出RouterA的参考配置命令(RouterB的配置命令可参考RouterA):RouterAip route-stat

13、ic 202.0.1.0 255.255.255.0 192.0.0.2 preference 60第六步:显示RouterA的配置信息和路由表信息如下:RouterAdisplay current-configuration Now create configuration. Current configuration ! version 1.74 sysname RouterA firewall enable aaa-enable aaa accounting-scheme optional ! interface Aux0 async mode flow link-protocol pp

14、p ! interface Ethernet0 ip address 202.0.0.8 255.255.255.0 ! interface Ethernet1 ! interface Serial0 clock DTECLK1 link-protocol ppp ip address 192.0.0.1 255.255.255.0 ! interface Async0 physical-mode async async mode protocol link-protocol ppp ! interface Async1 physical-mode async async mode proto

15、col link-protocol ppp ! interface Async2 physical-mode async async mode protocol link-protocol ppp ! interface Async3 physical-mode async async mode protocol link-protocol ppp ! interface Async4 physical-mode async async mode protocol link-protocol ppp ! interface Async5 physical-mode async async mo

16、de protocol link-protocol ppp ! interface Async6 physical-mode async async mode protocol link-protocol ppp ! interface Async7 physical-mode async async mode protocol link-protocol ppp ! quit ip route-static 202.0.1.0 255.255.255.0 192.0.0.2 preference 60 ! returnRouterAdisplay ip routing-tableRoutin

17、g Tables: Destination/Mask Proto Pref Metric Nexthop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0 127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 192.0.0.0/24 Direct 0 0 192.0.0.2 Serial0 192.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 192.0.0.2/32 Direct 0 0 192.0.0.2 Serial0 202.0.0.0/24 Direct 0

18、0 202.0.0.8 Ethernet0 202.0.0.8/32 Direct 0 0 127.0.0.1 LoopBack0 202.0.1.0/24 Static 60 0 192.0.0.2 Serial0RouterB的相关信息类似RouterA。比较前后路由表发现现在新增了一项静态路由。第七步:此时再测试网络互通性,可以ping通了吗?4.5.2 RIP协议的配置第一步:在上面的实验基础上,删除静态路由的配置之后再启动RIP协议。参考配置命令如下:RouterAundo ip route-static 202.0.1.0 24 192.0.0.2RouterArip waitin

19、g. RIP is runningRouterA-ripnetwork all在RouterB上进行相同的配置,配置命令请参考RouterA。第二步:显示RouterA的配置信息如下:RouterAdisplay current-configuration Now create configuration. Current configuration ! version 1.74 sysname RouterA firewall enable aaa-enable aaa accounting-scheme optional ! interface Aux0 async mode flow l

20、ink-protocol ppp ! interface Ethernet0 ip address 202.0.0.8 255.255.255.0 ! interface Ethernet1 ! interface Serial0 clock DTECLK1 link-protocol ppp ip address 192.0.0.1 255.255.255.0 ! interface Async0 physical-mode async async mode protocol link-protocol ppp ! interface Async1 physical-mode async a

21、sync mode protocol link-protocol ppp ! interface Async2 physical-mode async async mode protocol link-protocol ppp ! interface Async3 physical-mode async async mode protocol link-protocol ppp ! interface Async4 physical-mode async async mode protocol link-protocol ppp ! interface Async5 physical-mode

22、 async async mode protocol link-protocol ppp ! interface Async6 physical-mode async async mode protocol link-protocol ppp ! interface Async7 physical-mode async async mode protocol link-protocol ppp ! quit rip network all ! quit ! return第三步:显示RouterA的路由表信息如下:RouterAdisplay ip routing-tableRouting Ta

23、bles: Destination/Mask Proto Pref Metric Nexthop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0 127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 192.0.0.0/24 Direct 0 0 192.0.0.2 Serial0 192.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 192.0.0.2/32 Direct 0 0 192.0.0.2 Serial0 202.0.0.0/24 Direct 0 0 20

24、2.0.0.8 Ethernet0 202.0.0.8/32 Direct 0 0 127.0.0.1 LoopBack0 202.0.1.0/24 RIP 100 1 192.0.0.2 Serial0RouterB的配置信息和路由表与RouterA类似,学生们实验时可以自己查看,并注意和RouterA之间的区别第四步:测试网络互通性,应该是全网互通的。如果不是,请检查您的配置是否与上面的一致。4.5.3 OSPF协议的配置第一步:清空路由器的原有配置,并重新启动路由器。第二步:按照图4-1配置RouterA和RouterB的各端口信息,并配置OSPF参数后启动OSPF协议。参考配置命令如下

25、:RouterArouter id 1.1.1.1RouterAinterface e0RouterA-Ethernet0ip address 202.0.0.8 255.255.255.0RouterA-Ethernet0interface s0RouterA-Serial0ip address 192.0.0.1 255.255.255.0RouterA-Serial0ospf enable area 0.0.0.2RouterA-Serial0interface e0RouterA-Ethernet0ospf enable area 0.0.0.2RouterA-Ethernet0qui

26、tRouterAospf enable Start OSPF task. OSPF enabledRouterAinterface s0RouterA-Serial0shutdownRouterA-Serial0undo shutdown路由器RouterB的配置命令与RouterA类似,请参照进行配置。第三步:显示RouterA的配置信息和路由表信息如下:RouterAdisplay current-configuration Now create configuration. Current configuration ! version 1.74 sysname RouterA rout

27、er id 1.1.1.1 firewall enable aaa-enable aaa accounting-scheme optional ! interface Aux0 async mode flow link-protocol ppp ! interface Ethernet0 ip address 202.0.0.8 255.255.255.0 ospf enable area 0.0.0.2 ! interface Ethernet1 ! interface Serial0 clock DTECLK1 link-protocol ppp ip address 192.0.0.1

28、255.255.255.0 ospf enable area 0.0.0.2 ! interface Async0 physical-mode async async mode protocol link-protocol ppp ! interface Async1 physical-mode async async mode protocol link-protocol ppp ! interface Async2 physical-mode async async mode protocol link-protocol ppp ! interface Async3 physical-mo

29、de async async mode protocol link-protocol ppp ! interface Async4 physical-mode async async mode protocol link-protocol ppp ! interface Async5 physical-mode async async mode protocol link-protocol ppp ! interface Async6 physical-mode async async mode protocol link-protocol ppp ! interface Async7 phy

30、sical-mode async async mode protocol link-protocol ppp ! quit ospf enable ! quit ! returnRouterAdisplay ip routing-tableRouting Tables: Destination/Mask Proto Pref Metric Nexthop Interface 127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0 127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 192.0.0.0/24 Direct 0 0

31、192.0.0.2 Serial0 192.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0 192.0.0.2/32 Direct 0 0 192.0.0.2 Serial0 202.0.0.0/24 Direct 0 0 202.0.0.8 Ethernet0 202.0.0.8/32 Direct 0 0 127.0.0.1 LoopBack0 202.0.1.0/24 OSPF 10 1572 192.0.0.2 Serial0从以上信息可以看出路由表中增加了一条通过OSPF协议产生的路由项。第四步:测试网络互通性,应该是全网互通的。如果不是,请检查您的配置是否与上面的一致。4.6 实验总结通过本实验,应该了解路由协议的功能与原理,掌握静态路由协议配置和两种常见动态路由协议的配置。

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

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁