路由信息协议配置

时间:2020-03-21 11:49:58  来源:igfitidea点击:

本说明全部关于如何在Cisco路由器上配置RIP版本1和版本2.

RIP上的本教程将使CCNA学生的工作更加轻松。在此,我们了解了如何在cisco路由器上配置rip版本1和rip版本2. 本教程包括配置,路由信息协议的调试和故障排除。

我们已经看到配置很容易,但是当路由器数量增加时,配置静态路由变得非常困难,因此这里我们尝试使用动态路由方法,而我们的帖子专门针对如何配置和配置。
在Cisco路由器上启用RIP版本1和RIP版本2.
正如我在rip教程的上一篇文章中提到的那样,RIP将网络地址通告给其他相邻路由器。
因此,必须知道在可用的网络地址中需要哪个为了安全起见,将其通告给相邻路由器。

RIP是动态路由使用的最常见的路由协议之一,它使用HOP Count作为AD网络的方法。

跳数用于衡量一个数据包从一个点到另一个点必须经过多少个路由器。

在简单网络上配置RIP版本1.

  • 其中我们有两个路由器Router0和Router1.
  • Router0和Router1通过串口Se0/0/0和Se0/0/0相互连接
  • 路由器0和笔记本电脑0通过以太网端口fa0/0相互连接。
  • Router1和Laptop1通过以太网端口fa0/0相互连接。
  • laptop0的IP地址是10.0.0.2
  • lapto1的IP地址是30.0.0.2

在思科路由器上配置RIP路由的明智步骤说明

  • 在用户执行模式下启用RIP(路由信息协议)。
  • 然后切换到特权模式,然后键入config term进入全局配置模式。
  • 必须输入路由器RIP命令才能启用RIP协议。
  • 请注意,提示更改为(config-router)#,表示我们正在路由配置模式下工作。
  • 其中我们正在使用有类网络,因为版本1是默认版本,因此我们不需要执行命令版本。因为rip不支持无类网络。另外,如果我们不提及bydeault的版本号,它将采用版本1.

其中我们可以看到三个讽刺的用户,sarath和theitroad处于三个不同的网络中。
现在,如果这些用户想互相交谈,他们将无法进行路由。

为了使它们之间可以进行通讯,我们将在所有这三个路由器上配置RIP版本2.

从上图可以清楚地看到有5个不同的网络。

  • ip 10.0.0.2的用户讽刺驻留在网络10.0.0.0/8中
  • ip 50.0.0.2的用户sarath驻留在网络50.0.0.0/8中
  • ip 90.0.0.2的用户theitroad驻留在网络90.0.0.0/8中

配置步骤:

  • 根据拓扑图连接网络。
  • 启用ip并启用接口。
  • 在所有路由器上配置RIPv2.
  • 使用debug ip rip命令验证或者调试路由更新。
  • 验证路由表。
  • 使用ping命令验证网络连接。

现在,我们将配置RIP版本2.

首先,我们在每台PC上分配ip地址,然后在每个路由器端口上分配ip地址,然后通过以下方式启用网络:

不关闭,最后我们在每个路由器上设置rip版本2.

First Router Ethernet port configuration:

Router>enable
Router#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname linux
linux(config)#interface fastEthernet 0/0
linux(config-if)#ip address 10.0.0.1 255.0.0.0
linux(config-if)#no shutdown

第一路由器串行端口配置:

linux(config)#interface serial 0/0/0
linux(config-if)#ip address 30.0.0.1 255.0.0.0
linux(config-if)#clock rate 64000
linux(config-if)#no shutdown

Ethernet and Serial port configuration on router second for example:middle router:

Router>enable
Router#configure terminal 
Router(config)#interface serial 0/0/0
Router(config-if)#ip address 30.0.0.2 255.0.0.0
Router(config-if)#no shut

Router(config-if)#exit
Router(config)#interface serial 0/0/1
Router(config-if)#ip address 70.0.0.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut

Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 50.0.0.1 255.0.0.0
Router(config-if)#no shutdown

Ethernet and Serial Port Configuration on Last Router:

Router>enable
Router#configure terminal
Router(config)#hostname unix
unix(config)#interface fa0/0
unix(config-if)#ip address 90.0.0.1 255.0.0.0
unix(config-if)#no shutdown

unix(config-if)#exit
unix(config)#interface serial 0/0/0
unix(config-if)#ip address 70.0.0.2 255.0.0.0

unix(config-if)#no shutdown

configure and enable rip routing on router1

linux#configure terminal
linux(config)#router rip
linux(config-router)#versio
linux(config-router)#version 2
linux(config-router)#network 10.0.0.0
linux(config-router)#network 30.0.0.0
linux(config-router)#

configure an enable rip routing  on router 2

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 30.0.0.0
Router(config-router)#network 50.0.0.0
Router(config-router)#network 70.0.0.0

configure and enable rip routing  on router 3

unix>enable
unix#configure
unix#configure terminal
unix(config)#router rip
unix(config-router)#version 2
unix(config-router)#network 90.0.0.0
unix(config-router)#network 70.0.0.0

linux#show run
Building configuration...

Current configuration : 637 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname linux
!

!
interface FastEthernet0/0
 ip address 10.0.0.1 255.0.0.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/0/0
 ip address 30.0.0.1 255.0.0.0
 clock rate 64000
!
interface Serial0/0/1
 no ip address
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router rip
 version 2
 network 10.0.0.0
 network 30.0.0.0
!
ip classless
!
!
line con 0
line vty 0 4
 login
!
!
!
end

如何配置动态路由协议?

回答:

linux(config)#router {protocol} [keyword]

{protocol} = RIP,IGRP,EIGRP,IS-IS,OSPF

在这里我们使用了RIP

[protocol] =表示自治系统。