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

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

提示

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

升级

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

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

配置OSPFv3与BFD联动示例

组网需求

图1所示。SwitchA、SwitchB和SwitchC之间运行OSPFv3。业务流量在主链路SwitchA→SwitchB上传送,链路SwitchA→SwitchC→SwitchB作为备份链路。客户希望能在主链路上实现毫秒级故障检测,当主链路出现故障时,能将业务流量及时切换到备份链路上。

说明:

请确保该场景下互联接口的STP处于未使能状态。因为在使能STP的环形网络中,如果用交换机的VLANIF接口构建三层网络,会导致某个端口被阻塞,从而导致三层业务不能正常运行。

图7-16  配置BFD for OSPFv3特性组网图

配置思路

采用如下思路配置BFD for OSPFv3特性:

  1. 在各Switch上使能OSPFv3基本功能,使主链路能正确传送业务流量。

  2. 配置OSPFv3 BFD,当主链路出现故障时,能将业务流量及时切换到备份链路上。

操作步骤

  1. 配置各Switch接口的IPv6地址

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

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] ipv6
    [SwitchA] interface GigabitEthernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] undo portswitch
    [SwitchA-GigabitEthernet0/0/1] ipv6 enable
    [SwitchA-GigabitEthernet0/0/1] ipv6 address FC00:3::1 64
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface GigabitEthernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] undo portswitch
    [SwitchA-GigabitEthernet0/0/2] ipv6 enable
    [SwitchA-GigabitEthernet0/0/2] ipv6 address FC00:1::1 64
    [SwitchA-GigabitEthernet0/0/2] quit

  2. 配置OSPFv3基本功能

    # 配置SwitchA。

    [SwitchA] ospfv3
    [SwitchA-ospfv3-1] router-id 10.1.1.1
    [SwitchA-ospfv3-1] quit
    [SwitchA] interface GigabitEthernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] ospfv3 1 area 0.0.0.0
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] interface GigabitEthernet 0/0/2
    [SwitchA-GigabitEthernet0/0/2] ospfv3 1 area 0.0.0.0
    [SwitchA-GigabitEthernet0/0/2] quit

    # 配置SwitchB。

    [SwitchB] ospfv3
    [SwitchB-ospfv3-1] router-id 10.2.2.2
    [SwitchB-ospfv3-1] quit
    [SwitchB] interface GigabitEthernet 0/0/1
    [SwitchB-GigabitEthernet0/0/1] ospfv3 1 area 0.0.0.0
    [SwitchB-GigabitEthernet0/0/1] quit
    [SwitchB] interface GigabitEthernet 0/0/2
    [SwitchB-GigabitEthernet0/0/2] ospfv3 1 area 0.0.0.0
    [SwitchB-GigabitEthernet0/0/2] quit
    [SwitchB] interface GigabitEthernet 0/0/3
    [SwitchB-GigabitEthernet0/0/3] ospfv3 1 area 0.0.0.0
    [SwitchB-GigabitEthernet0/0/3] quit

    # 配置SwitchC。

    [SwitchC] ospfv3
    [SwitchC-ospfv3-1] router-id 10.3.3.3
    [SwitchC-ospfv3-1] quit
    [SwitchC] interface GigabitEthernet 0/0/1
    [SwitchC-GigabitEthernet0/0/1] ospfv3 1 area 0.0.0.0
    [SwitchC-GigabitEthernet0/0/1] quit
    [SwitchC] interface GigabitEthernet 0/0/2
    [SwitchC-GigabitEthernet0/0/2] ospfv3 1 area 0.0.0.0
    [SwitchC-GigabitEthernet0/0/2] quit

    # 配置完成后,执行display ospfv3 peer命令,可以看到SwitchA和SwitchB、SwitchB和SwitchC之间都建立了邻居关系。以SwitchA的显示结果为例。

    [SwitchA] display ospfv3 peer verbose
    OSPFv3 Process (1)                                                              
                                                                                    
     Neighbor 10.3.3.3 is Full, interface address FE80::225:9EFF:FEFB:BFF1           
        In the area 0.0.0.0 via interface GE0/0/2                                  
        DR Priority is 1 DR is 10.1.1.1 BDR is 10.3.3.3                               
        Options is 0x000013 (-|-|-|-|-|-|R|-|-|E|V6)                                
        Dead timer due in 00:00:31                                                  
        Neighbour is up for 00:13:24                                                
        Database Summary Packets List 0                                             
        Link State Request List 0                                                   
        Link State Retransmission List 0                                            
        Neighbour Event: 5                                                          
        Neighbour If Id : 0xd0                                                      
     Neighbor 10.2.2.2 is Full, interface address FE80::201:FF:FE01:1                
        In the area 0.0.0.0 via interface GE0/0/1                                  
        DR Priority is 1 DR is 10.1.1.1 BDR is 10.2.2.2                               
        Options is 0x000013 (-|-|-|-|-|-|R|-|-|E|V6)                                
        Dead timer due in 00:00:38                                                  
        Neighbour is up for 00:13:38                                                
        Database Summary Packets List 0                                             
        Link State Request List 0                                                   
        Link State Retransmission List 0                                            
        Neighbour Event: 5                                                          
        Neighbour If Id : 0x28                                                      

    # 查看SwitchA的OSPFv3路由表的信息,应该有去往SwitchB和SwitchC的路由表项。

    [SwitchA] display ospfv3 routing
                                                                                    
    Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,            
            N - NSSA, U - Uninstalled, D - Denied by Import Policy                  
                                                                                    
    OSPFv3 Process (1)                                                              
         Destination                                               Metric           
           Next-hop                                                                 
         FC00:1::/64                                                   1            
           directly connected, GigabitEthernet0/0/2                                
         FC00:2::/64                                                   2            
           via FE80::225:9EFF:FEFB:BFF1, GigabitEthernet0/0/2                      
           via FE80::201:FF:FE01:1, GigabitEthernet0/0/1                           
         FC00:3::/64                                                   1            
           directly connected, GigabitEthernet0/0/1                                
         FC00:4::/64                                                   2            
           via FE80::201:FF:FE01:1, GigabitEthernet0/0/1                           

    如OSPFv3路由表显示,去往FC00:4::1/64的路由下一跳地址为GE0/0/1,流量在主链路SwitchA→SwitchB上传输。

  3. 配置OSPFv3 BFD

    # 在SwitchA上配置OSPFv3与BFD联动功能。

    [SwitchA] bfd
    [SwitchA-bfd] quit
    [SwitchA] ospfv3
    [SwitchA-ospfv3-1] bfd all-interfaces enable
    [SwitchA-ospfv3-1] bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-multiplier 4
    [SwitchA-ospfv3-1] quit

    # 在SwitchB上配置OSPFv3与BFD联动功能。

    [SwitchB] bfd
    [SwitchB-bfd] quit
    [SwitchB] ospfv3
    [SwitchB-ospfv3-1] bfd all-interfaces enable
    [SwitchB-ospfv3-1] bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-multiplier 4
    [SwitchB-ospfv3-1] quit

    # 在SwitchC上配置OSPFv3与BFD联动功能。

    [SwitchC] bfd
    [SwitchC-bfd] quit
    [SwitchC] ospfv3
    [SwitchC-ospfv3-1] bfd all-interfaces enable
    [SwitchC-ospfv3-1] bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-multiplier 4
    [SwitchC-ospfv3-1] quit

    # 配置完成后,在SwitchA或SwitchB上执行display ospfv3 bfd session命令,可以看到BFD的State状态为Up。

    以SwitchB的显示为例。

    [SwitchB] display ospfv3 bfd session verbose
                                                                                    
    * - STALE                                                                       
                                                                                    
    OSPFv3 Process (1)                                                              
                                                                                    
     Neighbor-Id: 10.3.3.3                                                           
     BFD Status: Up                                                                 
     Interface: GE0/0/2                                                            
     IPv6-Local-Address: FE80::201:FF:FE01:1                                        
     IPv6-Remote-Address: FE80::225:9EFF:FEFB:BFF1                                  
     BFD Module preferred timer values                                              
         Transmit-Interval(ms): 100                                                 
         Receive-Interval(ms): 100                                                  
         Detect-Multiplier: 4                                                       
     OSPFv3 Module preferred timer values                                           
         Transmit-Interval(ms): 100                                                 
         Receive-Interval(ms): 100                                                  
         Detect-Multiplier: 4                                                       
     Configured timer values                                                        
         Transmit-Interval(ms): 100                                                 
         Receive-Interval(ms): 100                                                  
         Detect-Multiplier: 4                                                       
                                                                                    
     Neighbor-Id: 10.1.1.1                                                           
     BFD Status: Up                                                                 
     Interface: GE0/0/1                                                            
     IPv6-Local-Address: FE80::201:FF:FE01:1                                        
     IPv6-Remote-Address: FE80::200:13FF:FE82:4569                                  
     BFD Module preferred timer values                                              
         Transmit-Interval(ms): 100                                                 
         Receive-Interval(ms): 100                                                  
         Detect-Multiplier: 4                                                       
     OSPFv3 Module preferred timer values                                           
         Transmit-Interval(ms): 100                                                 
         Receive-Interval(ms): 100                                                  
         Detect-Multiplier: 4                                                       
     Configured timer values                                                        
         Transmit-Interval(ms): 100                                                 
         Receive-Interval(ms): 100                                                  
         Detect-Multiplier: 4                                                       
                                                                                    

  4. 检查配置结果

    # 对SwitchB的GE0/0/1接口执行shutdown命令,模拟主链路故障。

    [SwitchB] interface GigabitEthernet 0/0/1
    [SwitchB-GigabitEthernet0/0/1] shutdown

    # 在SwitchA上,查看路由表。可以看出,在主链路失效后,备份链路SwitchA-SwitchC-SwitchB生效,去往FC00:4::1/64的路由下一跳为GE0/0/2。

    [SwitchA] display ospfv3 routing
                                                                                    
    Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,            
            N - NSSA, U - Uninstalled, D - Denied by Import Policy                  
                                                                                    
    OSPFv3 Process (1)                                                              
         Destination                                               Metric           
           Next-hop                                                                 
         FC00:1::/64                                                   1            
           directly connected, GigabitEthernet0/0/2                                
         FC00:2::/64                                                   2            
           via FE80::225:9EFF:FEFB:BFF1, GigabitEthernet0/0/2                      
         FC00:4::/64                                                   3            
           via FE80::225:9EFF:FEFB:BFF1, GigabitEthernet0/0/2                      

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    ipv6
    #
    bfd
    #
    ospfv3 1
     router-id 10.1.1.1
     bfd all-interfaces enable
     bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-multiplier 4
    #
    interface GigabitEthernet0/0/1
     undo portswitch
     ipv6 enable
     ipv6 address FC00:3::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface GigabitEthernet0/0/2
     undo portswitch
     ipv6 enable
     ipv6 address FC00:1::1/64
     ospfv3 1 area 0.0.0.0
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    ipv6
    #
    bfd
    #
    ospfv3 1
     router-id 10.2.2.2
     bfd all-interfaces enable
     bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-multiplier 4
    #
    interface GigabitEthernet0/0/1
     undo portswitch
     ipv6 enable
     ipv6 address FC00:3::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface GigabitEthernet0/0/2
     undo portswitch
     ipv6 enable
     ipv6 address FC00:2::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface GigabitEthernet0/0/3
     undo portswitch
     ipv6 enable
     ipv6 address FC00:4::1/64
     ospfv3 1 area 0.0.0.0
    #
    return
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    ipv6
    #
    bfd
    #
    ospfv3 1
     router-id 10.3.3.3
     bfd all-interfaces enable
     bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-multiplier 4
    #
    interface GigabitEthernet0/0/1
     undo portswitch
     ipv6 enable
     ipv6 address FC00:2::1/64
     ospfv3 1 area 0.0.0.0
    #
    interface GigabitEthernet0/0/2
     undo portswitch
     ipv6 enable
     ipv6 address FC00:1::2/64
     ospfv3 1 area 0.0.0.0
    #
    return
翻译
下载文档
更新时间:2019-04-17

文档编号:EDOC1000141402

浏览量:22194

下载量:1343

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