一、实验目的
通过本实验,可以掌握以下技能:
- 配置接口IP地址
- 配置RIP协议
- 验证RIP协议配置
二、设备需求
- Cisco路由器3台,分别命名为twins、sa、和gill。其中twins具有2个以太网接口;sa具有2个以太网接口;gill具有2个以太网接口
- 2条交叉线序双绞线
- 1台access server,及用于反向Telnet的相应电缆
- 1台带有超级终端程序的PC机,以及Console电缆及转接器
三、拓扑结构及接口IP配置
实验的拓扑结构如下图所示。通过2对交叉线序双绞线分别把twins和sa连接起来,twins和gill连接起来。
各路由器使用的接口及其编号见上图所示的标注,各接口IP地址分配如下:
- twins:F0/0:192.168.3.1 F1/0:192.168.2.1
- sa:F0/0:192.168.4.1 F1/0:192.168.2.2
- gill:F0/0:192.168.5.1 F1/0:192.168.3.2
四、实验配置文档
- 基本网络配置
sa路由器配置:
Router>en
Router>enable
Router#conf
Router#configure ter
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname sa-sjt
sa-sjt(config)#inte
sa-sjt(config)#interface F
sa-sjt(config)#interface FastEthernet 0/0
sa-sjt(config-if)#ip address 192.168.4.1 255.255.255.0
sa-sjt(config-if)#no shut
sa-sjt(config-if)#no shutdown
sa-sjt(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
sa-sjt(config-if)#exit
sa-sjt(config)#inte
sa-sjt(config)#interface F
sa-sjt(config)#interface FastEthernet 1/0
sa-sjt(config-if)#ip address 192.168.2.2 255.255.255.0
sa-sjt(config-if)#no shut
sa-sjt(config-if)#no shutdown
sa-sjt(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
sa-sjt(config-if)#
(2)twins路由器配置:
Router>
Router>en
Router>enable
Router#conf
Router#configure ter
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host
Router(config)#hostname twins-sjt
twins-sjt(config)#inte
twins-sjt(config)#interface F
twins-sjt(config)#interface FastEthernet 1/0
twins-sjt(config-if)#ip address 192.168.2.1 255.255.255.0
twins-sjt(config-if)#no shut
twins-sjt(config-if)#no shutdown
twins-sjt(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
twins-sjt(config-if)#exit
twins-sjt(config)#int
twins-sjt(config)#interface F
twins-sjt(config)#interface FastEthernet 0/0
twins-sjt(config-if)#ip address 192.168.3.1 255.255.255.0
twins-sjt(config-if)#no shut
twins-sjt(config-if)#no shutdown
twins-sjt(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
twins-sjt(config-if)#
(3)gill路由器配置:
Router>
Router>en
Router>enable
Router#conf
Router#configure ter
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host
Router(config)#hostname gill-sjt
gill-sjt(config)#int
gill-sjt(config)#interface F
gill-sjt(config)#interface FastEthernet 1/0
gill-sjt(config-if)#ip address 192.168.3.2 255.255.255.0
gill-sjt(config-if)#no shut
gill-sjt(config-if)#no shutdown
gill-sjt(config-if)#
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
gill-sjt(config-if)#exit
gill-sjt(config)#int
gill-sjt(config)#interface F
gill-sjt(config)#interface FastEthernet 0/0
gill-sjt(config-if)#ip address 192.168.5.1 255.255.255.0
gill-sjt(config-if)#no shut
gill-sjt(config-if)#no shutdown
gill-sjt(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
gill-sjt(config-if)#
2. 配置RIP协议:
(1)使用rip配置sa:
sa-sjt>
sa-sjt>en
sa-sjt>enable
sa-sjt#conf
sa-sjt#configure ter
sa-sjt#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
sa-sjt(config)#router rip
sa-sjt(config-router)#network 192.168.4.0
sa-sjt(config-router)#network 192.168.2.0
sa-sjt(config-router)#
(2)使用rip配置twins:
twins-sjt>
twins-sjt>en
twins-sjt>enable
twins-sjt#cont
twins-sjt#conf
twins-sjt#configure ter
twins-sjt#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
twins-sjt(config)#router rip
twins-sjt(config-router)#network 192.168.2.0
twins-sjt(config-router)#network 192.168.3.0
twins-sjt(config-router)#
(3)使用rip配置gill:
gill-sjt>
gill-sjt>en
gill-sjt>enable
gill-sjt#conf
gill-sjt#configure ter
gill-sjt#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
gill-sjt(config)#router rip
gill-sjt(config-router)#network 192.168.3.0
gill-sjt(config-router)#network 192.168.5.0
gill-sjt(config-router)#
五、验证RIP协议配置
- show ip protocols
该命令显示路由器的IP路由选择协议配置,详细说明了协议的配置情况以及协议之间的交互情况,还指出了下一次更新在何时进行。这种细节对诊断配置错误很有帮助,该命令如下:
sa:
sa-sjt#show ip protocols
twins:
twins-sjt#show ip protocols
gill:
gill-sjt#show ip protocols
- show ip route
该命令显示路由器的IP路由选择表,详细指出了路由器是如何获悉网络和发现路由的,该命令如下:
sa:
sa-sjt#show ip route
twins:
twins-sjt#show ip route
gill:
gill-sjt#show ip route
配置RIP协议后,使用路由器sa去ping路由器gill,成功ping通
六、实验总结
- 对RIP协议有了进一步的认识,RIPv1作为有类路由协议,在更新中是不发送子网掩码的。
- 配置RIP协议时network后面跟的是直接相连的网络,而不是直接相连的网络任务。
- 成功配置RIP协议后可以使用ping命令来相互ping通。
七、附件
下面是该实验的文件
链接:https://pan.baidu.com/s/149WHe3S6Vkhv5i0UekIM_A 密码:iqwk