华为CE-配置BFD for IPv6多跳检测

配置BFD for IPv6多跳检测

组网需求

为需要快速检测和监控网络中的IPv6链路,可以创建BFD for IPv6会话。如图1所示,使用BFD异步模式检测DeviceA和DeviceC之间的多跳路径。

图1 BFD for IPv6多跳检测示例组网图

华为CE-配置BFD for IPv6多跳检测

本例中interface1,interface2分别代表100GE1/0/1,100GE1/0/2。

华为CE-配置BFD for IPv6多跳检测

配置思路

采用如下思路配置BFD for IPv6多跳检测:

  1. 配置DeviceA、DeviceB和DeviceC各接口的IPv6地址,并配置设备之间采用OSPFv3协议互连。

  2. 在DeviceA和DeviceC上使能全局BFD功能,并配置多跳BFD for IPv6会话,检测设备之间的链路。

操作步骤

  1. 配置DeviceA、DeviceB和DeviceC各接口的IPv6地址,并配置设备之间采用OSPFv3协议互连。
    # 配置DeviceA。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] ospfv3 1
    [*DeviceA-ospfv3-1] router-id 10.1.1.1
    [*DeviceA-ospfv3-1] area 0
    [*DeviceA-ospfv3-1-area-0.0.0.0] quit
    [*DeviceA-ospfv3-1] quit
    [*DeviceA] commit
    [~DeviceA] interface 100ge 1/0/1
    [~DeviceA-100GE1/0/1] undo portswitch
    [*DeviceA-100GE1/0/1] ipv6 enable
    [*DeviceA-100GE1/0/1] ipv6 address 2001:db8:1::1 64
    [*DeviceA-100GE1/0/1] ospfv3 1 area 0
    [*DeviceA-100GE1/0/1] quit
    [*DeviceA] commit
    # 配置DeviceB。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] ospfv3 1
    [*DeviceB-ospfv3-1] router-id 10.1.1.2
    [*DeviceB-ospfv3-1] area 0
    [*DeviceB-ospfv3-1-area-0.0.0.0] quit
    [*DeviceB-ospfv3-1] quit
    [*DeviceB] commit
    [~DeviceB] interface 100ge 1/0/1
    [~DeviceB-100GE1/0/2] undo portswitch
    [*DeviceB-100GE1/0/1] ipv6 enable
    [*DeviceB-100GE1/0/1] ipv6 address 2001:db8:1::2 64
    [*DeviceB-100GE1/0/1] ospfv3 1 area 0
    [*DeviceB-100GE1/0/1] quit
    [*DeviceB] commit
    [~DeviceB] interface 100ge 1/0/2
    [~DeviceB-100GE1/0/2] undo portswitch
    [*DeviceB-100GE1/0/2] ipv6 enable
    [*DeviceB-100GE1/0/2] ipv6 address 2001:db8:2::1 64
    [*DeviceB-100GE1/0/2] ospfv3 1 area 0
    [*DeviceB-100GE1/0/2] quit
    [*DeviceB] commit
    # 配置DeviceC。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceC
    [*HUAWEI] commit
    [~DeviceC] ospfv3 1
    [*DeviceC-ospfv3-1] router-id 10.1.1.3
    [*DeviceC-ospfv3-1] area 0
    [*DeviceC-ospfv3-1-area-0.0.0.0] quit
    [*DeviceC-ospfv3-1] quit
    [*DeviceC] commit
    [~DeviceC] interface 100ge 1/0/2
    [~DeviceC-100GE1/0/2] undo portswitch
    [*DeviceC-100GE1/0/2] ipv6 enable
    [*DeviceC-100GE1/0/2] ipv6 address 2001:db8:2::2 64
    [*DeviceC-100GE1/0/2] ospfv3 1 area 0
    [*DeviceC-100GE1/0/2] quit
    [*DeviceC] commit
  2. 在DeviceA和DeviceC上使能全局BFD功能,并配置DeviceA和DeviceC之间的多跳路由检测。
    # 配置DeviceA。

    [~DeviceA] bfd
    [*DeviceA-bfd] quit
    [*DeviceA] bfd ipv6session bind peer-ipv6 2001:db8:2::2
    [*DeviceA-bfd-session-ipv6session] discriminator local 1
    [*DeviceA-bfd-session-ipv6session] discriminator remote 2
    [*DeviceA-bfd-session-ipv6session] quit
    [*DeviceA] commit
    # 配置DeviceC。

    [~DeviceC] bfd
    [*DeviceC-bfd] quit
    [*DeviceC] bfd ipv6session bind peer-ipv6 2001:db8:1::1
    [*DeviceC-bfd-session-ipv6session] discriminator local 2
    [*DeviceC-bfd-session-ipv6session] discriminator remote 1
    [*DeviceC-bfd-session-ipv6session] quit
    [*DeviceC] commit

