Monday 13 April 2015

Configuring Multiple Spanning Tree Protocol

Configuring MSTP Features

These sections contain this configuration information:
Default MSTP Configuration
MSTP Configuration Guidelines
Specifying the MST Region Configuration and Enabling MSTP (required)
Configuring the Root Switch (optional)
Configuring a Secondary Root Switch (optional)
Configuring Port Priority (optional)
Configuring Path Cost (optional)

Default MSTP Configuration

Table 18-4 shows the default MSTP configuration.
Table 18-4 Default MSTP Configuration 

Feature

Default Setting

Spanning-tree mode

PVST+ (Rapid PVST+ and MSTP are disabled).

Switch priority (configurable on a per-CIST port basis)

32768.

Spanning-tree port priority (configurable on a per-CIST port basis)

128.

Spanning-tree port cost (configurable on a per-CIST port basis)

1000 Mbps: 4.

100 Mbps: 19.

10 Mbps: 100.

Hello time

2 seconds.

Forward-delay time

15 seconds.

Maximum-aging time

20 seconds.

Maximum hop count

20 hops.

For information about the supported number of spanning-tree instances

MSTP Configuration Guidelines

           Stacking is supported only on Catalyst 2960-S switches running the LAN base image.
           These are the configuration guidelines for MSTP:
When you enable MST by using the spanning-tree mode mst global configuration command, RSTP is automatically enabled.
For two or more stacked switches to be in the same MST region, they must have the same VLAN-to-instance map, the same configuration revision number, and the same name.
The switch stack supports up to 65 MST instances. The number of VLANs that can be mapped to a particular MST instance is unlimited.
PVST+, rapid PVST+, and MSTP are supported, but only one version can be active at any time. (For example, all VLANs run PVST+, all VLANs run rapid PVST+, or all VLANs run MSTP.)
All stack members run the same version of spanning tree (all PVST+, rapid PVST+, or MSTP). 
VTP propagation of the MST configuration is not supported. However, you can manually configure the MST configuration (region name, revision number, and VLAN-to-instance mapping) on each switch within the MST region by using the command-line interface (CLI) or through the SNMP support.
For load balancing across redundant paths in the network to work, all VLAN-to-instance mapping assignments must match; otherwise, all traffic flows on a single link. You can achieve load balancing across a switch stack by manually configuring the path cost.
All MST boundary ports must be forwarding for load balancing between a PVST+ and an MST cloud or between a rapid-PVST+ and an MST cloud. For this to occur, the IST master of the MST cloud should also be the root of the CST. If the MST cloud consists of multiple MST regions, one of the MST regions must contain the CST root, and all of the other MST regions must have a better path to the root contained within the MST cloud than a path through the PVST+ or rapid-PVST+ cloud. You might have to manually configure the switches in the clouds.
Partitioning the network into a large number of regions is not recommended. However, if this situation is unavoidable, we recommend that you partition the switched LAN into smaller LANs interconnected by routers or non-Layer 2 devices.
For configuration guidelines about UplinkFast, BackboneFast, and cross-stack UplinkFast,

Specifying the MST Region Configuration and Enabling MSTP

For two or more switches to be in the same MST region, they must have the same VLAN-to-instance mapping, the same configuration revision number, and the same name.
A region can have one member or multiple members with the same MST configuration; each member must be capable of processing RSTP BPDUs. There is no limit to the number of MST regions in a network, but each region can only support up to 65 spanning-tree instances. You can assign a VLAN to only one spanning-tree instance at a time.
Beginning in privileged EXEC mode, follow these steps to specify the MST region configuration and enable MSTP. This procedure is required.

Command

Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

spanning-tree mst configuration

Enter MST configuration mode.

Step 3 

instanceinstance-idvlan vlan-range

Map VLANs to an MST instance.

For instance-idthe range is 0 to 4094.

For vlan vlan-range, the range is 1 to 4094.

When you map VLANs to an MST instance, the mapping is incremental, and the VLANs specified in the command are added to or removed from the VLANs that were previously mapped.

To specify a VLAN range, use a hyphen; for example, instance 1 vlan 1-63 maps VLANs 1 through 63 to MST instance 1.

To specify a VLAN series, use a comma; for example, instance 1 vlan 10, 20, 30maps VLANs 10, 20, and 30 to MST instance 1.

Step 4 

name name

Specify the configuration name. The name string has a maximum length of 32 characters and is case sensitive.

Step 5 

revisionversion

Specify the configuration revision number. The range is 0 to 65535.

Step 6 

show pending

Verify your configuration by displaying the pending configuration.

Step 7 

exit

Apply all changes, and return to global configuration mode.

Step 8 

spanning-tree mode mst

