Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco Switching Black Book - Sean Odom, Hanson Nottingham.pdf
Скачиваний:
97
Добавлен:
24.05.2014
Размер:
2.89 Mб
Скачать

Viewing the STP Configuration on a Command Line Switch

To view the configuration, you use the same command you use for the Set/Clear command−based switches. However, you will receive much different output. Use this command:

show spantree

The output should look similar to this on your console:

VLAN1 is executing the IEEE compatible Spanning Tree Protocol Bridge Identifier has priority 8192, address 002C.100A.AD51 Configured hello time 2, max age 20, forward delay 15

Current root has priority 8192, address 002C.100A.AD51 Root port is FastEthernet 1/1, cost of root path is 0 Topology change flag not set, detected flag not set

Topology changes 21, last topology change occurred 1d3hl9m59s ago Times: hold 1, topology change 9211

hello 2, max age 20, forward delay 15

Timers: hello 2, topology change 35, notification 2 Port Ethernet 0/5 of VLAN1 is Forwarding

Port path cost 0, Port priority 100

Designated root has priority 8192, address 002C.100A.AD51 Designated bridge has priority 8192, address 002C.100A.AD51 Designated port is Ethernet 0/5, path cost 10

Timers: message age 20, forward delay 15, hold 1

Configuring the STP Root Switch

To configure the switch to become the root bridge, enter the following command in Privileged mode (Table 10.7 defines the syntax fields for this command):

set spantree root <vlan> dia <seconds> hello <seconds>

set spantree root 5 dia 3 hello 2

Configuring the STP Secondary Root Switch

To configure the switch to become the secondary root bridge, enter the following Privileged mode command (Table 10.7 defines the syntax fields for this command):

set spantree root secondary <vlan> dia <seconds> hello <seconds>

catalyst5000> (enable) set spantree root secondary 1 dia 3 hello 2 VLAN 1 bridge priority set to 16384.

VLAN 1 bridge max aging time set to 12. VLAN 1 bridge hello time set to 2.

VLAN 1 bridge forward delay set to 9. catalyst5000> (enable)

Table 10.7: Root and secondary bridge configuration command parameters.

Command Parameter

Definition

root

Designates the root switch. The default priority of the root bridge is 8,192.

215

secondary (optional)

Used to designate the switch as a secondary root switch if the root bridge

 

fails. The default priority of the secondary bridge is 16,384.

n (optional)

Specifies the VLAN. If you do not specify the VLAN, VLAN 1 is used.

 

The valid value range is 1 through 1,005.

dia n (optional)

Specifies the diameter value discussed earlier in the chapter. It is

 

essentially the number of bridges between any two points. The diameter

 

should be measured starting from the root bridge. Valid values are 2

 

through 7.

hello n (optional)

Specifies in seconds how often configuration messages should be

 

generated by the root switch. The valid values are 1 through 10.

Setting the Root Bridge for More than One VLAN on a Set/Clear Command−Based Switch

To set the primary root switch for more than one VLAN on a Set/Clear−based switch, use the Privileged mode command to change configuration to a root bridge. The default priority automatically changes to 8,192, which is the default when the command is used to configure the switch as the root bridge. Use the following command to specify the root bridge:

set spantree root <root|secondary> <VLAN list> dia <diameter>

The following command specifies the root bridge for VLANs 1 through 3:

set spantree root 1−3 dia 2

When the root bridge is configured correctly, the output on the console should be similar to this:

VLANs 1−3

bridge priority set

to 8192

VLANs 1−3

bridge max aging time

set to 10 seconds.

VLANS

1−3

bridge hello

time set

to

2 seconds.

VLANS

1−3

bridge forward delay set

to 7 seconds.

Switch is

now the root

switch

for active VLANs 1−3.

Assigning a Port Cost to a Port Using the Set/Clear Command−Based IOS

To manually change the port cost on a Set/Clear command−based switch, use the following Privileged mode command:

set spantree portcost <module/port> <port cost>

In the following example, 5 is the module number, 2 is the port number, and 100 is the configured port cost:

set spantree portcost 5/2 100

Assigning a Port Cost to a Port Using a CLI−Based Switch

To manually change the port cost on a Cisco IOS−based switch, use this Interface Configuration mode command:

spantree cost <port cost>

216

This example uses 100 as the port cost:

spantree cost 100

Verifying the Port Cost Configuration on Both a Set/Clear Command− and CLI−Based Interface

To verify the port cost on the port configured previously, use the following Privileged mode command:

show spantree <module/port>

The following command provides output on module 0, port 3:

show spantree 0/3

The output on the console should look similar to this:

Port

Vlan

Port−State

Cost

Priority Fast−StartGroup−method

—————— ——————

——————————

————

———————— —————————— ——————————

0/3

4

forwarding

10

32

disabled

Configuring the Port Priority on a Set/Clear Command−Based IOS

The port with the lowest priority value forwards frames for all VLANs. In the event that all ports have the same priority value, the port with the lowest port number will forward the frames. The possible port priority value range is from 0 to 63. The default port priority value is 32. To change a port’s priority, enter the following Privileged mode command:

set spantree portpri <module/port> <port priority>

Here, 4 is the module number, 3 is the port number, and 10 is the port priority:

set spantree portpri 4/3 10

Configuring the Port Priority on a CLI−Based IOS

On a Cisco IOS command−based switch, the priority value is a numerical value from 0 to 255. To set the port priority on a Cisco IOS command−based switch, enter the following Interface Configuration mode command:

spantree priority <port priority>

In this example, 100 is the priority value:

spantree priority 100

217

Verifying the STP Port Priority on a Set/Clear Command−Based Switch

To verify the proper port priority setting, use this command (only the module and port numbers are required):

show spantree <module/port>

The following command provides output on module 2, port 3:

show spantree 2/3

 

 

 

 

 

Port

Vlan

Port−State

Cost Priority

Portfast

Channel_id

————————————

————

———————————— ———— ——————— —————————— ——————————

2/3

1

not−connected

19

32

disabled

0

catalyst5000> (enable)

Verifying the VLAN Priority Settings

To verify the port’s VLAN priority settings, enter the following command in Privileged mode (only the module and port number are required):

show spantree <module/port>

The following command provides output on module 3, port 5:

show spantree 3/5

Adjusting the FwdDelay Timer on a Set/Clear Command−Based IOS

To change the FwdDelay default setting, use the following Privileged mode command:

set spantree fwddelay <delay value> <VLAN>

In this example, 4 indicates a four−second delay and 3 indicates the VLAN:

set spantree fwddelay 4 3

Adjusting the Hello Timer on a Set/Clear Command−Based IOS

To change the default Hello Time on the bridge, use this Privileged mode command:

Set spantree hello <time value>

Use 4 to indicate a four−second interval:

set spantree hello 4

218

Соседние файлы в предмете Программирование