STP
・ブリッジプライオリティ値の変更
(config)#spanning-tree vlan <VLAN番号> priority <プライオリティ値>
・プライオリティ値の自動調整
(config)#spanning-tree vlan <VLAN番号> root <primary | secondary>
・ポートパスコスト変更
(congif-if)#spanning-tree [vlan <VLAN番号>] cost <コスト値>
・ポートプライオリティ値の変更
(config-if)#spanning-tree [vlan <VLAN番号>] port-priority
・STPモード変更
(config)#spanning-tree mode <pvst | rapid-pvsp | mst>
・portfastの設定
グローバルコンフィギュレーション:非トランクポートで有効になる
インターフェイスコンフィギュレーションモード:そのインターフェイスのみで有効、トランクポートでは不可
(config)#spanning-tree portfast default
(config-if)#spanning-tree portfast
・uplinkfastの設定
(config)#spanning-tree uplinkfast
・backbonefastの設定
(config)#spanning-tree backbonefast
・STPの設定確認
#show spanning-tree [vlan <VLAN番号>]
Switch1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address aabb.cc00.0100
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address aabb.cc00.0100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Et0/0 Desg LIS 100 128.1 Shr
Et0/1 Desg LIS 100 128.2 Shr
Et0/2 Desg LIS 100 128.3 Shr
Et0/3 Desg LIS 100 128.4 Shr
Et1/0 Desg LIS 100 128.33 Shr
Et1/1 Desg LIS 100 128.34 Shr
Et1/2 Desg LIS 100 128.35 Shr
Et1/3 Desg LIS 100 128.36 Shr
・STPのインターフェイスの確認
#show spanning-tree interface <インターフェイス>
Switch1#show spanning-tree interface ethernet 0/0
Vlan Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
VLAN0001 Desg FWD 100 128.1 Shr
・portfastのイベントログ確認
#debug spanning-tree events
・mstコンフィギュレーションモード移行
(config)#spanning-tree mst configuration
・リージョン名設定
(config-mst)#name <リージョン名>
・リビジョン番号設定
(config-mst)#revision <リージョン番号>
・VLANマッピング設定
(config-mst)#instance <インスタンス番号> vlan <VLANリスト>
・mst設定確認
#show spanning-tree mst configuration
Switch1#show spanning-tree mst configuration
Name [taskkun]
Revision 3 Instances configured 2
Instance Vlans mapped
——– ———————————————————————
0 2-4094
1 1
——————————————————————————-
(config-mst)#show pending
Switch1(config-mst)#show pending
Pending MST configuration
Name [taskkun]
Revision 3 Instances configured 2
Instance Vlans mapped
——– ———————————————————————
0 2-4094
1 1
——————————————————————————-
・ルートガード有効化
(config-if)#spanning-tree guard root
・BPDUガードの有効化
グローバルコンフィギュレーションモード:portfast設定がされているポートで有効
インターフェイスコンフィギュレーションモード:そのインターフェイスのみで有効
(config)#spanning-tree portfast bpduguard default
(config-if)#spanning-tree bpduguard enable
・BPDUフィルタリングの有効化
グローバルコンフィギュレーションモード:portfast設定がされているポートで有効
インターフェイスコンフィギュレーションモード:そのインターフェイスのみで有効
(config)#spanning-tree portfast bpdufilter default
(config-if)#spanning-tree bpdufilter <enable | disable>
・ループガード有効化
グローバルコンフィギュレーションモード:すべてのポートでループガード有効
インターフェイスコンフィギュレーションモード:そのインターフェイスのみで有効
(config)#spanning-tree loopguard default
(config-if)#spanning-tree guard loop
・不整合ポートの情報確認
#show spanning-tree inconsistentports
Switch1#show spanning-tree inconsistentports
Name Interface Inconsistency
——————– ———————— ——————
Number of inconsistent ports (segments) in the system : 0
Etherchannel
・Etherchannel設定
(config-if)#channel-group <グループ番号> mode <on | auto | desirable | active | passive> [non-silent]
※Etherchannelネゴシエーション組み合わせ
PAgP:auto、desirable
LACP:passive、active
auto | desirable | passive | active | |
auto | × | 〇 | × | × |
desirable | 〇 | 〇 | × | × |
passive | × | × | × | 〇 |
active | × | × | 〇 | 〇 |
・ネゴシエーションプロトコル指定
(config-if)#channel-protocol <pagp | lacp>
・LACPプライオリティ値設定
(config)#lacp system-priority <プライオリティ値>
・LACPポートプライオリティ値設定
(config-if)#lacp port-priority <プライオリティ値>
・ロードバランシング設定
(config)#port-channel load-balance <dst-ip | dst-mac | src-dst-ip | src-dst-mac | src-ip | src-mac>
・Etherchannel設定確認
#show etherchannel <detail | summary | port>
Switch1#show etherchannel summary
Flags: D – down P – bundled in port-channel
I – stand-alone s – suspended
H – Hot-standby (LACP only)
R – Layer3 S – Layer2
U – in use f – failed to allocate aggregator
M – not in use, minimum links not met
u – unsuitable for bundling
w – waiting to be aggregated
d – default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
——+————-+———–+———————————————–
1 Po1(SU) LACP Et0/0(P) Et0/1(P)
・ロードバランシング設定確認
#show etherchannel load-balance
Switch1#show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
・Etherchannelガードの有効化
(config)#[no] spanning-tree etherchannel guard misconfig
コメントを書く