检查配置结果

# 配置完成后,DeviceA和DeviceC之间可以相互Ping通。以DeviceA的显示结果为例。

[~DeviceA] ping ipv6 2001:db8:2::2
PING 2001:db8:2::2 : 56  data bytes, press CTRL_C to break
    Reply from 2001:db8:2::2
    bytes=56 Sequence=1 hop limit=64 time=22 ms
    Reply from 2001:db8:2::2
    bytes=56 Sequence=2 hop limit=64 time=1 ms
    Reply from 2001:db8:2::2
    bytes=56 Sequence=3 hop limit=64 time=1 ms
    Reply from 2001:db8:2::2
    bytes=56 Sequence=4 hop limit=64 time=1 ms

    Reply from 2001:db8:2::2
    bytes=56 Sequence=5 hop limit=64 time=1 ms
  ---2001:db8:2::2 ping statistics---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max=1/5/22 ms

# 在DeviceA和DeviceC上查看BFD会话详细信息。以DeviceA的显示结果为例。

[~DeviceA] display bfd session all verbose
2020-01-01 11:21:06.8
(w): State in WTR 
(*): State is invalid
Total UP/DOWN Session Number : 1/0
--------------------------------------------------------------------------------
  Name : ipv6session                    (Multiple Hops) State : Up                    
------------------------------------------------------------------------------
  Local Discriminator    : 1                Remote Discriminator   : 2
  Session Detect Mode    : Asynchronous Mode Without Echo Function
  BFD Bind Type          : Peer IP Address
  Bind Session Type      : Static
  Bind Peer IP Address   : 2001:DB8:2::2
  Bind Interface         : -
  FSM Board ID           : 1               TOS-EXP                : 7
  Min Tx Interval (ms)   : 1000      Min Rx Interval (ms)   : 1000
  Actual Tx Interval (ms): 1000             Actual Rx Interval (ms): 1000
  WTR Interval (ms)      : -                Detect Interval (ms)   : 3000
  Local Detect Multi     : 3                Active Multi           : -
  Echo Passive           : Disable          Acl Number             : -
  Destination Port       : 4784             TTL                    : 254
  Proc Interface Status  : Disable          Process PST            : Disable
  Config PST             : Disable
  Last Local Diagnostic  : No Diagnostic
  Bind Application       : No Application Bind
  Session Description    : - 
------------------------------------------------------------------------------

可以看到建立了一个多跳(Multiple Hops)的BFD会话,状态为UP。

配置脚本

  • DeviceA

    #
    sysname DeviceA
    #
    bfd
    #
    ospfv3 1
     router-id 10.1.1.1
     area 0.0.0.0
    #
    interface 100GE1/0/2
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:1::1/64
     ospfv3 1 area 0.0.0.0
    #
    bfd ipv6session bind peer-ipv6 2001:DB8:2::2
     discriminator local 1
     discriminator remote 2
    #
    return
  • DeviceB

    #
    sysname DeviceB
    #
    ospfv3 1
     router-id 10.1.1.2
     area 0.0.0.0
    #
    interface 100GE1/0/2
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:1::2/64
     ospfv3 1 area 0.0.0.0
    #
    interface 100GE1/0/2
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:2::1/64
     ospfv3 1 area 0.0.0.0
    #
    return
  • DeviceC

    #
    sysname DeviceC
    #
    bfd
    #
    ospfv3 1
     router-id 10.1.1.3
     area 0.0.0.0
    #
    interface 100GE1/0/2
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8:2::2/64
     ospfv3 1 area 0.0.0.0
    #
    bfd ipv6session bind peer-ipv6 2001:DB8:1::1
     discriminator local 2
     discriminator remote 1
    #
    return
上一篇 LDP 邻居无法建立排查步骤
下一篇 Apache 虚拟主机 + 不同域名 配置教程