CCNP RIP及RIP選路實驗

RIP

基本信息

一種IGP路由信息協議,基於UDP520端口工作,存在V1,V2(ipv4)和RIPNG(ipv6)3種版本。距離矢量型路由協議,支持等開銷負載均衡,默認4條,最大6條,跳數=度量,觸發和週期更新。

協議的防環機制

  1. rip默認最大跳數可達爲15跳,16跳爲不可達(跳數限制)
  2. 從此口進不從此口出,用於直連和星型拓撲的防環,在MA網絡消除重複更新量(水平分割)
  3. 路由不可達時自動發送一條跳數爲16跳的路由條目觸發更新(毒性逆轉水平分割)
  4. 抑制計時器—更新時間30s 失效時間180s 抑制時間180s(華爲設備不存在抑制時間) 刷新時間240s

V1和V2的區別

  1. V1是有類別協議,更新時不攜帶子網掩碼;V2是無類別協議,不支持超網,但支持認證。
  2. V1使用廣播更新—255.255.255.255 V2使用組播更新—224.0.0.9
    兼容問題:V1和V2默認不兼容,V1僅收發V1信息;V2僅收發V2信息。

RIPV1連續子網問題

RIPV1可以在連續性子網環境下正常工作;若未實現連續子網環境,可以使用第二地址

選路實驗

RIP選路實驗
子網劃分
先劃分6個路由器的環回和骨幹鏈路,在仔細劃分,方便RIP宣告和彙總

骨幹+環回 骨幹 環回1 環回2
R2 192.168.1.0/27 192.168.1.0/29 192.168.1.8/29 192.168.1.16/29
R3 192.168.1.32/27 192.168.1.32/29 192.168.1.40/29 192.168.1.48/29
R4 192.168.1.64/27 192.168.1.64/29 192.168.1.72/29 192.168.1.80/29
R5 192.168.1.96/27 192.168.1.96/29 192.168.1.104/29 192.168.1.112/29
R6 192.168.1.128/27 192.168.1.128/29 192.168.1.136/29 192.168.1.144/29
R6-7 - 192.168.1.160/27 - -

實驗拓撲及各網段如下:
在這裏插入圖片描述

  1. 基本IP配置略
    R1-R2之間用12.1.1.0/24網段 R1環回爲1.1.1.1/24
  2. 因爲R7,R8爲RIPV1,但R7-R8網段不是連續子網,所以在R7-R8接口上配置第二地址
R7(config)#interface f1/0
R7(config-if)#ip address 172.16.3.1 255.255.255.0 secondary 
R8(config)#interface f0/0
R8(config-if)#ip address 172.168.3.2 255.255.255.0 secondary 
  1. 啓RIP協議,宣告網段
R2(config)#router  rip 
R2(config-router)#version 2
R2(config-router)#no auto-summary    關閉自動彙總
R2(config-router)#network 192.168.1.0  爲了方便,所以我們全部宣告
R3,R4,R5,R6略
R7(config)#router  rip 
R7(config-router)#network 172.168.1.0
R7(config-router)#network 172.168.3.0宣告第二地址
R8(config)#router  rip 
R7(config-router)#network 172.168.2.0
R7(config-router)#network 172.168.3.0
  1. RIPV1V2兼容
R6(config)#interface f2/0
R6(config-if)#ip rip send version 1 2   可發送版本12
R6(config-if)#ip rip receive version 1 2  可接收版本12 
R7(config)#interface f0/0
R7(config-if)#ip rip send version 1 2
R7(config-if)#ip rip receive version 1 2
  1. RIP選路R2訪問R5環回通過R3
    RIP選路用偏移列表,在控制層面更新進出的接口上人爲加大度量,可疊加
R6(config)#access-list 1 permit 192.168.1.96 0.0.0.31
R6(config)#router rip 
R6(config-router)#offset-list 1 in 6 
  1. 加快收斂,彙總路由減少路由條目數量
R2
R2(config)#router rip 
R2(config-router)#timers basic 15 90 90 120   加快收斂
R2(config)#interface f1/0        在更新源路由器上所有更新發出的接口上彙總
R2(config-if)#ip summary-address rip 192.168.1.0 255.255.255.224
R2(config)#interface f2/0
R2(config-if)#ip summary-address rip 192.168.1.0 255.255.255.224
R3
R3(config)#interface f0/0
R3(config-if)#ip summary-address rip 192.168.1.32 255.255.255.224
R3(config)#interface f1/0
R3(config-if)#ip summary-address rip 192.168.1.32 255.255.255.224
R4
R4(config)#interface f0/0
R4(config-if)#ip summary-address rip 192.168.1.64 255.255.255.224
R4(config)#interface f1/0
R4(config-if)#ip summary-address rip 192.168.1.64 255.255.255.224
R5
R5(config)#interface f0/0
R5(config-if)#ip summary-address rip 192.168.1.96 255.255.255.224
R5(config)#interface f1/0
R5(config-if)#ip summary-address rip 192.168.1.96 255.255.255.224
R6
R6(config)#interface f0/0    
R6(config-if)#ip summary-address rip 192.168.1.128 255.255.255.224
R6(config-if)#ip summary-address rip 192.168.1.160 255.255.255.224
R6(config)#interface f1/0
R6(config-if)#ip summary-address rip 192.168.1.160 255.255.255.224
R6(config-if)#ip summary-address rip 192.168.1.128 255.255.255.224
R6(config)#interface f2/0
R6(config-if)#ip summary-address rip 192.168.1.128 255.255.255.224
R6(config-if)#ip summary-address rip 192.168.1.160 255.255.255.224
  1. 私網可以連接公網做NAT
R2(config)#access-list 1 permit any
R2(config)#ip nat inside source list 1 interface f0/0
R2(config)#interface f0/0
R2(config-if)#ip nat outside
R2(config)#interface f1/0
R2(config-if)#ip nat inside
R2(config)#interface f2/0
R2(config-if)#ip nat inside
R2(config-router)#default-information originate 下放缺省地址
R2(config)#ip route 0.0.0.0 0.0.0.0 12.1.1.1  靜態缺省
  1. R1telnetR2實際登錄R8
 打開R8telnet   在R2做端口映射 
R8(config)#enable password cisco
R8(config)#line vty 0 4
R8(config-line)#password cisco
R8(config-line)#login 
R2(config)#ip nat inside source static tcp 78.1.1.2 23 12.1.1.2 23 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章