您好,欢迎访问代理记账网站
  • 价格透明
  • 信息保密
  • 进度掌控
  • 售后无忧

RIP路由协议

文章目录

  • 实验名称
  • 实验目的
  • 实验设备
  • 实验拓扑
  • 实验步骤
    • 1.配置PC
    • 2.三层交换机基本配置
    • 3.路由器1基本配置
    • 4.路由器2基本配置
    • 5.配置RIPv2路由协议
    • 6.Router1配置RIPv2协议
    • 7.Router2配置RIPv2协议
    • 8.查看路由表
    • 9.测试网络连通性


实验名称

RIPv2配置

实验目的

掌握在路由器上配置RIPv2

实验设备

三层交换机一台,RSR10路由器两台,直连线或交叉线3条

实验拓扑

本实验的拓扑结构如下图所示:
实验拓扑

实验步骤

1.配置PC

PC1
IP地址:192.168.5.11
子网掩码:255.255.255.0
默认网关:192.168.5.1
PC2:
IP地址:192.168.3.22
子网掩码:255.255.255.0
默认网关:192.168.3.1

2.三层交换机基本配置

Switch#conf t
Switch(config)#hostname s3550
s3550(config)#vlan 10
s3550(config-vlan)#exit
s3550(config)#vlan 20
s3550(config-vlan)#exit
s3550(config)#int f0/2
s3550(config-if)#switchport access vlan 20
s3550(config-if)#exit
s3550(config)#int f0/1
s3550(config-if)#switchport access vlan 10
s3550(config-if)#exit
s3550(config)#interface vlan 10
s3550(config-if)#ip address 192.168.5.1 255.255.255.0
s3550(config-if)#no shutdown
s3550(config-if)#exit
s3550(config)#interface vlan 20
s3550(config-if)#ip address 192.168.1.2 255.255.255.0
s3550(config-if)#no shutdown
s3550(config-if)#exit
s3550(config)#ip routing

查看路由表:

s3550#show ip route
Codes: 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 route

Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, Vlan20
C    192.168.5.0/24 is directly connected, Vlan10

3.路由器1基本配置

Router>en
Router#conf t
Router(config)#int f0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#int s2/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown

4.路由器2基本配置

Router>en
Router#conf t
Router(config)#int f0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#int s2/0
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#no shutdown

5.配置RIPv2路由协议

s3550配置RIP协议:

s3550(config)#router rip
Router(config-router)#version 
s3550(config-router)#network 192.168.1.0
s3550(config-router)#network 192.168.5.0

6.Router1配置RIPv2协议

Router>en
Router#conf t
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#no auto-summary
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
Router(config-router)#end

7.Router2配置RIPv2协议

Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#no auto-summary
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.3.0
Router(config-router)#end

8.查看路由表

三层交换机:

s3550#show ip route
Codes: 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 route

Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, Vlan20
R    192.168.2.0/24 [120/1] via 192.168.1.1, 00:00:23, Vlan20
R    192.168.3.0/24 [120/2] via 192.168.1.1, 00:00:23, Vlan20
C    192.168.5.0/24 is directly connected, Vlan10

Router1:

Router#show ip route
Codes: 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 route

Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, FastEthernet0/0
C    192.168.2.0/24 is directly connected, Serial2/0
R    192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:04, Serial2/0
R    192.168.5.0/24 [120/1] via 192.168.1.2, 00:00:29, FastEthernet0/0

Router2

Router#show ip route
Codes: 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 route

Gateway of last resort is not set

R    192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:18, Serial2/0
C    192.168.2.0/24 is directly connected, Serial2/0
C    192.168.3.0/24 is directly connected, FastEthernet0/0
R    192.168.5.0/24 [120/2] via 192.168.2.1, 00:00:18, Serial2/0

9.测试网络连通性

PC之间是否互相连通
PC1
PC2

如图所示,实验成功


分享:

低价透明

统一报价,无隐形消费

金牌服务

一对一专属顾问7*24小时金牌服务

信息保密

个人信息安全有保障

售后无忧

服务出问题客服经理全程跟进