华为CE-交换机配置-配置BFD for IPv6单跳检测

配置BFD for IPv6单跳检测

组网需求

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

图1 BFD for IPv6单跳检测组网图

华为CE-交换机配置-配置BFD for IPv6单跳检测

本例中interface1代表100GE1/0/1。

华为CE-交换机配置-配置BFD for IPv6单跳检测

配置思路

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

  1. 在DeviceA和DeviceB上配置接口的IPv6地址。

  2. 在DeviceA和DeviceB上使能全局BFD功能,并配置绑定出接口的单跳BFD会话。

操作步骤

  1. 配置DeviceA和DeviceB接口的IPv6地址。
    # 配置DeviceA接口的IPv6地址。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] 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 64
    [*DeviceA-100GE1/0/1] quit
    [*DeviceA] commit
    # 配置DeviceB接口的IPv6地址。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] interface 100ge 1/0/1
    [~DeviceB-100GE1/0/1] undo portswitch
    [*DeviceB-100GE1/0/1] ipv6 enable
    [*DeviceB-100GE1/0/1] ipv6 address 2001:db8::2 64
    [*DeviceB-100GE1/0/1] quit
    [*DeviceB] commit
  2. 配置单跳BFD会话。
    # 配置DeviceA。

    [~DeviceA] bfd
    [*DeviceA-bfd] quit
    [*DeviceA] bfd ipv6session bind peer-ipv6 2001:db8::2 interface 100ge 1/0/1
    [*DeviceA-bfd-session-ipv6session] discriminator local 1
    [*DeviceA-bfd-session-ipv6session] discriminator remote 2
    [*DeviceA-bfd-session-ipv6session] quit
    [*DeviceA] commit
    # 配置DeviceB。

    [~DeviceB] bfd
    [*DeviceB-bfd] quit
    [*DeviceB] bfd ipv6session bind peer-ipv6 2001:db8::1 interface 100ge 1/0/1
    [*DeviceB-bfd-session-ipv6session] discriminator local 2
    [*DeviceB-bfd-session-ipv6session] discriminator remote 1
    [*DeviceB-bfd-session-ipv6session] quit
    [*DeviceB] commit

检查配置结果

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

[~DeviceA] ping ipv6 2001:db8::2
PING 2001:db8::2 : 56  data bytes, press CTRL_C to break
    Reply from 2001:db8::2
    bytes=56 Sequence=1 hop limit=64 time=3 ms
    Reply from 2001:db8::2
    bytes=56 Sequence=2 hop limit=64 time=1 ms
    Reply from 2001:db8::2
    bytes=56 Sequence=3 hop limit=64 time=1 ms
    Reply from 2001:db8::2
    bytes=56 Sequence=4 hop limit=64 time=1 ms
    Reply from 2001:db8::2
    bytes=56 Sequence=5 hop limit=64 time=1 ms
  ---2001:db8::2 ping statistics---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max=1/1/3 ms

# 在DeviceA和DeviceB上查看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                    (Single Hops) State : Up                    
------------------------------------------------------------------------------
  Local Discriminator    : 1                Remote Discriminator   : 2
  Session Detect Mode    : Asynchronous Mode Without Echo Function
  BFD Bind Type          : Interface(100GE1/0/1)
  Bind Session Type      : Static
  Bind Peer IP Address   : 2001:DB8::2
  Bind Interface         : 100GE1/0/1
  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       : 3784             TTL                    : 255
  Proc Interface Status  : Disable          Process PST            : Disable
  Config PST             : Disable
  Last Local Diagnostic  : No Diagnostic
  Bind Application       : No Application Bind 
  Session Description    : - 
------------------------------------------------------------------------------

可以看到建立了一个单跳(Single Hops)的BFD for IPv6会话,且状态为Up。

配置脚本

  • DeviceA

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

    #
    sysname DeviceB
    #
    bfd
    #
    interface 100GE1/0/1
     undo portswitch
     ipv6 enable
     ipv6 address 2001:DB8::2/64
    #
    bfd ipv6session bind peer-ipv6 2001:DB8::1 interface 100GE1/0/1
     discriminator local 2
     discriminator remote 1
    #
    return
上一篇 案例1 RSR20-X 有线线路断开后无法通过4G备份线路访问总部资源
下一篇 Apache 虚拟主机 + 不同端口号