当前位置:   article > 正文

实训十五:路由器RIPV1配置_实验6.1:路由器配置ripv1基本功能 任务要求 某网络的拓扑结构如图6-8所示。招生就

实验6.1:路由器配置ripv1基本功能 任务要求 某网络的拓扑结构如图6-8所示。招生就

一、实验目的

1.掌握动态路由的配置方法
2.理解 RIP 协议的工作过程

二、应用环境

1.在路由器较多的环境里,手工配置静态路由给管理员带来大的工作负担
2.在不太稳定的网络环境里,手工修改表不现实

三、 实验设备

1.DCR-2655 三台
2.网线(交叉线) 四条

四、 实验拓扑

在这里插入图片描述

五、实验配置

在这里插入图片描述

六、实验步骤

第一步:按照上表配置所有接口的 IP 地址,保证所有接口全部是 up 状态,测试连通性

下面为 RA 配置:
Router_config#hostname RA
RA_config#
RA_config#int g0/3
RA_config_g0/3#ip add 192.168.1.1 255.255.255.0
RA_config_g0/3#exit
RA_config#int g0/4
RA_config_g0/4#ip add 192.168.0.1 255.255.255.0
RA_config_g0/4#exit
RB、RC 配置 略
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

第二步:查看路由器 A 的路由表RA#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
 D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
 ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
 OE1 - OSPF external type 1, OE2 - OSPF external type 2
 DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
VRF ID: 0
 C 192.168.0.0/24 is directly connected, GigaEthernet0/4 !直连的路由
C 192.168.1.0/24 is directly connected, GigaEthernet0/3 !直连的路由
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

第三步:查看路由器 B 的路由表

 RB#show ip route 
 Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
 D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
 ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
 OE1 - OSPF external type 1, OE2 - OSPF external type 2
 DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
 VRF ID: 0
 C 192.168.1.0/24 is directly connected, GigaEthernet0/3 
 C 192.168.2.0/24 is directly connected, GigaEthernet0/4 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

第四步:查看路由器 C 的路由表

RC#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
 D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
 ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
 OE1 - OSPF external type 1, OE2 - OSPF external type 2
 DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
VRF ID: 0
C 192.168.2.0/24 is directly connected, GigaEthernet0/4 
C 192.168.3.0/24 is directly connected, GigaEthernet0/3 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

第五步:在路由器 A 上 PING 路由器 C

RA#ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes
.....
--- 192.168.2.2 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss !不通
  • 1
  • 2
  • 3
  • 4
  • 5

第六步:在路由器 A 上配置 RIP 协议并查看路由表

RA_config#router rip !启动 RIP 协议RA_config_rip#network 192.168.0.0 !宣告网段
RA_config_rip#network 192.168.1.0
RA_config_rip#^Z
RA#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
 D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
 ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
 OE1 - OSPF external type 1, OE2 - OSPF external type 2
 DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
VRF ID: 0
C 192.168.0.0/24 is directly connected, GigaEthernet0/4
C 192.168.1.0/24 is directly connected, GigaEthernet0/3
!注意到并没有出现 RIP 学习到的路由 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

第七步:在路由器 B 上配置 RIP 协议并查看路由表

RB_config#router rip
RB_config_rip#network 192.168.1.0
RB_config_rip#network 192.168.2.0
RB_config_rip#^Z
RB#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
 D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
 ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
 OE1 - OSPF external type 1, OE2 - OSPF external type 2
 DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
VRF ID: 0
R 192.168.0.0/24 [120,1] via 192.168.1.1(on GigaEthernet0/3) !从 RA 上学习到的路由
C 192.168.1.0/24 is directly connected, GigaEthernet0/3 
C 192.168.2.0/24 is directly connected, GigaEthernet0/4 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

第八步:在路由器 C 上配置 RIP 协议并查看路由表

RC_config#router rip
RC_config_rip#network 192.168.2.0
RC_config_rip#network 192.168.3.0 
RC_config_rip#^Z
RC#show ip route 
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
 D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
 ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
 OE1 - OSPF external type 1, OE2 - OSPF external type 2
 DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2VRF ID: 0
R 192.168.0.0/24 [120,2] via 192.168.2.1(on GigaEthernet0/4) 
 !从 RA 上学习的路由
