H3C OSPF配置7-GR和NSR配置舉例


GR配置舉例

1.組網需求  

·     Switch A、Switch B和Switch C既屬於同一自治系統,也屬於同一OSPF域,通過OSPF協議實現網絡互連,並提供GR機制。

·     Switch A作為非IETF標准GR Restarter,Switch B和Switch C作為GR Helper並且通過GR機制與Switch A保持帶外同步。

   

2.配置

  1)配置OSPF基本功能  

SW A
[SwitchA] router id 1.1.1.1
[SwitchA] ospf 100
[SwitchA-ospf-100] area 0
[SwitchA-ospf-100-area-0.0.0.0] network 192.1.1.0 0.0.0.255

SW B
[SwitchB] router id 2.2.2.2
[SwitchB] ospf 100
[SwitchB-ospf-100] area 0
[SwitchB-ospf-100-area-0.0.0.0] network 192.1.1.0 0.0.0.255

SW C
[SwitchC] router id 3.3.3.3
[SwitchC] ospf 100
[SwitchC-ospf-100] area 0
[SwitchC-ospf-100-area-0.0.0.0] network 192.1.1.0 0.0.0.255

  2)配置OSPF GR  

[SwitchA] ospf 100
[SwitchA-ospf-100] enable link-local-signaling
[SwitchA-ospf-100] enable out-of-band-resynchronization
[SwitchA-ospf-100] graceful-restart  # 配置Switch A作為非IETF標准GR Restarter,即使能OSPF進程100的本地鏈路信令能力、OSPF帶外同步能力和非IETF標准GR能力。

[SwitchB] ospf 100
[SwitchB-ospf-100] enable link-local-signaling
[SwitchB-ospf-100] enable out-of-band-resynchronization  # 配置Switch B作為GR Helper,即使能OSPF進程100的本地鏈路信令能力和OSPF帶外同步能力。

[SwitchC] ospf 100
[SwitchC-ospf-100] enable link-local-signaling
[SwitchC-ospf-100] enable out-of-band-resynchronization  # 配置Switch C作為GR Helper,即使能OSPF進程100的本地鏈路信令能力和OSPF帶外同步能力。

3.驗證配置

# 打開Switch A的OSPF平滑啟動事件調試信息開關。在Switch A上以GR方式重啟OSPF進程。

<SwitchA> debugging ospf event graceful-restart
<SwitchA> terminal monitor
<SwitchA> terminal logging level 7
<SwitchA> reset ospf 100 process graceful-restart
Reset OSPF process? [Y/N]:y
%Oct 21 15:29:28:727 2019 SwitchA OSPF/5/OSPF_NBR_CHG: OSPF 100 Neighbor 192.1.1.2(Vlan-interface100) from Full to Down.
%Oct 21 15:29:28:729 2019 SwitchA OSPF/5/OSPF_NBR_CHG: OSPF 100 Neighbor 192.1.1.3(Vlan-interface100) from Full to Down.
*Oct 21 15:29:28:735 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 nonstandard GR Started for OSPF Router
*Oct 21 15:29:28:735 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 created GR wait timer,timeout interval is 40(s).
*Oct 21 15:29:28:735 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 created GR Interval timer,timeout interval is 120(s).
*Oct 21 15:29:28:758 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 created OOB Progress timer for neighbor 192.1.1.3.
*Oct 21 15:29:28:766 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 created OOB Progress timer for neighbor 192.1.1.2.
%Oct 21 15:29:29:902 2019 SwitchA OSPF/5/OSPF_NBR_CHG: OSPF 100 Neighbor 192.1.1.2(Vlan-interface100) from Loading to Full.
*Oct 21 15:29:29:902 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 deleted OOB Progress timer for neighbor 192.1.1.2.
%Oct 21 15:29:30:897 2019 SwitchA OSPF/5/OSPF_NBR_CHG: OSPF 100 Neighbor 192.1.1.3(Vlan-interface100) from Loading to Full.
*Oct 21 15:29:30:897 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 deleted OOB Progress timer for neighbor 192.1.1.3.
*Oct 21 15:29:30:911 2019 SwitchA OSPF/7/DEBUG:
OSPF GR: Process 100 Exit Restart,Reason : DR or BDR change,for neighbor : 192.1.1.3.
*Oct 21 15:29:30:911 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 deleted GR Interval timer.
*Oct 21 15:29:30:912 2019 SwitchA OSPF/7/DEBUG:
OSPF 100 deleted GR wait timer.
%Oct 21 15:29:30:920 2019 SwitchA OSPF/5/OSPF_NBR_CHG: OSPF 100 Neighbor 192.1.1.2(Vlan-interface100) from Full to Down.
%Oct 21 15:29:30:921 2019 SwitchA OSPF/5/OSPF_NBR_CHG: OSPF 100 Neighbor 192.1.1.3(Vlan-interface100) from Full to Down.
%Oct 21 15:29:33:815 2019 SwitchA OSPF/5/OSPF_NBR_CHG: OSPF 100 Neighbor 192.1.1.3(Vlan-interface100) from Loading to Full.
%Oct 21 15:29:35:578 2019 SwitchA OSPF/5/OSPF_NBR_CHG: OSPF 100 Neighbor 192.1.1.2(Vlan-interface100) from Loading to Full.  
從上面的信息可以看出Switch A完成了GR。

