OSPF四大特殊區域(STUB T-STUB NSSA T-NSSA)

Ospf 四大特殊區域

  • stub area 末節
  • totally stub area ------T-stub 完全末節
  • nssa area 次末節
  • nssa totally area ------T-nssa 完全次末節
  • 這四大區域作用都是優化路由表
  • 優化路由表的好處
    • 如果一臺路由器的它路由表條目非常非常多有什麼影響,數據包到本路由要去查表,那麼數據包查表的過程是需要時間的,如果時間越長會造成網絡延遲比較大,所以就需要優化路由表來減小影響
  • 路由重發布
    • RIP 和OSPF路由協議本質不通的問題是由於:不同路由協議之間不能夠相互學習路由條目.
    • 基於這個背景:路由重分佈(路由重發布)
    • 路由重分佈:解決不同路由協議之間相互學習路由條目的.
    • 配置的位置:不同路由協議相交換路由器上進行配置.
  • 默認路由:0.0.0.0 0.0.0.0 下一跳(靜態默認路由) 0代表的的任意網段
  • OIA的路由表示:這條路由是由OSPF區域之間經過的路由
  • Stub區域:
    • Stub——末節
      • 作用:優化路由表
      • 優化區域:只優化stub區域內的所有路由器:將到達外部路由協議(rip)優先成默認路由。
      • 優化條目:是將非OSPF區域路由條目優化成O*IA的默認路由
      • 就是與骨幹區域相鄰的區域
        • 1相鄰後面沒有接其它區域
          • 例圖:

        • 2.如果相鄰後面接了其的OSPF區域,先擇最後一個區域作爲stub區域.
          • 例圖:

    • Stub的配置
      • 拓撲圖:
      • 1、規劃網段
      • 2、配置每個節點的IP地址
        • R0:
          • en
          • conf t
          • int s0/3/0
          • no shutdown
          • ip address 172.16.255.1 255.255.255.252
          • exit
          • interface loopback0
          • ip address 172.16.1.1 255.255.255.0
          • end
          • wr
        • R1:
          • enable
          • conf t
          • interface s0/3/0
          • no shutdown
          • ip address 172.16.255.2 255.255.255.252
          • exit
          • interface s0/3/1
          • no shutdown
          • ip address 172.16.255.5 255.255.255.252
          • exit
        • R2:
          • enable
          • conf t
          • interface s0/3/1
          • no shutdown
          • ip address 172.16.255.6 255.255.255.252
          • exit
          • interface s0/3/0
          • no shutdown
          • ip address 172.16.255.9 255.255.255.252
          • exit
          • interface s0/1/0
          • no shutdown
          • ip address 192.168.1.1 255.255.255.0
          • exit
        • R3:
          • enable
          • conf t
          • interface loopback0
          • ip address 172.16.2.1 255.255.255.0
          • exit
          • interface s0/3/0
          • no shutdown
          • ip address 172.16.255.10 255.255.255.252
          • exit
        • R4:
          • enable
          • conf t
          • interface loopback0
          • ip address 10.1.1.1  255.0.0.0
          • exit
          • interface s0/3/0
          • no shutdown
          • ip address 192.168.1.2 255.255.255.0
          • exit
      • 3、配置路由協議
        • R0:
          • Router(config)#routerospf 1
          • Router(config-router)#network172.16.1.0 0.0.0.255 area 1
          • Router(config-router)#network172.16.255.0 0.0.0.3 area 1
        • R1:
          • Router(config)#router ospf1
          • Router(config-router)#network172.16.255.0 0.0.0.3 area 1
          • Router(config-router)#network172.16.255.4 0.0.0.3 area 0
        • R2:
          • Router(config)#routerospf 1
          • Router(config-router)#network172.16.255.4 0.0.0.3 area 0
          • Router(config-router)#network172.16.255.8 0.0.0.3 area 0
          • Router(config)#routerrip
          • Router(config-router)#network192.168.1.0
        • R3:
          • Router(config)#routerospf 1
          • Router(config-router)#network172.16.2.0 0.0.0.255 area 2
          • Router(config-router)#network172.16.255.8 0.0.0.3 area 0
        • R4:
          • Router(config)#routerrip
          • Router(config-router)#network10.0.0.0
          • Router(config-router)#network192.168.1.0
      • 4、路由重發布(R2)
        • 將OSPF路由條目導入到RIP路由表.
        • Router(config)#routerrip
        • Router(config-router)#redistributeospf 1 metric 1
        • 將RIP路由條目導入到OSPF路由表.
        • Router(config)#routerospf 1
        • Router(config-router)#redistributerip subnets
      • 5、設置Stub區域(area1)
        • R1:
          • Router(config)#routerospf 1
          • Router(config-router)#area1 stub
        • R0:
          • Router(config)#routerospf 1
          • Router(config-router)#area1 stub
  • T-Stub
    • 優化區域:外部路由協議(RIP)和OIA(OSPF區域間的所有路由)優化成一條默認路由
    • 優化條目:是將非OSPF區域路由條目以及區域間的路由(OIA路由條目)優化成O*IA的默認路由。
    • 配置:
      • 在stub的基礎上
      • 添加T-stub
        • R1:
          • R1(config)# router ospf 1
          • R1(config-router)# area 1 stub  no- summary
          • R1(config-router)# exit
        • R0:
          • R0(config)# router ospf 1
          • R0(config-router)# area 1 stub
          • R0(config-router)# exit
          • R0(config)# ex
  • NSSA
    • 拓撲圖:
    • NSSA區域就是接其它路由協議的區域.(但是前提這個區域不是area 0)
    • 優化區域:NSSA區域路由器以及NSSA相連的其它協議的路由器
    • 優化條目:是將與AREA0相連的非OSPF區域路由條目優化成O*N2的默認路由
    • 配置:
      • 拓撲圖:
      • NSSA區域所有的路由器都要進行配置
      • 1、規劃網段
      • 2、配置每個節點IP地址
      • 3、配置路由協議
      • 4、路由重發布
      • 5、添加NSSSA
        • R8:
          • R8(config)# router ospf 1
          • R8(config-router)# area 1 nssa default- - information- - originate
          • R8(config-router)#exit
        • R7:
          • R8(config)# route r ospf 1
          • R8(config-router)# area 1 nssa
          • R7(config-router)# exit
  • T-NSSA
    • 優化區域:
      • NSSA區域路由器以及NSSA相連的其它協議的路由器
      • 將OSPF區域間的路由條目和將骨幹區域相連的外部路由協議的條目.並且將:t-NSSA連接其它路由協議的路由器上將除了NSSA區域的路由和本路由協議內部路由條目其它全部優化成一條默認路由
    • 優化條目:是將與AREA0相連的非OSPF區域路由條目以及區域間的路由(OIA)優化成O*IA的默認路由
    • 配置:
      • 在NSSSA的基礎上
      • 添加T-NSSA(進一步簡化NSSA區域的路由表)
        • R8:(只需要在R8添加)
          • R8(config)# router ospf 1
          • R8(config-router)# area  1 nssa no- - summary
          • R8(config-router)#exit
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章