< Home

stp timer max-age

Function

The stp timer max-age command sets the Max Age of a switching device, that is, the BPDU aging time on a port of the switching device.

The undo stp timer max-age command restores the default setting.

By default, the Max Age of a switching device is 2000 centiseconds (20 seconds).

Format

stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] timer max-age max-age

undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] timer max-age

Parameters

Parameter Description Value

vlan vlan-id1 [ to vlan-id2 ]

Specifies one or more VLANs in which the Max Age value is set.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, the Max Age value is configured only for the VLAN specified by vlan-id1.

In the stp timer max-age command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.

max-age

Specifies the BPDU aging time on a port of the switch.

The value ranges from 600 to 4000 in centiseconds with a step of 100.

Views

System view or MST process region view

VBST does not support processes. When VBST is running, you cannot run the stp timer max-age command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network where a spanning tree protocol is enabled, a switching device checks whether the BPDUs received from an upstream switching device time out based on the set Max Age value. If the received BPDUs time out, the switching device ages the BPDUs and blocks the port that receives the BPDUs. Then, the switching device sends the BPDUs with the switching device as the root bridge. This aging mechanism effectively controls the diameter of the spanning tree. After the stp timer max-age command is run, the Max Age value is set to control the timeout period of received BPDUs.

In a spanning tree, the device closer to the root bridge is the upstream device of another connected device.

Precautions

The value of the Max Age set on the root bridge is advertised to other devices of the same spanning tree using BPDUs. Then it becomes the MaxAge value of all devices in the spanning tree.

The relationships between the Hello Time, Forward Delay, and Max Age are as follows. The spanning tree functions properly only if the relationships are correctly established. Otherwise, frequent network flapping occurs.
  • 2 x (Forward Delay - 1.0 second) ≥ Max Age

  • Max Age ≥ 2 x (Hello Time + 1.0 second)

Running the stp bridge-diameter command to set the network diameter is recommended. After the stp bridge-diameter command is run, the switching device sets optimum values for the three parameters, Hello Time, Forward Delay, and Max Age.

Example

# Set the Max Age to 1000 centiseconds (10 seconds) when STP/RSTP/MSTP is running.

<HUAWEI> system-view
[HUAWEI] stp timer max-age 1000
# Set the Max Age value to 1000 centiseconds (10 seconds) for VLAN 10 when VBST is running.
<HUAWEI> system-view
[HUAWEI] stp vlan 10 timer max-age 1000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >