计算机网络实验四.ppt_第1页
计算机网络实验四.ppt_第2页
计算机网络实验四.ppt_第3页
计算机网络实验四.ppt_第4页
计算机网络实验四.ppt_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、实验四 动态路由RIP&OSPF的配置,动态路由协议,动态路由协议的特点: 根据网络系统的运行情况路由器自动计算调整路由,并利用相应的算法,计算出最终的路由表。 动态路由协议根据所连接的网络规模大小分为: 1)距离矢量路由协议 2)链路状态路由协议,动态路由协议RIP协议,RIP是最简单的距离矢量路由协议; RIP路由协议以”跳数”作为度量单位,用以计算路由; RIP路由协议优先选择“跳数”少的路径作为最优路径 RIP路由协议支持最大的“跳数”为15。,路由器配置实例,RIP协议的配置,RIP协议配置语法: Router(config)#ip routing 启用IP路由协议 Router(c

2、onfig)#router rip 启用RIP路由协议 Router(config-router)#network .发布直连网段 Router(config-router)#version 2 设置RIP协议版本号2 Router(config-router)#end RIP协议删除语法 Router(config)# no router rip,R1配置过程: R1enable R1#configure t 进入全局配置模式 R1(config)#hostname R1 更改路由器名字为R1 R1(config)#interface e0/0 进入e0/0端口 R1(config-if)#

3、ip address 1.0.0.8 255.0.0.0 配置e0/0端口地址 R1(config-if)#no shutdown 启动f1/0端口 R1(config)#interface f1/0 进入f1/0端口 R1(config-if)#ip address 2.0.0.5 255.0.0.0 配置e0/0端口地址R1(config-if)#no shutdown 启动f1/0端口 R1(config)#ip routing 启用ip路由协议 R1(config)#router rip 启用rip路由协议 R1(config-router)#network 1.0.0.0 发布直连网

4、段 R1(config-router)#network 2.0.0.0 发布直连网段 R1(config-router)#version 2 设置rip版本号2 R1(config-router)#end,RIP协议路由器配置实例,RIP协议路由器配置实例,R1#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type

5、 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort i

6、s not set C 1.0.0.0/8 is directly connected, Ethernet0/0 C 2.0.0.0/8 is directly connected, FastEthernet1/0 R 3.0.0.0/8 120/1 via 2.0.0.8, 00:00:06, FastEthernet1/0,RIP协议路由器配置实例,R2配置过程: R2enable R2#configure t 进入全局配置模式 R2(config)#hostname R2 更改路由器名字为R1 R2(config)#interface e0/0 进入e0/0端口 R2(config-if

7、)#ip address 2.0.0.8 255.0.0.0 配置e0/0端口地址 R2(config-if)#no shutdown 启动f1/0端口 R2(config)#interface f1/0 进入f1/0端口 R2(config-if)#ip address 3.0.0.5 255.0.0.0 配置e0/0端口地址 R2(config-if)#no shutdown 启动f1/0端口 R2(config)#ip routing 启用ip路由协议 R2(config)#router rip 启用rip路由协议 R2(config-router)#network 2.0.0.0 发布

8、直连网段 R2(config-router)#network 3.0.0.0 发布直连网段 R2(config-router)#version 2 设置rip版本号2 R2(config-router)#end,RIP协议路由器配置实例,R2#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - O

9、SPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set

10、R 1.0.0.0/8 120/1 via 2.0.0.5, 00:00:23, FastEthernet1/0 C 2.0.0.0/8 is directly connected, FastEthernet1/0 C 3.0.0.0/8 is directly connected, Ethernet0/0,RIP协议路由器配置实例,PC1配置过程: Routerenable Router#configure terminal Router(config)#hostname PC1 PC1(config)#interface e0/0 PC1(config-if)#ip address 1.0

11、.0.5 255.0.0.0 PC1(config-if)#no shutdown PC1(config-if)#exit PC1(config)#ip route 0.0.0.0 0.0.0.0 1.0.0.8配置默认路由 PC1(config)#exit PC1#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external ty

12、pe 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort

13、 is 1.0.0.8 to network 0.0.0.0 C 1.0.0.0/8 is directly connected, Ethernet0/0 S* 0.0.0.0/0 1/0 via 1.0.0.8,RIP协议路由器配置实例,PC2配置过程: Routerenable Router#configure terminal Router(config)#hostname PC2 PC2(config)#interface e0/0 PC2(config-if)#ip address 3.0.0.8 255.0.0.0 PC2(config-if)#no shutdown PC2(co

14、nfig)#ip route 0.0.0.0 0.0.0.0 3.0.0.5 PC2(config)#exit PC2#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF

15、external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is 3.0.0.5 to network 0.0.0.0 C 3.0.0.0/8 is directly connected, Ethernet

16、0/0 S* 0.0.0.0/0 1/0 via 3.0.0.5,动态路由协议OSPF协议,OSPF协议,即“开放最短路径优先”协议,适用于所有的路由器和三层交换机; OSPF协议原理: 1)区域内每台路由器根据自身的网络情况生成自己的链路状况,并告知主路由器; 2)主路由器将所有路由器的链路状态信息组成链路状态数据库,发布给各个路由器; 3)每个路由器根据该数据库信息,利用最短路径算法,计算出以自己为根的最短路径,形成路由表。 OSPF协议支持各种规模网络,反应速度快,能够减少网络带宽,减少对其它设备的干扰。,OSPF协议的配置,OSPF协议配置语法: Router(config)#rout

17、er ospf processid 进入OSPF协议配置模式,processid为ospf进程号 例: Router(config)#router ospf 1 Router(config-router)#network address wildcard area areaid address wildcard:表示运行OSPF端口所在网段地址及相应的子网掩码反码 例:Router(config-router)#network 1.0.0.0 0.255.255.255 area 0 OSPF协议删除语法 Router(config)# no router ospf processid,OSP

18、F协议的配置,R1配置过程: R1(config)#ip routing 启用IP路由协议 R1(config)#router ospf 1 启用进程处理号为1的OSPF协议 R1(config-router)#network 1.0.0.0 0.255.255.255 area 0 R1(config-router)#network 2.0.0.0 0.255.255.255 area 0 在区域0上发布直连网段 R1(config-router)#end,OSPF协议的配置,R1#show ip route Codes: C - connected, S - static, R - RIP

19、, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - ca

20、ndidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set C 1.0.0.0/8 is directly connected, Ethernet0/0 C 2.0.0.0/8 is directly connected, FastEthernet1/0 O 3.0.0.0/8 110/11 via 2.0.0.8, 00:00:25, FastEthernet1/0,OSPF协议的配置,R2配置过程: R2(config)#ip routing 启用IP路由协议 R2(config)#router ospf 1 启用进程处理号为1的OSPF协议 R2(config-router)#network 2.0.0.0 0.255.255.255 area 0 R2(config-router)#network 3.0.0.0 0.255.255.255 area 0

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论