华为设备RIP实施和理论详解
1.路由协议基础
共同的目的:更新、维护和控制3层的路由
工作机制:
RIP,封装在UDP这个协议上,端口号520(优先级100)
OSPF,封装在IP层,协议号89(优先级,内部10,外部是150-ASE)
中间系统到中间系统,OSI模型上的路由协议,直接封装在2层上,直接把协议报文发到0014(L1)/0015(Level2)上,优先级15
BGP,封装在TCP这协议上的,端口号179(优先级255)
RIP到底工作在3层还是4层?
优先级本地有效(不能影响其他路由器的协议竞争路由表)
2.RIP 基础配置
报文:request、response(command)
基本的配置:
[R2]dis current-configuration configuration rip
[V200R003C00]
#
rip 1
network 10.0.0.0
network 22.0.0.0
[R2]dis rip 1 neighbor
IP Address Interface Type Last-Heard-Time
10.1.12.1 Serial2/0/0 RIP 0:0:10
Number of RIP routes : 2
RIP每个30s来发送一次response
[R2]dis ip rou pro rip
Route Flags: R - relay, D - download to fib
Public routing table : RIP
Destinations : 3 Routes : 3
RIP routing table status : <Active>
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost(HOP) Flags NextHop Interface
1.0.0.0/8 RIP 100 1 D 10.1.12.1 Serial2/0/0
10.1.1.0/24 RIP 100 1 D 10.1.12.1 Serial2/0/0
11.0.0.0/8 RIP 100 1 D 10.1.12.1 Serial2/0/0
<R2>dis rip 1 route
Route Flags : R - RIP
A - Aging, G - Garbage-collect
Peer 10.1.12.1 on Serial2/0/0
Destination/Mask Nexthop Cost Tag Flags Sec
11.1.1.1/32 10.1.12.1 1 0 RA 180
10.1.1.0/24 10.1.12.1 1 0 RA 180
1.1.1.1/32 10.1.12.1 1 0 RA 180 //老话时间aging time到时,会切换到垃圾收集时间,此时路由消失,但是DB中依旧存在:<R2>dis ip rou pro rip
<R2>
<R2>dis rip 1 route
Route Flags : R - RIP
A - Aging, G - Garbage-collect
Peer 10.1.12.1 on Serial2/0/0
Destination/Mask Nexthop Cost Tag Flags Sec
11.1.1.1/32 10.1.12.1 16 0 RG 84
10.1.1.0/24 10.1.12.1 16 0 RG 84
1.1.1.1/32 10.1.12.1 16 0 RG 84 //进入120s的垃圾收集时间,意味着该表项中存在于RIP路由表,而全局路由表早已消失
[R2-rip-1]timers rip 29 179 119 //修改RIP的时间值
3.防环机制:
1)水平分割(split horizon),从某个接口收到了路由。就不会再把该路由从接口发出去(被动方式)
<R2>dis rip 1 int ver
Serial2/0/0(10.1.12.2)
State : UP MTU : 500
Metricin : 0
Metricout : 1
Input : Enabled Output : Enabled
Protocol : RIPv2 Multicast
Send version : RIPv2 Multicast Packets
Receive version : RIPv2 Multicast and Broadcast Packets
Poison-reverse : Disabled
Split-Horizon : Enabled //水平分割开启
Authentication type : None
Replay Protection : Disabled
2)毒性逆转,发送不可达路由告知邻居路由器(主动方式,坏消息总比没有消息强)
interface Serial2/0/0
link-protocol ppp
ip address 10.1.12.2 255.255.255.0
rip poison-reverse //开启毒性逆转
3)触发更新
拍错:
rip metricin 15 //入方向度量值15
[R2]display rip 1 database //验证数据库
Advertisement State : [A] - Advertised
[I] - Not Advertised/Withdraw 代表消失
1.0.0.0/8, cost 16, ClassfulSumm
1.1.1.1/32, cost 16, [I], nexthop 10.1.12.1
10.0.0.0/8, cost 0, ClassfulSumm
10.1.1.0/24, cost 16, [I], nexthop 10.1.12.1
10.1.12.0/24, cost 0, [A], Rip-interface
11.0.0.0/8, cost 16, ClassfulSumm
11.1.1.1/32, cost 16, [I], nexthop 10.1.12.1
[R1-Serial2/0/0]rip metricout 9
interface Serial2/0/0
link-protocol ppp
ip address 10.1.12.1 255.255.255.0
rip metricout 2000 8 //精准的对acl 2000匹配的路由来进行度量值的修改
[R1]dis acl all
Total quantity of nonempty ACL number is 1
4.静默端口(RIP、OSPF、中间系统到中间系统都存在)
不在发送某种协议的报文,通常用在环回接口以及连接终端的接口上,用于构建邻居的物理接口上。
rip 1
version 2
network 10.0.0.0
network 22.0.0.0
silent-interface all //静默所有接口
silent-interface disable Serial2/0/0//排除物理接口,物理接口不要静默,用于构建邻居
Basic ACL 2000, 1 rule
Acl's step is 5
rule 10 permit source 1.1.1.1 0 (3 matches)
5.汇总:在路由可用的前提下减少路由条目数
RIP可以在任何一个设备做汇总,要在路由更新出去的接口来实施
11.1.1.1 0000,0001
11.1.1.2 0000.0010
11.1.1.3 0000,0011
11.1.1.0 255.255.255.252
[R1-Serial2/0/0]rip summary-address 11.1.1.0 255.255.255.252 //推荐使用手工汇总
[R2-rip-1]dis ip rou pro rip
Route Flags: R - relay, D - download to fib
Public routing table : RIP
Destinations : 3 Routes : 3
RIP routing table status : <Active>
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 RIP 100 8 D 10.1.12.1 Serial2/0/0
10.1.1.0/24 RIP 100 1 D 10.1.12.1 Serial2/0/0
11.1.1.0/30 RIP 100 1 D 10.1.12.1 Serial2/0/0
不推荐的自动汇总,把路由汇总到主类的边界
[R2-rip-1]summary always
[R2-rip-1]dis ip rou pro rip
Route Flags: R - relay, D - download to fib
Public routing table : RIP
Destinations : 3 Routes : 3
RIP routing table status : <Active>
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.0.0.0/8 RIP 100 1 D 10.1.12.1 Serial2/0/0
10.1.1.0/24 RIP 100 1 D 10.1.12.1 Serial2/0/0 //为什么这条路由没有自动汇总呢?
11.0.0.0/8 RIP 100 1 D 10.1.12.1 Serial2/0/0
RIP routing table status : <Inactive>
Destinations : 0 Routes : 0
如果需要汇总的网络和RIP构建邻居的接口同一个主类网络,则不会汇总
需求:
1.两个设备各自通告自身的环回接口,建立邻居之后手工汇总环回接口到/16
2.静默所有接口,请使用单播来建立邻居关系,使用单播来更新RIP报文
3.R1增加一个额外的环回接口1.1.1.1,R2上得到这一条路由的度量为15
本文转自EnderJoe 51CTO博客,原文链接:http://blog.51cto.com/enderjoe/2057525
华为设备RIP实施和理论详解的更多相关文章
- [PXE] Linux(centos6)中PXE 服务器搭建,PXE安装、启动及PXE理论详解
[PXE] Linux(centos6)中PXE 服务器搭建,PXE安装.启动及PXE理论详解 本篇blog主要讲述了[PXE] linux(centos)PXE无盘服务器搭建,安装,启动及pxe协议 ...
- 动态选路、RIP协议&&OSPF协议详解
动态选路.RIP协议&&OSPF协议详解 概念 当相邻路由器之间进行通信,以告知对方每个路由器当前所连接的网络,这时就出现了动态选路.路由器之间必须采用选路协议进行通信,这样的选路协议 ...
- 迅为4412开发板Linux驱动教程——总线_设备_驱动注册流程详解
本文转自:http://www.topeetboard.com 视频下载地址: 驱动注册:http://pan.baidu.com/s/1i34HcDB 设备注册:http://pan.baidu.c ...
- Cisco思科模拟器路由器各个端口IP地址的配置及路由协议RIP的配置 入门详解 - 精简归纳
Cisco思科模拟器路由器各个端口IP地址的配置及路由协议RIP的配置 入门详解 - 精简归纳 JERRY_Z. ~ 2020 / 11 / 21 转载请注明出处!️ 附: 交流方式: ️ ️ ️ Q ...
- JVM的GC理论详解
GC的概念 GC:Garbage Collection 垃圾收集.这里所谓的垃圾指的是在系统运行过程当中所产生的一些无用的对象,这些对象占据着一定的内存空间,如果长期不被释放,可能导致OOM(堆溢出) ...
- awk理论详解、实战
答疑解惑: 为什么用awk取IP的时候用$4? ifconfig eth0 | awk -F '[ :]+' 'NR==2{print $4}' IP第二行内容如下: inet addr:10.0.0 ...
- (转载)linux中设备文件配置程序udev详解
如果你使用Linux比较长时间了,那你就知道,在对待设备文件这块,Linux改变了几次策略.在Linux早期,设备文件仅仅是是一些带有适当的属性集的普通文件,它由mknod命令创建,文件存放在/dev ...
- Java基础学习总结(53)——HTTPS 理论详解与实践
前言 在进行 HTTP 通信时,信息可能会监听.服务器或客户端身份伪装等安全问题,HTTPS 则能有效解决这些问题.在使用原始的HTTP连接的时候,因为服务器与用户之间是直接进行的明文传输,导致了用户 ...
- 关于Apple设备私有的apple-touch-icon属性详解
以前我们用过favicon在浏览器给网站进行身份标识,用法如下: <link href="http://image.feeliu.com/web/favicon.ico" r ...
随机推荐
- MariaDB使用数据库查询《三》
MariaDB使用数据库查询 案例5:使用数据库查询 5.1 问题 本例要求配 ...
- 【数据库】MySQL数据库(二)
一.数据库文件的导出 1.在DOS命令行下导出数据库(带数据) mysqldump -u root -p 数据库名 > E:\wamp\www\lamp175\lamp175.sql 2.在DO ...
- Vulnhub DC-4靶机渗透
信息搜集 nmap -sP 192.168.146.0/24 #扫网段看看存活的主机,找到靶机 nmap -sS -Pn -A 192.168.146.141 可以看到开放了22和80端口,那么就可以 ...
- Java第六天,API中常用的类,StringBuffer、StringBuilder、包装类、System类的使用
System (1)这个类中有很多可以获取系统信息的类. public class SystemLearn { public static void main(String[] args) { lon ...
- 自动生成四则运算题目(C语言)
Github项目地址:https://github.com/huihuigo/expgenerator 合作者:马文辉(3118005015).卢力衔(3118005013) 项目简介 1题目:实现一 ...
- P4015 运输问题【zkw费用流】
输入输出样例 输入 #1复制 2 3 220 280 170 120 210 77 39 105 150 186 122 输出 #1复制 48500 69140zuixiaofeiyo 说明/提示 1 ...
- Lua 5.3 -- SOL2.0 用户指南 【1】
SOL2.2 是一个快速.简单的C++与LUA的绑定器.如果确定要在你的程序里面同时运行Lua和C++,SOL 是一个高性能的绑定器,是一个API使用方便的 GO-TO 框架. 简单看一下特点:这个链 ...
- std::string::assign函数
string& assign (const string& str); string& assign (const string& str, size_t subpos ...
- 【高并发】不废话,言简意赅介绍BlockingQueue
写在前面 最近,有不少网友留言提问:在Java的并发编程中,有个BlockingQueue,它是个阻塞队列,为何要在并发编程里使用BlockingQueue呢?好吧,今天,就临时说一下Blocking ...
- bootstrap-table 内容超出鼠标悬浮显示全部
.table th, .table td { text-align: center; vertical-align: middle !important; } table { width: 100px ...