This section provides an example for configuring single-hop BFD for IPv6 to detect faults in an IPv6 link on a network.
To rapidly detect faults in an IPv6 link on a network, establish a single-hop BFD session for IPv6. On the network shown in Figure 1, a single-hop BFD session in asynchronous mode is established to detect faults in the link between Device A and Device B.
Enable BFD globally on Device A and Device B.
Create single-hop BFD sessions for IPv6 and bind them to the outbound interfaces on Device A and Device B.
Peer IPv6 address monitored by BFD
Local and remote discriminators of BFD sessions
BFD session names
# Assign an IPv6 address to the interface on Device A.
<HUAWEI> system-view [~HUAWEI] sysname DeviceA [*HUAWEI] commit [~DeviceA] interface gigabitethernet 0/1/0 [~DeviceA-GigabitEthernet0/1/0] undo shutdown [*DeviceA-GigabitEthernet0/1/0] ipv6 enable [*DeviceA-GigabitEthernet0/1/0] ipv6 address 2001:db8::1 32 [*DeviceA-GigabitEthernet0/1/0] commit [~DeviceA-GigabitEthernet0/1/0] quit
# Assign an IPv6 address to the interface on Device B.
<HUAWEI> system-view [~HUAWEI] sysname DeviceB [*HUAWEI] commit [~DeviceB] interface gigabitethernet 0/1/0 [~DeviceB-GigabitEthernet0/1/0] undo shutdown [*DeviceB-GigabitEthernet0/1/0] ipv6 enable [*DeviceB-GigabitEthernet0/1/0] ipv6 address 2001:db8::2 32 [*DeviceB-GigabitEthernet0/1/0] commit [~DeviceB-GigabitEthernet0/1/0] quit
After the configuration is complete, Device A and Device B can ping each other. The following example uses the command output on Device A.
[~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
# Configure Device A.
[~DeviceA] bfd [*DeviceA-bfd] quit [*DeviceA] bfd ipv6session bind peer-ipv6 2001:db8::2 interface gigabitethernet 0/1/0 [*DeviceA-bfd-session-ipv6session] discriminator local 1 [*DeviceA-bfd-session-ipv6session] discriminator remote 2 [*DeviceA-bfd-session-ipv6session] commit [~DeviceA-bfd-session-ipv6session] quit
# Configure Device B.
[~DeviceB] bfd [*DeviceB-bfd] quit [*DeviceB] bfd ipv6session bind peer-ipv6 2001:db8::1 interface gigabitethernet 0/1/0 [*DeviceB-bfd-session-ipv6session] discriminator local 2 [*DeviceB-bfd-session-ipv6session] discriminator remote 1 [*DeviceB-bfd-session-ipv6session] commit [~DeviceB-bfd-session-ipv6session] quit
After completing the configurations, run the display bfd session all verbose command on Device A or Device B. The command output shows that a single-hop BFD session for IPv6 has been established and its status is Up. The following example uses the command output on Device A.
[~DeviceA] display bfd session all verbose (w): State in WTR (*): State is invalid ------------------------------------------------------------------------------ (One Hop) State : Up Name : ipv6session ------------------------------------------------------------------------------ Local Discriminator : 1 Remote Discriminator : 2 Session Detect Mode : Asynchronous Mode Without Echo Function BFD Bind Type : Interface(GigabitEthernet0/1/0) Bind Session Type : Static Bind Peer IP Address : 2001:db8::2 Bind Interface : GigabitEthernet0/1/0 FSM Board Id : 1 TOS-EXP : 7 Min Tx Interval (ms) : 10 Min Rx Interval (ms) : 10 Actual Tx Interval (ms): 10 Actual Rx Interval (ms): 10 Local Detect Multi : 3 Detect Interval (ms) : 30 Echo Passive : Disable Acl Number : - Destination Port : 3784 TTL : 255 Proc Interface Status : Disable Process PST : Disable WTR Interval (ms) : 0 Config PST : Disable Active Multi : 3 Last Local Diagnostic : No Diagnostic Bind Application : No Application Bind Session TX TmrID : 0 Session Detect TmrID : 0 Session Init TmrID : - Session WTR TmrID : - Session Echo Tx TmrID : - Session Description : - ------------------------------------------------------------------------------ Total UP/DOWN Session Number : 1/0
Device A configuration file
# sysname DeviceA # bfd # interface GigabitEthernet0/1/0 undo shutdown ipv6 enable ipv6 address 2001:db8::1/32 # bfd ipv6session bind peer-ipv6 2001:db8::2 interface GigabitEthernet0/1/0 discriminator local 1 discriminator remote 2 # return
Device B configuration file
# sysname DeviceB # bfd # interface GigabitEthernet0/1/0 undo shutdown ipv6 enable ipv6 address 2001:db8::2/32 # bfd ipv6session bind peer-ipv6 2001:db8::1 interface GigabitEthernet0/1/0 discriminator local 2 discriminator remote 1 # return