RIPv2协议配置

来源:互联网 发布:颜色搭配知乎 编辑:程序博客网 时间:2024/06/05 04:16

RIPv2协议配置

实验目的

通过本实验,可以掌握以下技能:

  1. 配置接口IP地址。
  2. 配置RIPv2协议。
  3. 验证RIPv2协议配置。

设备需求

Cisco路由器3台,分别命名为twins、sa和gill。其中twins具有2个以太网接口;sa具有2个以太网接口;gill具有2个以太网接口。
  • 2条交叉线序双绞线。
  • 1台access server,及用于反向Telnet的相应电缆。
  • 1台带有超级终端程序的PC机,以及Console电缆及转接器。

实验的拓扑结构如图实验4所示,地址如下。通过2对交叉线序双绞线分别把twins和sa连接起来、twins和gill连接起来。
这里写图片描述

               图4实验的拓扑结构

各路由器使用的接口及其编号见图的标注。各接口IP地址分配如下:

twins: E0:192.168.10.1  E1:192.168.11.1sa: E0:192.168.10.2  E1:192.168.12.1gill:E0:192.168.11.2  E1:192.168.15.1

实验配置文档

1. 基本网络配置

1)AoChengKaoRs

Router>enableRouter#config tEnter configuration commands, one per line.  End with CNTL/Z.Router(config)#hostname AoChengKaoRsAoChengKaoRs(config)#int fastethernet 0/0AoChengKaoRs(config-if)#ip address 192.168.10.2 255.255.255.0AoChengKaoRs(config-if)#no shutdownAoChengKaoRs(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upAoChengKaoRs(config-if)#exitAoChengKaoRs(config)#AoChengKaoRs#%SYS-5-CONFIG_I: Configured from console by consoleAoChengKaoRs#config tEnter configuration commands, one per line.  End with CNTL/Z.AoChengKaoRs(config)#int fastethernet 0/1AoChengKaoRs(config-if)#ip address 192.168.12.1 255.255.255.0AoChengKaoRs(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upAoChengKaoRs(config-if)#AoChengKaoRs#%SYS-5-CONFIG_I: Configured from console by consoleAoChengKaoRs#writeBuilding configuration...[OK]

2)AoChengKaoRt

Router>enableRouter#config tEnter configuration commands, one per line.  End with CNTL/Z.Router(config)#Router(config)#hostname AoChengKaoRtAoChengKaoRt(config)#int fastethernet 0/0AoChengKaoRt(config-if)#ip address 192.168.10.1 255.255.255.0AoChengKaoRt(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upAoChengKaoRt(config-if)#AoChengKaoRt#%SYS-5-CONFIG_I: Configured from console by consoleAoChengKaoRt#config tEnter configuration commands, one per line.  End with CNTL/Z.AoChengKaoRt(config)#int fastethernet 0/1AoChengKaoRt(config-if)#ip address 192.168.11.1 255.255.255.0AoChengKaoRt(config-if)#no shutdownAoChengKaoRt(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to upAoChengKaoRt#%SYS-5-CONFIG_I: Configured from console by consoleAoChengKaoRt#writeBuilding configuration...[OK] ```3)AoChengKaoRg

Router>ena

Router#config tEnter configuration commands, one per line.  End with CNTL/Z.Router(config)#hostname AoChengKaoRgAoChengKaoRg(config)#int fastethernet 0/0AoChengKaoRg(config-if)#ip address 192.168.11.2 255.255.255.0AoChengKaoRg(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upAoChengKaoRg(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upAoChengKaoRg(config-if)#exitAoChengKaoRg(config)#int fastethernet 0/1AoChengKaoRg(config-if)#ip address 192.168.15.1 255.255.255.0AoChengKaoRg(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upAoChengKaoRg(config-if)#AoChengKaoRg#%SYS-5-CONFIG_I: Configured from console by consoleAoChengKaoRg#writeBuilding configuration...[OK]

2. 配置RIPv2协议

1)AoChengKaoRs

AoChengKaoRs#config t

Enter configuration commands, one per line. End with CNTL/Z.

AoChengKaoRs(config)#router rip

AoChengKaoRs(config-router)#network 192.168.10.0

AoChengKaoRs(config-router)#network 192.168.12.0

AoChengKaoRs(config-router)#

AoChengKaoRs#

%SYS-5-CONFIG_I: Configured from console by console

AoChengKaoRsa#write

Building configuration…

[OK]

2)AoChengKaoRt

AoChengKaoRt#config t

Enter configuration commands, one per line. End with CNTL/Z.

AoChengKaoRt(config)#router rip

AoChengKaoRt(config-router)#network 192.168.10.0

AoChengKaoRt(config-router)#network 192.168.11.0

AoChengKaoRt(config-router)#

AoChengKaoRt#

%SYS-5-CONFIG_I: Configured from console by console

AoChengKaoRt#write

Building configuration…

[OK]

3)AoChengKaoRg

AoChengKaoRg#config t

Enter configuration commands, one per line. End with CNTL/Z.

AoChengKaoRg(config)#router rip

AoChengKaoRg(config-router)#network 192.168.11.0

AoChengKaoRg(config-router)#network 192.168.15.0

AoChengKaoRg(config-router)#

AoChengKaoRg#

%SYS-5-CONFIG_I: Configured from console by console

AoChengKaoRg#write

Building configuration…

[OK]

验证实验结果

1. show ip protocols

该命令显示路由器的IP路由选择协议配置,详细说明了协议的配置情况以及协议之间的交互情况,还指出了下一次更新在何时进行
这种细节对诊断配置错误很有帮助,该命令如下:

AoChengKaoRs#sh ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 3 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 2, receive 2  Interface             Send  Recv  Triggered RIP  Key-chain  FastEthernet0/0       2     2       FastEthernet1/0       2     2     Automatic network summarization is in effectMaximum path: 4Routing for Networks:    192.168.10.0    192.168.12.0Passive Interface(s):Routing Information Sources:    Gateway         Distance      Last Update    192.168.10.1         120      00:00:01Distance: (default is 120)AoChengKaoRs#

同理可以验证另外2个路由器RIP协议(AoChengKaoRt,AoChengKaoRg)的配置情况。

2. show ip route

该命令显示路由器的IP路由选择表,详细指出了路由器是如何获悉网络和发现路由的
该命令如下:

AoChengKaoRs#sh ip routeCodes: C - connected, S - static, I - IGRP, 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 external type 2, E - EGP       i - IS-IS, 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 routeGateway of last resort is not setC    192.168.10.0/24 is directly connected, FastEthernet0/0R    192.168.11.0/24 [120/1] via 192.168.10.1, 00:00:07, FastEthernet0/0C    192.168.12.0/24 is directly connected, FastEthernet1/0R    192.168.15.0/24 [120/2] via 192.168.10.1, 00:00:07, FastEthernet0/0AoChengKaoRs#

同理可以验证另外2个路由器路由表(AoChengKaoRt,AoChengKaoRg)的配置情况。

3. ping 指令的使用

1)从sa路由器去ping gill路由器,如果能ping通,说明RIP协议工作正常,如果不能ping通

所以有其他错误存在,需要检查硬件和其他配置。

这里写图片描述

2)从PC0( 192.168.12.2)ping PC1(192.168.15.2),检查是否可以ping通,如果不能ping通

所以有其他错误存在,需要检查硬件和其他配置。
这里写图片描述

                             图10-7

具体配置见附件:RIPV2.pkt

RIPV2.pkt

实验总结

通过本次实验,我学会了如何配置配置接口IP地址以及如何配置RIPv2协议,并验证了RIPv2协议配置。

原创粉丝点击