Enable MSTP. RSTP is also enabled.
You cannot run both MSTP and PVST+ or both MSTP and rapid PVST+ at the same time.

Step 9 

end

Return to privileged EXEC mode.

Step 10 

show running-config

Verify your entries.

Step 11 

copy running-config startup-config

(Optional) Save your entries in the configuration file.
To return to the default MST region configuration, use the no spanning-tree mst configuration global configuration command. To return to the default VLAN-to-instance map, use the no instance instance-id [vlan vlan-range] MST configuration command. To return to the default name, use the no nameMST configuration command. To return to the default revision number, use the no revision MST configuration command. To re-enable PVST+, use the no spanning-tree mode or the spanning-tree mode pvst global configuration command.
This example shows how to enter MST configuration mode, map VLANs 10 to 20 to MST instance 1, name the region region1, set the configuration revision to 1, display the pending configuration, apply the changes, and return to global configuration mode:

Switch(config)# spanning-tree mst configuration

Switch(config-mst)# instance 1 vlan 10-20

Switch(config-mst)# name region1

Switch(config-mst)# revision 1

Switch(config-mst)# show pending

Pending MST configuration

Name      [region1]

Revision  1

Instance  Vlans Mapped

--------  ---------------------

0         1-9,21-4094

1         10-20
-------------------------------



Switch(config-mst)# exit

Switch(config)#

Configuring the Root Switch

