Part 9 - High Availability

08-BFD Commands

Chapters Download  (49.45 KB)

08-BFD Commands


BFD Configuration Commands

bfd authentication-mode

Syntax

bfd authentication-mode { md5 key-id key | sha1 key-id key | simple key-id password }

undo bfd authentication-mode

View

Interface view

Default Level

2: System level

Parameters

md5: Uses message digest 5 (MD5) authentication.

sha1: Uses secure hash algorithm (SHA-1) authentication.

simple: Uses plaint text authentication.

key-id: Authentication key ID, in the range 1 to 255.

key: A string of 1 to 16 characters. It is displayed as a 24-byte cipher text string when the display current-configuration command is executed.

password: Password, a string of 1 to 16 characters when the simple keyword is used. It can be displayed with the display current-configuration command.

Description

Use the bfd authentication-mode command to configure the BFD authentication mode on the interface.

Use the undo bfd authentication-mode command to restore the default.

By default, no authentication is configured on an interface.

 

The authentication mode, key-id, key (or password) used by both ends trying to establish a BFD session must be the same. If one end changes its authentication mode, it sends the authentication packets in both the new and the old mode at the same time until the other end also changes to the same authentication mode.

 

Examples

# Configure VLAN-interface 1 to support MD5 authentication, and set the authentication key-id to 15 and authentication key to BfdKey.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] bfd authentication-mode md5 15 BfdKey

bfd detect-multiplier

Syntax

bfd detect-multiplier value

undo bfd detect-multiplier

View

Interface view

Default Level

2: System level

Parameters

value: Maximum number of consecutive BFD packets that the remote device fails to receive from the interface before considering the BFD session down, in the range of 3 to 50.

Description

Use the bfd detect-multiplier command to configure the maximum number of consecutive BFD packets that the remote device fails to receive from the local interface before considering the BFD session down.

Use the undo bfd detect-multiplier command to restore the default.

The default is 5.

Examples

# Configure the detect multiplier as 6 on VLAN-interface 1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] bfd detect-multiplier 6

bfd echo-source-ip

Syntax

bfd echo-source-ip ip-address

undo bfd echo-source-ip

View

System view

Default Level

2: System level

Parameters

ip-address: Source IP address of BFD echo packets.

Description

Use the bfd echo-source-ip command to configure the source IP address of BFD echo packets.

Use the undo bfd echo-source-ip command to remove the configured source IP address of BFD echo packets.

Do not configure the source IP address of the BFD echo packets to belong to the same network segment as any interface address of the device. Otherwise a large amount of ICMP redirect packets may be sent by the remote device, causing network congestion.

Examples

# Configure the source IP address of echo packets as 10.1.1.1.

<Sysname> system-view

[Sysname] bfd echo-source-ip 10.1.1.1

bfd min-echo-receive-interval

Syntax

bfd min-echo-receive-interval value

undo bfd min-echo-receive-interval

View

Interface view

Default Level

2: System level

Parameters

value: Minimum echo receiving interval, in milliseconds. The value ranges from 200 to 1000.

Description

Use the bfd min-echo-receive-interval command to configure the minimum echo packet receiving interval on the interface.

Use the undo bfd min-echo-receive-interval command to restore the default minimum echo packet receiving interval on the interface.

The default minimum echo packet receiving interval is 400 milliseconds.

Examples

# Configure the minimum echo receiving interval on VLAN-interface 1 as 500 milliseconds.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] bfd min-echo-receive-interval 500

bfd min-receive-interval

Syntax

bfd min-receive-interval value

undo bfd min-receive-interval

View

Interface view

Default Level

2: System level

Parameters

value: Minimum interval for receiving BFD control packets, in milliseconds. The value ranges from 200 to 1000.

Description

Use the bfd min-receive-interval command to configure the minimum interval for receiving BFD control packets.

Use the undo bfd min-receive-interval command to restore the default minimum interval for receiving BFD control packets.

The default minimum interval for receiving BFD control packets is 400 milliseconds.

Note that, if the remote device sends BFD control packets at an interval shorter than the minimum receiving interval of the local device, the remote device changes its sending interval to the minimum receiving interval of the local device.

