Перейти к основному содержимому

Конфигурация RPVST+

Этот раздел содержит полный пример настройки RPVST+.

Топология

Image

Рисунок 6-38: Конфигурация RPVST+

Конфигурация

Switch 2

#configure terminalПерейти в режим конфигурации для коммутатора.
(config)#bridge 1 protocol rpvst\+Настроить bridge 1 как bridge RPVST+.
(config)#vlan 2-3 bridge 1Настроить VLAN 2 и 3 и ассоциировать их с bridge 1.
(config)#spanning-tree rpvst\+ configurationПерейти в режим конфигурации Rapid Per-VLAN Spanning Tree.
(config-rpvst\+)#bridge 1 vlan 2Ассоциировать настроенный VLAN с bridge 1.
(config-rpvst\+)#bridge 1 vlan 3Ассоциировать настроенный VLAN с bridge 1.
(config-rvpst\+)#exitВыйти из режима конфигурации RPVST+.
(config)#interface eth1Перейти в режим интерфейса для eth1.
(config-if)#switchportНастроить eth1 как порт уровня 2.
(config-if)#bridge-group 1Ассоциировать bridge с интерфейсом.
(config-if)#switchport mode trunkНастроить порт как транковый.
(config-if)#switchport trunk allowed vlan add 2,3Настроить VLAN 2 и VLAN 3 на интерфейсе.
(config-if)#bridge-group 1 vlan 2Настроить bridge group для интерфейса с VLAN 2.
(config-if)#bridge-group 1 vlan 3Настроить bridge group для интерфейса с VLAN 3.
(config-if)#exitВыйти из режима интерфейса.
(config)#interface eth2Перейти в режим интерфейса для eth2.
(config-if)#switchportНастроить eth2 как порт уровня 2.
(config-if)#bridge-group 1Ассоциировать bridge с интерфейсом.
(config-if)#switchport mode trunkНастроить порт как транковый.
(config-if)#switchport trunk allowed vlan add 2,3Настроить VLAN 2 и VLAN 3 на интерфейсе.
(config-if)#bridge-group 1 vlan 2Настроить bridge group для интерфейса с VLAN 2.
(config-if)#bridge-group 1 vlan 3Настроить bridge group для интерфейса с VLAN 3.
(config-if)#exitВыйти из режима интерфейса.

Switch 1

#configure terminalПерейти в режим конфигурации для коммутатора.
(config)#bridge 1 protocol rpvst\+Настроить bridge 1 как bridge RPVST+.
(config)#vlan 2-3 bridge 1Настроить VLAN 2 и 3 и ассоциировать их с bridge 1.
(config)#spanning-tree rpvst\+ configurationПерейти в режим конфигурации Rapid Per-VLAN Spanning Tree.
(config-rpvst\+)#bridge 1 vlan 2Ассоциировать настроенный VLAN с bridge 1.
(config-rpvst\+)#bridge 1 vlan 3Ассоциировать настроенный VLAN с bridge 1.
(config-rvpst\+)#exitВыйти из режима конфигурации RPVST+.
(config)#interface eth1Перейти в режим интерфейса для eth1.
(config-if)#switchportНастроить eth1 как порт уровня 2.
(config-if)#bridge-group 1Ассоциировать bridge с интерфейсом.
(config-if)#switchport mode trunkНастроить порт как транковый.
(config-if)#switchport trunk allowed vlan add 2,3Настроить VLAN 2 и VLAN 3 на интерфейсе.
(config-if)#bridge-group 1 vlan 2Настроить bridge group для интерфейса с VLAN 2.
(config-if)#bridge-group 1 vlan 3Настроить bridge group для интерфейса с VLAN 3.
(config-if)#exitВыйти из режима интерфейса.

Switch 3

#configure terminalПерейти в режим конфигурации для коммутатора.
(config)#bridge 1 protocol rpvst\+Настроить bridge 1 как bridge RPVST+.
(config)#vlan 2-3 bridge 1Настроить VLAN 2 и 3 и ассоциировать их с bridge 1.
(config)#interface eth1Перейти в режим интерфейса для eth1.
(config-if)#switchportНастроить eth1 как порт уровня 2.
(config-if)#bridge-group 1Ассоциировать bridge с интерфейсом.
(config-if)#switchport mode trunkНастроить порт как транковый.
(config-if)#switchport trunk allowed vlan add 2,3Настроить VLAN 2 и VLAN 3 на интерфейсе.
(config-if)#exitВыйти из режима интерфейса.
Проверка

Switch2

