Interface backup commands -- backup interface

Use backup interface to specify a backup interface for an interface.

Use undo backup interface to remove a backup interface.

Syntax

backup interface interface-type interface-number [ priority ]

undo backup interface interface-type interface-number

Default

An interface does not have backup interfaces.

Views

Interface view

Predefined user roles

network-admin

mdc-admin

Parameters

interface-type interface-number: Specifies a backup interface by its type and number.

priority: Assigns a priority to the backup interface. The value range is 0 to 255, and the default is 0. The greater the value, the higher the priority.

Usage guidelines

Use this command on the primary interface to specify its backup interfaces. If you also configure the traffic thresholds, the primary and backup interfaces operate in load balancing mode. If you do not configure the traffic thresholds, the primary and backup interfaces operate in strict active/standby mode.

Backup interface priority is used for interface backup to make interface activation or deactivation decisions when the primary interface fails or is overloaded. Backup interfaces are activated in descending order of priority, with the highest-priority interface deactivated first. In contrast, they are deactivated in ascending order of priority, with the lowest-priority interface deactivated first.

Once a backup interface is activated to forward traffic, only the primary interface can preempt it. A higher-priority backup interface cannot preempt a lower-priority backup interface that has taken over the primary interface.

Use Table 1 when you configure primary and backup interfaces.

Table 1 Restrictions on the primary and backup interfaces

Item | Restrictions
Maximum number of primary interfaces/device | 10.
Backup interfaces/primary interface | 3.
Configuration restrictions | · An interface can only be the backup of one interface. · A primary interface cannot be configured as a backup interface at the same time. · A main interface and its subinterfaces cannot be the backup of each other. · The primary and backup interfaces cannot be members of a logical link. For example, they cannot be members of a Layer 3 aggregation group.

This command and the backup track command are mutually exclusive.

· If you have configured the backup interface command on the primary interface, you cannot configure the backup track command on the primary or backup interface.

· If you have associated a backup interface with a track entry, you cannot configure the backup interface command on it or specify it as a backup interface by using the backup interface command.

Examples

# Specify GigabitEthernet 1/0/2 as a backup interface of GigabitEthernet 1/0/1, with a priority of 50.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] backup interface gigabitethernet 1/0/2 50

Related commands

backup track

Interface backup commands -- backup threshold

Use backup threshold to configure traffic thresholds on a primary interface for load sharing.

Use undo backup threshold to restore the default.

Syntax

backup threshold upper-threshold lower-threshold

undo backup threshold

Default

No traffic thresholds are configured.

Views

Interface view

Predefined user roles

network-admin

mdc-admin

Parameters

upper-threshold: Specifies the upper threshold as a percentage of bandwidth available on the primary interface. The value range is 1 to 99.

lower-threshold: Specifies the lower threshold as a percentage of bandwidth available on the primary interface. The value range is 1 to 99.

| NOTE: To set the bandwidth used for load sharing calculation in this command, use the bandwidth command on the primary interface.

Usage guidelines

Before you can use this command on an interface, you must specify a minimum of one backup interface for the interface.

This command enables a primary interface and its backup interfaces to be load shared. In load sharing mode, interface backup regularly compares the amount of traffic with the thresholds.

· When the amount of traffic on the primary interface exceeds the upper threshold, the backup interfaces are activated to share load in descending order of backup priority.

· When the total amount of traffic on all the load-shared interfaces drops below the lower threshold, the backup interfaces are deactivated in ascending order of priority. As a best practice, configure the lower threshold smaller than half of the upper threshold to prevent link flapping from causing frequent interface switchovers.

· When the primary interface goes down, the active/standby mode applies. Only the highest-priority interface is activated.

You can configure the traffic polling interval by using the backup timer flow-check command.

| NOTE: · "Traffic" on an interface refers to the amount of incoming or outgoing traffic, whichever is higher. · If two backup interfaces have the same priority, the one configured first has preference.

Examples

# On GigabitEthernet 1/0/1, set the upper and lower traffic thresholds to 80 and 20, respectively.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] backup threshold 80 20

Related commands

backup interface

backup timer flow-check

Interface backup commands -- backup timer delay