The switch maintains a spanning-tree instance for the group of VLANs mapped to it. A switch ID, consisting of the switch priority and the switch MAC address, is associated with each instance. For a group of VLANs, the switch with the lowest switch ID becomes the root switch.
To configure a switch to become the root, use the spanning-tree mst instance-id root global configuration command to modify the switch priority from the default value (32768) to a significantly lower value so that the switch becomes the root switch for the specified spanning-tree instance. When you enter this command, the switch checks the switch priorities of the root switches. Because of the extended system ID support, the switch sets its own priority for the specified instance to 24576 if this value will cause this switch to become the root for the specified spanning-tree instance.
If any root switch for the specified instance has a switch priority lower than 24576, the switch sets its own priority to 4096 less than the lowest switch priority. (4096 is the value of the least-significant bit of a 4-bit switch priority value as shown in 
If your network consists of switches that both do and do not support the extended system ID, it is unlikely that the switch with the extended system ID support will become the root switch. The extended system ID increases the switch priority value every time the VLAN number is greater than the priority of the connected switches running older software.
The root switch for each spanning-tree instance should be a backbone or distribution switch. Do not configure an access switch as the spanning-tree primary root.
Use the diameter keyword, which is available only for MST instance 0, to specify the Layer 2 network diameter (that is, the maximum number of switch hops between any two end stations in the Layer 2 network). When you specify the network diameter, the switch automatically sets an optimal hello time, forward-delay time, and maximum-age time for a network of that diameter, which can significantly reduce the convergence time. You can use the hellokeyword to override the automatically calculated hello time.
    After configuring the switch as the root switch, we recommend that you avoid manually configuring the hello time, forward-delay time, and maximum-age time through the spanning-tree mst hello-timespanning-tree mst forward-time, and the spanning-tree mst max-age global configuration commands.
    Beginning in privileged EXEC mode, follow these steps to configure a switch as the root switch. This procedure is optional.

Command

Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

spanning-tree mst instance-idroot primary [diameter net-diameter [hello-time seconds]]

Configure a switch as the root switch.

For instance-id, you can specify a single instance, a range of instances separated by a hyphen, or a series of instances separated by a comma. The range is 0 to 4094.

(Optional) For diameter net-diameter, specify the maximum number of switches between any two end stations. The range is 2 to 7. This keyword is available only for MST instance 0.

(Optional) For hello-time seconds, specify the interval in seconds between the generation of configuration messages by the root switch. The range is 1 to 10 seconds; the default is 2 seconds.

Step 3 

end

Return to privileged EXEC mode.

Step 4 

show spanning-tree mstinstance-id

Verify your entries.

Step 5 

copy running-config startup-config

(Optional) Save your entries in the configuration file.
To return the switch to its default setting, use the no spanning-tree mst instance-id root global configuration command.

Configuring a Secondary Root Switch

When you configure a switch with the extended system ID support as the secondary root, the switch priority is modified from the default value (32768) to 28672. The switch is then likely to become the root switch for the specified instance if the primary root switch fails. This is assuming that the other network switches use the default switch priority of 32768 and therefore are unlikely to become the root switch.
You can execute this command on more than one switch to configure multiple backup root switches. Use the same network diameter and hello-time values that you used when you configured the primary root switch with the spanning-tree mst instance-id root primary global configuration command.
Beginning in privileged EXEC mode, follow these steps to configure a switch as the secondary root switch. This procedure is optional.

Command

Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

spanning-tree mst instance-idroot secondary [diameter net-diameter [hello-time seconds]]

Configure a switch as the secondary root switch.

For instance-id, you can specify a single instance, a range of instances separated by a hyphen, or a series of instances separated by a comma. The range is 0 to 4094.

(Optional) For diameter net-diameter, specify the maximum number of switches between any two end stations. The range is 2 to 7. This keyword is available only for MST instance 0.

(Optional) For hello-time seconds, specify the interval in seconds between the generation of configuration messages by the root switch. The range is 1 to 10 seconds; the default is 2 seconds.

Use the same network diameter and hello-time values that you used when configuring the primary root switch. 

Step 3 

end

Return to privileged EXEC mode.

Step 4 

show spanning-tree mstinstance-id

Verify your entries.

Step 5 

copy running-config startup-config

(Optional) Save your entries in the configuration file.
To return the switch to its default setting, use the no spanning-tree mst instance-id root global configuration command.

Configuring Port Priority

If a loop occurs, the MSTP uses the port priority when selecting an interface to put into the forwarding state. You can assign higher priority values (lower numerical values) to interfaces that you want selected first and lower priority values (higher numerical values) that you want selected last. If all interfaces have the same priority value, the MSTP puts the interface with the lowest interface number in the forwarding state and blocks the other interfaces.
          If your switch is a member of a switch stack, you must use the spanning-tree mst [instance-idcost cost interface configuration command instead of thespanning-tree mst [instance-idport-priority priority interface configuration command to select a port to put in the forwarding state. Assign lower cost values to ports that you want selected first and higher cost values to ports that you want selected last. For more information
          Beginning in privileged EXEC mode, follow these steps to configure the MSTP port priority of an interface. This procedure is optional.

Command

Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

interface interface-id

Specify an interface to configure, and enter interface configuration mode.

Valid interfaces include physical ports and port-channel logical interfaces. The port-channel range is 1 to 6.

Step 3 

spanning-tree mstinstance-id port-priority priority

Configure the port priority.

For instance-id, you can specify a single instance, a range of instances separated by a hyphen, or a series of instances separated by a comma. The range is 0 to 4094.

For priority, the range is 0 to 240 in increments of 16. The default is 128. The lower the number, the higher the priority.

The priority values are 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, and 240. All other values are rejected.

Step 4 

end

Return to privileged EXEC mode.

Step 5 

show spanning-treemst interfaceinterface-id

or

show spanning-tree mst instance-id

Verify your entries.

Step 6 

copy running-config startup-config

(Optional) Save your entries in the configuration file.
    The show spanning-tree mst interface interface-id privileged EXEC command displays information only if the port is in a link-up operative state. Otherwise, you can use the show running-config interface privileged EXEC command to confirm the configuration.
      To return the interface to its default setting, use the no spanning-tree mst instance-id port-priority interface configuration command.

Configuring Path Cost

The MSTP path cost default value is derived from the media speed of an interface. If a loop occurs, the MSTP uses cost when selecting an interface to put in the forwarding state. You can assign lower cost values to interfaces that you want selected first and higher cost values that you want selected last. If all interfaces have the same cost value, the MSTP puts the interface with the lowest interface number in the forwarding state and blocks the other interfaces.
Beginning in privileged EXEC mode, follow these steps to configure the MSTP cost of an interface. This procedure is optional.

Command

Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

interface interface-id

Specify an interface to configure, and enter interface configuration mode. Valid interfaces include physical ports and port-channel logical interfaces. The port-channel range is 1 to 6.

Step 3 

spanning-tree mstinstance-id costcost

Configure the cost.

If a loop occurs, the MSTP uses the path cost when selecting an interface to place into the forwarding state. A lower path cost represents higher-speed transmission.

For instance-id, you can specify a single instance, a range of instances separated by a hyphen, or a series of instances separated by a comma. The range is 0 to 4094.

For cost, the range is 1 to 200000000; the default value is derived from the media speed of the interface.

Step 4 

end

Return to privileged EXEC mode.

Step 5 

show spanning-tree mst interfaceinterface-id

or

show spanning-tree mst instance-id

Verify your entries.

Step 6 

copy running-config startup-config

(Optional) Save your entries in the configuration file.
    The show spanning-tree mst interface interface-id privileged EXEC command displays information only for ports that are in a link-up operative state. Otherwise, you can use the show running-config privileged EXEC command to confirm the configuration.
    To return the interface to its default setting, use the no spanning-tree mst instance-id cost interface configuration command.

No comments:

Post a Comment