路由器 RIP-1 配置

实训二十三 路由器 RIP-1 配置

一、实验目的

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#no shut

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#no shut

RA_config_g0/4#exit

RB、RC 配置 略

第二步:查看路由器 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 !直连的路由

第三步:查看路由器 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

第四步:查看路由器 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

第五步:在路由器 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 !不通

第六步:在路由器 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 

学习到的路由

第七步:在路由器 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

第八步:在路由器 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

第九步:再次查看路由器 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)

!注意到所有网段都学习到了路由

第十步:相关的查看命令

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.分配地址时最好是连续的子网,以免 RIP 汇聚出现错误

八、配置命令

RA#show run

Building configuration...

Current configuration:

!

!version 1.3.3H

service timestamps log date

service timestamps debug dateno service password-encryption

!

hostname RA

!

gbsc group default

!

interface FastEthernet0/0

no ip address

no ip directed-broadcast

!

interface GigaEthernet0/3

ip address 192.168.1.1 255.255.255.0

no ip directed-broadcast

!

interface GigaEthernet0/4

ip address 192.168.0.1 255.255.255.0

no ip directed-broadcast

!

interface GigaEthernet0/5

no ip address

no ip directed-broadcast

!

interface GigaEthernet0/6

no ip address

no ip directed-broadcast

!

interface Serial0/1

no ip address

no ip directed-broadcast

!

interface Serial0/2

no ip address

no ip directed-broadcast

!

interface Async0/0

no ip address

no ip directed-broadcast

!

router rip

network 192.168.0.0

network 192.168.1.0

!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值