Use backup timer delay to set interface state switchover delay timers on a primary interface.

Use undo backup timer delay to restore the default.

Syntax

backup timer delay up-delay down-delay

undo backup timer delay

Default

Both up and down delay timers are 5 seconds.

Views

Interface view

Predefined user roles

network-admin

mdc-admin

Parameters

up-delay: Specifies the number of seconds that the primary or backup interface must wait before it can come up. The value range is 1 to 65535 seconds.

down-delay: Specifies the number of seconds that the active primary or backup interface must wait before it is set to down state. The value range is 1 to 65535 seconds.

Usage guidelines

Before you can use this command on an interface, you must specify at least one backup interface for the interface.

The switchover delay mechanism prevents link flapping from causing frequent interface switchovers. When the link of the active interface fails, the interface state does not change immediately. Instead, a down delay timer starts. If the link recovers before the timer expires, the interface state does not change. If the link is still down when the timer expires, the interface state changes to down.

Examples

# Specify GigabitEthernet 1/0/2 as a backup of GigabitEthernet 1/0/1, and set both up and down delay timers to 10 seconds.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] backup interface gigabitethernet 1/0/2

[Sysname-GigabitEthernet1/0/1] backup timer delay 10 10

Related commands

backup interface

Interface backup commands -- backup timer flow-check

Use backup timer flow-check to configure the traffic polling interval on a primary interface.

Use undo backup timer flow-check to restore the default.

Syntax

backup timer flow-check interval

undo backup timer flow-check

Default

The traffic polling interval is 30 seconds.

Views

Interface view

Predefined user roles

network-admin

mdc-admin

Parameters

interval: Specifies a traffic polling interval in the range of 30 to 600 seconds.

Usage guidelines

Before you can use this command on an interface, you must specify at least one backup interface for the interface.

This command takes effect when the primary and backup interfaces operate in load sharing mode. Interface backup compares the amount of traffic with the thresholds at this interval to determine whether to activate or deactivate a backup interface.

Examples

# Set the traffic polling interval to 60 seconds on GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] backup timer flow-check 60

Related commands

backup interface

Interface backup commands -- backup track

Use backup track to associate a backup interface with a track entry.

Use undo backup track to restore the default.

Syntax

backup track track-entry-number

undo backup track

Default

An interface is not associated with a track entry.

Views

Interface view

Predefined user roles

network-admin

mdc-admin

Parameters

track-entry-number: Specifies a track entry ID in the range of 1 to 1024.

Usage guidelines

To change the state of a backup interface response to the link state of the primary interface, use this command. For the setting to work, you must configure the track entry to monitor the state of the primary link. For more information about configuring a track entry, see High Availability Configuration Guide.

You can associate an interface with only one track entry. If you execute this command multiple times, the most recent configuration takes effect.

You can create the associated track entry before or after the association. The association takes effect after the track entry is created.

To maintain performance, limit the number of associations to 64.

This command and the backup interface command are mutually exclusive.

· If you have configured the backup interface command on the primary interface, you cannot configure the backup track command on the primary or backup interface.

· If you have associated a backup interface with a track entry, you cannot configure the backup interface command on it or specify it as a backup interface by using the backup interface command.

Examples

# Associate GigabitEthernet 1/0/1 with track entry 1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] backup track 1

Related commands

backup interface

Interface backup commands -- display interface-backup state

Use display interface-backup state to display state information for primary and backup interfaces.

Syntax

display interface-backup state

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Examples

# Display state information for primary and backup interfaces.

<Sysname> display interface-backup state

Interface: GE1/0/1

UpDelay: 10 s

DownDelay: 5 s

Upper threshold: 80

Lower threshold: 20

State: DOWN

Backup interfaces:

GE1/0/2 Priority: 30 State: UP_DELAY

GE1/0/3 Priority: 20 State: STANDBY

IB Track Information:

GE1/0/4 Track: 1 State: STANDBY

GE1/0/5 Track: 2 State: UP

Table 2 Command output

Field | Description
Interface | Name of the primary interface.
UpDelay | The number of seconds that elapse after the primary interface goes down before the backup interface is activated.
DownDelay | The number of seconds that elapse after the primary interface comes up before the backup interface is deactivated.
Upper threshold | The upper traffic threshold specified as a percentage of bandwidth available on the primary interface. When the traffic on the primary interface exceeds the upper threshold, the backup interfaces are activated to share load in descending order of backup priority.
Lower threshold | The lower traffic threshold specified as a percentage of bandwidth available on the primary interface. When the total amount of traffic on all the load-shared interfaces drops below the lower threshold, the backup interfaces are deactivated in ascending order of priority.
State | State of the primary interface: · UP—The interface is both administratively and physically up. · DOWN—The interface is administratively up, but its physical state is down (possibly because no physical link exists or the link has failed). · UP_DELAY—The interface has recovered, and it is waiting to preempt the active backup interface. · DOWN_DELAY—The interface has failed, and it is waiting to be taken over by a backup interface. During this period, packet loss occurs on the primary interface. The interface can forward traffic only when it is in UP state.
Backup interfaces | Backup interfaces assigned to the primary interface.
Priority | Priority of the backup interface.
State | State of the backup interface: · UP—The interface is both administratively and physically up. · DOWN—The interface is administratively up, but its physical state is down (possibly because no physical link exists or the link has failed). · UP_DELAY—The backup interface is waiting to take over the primary interface. · DOWN_DELAY—The interface is waiting to be preempted by the primary interface that has recovered. · STANDBY—The interface is on standby while the primary interface is operating correctly. The interface can forward traffic only when it is in UP state.
IB Track Information | Associations of backup interfaces and track entries.
Track | Track entry ID associated with the backup interface.
State | State of the backup interface associated with a track entry: · INVALID—The backup role of the interface has not taken effect, for example, because the track entry has not been created. · UP—The interface is both administratively and physically up. · DOWN—The interface is administratively up, but its physical state is down (possibly because no physical link exists or the link has failed). · STANDBY—The backup interface is on standby while the primary link is operating correctly.

Interface backup commands -- display interface-backup statistics

Use display interface-backup statistics to display traffic statistics for load-shared interfaces.

Syntax

display interface-backup statistics

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Examples

# Display traffic statistics for load-shared interfaces.

<Sysname> display interface-backup statistics

Interface: GigabitEthernet1/0/2

Statistics interval: 30 s

Bandwidth: 100000000 bps

ActiveTotalIn: 102 bytes

ActiveTotalOut: 108 bytes

ActiveIntervalIn: 102 bytes

ActiveIntervalOut: 108 bytes

Active used bandwidth: 28 bps

TotalIn: 102 bytes

TotalOut: 108 bytes

TotalIntervalIn: 102 bytes

TotalIntervalOut: 108 bytes

Total used bandwidth: 28 bps

Table 3 Command output

Field | Description
Interface | Name of the primary interface.
Statistics interval | Traffic polling interval, in seconds.
Bandwidth | Expected bandwidth (in bps) of the primary interface. This bandwidth is used for load sharing computation. You can use the bandwidth command in interface view to set its value.
PrimaryTotalIn | Cumulative sum of incoming bytes on the primary interface at the most recent traffic polling.
PrimaryTotalOut | Cumulative sum of outgoing bytes on the primary interface at the most recent traffic polling.
PrimaryIntervalIn | Number of incoming bytes on the primary interface for the most recent polling interval.
PrimaryIntervalOut | Number of outgoing bytes on the primary interface for the most recent polling interval.
Primary used bandwidth | The primary interface's used bandwidth that was counted in load sharing computation.
TotalIn | Cumulative sum of incoming bytes on the load-shared primary and backup interfaces at the most recent traffic polling.
TotalOut | Cumulative sum of outgoing bytes on the load-shared primary and backup interfaces at the most recent traffic polling.
TotalIntervalIn | Number of incoming bytes on the load-shared primary and backup interfaces for the most recent polling interval.
TotalIntervalOut | Number of outgoing bytes on the load-shared primary and backup interfaces for the most recent polling interval.
Total used bandwidth | Total used bandwidth (in bps) of the load-shared primary and backup interfaces for the most recent polling interval.