设为首页 收藏本站
查看: 1223|回复: 0

[经验分享] 华为设备RIP实施和理论详解

[复制链接]

尚未签到

发表于 2018-7-23 07:59:54 | 显示全部楼层 |阅读模式
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 ->  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,>  1.1.1.1/32, cost 16, [I], nexthop 10.1.12.1

  10.0.0.0/8, cost 0,>  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,>  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 ->  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 ->  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

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-539904-1-1.html 上篇帖子: 华为基本配置命令 下篇帖子: 华为mux-vlan配置步骤
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表