R 192.168.1.0/24 [120,1] via 192.168.2.1(on GigaEthernet0/4) 
 !从 RB 上学习的路由
C 192.168.2.0/24 is directly connected, GigaEthernet0/4 
C 192.168.3.0/24 is directly connected, GigaEthernet0/3 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

第九步:再次查看路由器 A 和路由器 B 的路由表

RA#show ip route 
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
 D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
 ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
 OE1 - OSPF external type 1, OE2 - OSPF external type 2
 DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
VRF ID: 0
C 192.168.0.0/24 is directly connected, GigaEthernet0/4
C 192.168.1.0/24 is directly connected, GigaEthernet0/3
R 192.168.2.0/24 [120,1] via 192.168.1.2(on GigaEthernet0/3) 
R 192.168.3.0/24 [120,2] via 192.168.1.2(on GigaEthernet0/3)
RB#show ip route 
Codes: C - connected, S - static, R - RIP, B - BGP, BC - BGP connected
 D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area
 ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2
 OE1 - OSPF external type 1, OE2 - OSPF external type 2
 DHCP - DHCP type, L1 - IS-IS level-1, L2 - IS-IS level-2
VRF ID: 0
R 192.168.0.0/24 [120,1] via 192.168.1.1(on GigaEthernet0/3)
C 192.168.1.0/24 is directly connected, GigaEthernet0/3
C 192.168.2.0/24 is directly connected, GigaEthernet0/4
R 192.168.3.0/24 [120,1] via 192.168.2.2(on GigaEthernet0/4) 
 
!注意到所有网段都学习到了路由 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

第十步:相关的查看命令

RA#show ip rip !显示 RIP 状态
Update: 30, Expire: 180, Holddown: 120
Input-queue: 50
Validate-update-source: Enable
Neighbor List:RA#show ip rip protocol !显示协议细节
RIP is Active 
update interval 30(s), Invalid interval 180(s) !注意定时器的值
Holddown interval 120(s), Trigger interval 5(s) 
Automatic network summarization: Enable
Network List:
 network 192.168.0.0
 network 192.168.1.0
Filter list:
Offset list:
Redistribute policy:
Interface send version and receive version:
Global version : default
 Interface Send-version Recv-version Nbr_number
 GigaEthernet0/3 V1 V1 V2 2
 GigaEthernet0/4 V1 V1 V2 0
Distance: 0 (default is 120): !注意默认的管理距离
Maximum route count: 1024, Current route count:4 
RA#show ip rip database ! 显示 RIP 数据库
192.168.0.0/24 directly connected GigaEthernet0/4
192.168.1.0/24 directly connected GigaEthernet0/3
192.168.2.0/24 [120,1] via 192.168.1.2 (on GigaEthernet0/3) 00:00:26 
192.168.3.0/24 [120,2] via 192.168.1.2 (on GigaEthernet0/3) 00:00:26 !收
到 RIP 广播的时间
RA#show ip route rip !仅显示 RIP 学习到的路由
R 192.168.2.0/24 [120,1] via 192.168.1.2(on GigaEthernet0/3)
R 192.168.3.0/24 [120,2] via 192.168.1.2(on GigaEthernet0/3)
RB 、RC 略
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32

七、 注意事项和排错

1.只能宣告直连的网段
2.宣告时不附加掩码
3.分配地址时最好是连续的子网,以免 RIP 汇聚出现错误

八、相关配置命令详解

router rip 使用 router rip 全局命令来配置 RIP 路由进程,no router rip 则关闭 RIP 路由进程。 router rip no router rip 参数: 无 缺省 :系统缺省不运行 RIP。 命令模式 : 全局配置 状态使用说明必须先启动 RIP,才能进入路由配置态,才能配置 RIP 的各种全局性参数,而配置与接口相关的参数则不受是否已经启动 RIP 的限制。 示例 : 启动 RIP 并进入路由配置态。 相关命令 network (RIP) network 使用 network 命令为 RIP 协议指定连接的网络号,no network 则取消一个网络号。 network network-numbe < network-mask> no network network-number < network-mask>
在这里插入图片描述
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/403906
推荐阅读
相关标签
  

闽ICP备14008679号