NSR配置舉例

1.Switch S、Switch A、Switch B屬於同一OSPF區域,通過OSPF協議實現網絡互連。要求對Switch S進行主備倒換時,Switch A和Switch B到Switch S的鄰居沒有中斷,Switch A到Switch B的流量沒有中斷。

    

2.配置

  1)配置各路由器接口的IP地址和OSPF協議 

  配置各交換機之間采用OSPF協議進行互連,確保Switch S、Switch A和Switch B之間能夠在網絡層互通,並且各交換機之間能夠借助OSPF協議實現動態路由更新。

  2)配置OSPF NSR  

[SwitchS] ospf 100
[SwitchS-ospf-100] non-stop-routing  # 使能Switch S的OSPF NSR功能。

3.配置驗證  

# Switch S進行主備倒換。
[SwitchS] placement reoptimize
Predicted changes to the placement
Program                           Current location       New location
---------------------------------------------------------------------
rib                               0/0                    0/0
staticroute                       0/0                    0/0
ospf                              0/0                    1/0
Continue? [y/n]:y
Re-optimization of the placement start. You will be notified on completion.
Re-optimization of the placement complete. Use 'display placement' to view the new placement.

  

# 查看Switch A/B上OSPF協議的鄰居和路由。
<SwitchA> display ospf peer
          OSPF Process 1 with Router ID 2.2.2.1
               Neighbor Brief Information
 Area: 0.0.0.0
 Router ID       Address         Pri Dead-Time  State             Interface
 3.3.3.1         12.12.12.2      1   37         Full/BDR          Vlan100

<SwitchA> display ospf routing
          OSPF Process 1 with Router ID 2.2.2.1
                   Routing Table
                Topology base (MTID 0)
 Routing for network
 Destination        Cost     Type    NextHop         AdvRouter       Area
 44.44.44.44/32     2        Stub    12.12.12.2      4.4.4.1         0.0.0.0
 14.14.14.0/24      2        Transit 12.12.12.2      4.4.4.1         0.0.0.0
 22.22.22.22/32     0        Stub    22.22.22.22     2.2.2.1         0.0.0.0
 12.12.12.0/24      1        Transit 12.12.12.1      2.2.2.1         0.0.0.0

 Total nets: 4
 Intra area: 4  Inter area: 0  ASE: 0  NSSA: 0

  通過上面信息可以看出在Switch S發生主備倒換的時候,Switch A和Switch B的鄰居和路由信息保持不變,從Switch A到Switch B的流量轉發沒有受到主備倒換的影響。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM