配置RIP路由协议实现不同路由之间的互通

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置RIP路由协议实现不同路由之间的互通相关的知识,希望对你有一定的参考价值。

实验名称:配置RIP路由协议实现不同路由之间的互通
实验拓扑:技术分享图片
实验环境:1、四台路由器,
2、两台
PC 0 IP: 192.168.1.1/24
网关:192.168.1.254
PC 1 IP:192.168.5.1/24
网关:192.168.5.254
实验步骤:为各自路由器开启RIP协议
#开启RIP协议
#设置版本号:2
#关闭自动汇总功能
#设置路由器直连网段的network
1、 配置路由1
Router>
Router>enable
Router#configure
Router(config)#int g0/2
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up

Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.1.254 255.255.255.0
Router(config-if)#e
Router(config-if)#exit
Router(config)#int g0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#e
Router(config-if)#exit
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up

Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#router rip
Router(config-router)#v
Router(config-router)#version 2
Router(config-router)#no a
Router(config-router)#no auto-summary
Router(config-router)#net
Router(config-router)#network 192.168.1.0
Router(config-router)#net
Router(config-router)#network 192.168.2.0
Router(config-router)#
2、 配置路由器2
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>
Router>enable
Router#
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int g0/1
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#e
Router(config-if)#exit
Router(config)#int g0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#e
Router(config-if)#exit
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
\
^
% Invalid input detected at ‘^‘ marker.
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#router rip
Router(config-router)#v
Router(config-router)#version 2
Router(config-router)#no a
Router(config-router)#no auto-summary
Router(config-router)#ne
Router(config-router)#network 192.168.2.0
Router(config-router)#n
Router(config-router)#nw
Router(config-router)#ne
Router(config-router)#network 192.168.3.0
Router(config-router)#

3、 配置路由器3
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>
Router>
Router>enable
Router#
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#int g0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

Router(config-if)#e
Router(config-if)#exit
Router(config)#int g0/1
Router(config-if)#no suhtdown
^
% Invalid input detected at ‘^‘ marker.
Router(config-if)#no shtdown
^
% Invalid input detected at ‘^‘ marker.
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

Router(config-if)#ip address 192.168.3.2 255.255.255.0
Router(config-if)#e
Router(config-if)#exit
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#
Router(config-if)#ip add 192.168.4.1 255.255.255.0
Router(config-if)#e
Router(config-if)#exit
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config)#
Router(config)#
Router(config)#
Router(config)#router rip
Router(config-router)#v
Router(config-router)#version 2
Router(config-router)#no s
Router(config-router)#no a
Router(config-router)#no auto-summary
Router(config-router)#ne
Router(config-router)#network 192.168.3.0
Router(config-router)#me
Router(config-router)#ne
Router(config-router)#network 192.168.4.0
Router(config-router)#

Router con0 is now available

Press RETURN to get started.

Router>
Router>
Router>enabel
Translating "enabel"...domain server (255.255.255.255) % Name lookup aborted
Router>enable
Router#
Router#wr
Router#write
4、 配置路由器4

Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>
Router>
Router>
Router>enable
Router#
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int g0/1
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

Router(config-if)#ip add 192.168.4.2 255.255.255.0
Router(config-if)#e
Router(config-if)#exit
Router(config)#int g0/2
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up

Router(config-if)#no shutdown
Router(config-if)#ip add 192.168.5.254 255.255.255.0
Router(config-if)#e
Router(config-if)#exit
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up

Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#router rip
Router(config-router)#v
Router(config-router)#version 2
Router(config-router)#no a
Router(config-router)#no auto-summary
Router(config-router)#ne
Router(config-router)#network 192.168.4.0
Router(config-router)#n
Router(config-router)#ne
Router(config-router)#network 192.168.5.0
Router(config-router)#e
Router(config-router)#exit
Router(config)#e
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#wr
Router#write
Building configuration...
[OK]
Router#
5、验证与测试
技术分享图片

以上是关于配置RIP路由协议实现不同路由之间的互通的主要内容,如果未能解决你的问题,请参考以下文章

多路由器环境配置的一些小技巧(达内)

动态路由实现OSPF和RIP协议实现全网互连互通

使用OSPF与RIP动态路由协议实现全网互连互通

动态路由之OSPF和RIP协议实现全网互连互通

请问rip路由协议配置的具体步骤是啥?谢谢

路由器RIP动态路由配置