#show spanning-tree rpvst+ vlan 2
% vlan 2 Instance 1 configured
% 1: Root Path Cost 0 - Root Port 0 - Bridge Priority 32768
% 1: Root Id 8002525400b7bfa7
% 1: Bridge Id 8002525400b7bfa7
%   eth1: Port Number 3 - Ifindex 3 - Port Id 0x8003 - Role Designated - State Forwarding
%   eth1: Designated Internal Path Cost 0  - Designated Port Id 0x8003
%   eth1: Configured Internal Path Cost 200000
%   eth1: Configured External Path cost 200000
%   eth1: Configured Internal Priority 128
%   eth1: Configured External Priority 128
%   eth1: Designated Root 8002525400b7bfa7
%   eth1: Designated Bridge 8002525400b7bfa7
%   eth1: Message Age 0 - Max Age 20
%   eth1: Hello Time 2 - Forward Delay 15
%   eth1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 0
%
%   eth2: Port Number 4 - Ifindex 4 - Port Id 0x8004 - Role Designated - State Forwarding
%   eth2: Designated Internal Path Cost 0  - Designated Port Id 0x8004
%   eth2: Configured Internal Path Cost 200000
%   eth2: Configured External Path cost 200000
%   eth2: Configured Internal Priority 128
%   eth2: Configured External Priority 128
%   eth2: Designated Root 8002525400b7bfa7
%   eth2: Designated Bridge 8002525400b7bfa7
%   eth2: Message Age 0 - Max Age 20
%   eth2: Hello Time 2 - Forward Delay 15
%   eth2: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 1 %
#show spanning-tree rpvst+ interface eth1
% 1: Bridge up - Spanning Tree Enabled  - topology change detected
% 1: Root Path Cost 0 - Root Port 0 -  Bridge Priority 32768
% 1: Forward Delay 15 - Hello Time 2 - Max Age 20 - Transmit Hold Count 6
% 1: Root Id 8001525400b7bfa7
% 1: Bridge Id 8001525400b7bfa7
% 1: last topology change Wed Mar 28 15:33:06 2022
% 1: 2 topology change(s)  - last topology change Wed Mar 28 15:33:06 2022
% 1: portfast bpdu-filter disabled
% 1: portfast bpdu-guard disabled
% 1: portfast errdisable timeout disabled
% 1: portfast errdisable timeout interval 300 sec
%   eth1: Port Number 3 - Ifindex 3 - Port Id 0x8003 - Role Designated - State Forwarding
%   eth1: Designated External Path Cost 0 -Internal Path Cost 0
%   eth1: Configured Path Cost 200000  - Add type Explicit ref count 3
%   eth1: Designated Port Id 0x8003 - Priority 128  -
%   eth1: Root 8001525400b7bfa7
%   eth1: Designated Bridge 8001525400b7bfa7
%   eth1: Message Age 0 - Max Age 20
%   eth1: Hello Time 2 - Forward Delay 15
%   eth1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 2 - topo change timer 0
%   eth1: forward-transitions 1
%   eth1: Version Rapid Spanning Tree Protocol - Received None - Send RSTP
%   eth1: No portfast configured - Current  portfast off
%   eth1: bpdu-guard  default  - Current bpdu-guard off
%   eth1: bpdu-filter default  - Current bpdu-filter off
%   eth1: no root guard configured     - Current root guard off
%   eth1: Configured Link Type point-to-point - Current point-to-point
%   eth1: No auto-edge configured - Current port Auto Edge off
%
%
%   Instance        VLAN
%   0:              1
%   1:              2
%   2:              3
#show spanning-tree rpvst+ detail
% 1: Bridge up - Spanning Tree Enabled  - topology change detected
% 1: Root Path Cost 0 - Root Port 0 -  Bridge Priority 32768
% 1: Forward Delay 15 - Hello Time 2 - Max Age 20 - Transmit Hold Count 6
% 1: Root Id 8001525400b7bfa7
% 1: Bridge Id 8001525400b7bfa7
% 1: last topology change Wed Mar 28 15:33:06 2022
% 1: 2 topology change(s)  - last topology change Wed Mar 28 15:33:06 2022
% 1: portfast bpdu-filter disabled
% 1: portfast bpdu-guard disabled
% 1: portfast errdisable timeout disabled
% 1: portfast errdisable timeout interval 300 sec
%   eth1: Port Number 3 - Ifindex 3 - Port Id 0x8003 - Role Designated - State Forwarding
%   eth1: Designated External Path Cost 0 -Internal Path Cost 0
%   eth1: Configured Path Cost 200000  - Add type Explicit ref count 3
%   eth1: Designated Port Id 0x8003 - Priority 128  -
%   eth1: Root 8001525400b7bfa7
%   eth1: Designated Bridge 8001525400b7bfa7
%   eth1: Message Age 0 - Max Age 20
%   eth1: Hello Time 2 - Forward Delay 15
%   eth1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 0 - topo change timer 0
%   eth1: forward-transitions 1
%   eth1: Version Rapid Spanning Tree Protocol - Received None - Send RSTP
%   eth1: No portfast configured - Current  portfast off %   eth1: bpdu-guard  default  - Current bpdu-guard off
%   eth1: bpdu-filter default  - Current bpdu-filter off
%   eth1: no root guard configured     - Current root guard off
%   eth1: Configured Link Type point-to-point - Current point-to-point
%   eth1: No auto-edge configured - Current port Auto Edge off
%
%   eth2: Port Number 4 - Ifindex 4 - Port Id 0x8004 - Role Designated - State Forwarding
%   eth2: Designated External Path Cost 0 -Internal Path Cost 0
%   eth2: Configured Path Cost 200000  - Add type Explicit ref count 3
%   eth2: Designated Port Id 0x8004 - Priority 128  -
%   eth2: Root 8001525400b7bfa7
%   eth2: Designated Bridge 8001525400b7bfa7
%   eth2: Message Age 0 - Max Age 20
%   eth2: Hello Time 2 - Forward Delay 15
%   eth2: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 1 - topo change timer 0
%   eth2: forward-transitions 1
%   eth2: Version Rapid Spanning Tree Protocol - Received None - Send RSTP
%   eth2: No portfast configured - Current  portfast off
%   eth2: bpdu-guard  default  - Current bpdu-guard off
%   eth2: bpdu-filter default  - Current bpdu-filter off
%   eth2: no root guard configured     - Current root guard off
%   eth2: Configured Link Type point-to-point - Current point-to-point
%   eth2: No auto-edge configured - Current port Auto Edge off %
% Instance  1:  Vlans: 2
%   eth1: Port Number 3 - Ifindex 3 - Port Id 0x8003 - Role Designated - State Forwarding
%   eth1: Designated Internal Path Cost 0  - Designated Port Id 0x8003
%   eth1: Configured Internal Path Cost 200000
%   eth1: Configured External Path cost 200000
%   eth1: Configured Internal Priority 128
%   eth1: Configured External Priority 128
%   eth1: Designated Root 8002525400b7bfa7
%   eth1: Designated Bridge 8002525400b7bfa7
%   eth1: Message Age 0 - Max Age 20
%   eth1: Hello Time 2 - Forward Delay 15
%   eth1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 0
% Instance  1:  Vlans: 2
%   eth2: Port Number 4 - Ifindex 4 - Port Id 0x8004 - Role Designated - State Forwarding
%   eth2: Designated Internal Path Cost 0  - Designated Port Id 0x8004
%   eth2: Configured Internal Path Cost 200000
%   eth2: Configured External Path cost 200000
%   eth2: Configured Internal Priority 128
%   eth2: Configured External Priority 128
%   eth2: Designated Root 8002525400b7bfa7
%   eth2: Designated Bridge 8002525400b7bfa7
%   eth2: Message Age 0 - Max Age 20
%   eth2: Hello Time 2 - Forward Delay 15
%   eth2: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 1
% Instance  2:  Vlans: 3
%   eth1: Port Number 3 - Ifindex 3 - Port Id 0x8003 - Role Designated - State Forwarding
%   eth1: Designated Internal Path Cost 0  - Designated Port Id 0x8003
%   eth1: Configured Internal Path Cost 200000
%   eth1: Configured External Path cost 200000
%   eth1: Configured Internal Priority 128
%   eth1: Configured External Priority 128
%   eth1: Designated Root 8003525400b7bfa7
%   eth1: Designated Bridge 8003525400b7bfa7
%   eth1: Message Age 0 - Max Age 20
%   eth1: Hello Time 2 - Forward Delay 15
%   eth1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 0
% Instance  2:  Vlans: 3
%   eth2: Port Number 4 - Ifindex 4 - Port Id 0x8004 - Role Designated - State Forwarding
%   eth2: Designated Internal Path Cost 0  - Designated Port Id 0x8004
%   eth2: Configured Internal Path Cost 200000
%   eth2: Configured External Path cost 200000
%   eth2: Configured Internal Priority 128
%   eth2: Configured External Priority 128
%   eth2: Designated Root 8003525400b7bfa7
%   eth2: Designated Bridge 8003525400b7bfa7
%   eth2: Message Age 0 - Max Age 20
%   eth2: Hello Time 2 - Forward Delay 15
%   eth2: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 1