动态路由RIP

动态路由RIP


北京千锋互联科技有限公司
云计算&网络安全杨哥团队:行癫

RIP 路由信息协议

它基于距离矢量算法的协议,使用跳数作为度量来衡量达到目的网络的距离。

矢量:从源到目的,源只知道目的是谁。

特点:配置简单,易于维护,适用于小型网络,容易出环。

工作原理:设备之间互相发送request(路由更新请求)消息,收到request消息的设备将路由放到response(路由更新)中发送出去,当网络稳定后,RIP周期性发送response消息,周期为30s一次。

RIP的报文格式:

Command:指令/命令(1:request或2:response)

Version:版本 rip v1 和 rip v2

Address family identitier 地址族标识 固定取值ipv4

Ip address : ip地址 在request消息中不显示

Metric:固定取值16

RIP v1 以广播的形式发送response路由更新 255.255.255.255

RIP v2 以组播的形式发送response路由更新 224.0.0.9

RIP度量(Metric):度量等同于开销

RIP使用跳数作为度量值来衡量到达目的的网络

缺省的情况下,直连网络的路由条数为0,当路由器发送路由更新时,会把度量值加1,不能超过15跳。

RIPv1和RIPv2的比较

V1:有类别路由协议,不支持VLSM和CIDR(无类别域间路由)

以广播的形式发送报文255.255.255.255

不支持认证

V2:无类别路由协议,支持VLSM,支持路由聚合与CIDR

支持以广播或者组播(224.0.0.9)方式发送报文

支持明文认证和MD5密文认证

V2的报文格式:

Route Tag:路由标记 用来做路由策略使用

Subnet Mask:子网掩码

Next Hop: 下一跳

RIP企业级部署

在这里插入图片描述
一:基础配置

R1:

<Huawei>system view
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]int g0/0/0            //进入接口
[Huawei-GigabitEthernet0/0/0]ip address 10.1.1.1 24   //配置IP地址
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 10.1.2.1 24
[Huawei-GigabitEthernet0/0/1]display ip interface brief  //查看接口配置
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              10.1.1.1/24          up         up        
GigabitEthernet0/0/1              10.1.2.1/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s) 

R2:

<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.1.2.2 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 10.1.3.1 24 
[Huawei-GigabitEthernet0/0/1]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              10.1.2.2/24          up         up        
GigabitEthernet0/0/1              10.1.3.1/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)  

R3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 10.1.3.2 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 10.1.4.1 24
[Huawei-GigabitEthernet0/0/1]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              10.1.3.2/24          up         up        
GigabitEthernet0/0/1              10.1.4.1/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s) 

二:RIP部署

R1(同样的部署):

三:结果

在这里插入图片描述

PC1使用ping命令可以于PC2互相通信。

四:抓包

在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值