Example for Configuring Single-Hop BFD for IPv6
Networking Requirements
In Figure 2-27, SwitchA and SwitchB communicate at Layer 3 using VLANIF interfaces. The customer requires that link failures between switches be detected quickly.
Configuration Roadmap
The configuration roadmap is as follows:
Configure a BFD6 session on SwitchA to detect the single-hop link from SwitchA to SwitchB.
Configure a BFD6 session on SwitchB to detect the single-hop link from SwitchB to SwitchA.
The intervals for sending and receiving BFD packets and local detection multiplier retain the default settings.
Procedure
- Configure IP addresses on switches to implement connections.
# Assign IPv6 addresses to the interfaces on switches. SwitchA is used as an example. The configuration on SwitchB is similar to the configuration on SwitchA. For the differences, see the configuration files.
<Quidway> system-view [Quidway] sysname SwitchA [SwitchA] vlan batch 100 [SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] port link-type trunk [SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 [SwitchA-GigabitEthernet1/0/1] quit [SwitchA] ipv6 [SwitchA] interface vlanif 100 [SwitchA-Vlanif100] ipv6 enable [SwitchA-Vlanif100] ipv6 address fc00:0:0:2001::1 64 [SwitchA-Vlanif100] quit
- Configure a single-hop BFD6 session.
# Enable BFD on SwitchA and create a BFD6 session between SwitchA and SwitchB. An outbound interface needs to be bound to the BFD6 session.
[SwitchA] bfd [SwitchA-bfd] quit [SwitchA] bfd atob bind peer-ipv6 fc00:0:0:2001::2 interface vlanif 100 [SwitchA-bfd-session-atob] discriminator local 1 [SwitchA-bfd-session-atob] discriminator remote 2 [SwitchA-bfd-session-atob] commit [SwitchA-bfd-session-atob] quit
# Enable BFD on SwitchB and create a BFD6 session between SwitchB and SwitchA. An outbound interface needs to be bound to the BFD6 session.
[SwitchB] bfd [SwitchB-bfd] quit [SwitchB] bfd btoa bind peer-ipv6 fc00:0:0:2001::1 interface vlanif 100 [SwitchB-bfd-session-btoa] discriminator local 2 [SwitchB-bfd-session-btoa] discriminator remote 1 [SwitchB-bfd-session-btoa] commit [SwitchB-bfd-session-btoa] quit
- Verify the configuration.
# When the network runs stably, run the display bfd session all verbose command on SwitchA and SwitchB. A single-hop BFD6 session exists and its status is Up.
The command output on SwitchA is used as an example.
[SwitchA] display bfd session all verbose -------------------------------------------------------------------------------- Session MIndex : 4096 (One Hop) State : Up Name : atob -------------------------------------------------------------------------------- Local Discriminator : 1 Remote Discriminator : 2 Session Detect Mode : Asynchronous Mode Without Echo Function BFD Bind Type : Interface(Vlanif100) Bind Session Type : Static Bind Peer IP Address : FC00:0:0:2001::2 NextHop Ip Address : FC00:0:0:2001::2 Bind Interface : Vlanif100 FSM Board Id : 0 TOS-EXP : 7 Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000 Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000 Local Detect Multi : 3 Detect Interval (ms) : 3000 Echo Passive : Disable Acl Number : - Destination Port : 3784 TTL : 255 Proc Interface Status : Disable Process PST : Disable WTR Interval (ms) : - Active Multi : 3 DSCP : - Last Local Diagnostic : No Diagnostic Bind Application : No Application Bind Session TX TmrID : - Session Detect TmrID : - Session Init TmrID : - Session WTR TmrID : - Session Echo Tx TmrID : - PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0 Session Description : - -------------------------------------------------------------------------------- Total UP/DOWN Session Number : 1/0
Configuration Files
SwitchA configuration file
# sysname SwitchA # ipv6 # vlan batch 100 # bfd # interface Vlanif100 ipv6 enable ipv6 address FC00:0:0:2001::1/64 # interface GigabitEthernet1/0/1 port link-type trunk port trunk allow-pass vlan 100 # bfd atob bind peer-ipv6 FC00:0:0:2001::2 interface Vlanif100 discriminator local 1 discriminator remote 2 commit # return
SwitchB configuration file
# sysname SwitchB # ipv6 # vlan batch 100 # bfd # interface Vlanif100 ipv6 enable ipv6 address FC00:0:0:2001::2/64 # interface GigabitEthernet1/0/1 port link-type trunk port trunk allow-pass vlan 100 # bfd btoa bind peer-ipv6 FC00:0:0:2001::1 interface Vlanif100 discriminator local 2 discriminator remote 1 commit # return