Examples

# Configure the minimum interval for receiving BFD control packets on VLAN-interface 1 as 500 milliseconds.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] bfd min-receive-interval 500

bfd min-transmit-interval

Syntax

bfd min-transmit-interval value

undo bfd min-transmit-interval

View

Interface view

Default Level

2: System level

Parameters

value: Minimum interval for transmitting BFD control packets, in milliseconds. The value ranges from 200 to 1000.

Description

Use the bfd min-transmit-interval command to configure the minimum interval for transmitting BFD control packets.

Use the undo bfd min-transmit-interval command to restore the default minimum interval for transmitting BFD control packets.

The default minimum interval for transmitting BFD control packets is 400 milliseconds

Note that, a proper interval ensures that BFD control packets are not transmitted faster than the device can deal with. The actual interval for transmitting BFD control packets at the local device should be the greater between the minimum interval for sending BFD control packets configured on the local interface and the minimum interval for receiving BFD control packets on the remote device.

Examples

# Configure the minimum interval for transmitting BFD control packets on VLAN-interface 1 as 500 milliseconds.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] bfd min-transmit-interval 500

bfd multi-hop destination-port

Syntax

bfd multi-hop destination-port port-number

undo bfd multi-hop destination-port

View

System view

Default Level

2: System level

Parameters

port-number: Destination port number of multi-hop BFD control packets, 3784 or 4784.

Description

Use the bfd multi-hop destination-port command to configure the destination port number for multi-hop BFD control packets as 3784 or 4784.

Use the undo bfd multi-hop destination-port command to restore the default.

By default, the destination port number for multi-hop BFD control packets is 4784.

Examples

# Configure the destination port number for multi-hop BFD control packets as 3784.

<Sysname> system-view

[Sysname] bfd multi-hop destination-port 3784

bfd session init-mode

Syntax

bfd session init-mode { active | passive }

undo bfd session init-mode

View

System view

Default Level

2: System level

Parameters

active: Uses the active mode. In the active mode, BFD actively transmits BFD control packets to the remote device.

passive: Uses the passive mode. In the passive mode, BFD does not actively transmit a BFD control packet to the remote end; it transmits a BFD control packet only after receiving a BFD control packet from the remote end.

Description

Use the bfd session init-mode command to configure the mode for establishing a BFD session.

Use the undo bfd session init-mode command to restore the default.

By default, BFD uses the active mode.

Examples

# Configure the session establishment mode as passive.

<Sysname> system-view

[Sysname] bfd session init-mode passive

display bfd debugging-switches

Syntax

display bfd debugging-switches

View

Any view

Default Level

2: System level

Parameters

None

Description

Use the display bfd debugging-switches command to display enabled BFD debugging switches.

Examples

# Display enabled BFD debugging switches.

<Sysname> display bfd debugging-switches

BFD Error debugging is on

BFD Event debugging is on

BFD FSM debugging is on

BFD Packet Receive debugging is on

BFD Packet Send debugging is on

BFD SCM debugging is on

BFD Timer debugging is on

display bfd interface

Syntax

display bfd interface [ verbose ]

View

Any view

Default Level

2: System level

Parameters

verbose: Displays detailed interface information.

Description

Use the display bfd interface command to display information about BFD-enabled interfaces.

Examples

# Display brief information about BFD-enabled interfaces.

<Sysname> display bfd interface

 

 Total Interface Num: 1

 

      Interface: Vlan-interface21     Session Num: 1

Min Trans Inter: 200ms             Min Recv Inter: 200ms

     DetectMult: 3             Min Echo Recv Inter: 400ms

      Auth mode: Simple

# Display detailed information about BFD-enabled interfaces.

<Sysname> display bfd interface verbose

 

 Total Interface Num: 1

 

      Interface: Vlan-interface21            Session Num: 1

Min Trans Inter: 200ms             Min Recv Inter: 200ms

     DetectMult: 3             Min Echo Recv Inter: 400ms

      Auth mode: Simple

 

 LD/RD       SourceAddr      DestAddr        ConnType  State     Mode

 2/2         192.168.11.11   192.168.11.10   Direct    Up        Ctrl

Table 1-1 display bfd interface command output description

Field

Description

Interface

Interface name

Session Num

Number of sessions established on the local interface

Min Trans Inter

Minimum transmit interval configured on the interface

Min Recv Inter

Minimum receive interval configured on the interface

DetectMult

Session detection multiplier

Auth mode

Session authentication mode: simple, MD5, or SHA-1

LD

Local ID of the session

RD

Remote ID of the session

SourceAddr

Source IP address of the session

DestAddr

Destination IP address of the session

ConnType

Connection type of the interface

State

Session state

Mode

Working mode of the session: control (Ctrl) mode or echo (Echo) mode.

 

display bfd session

Syntax

display bfd session [ slot slot-number [ all | verbose ] | verbose ]

View

Any view

Default Level

2: System level

Parameters

verbose: Displays detailed session information.

slot slot-number: Displays the session information of the specified IRF member device. The slot-number argument is the number of the IRF member device, which you can display with the display irf command. The value range for the slot-number argument depends on the number of members and numbering conditions in the current IRF virtual device.

all: Displays detailed information about all the BFD sessions.

Description

Use the display bfd session command to display BFD session information.

With no slot number specified, this command displays information about all current BFD sessions on the IRF member device.

Examples

# Display detailed information about all the sessions.

<Sysname> display bfd session verbose

 

 Total Session Num: 2            Init Mode: Active

 

 Session Working Under Ctrl Mode:

 

     Local Discr: 1                   Remote Discr: 1

       Source IP: 192.168.11.11     Destination IP: 192.168.11.10

   Session State: Up                     Interface: Vlan-interface20

 Min Trans Inter: 200ms            Act Trans Inter: 200ms

  Min Recv Inter: 200ms           Act Detect Inter: 1000ms

  Running Up for: 00:02:36               Auth mode: None

    Connect Type: Direct                 Board Num: 1

        Protocol: OSPF

       Diag Info: No Diagnostic

 

Table 1-2 display bfd session command output description

Field

Description

LD/ Local Discr

Local ID of the session

RD/Remote Discr

Remote ID of the session

SourceAddr/ Source IP

Source IP address of the session

DestAddr/ Destination IP

Destination IP address of the session

State/Session State

Session state

Holdtime

Length of time before session detection timer expires

Interface

Name of the interface on the session

Min Trans Inter

Expected minimum transmit interval configured on the interface

Min Recv Inter

Expected minimum receive interval configured on the interface

Act Trans Inter

Actual transmit interval

Act Detect Inter

Actual session detection timer

Recv Pkt Num

Number of packets received

Send Pkt Num

Number of packets sent

Auth mode

Session authentication mode: simple, MD5, or SHA-1

Connect Type

Connection type of the interface

Running up for

Time interval for which the session has been up

Board Num

The member device maintaining the session

Protocol

Registered protocol

Diag Info

Diagnostic information about the session

 

reset bfd session statistics

Syntax

reset bfd session statistics [slot slot-number ]

View

User view

Default Level

2: System level

Parameters

slot slot-number: Clears the session statistics of the specified IRF member device. The slot-number argument is the number of the IRF member device, which you can display with the display irf command. The value range for the slot-number argument depends on the number of members and numbering conditions in the current IRF virtual device.

Description

Use the reset bfd session statistics command to clear BFD session statistics.

Examples

# Clear BFD session statistics on No.6 IRF member device.

<Sysname> reset bfd session statistics slot 6

snmp-agent trap enable bfd

Syntax

snmp-agent trap enable bfd

undo snmp-agent trap enable bfd

View

System view

Default Level

3: Manage level

Parameters

None

Description

Use the snmp-agent trap enable bfd command to enable sending BFD traps.

Use the undo snmp-agent trap enable bfd command to disable sending BFD traps.

By default, sending BFD traps is enabled.

Examples

# Disable sending BFD traps.

<Sysname> system-view

[Sysname] undo snmp-agent trap enable bfd

H3C reserves the right to modify its collaterals without any prior notice. For the latest information of the collaterals, please consult H3C sales or call 400 hotline.