所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

S1720, S2700, S5700, S6720 V200R010C00 配置指南-IP单播路由

本文档介绍了设备支持的IP单播路由相关配置。主要内容包括IP路由概述,静态路由、RIP、RIPng、OSPF、OSPFv3、IS-IS(IPv4)、IS-IS(IPv6)、BGP、路由策略以及策略路由的基本原理和配置过程,并提供相关的配置案例。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置OSPF GR特性示例

配置OSPF GR特性示例

组网需求

图1所示,三台设备之间运行OSPF协议,整个OSPF网络被划分为Area0和Area1两个区域。现要求在SwitchC上运行的OSPF协议重启过程中不影响数据的正常转发。

图6-75  OSPF GR的配置举例

配置思路

采用如下的思路配置OSPF GR:

  1. 在各交换机上配置OSPF基本功能,实现OSPF网络的基本互通。

  2. SwitchA和SwitchC上使能Opaque LSA功能,实现OSPF通过Type9 LSA支持OSPF GR。
  3. SwitchA和SwitchC上配置GR功能,实现当OSPF协议重启时保证数据正常转发。

操作步骤

  1. 配置各接口所属的VLAN

    # 配置SwitchA。SwitchB和SwitchC的配置与SwitchA类似。

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 10 20
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] port link-type trunk
    [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface gigabitethernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] port link-type trunk
    [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 20
    [SwitchA-GigabitEthernet0/0/2] quit

  2. 配置各VLANIF接口的IP地址

    # 配置SwitchA。SwitchB和SwitchC的配置与SwitchA类似。

    [SwitchA] interface vlanif 10
    [SwitchA-Vlanif10] ip address 192.168.0.1 24
    [SwitchA-Vlanif10] quit
    [SwitchA] interface vlanif 20
    [SwitchA-Vlanif20] ip address 192.168.1.1 24
    [SwitchA-Vlanif20] quit

  3. 配置OSPF基本功能

    # 配置SwitchA。

    [SwitchA] ospf 1 router-id 10.1.1.1
    [SwitchA-ospf-1] area 0
    [SwitchA-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] quit
    [SwitchA-ospf-1] area 1
    [SwitchA-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.1] quit
    [SwitchA-ospf-1] quit

    # 配置SwitchB。

    [SwitchB] ospf 1 router-id 10.2.2.2
    [SwitchB-ospf-1] area 0
    [SwitchB-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
    [SwitchB-ospf-1-area-0.0.0.0] quit
    [SwitchB-ospf-1] quit

    # 配置SwitchC。

    [SwitchC] ospf 1 router-id 10.3.3.3
    [SwitchC-ospf-1] area 1
    [SwitchC-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
    [SwitchC-ospf-1-area-0.0.0.1] quit
    [SwitchC-ospf-1] quit

  4. 使能Opaque-LSA功能

    # 配置SwitchA。

    [SwitchA] ospf 1
    [SwitchA-ospf-1] opaque-capability enable
    [SwitchA-ospf-1] quit

    # 配置SwitchC。

    [SwitchC] ospf 1
    [SwitchC-ospf-1] opaque-capability enable
    [SwitchC-ospf-1] quit

  5. 配置OSPF GR特性

    # 配置SwitchA。

    [SwitchA] ospf 1
    [SwitchA-ospf-1] graceful-restart
    [SwitchA-ospf-1] return

    # 配置SwitchC。

    [SwitchC] ospf 1
    [SwitchC-ospf-1] graceful-restart
    [SwitchC-ospf-1] return

  6. 验证配置结果

    # 查看SwitchC的GR状态。

    <SwitchC> display ospf graceful-restart
     
              OSPF Process 1 with Router ID 10.3.3.3
     Graceful-restart capability     : enabled
     Graceful-restart support        : planned and un-planned, totally
     Helper-policy support           : planned and un-planned, strict lsa check
     Current GR state                : normal
     Graceful-restart period         : 120 seconds
     
     Number of neighbors under helper:
      Normal neighbors    : 0
      Virtual neighbors   : 0
      Sham-link neighbors : 0
      Total neighbors     : 0
     
     Number of restarting neighbors : 0
     
     Last exit reason:
      On graceful restart : none
      On Helper           : none

    # 在SwitchA查看邻居状态。

    <SwitchA> display ospf peer
    
    	 OSPF Process 1 with Router ID 10.1.1.1
    		 Neighbors 
    
     Area 0.0.0.0 interface 192.168.0.1(Vlanif10)'s neighbors
     Router ID: 10.2.2.2          Address: 192.168.0.2      GR State: Normal     
       State: Full  Mode:Nbr is  Master  Priority: 1
       DR: 192.168.0.2  BDR: 192.168.0.1  MTU: 0    
       Dead timer due in 40  sec 
       Retrans timer interval: 5 
       Neighbor is up for 00:04:28     
       Authentication Sequence: [ 0 ] 
    
    		 Neighbors 
    
     Area 0.0.0.1 interface 192.168.1.1(Vlanif20)'s neighbors
     Router ID: 10.3.3.3          Address: 192.168.1.2      GR State: Normal   
       State: Full  Mode:Nbr is  Master  Priority: 1
       DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
       Dead timer due in 36  sec 
       Retrans timer interval: 5 
       Neighbor is up for 00:00:00     
       Authentication Sequence: [ 0 ]

    可以看到,SwitchA的OSPF邻居处于Full状态,GR的状态是Normal

    # 平滑重启SwitchC的OSPF进程。

    <SwitchC> reset ospf process graceful-restart

    # 在SwitchA查看邻居状态。

    <SwitchA> display ospf peer
    
    	 OSPF Process 1 with Router ID 10.1.1.1
    		 Neighbors 
    
     Area 0.0.0.0 interface 192.168.0.1(Vlanif10)'s neighbors
     Router ID: 10.2.2.2          Address: 192.168.0.2      GR State: Normal     
       State: Full  Mode:Nbr is  Master  Priority: 1
       DR: 192.168.0.2  BDR: 192.168.0.1  MTU: 0    
       Dead timer due in 40  sec 
       Retrans timer interval: 5 
       Neighbor is up for 00:04:28     
       Authentication Sequence: [ 0 ] 
    
    		 Neighbors 
    
     Area 0.0.0.1 interface 192.168.1.1(Vlanif20)'s neighbors
     Router ID: 10.3.3.3          Address: 192.168.1.2      GR State: Normal   
       State: Full  Mode:Nbr is  Slave  Priority: 1
       DR: 192.168.1.1  BDR: 192.168.1.2  MTU: 0    
       Dead timer due in 36  sec 
       Retrans timer interval: 5 
       Neighbor is up for 00:00:00     
       Authentication Sequence: [ 0 ]

    可以看到,SwitchA与SwitchC邻居关系继续保持为Full状态,不受SwitchC的OSPF进程平滑重启的影响。

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ip address 192.168.0.1 255.255.255.0
    #
    interface Vlanif20
     ip address 192.168.1.1 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    ospf 1 router-id 10.1.1.1
     opaque-capability enable
     graceful-restart
     area 0.0.0.0
      network 192.168.0.0 0.0.0.255
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 192.168.0.2 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    ospf 1 router-id 10.2.2.2
     area 0.0.0.0
      network 192.168.0.0 0.0.0.255
    #
    return
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    vlan batch 20
    #
    interface Vlanif20
     ip address 192.168.1.2 255.255.255.0
    #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    ospf 1 router-id 10.3.3.3
     opaque-capability enable
     graceful-restart
     area 0.0.0.1
      network 192.168.1.0 0.0.0.255
    #
    return
翻译
下载文档
更新时间:2019-04-17

文档编号:EDOC1000141402

浏览量:27187

下载量:1379

平均得分:
本文档适用于这些产品
相关文档
相关版本
分享
上一页 下一页