S_Aの f0/4 のインターフェイスに「PortFast と BPDUガード」を設定します。PC2、PC3、PC4を接続するインターフェイスの設定は省略します。

PortFast と BPDUガードを設定する
PortFast機能を有効にするポートには、レイヤ2ループを防ぐ目的から、BPDUガード機能も設定します。
S_A(config)#int f0/4
S_A(config-if)#spanning-tree portfast
S_A(config-if)#spanning-tree bpduguard enable
PortFastを有効にすると、下のように警告が表示されます。
%Warning: portfast should only be enabled on ports connected to a single
host. Connecting hubs, concentrators, switches, bridges, etc... to this
interface when portfast is enabled, can cause temporary bridging loops.
Use with CAUTION
%Portfast has been configured on FastEthernet0/4 but will only
have effect when the interface is in a non-trunking mode.
設定内容の検証
まず、PC1を接続するケーブルを外します。
そして、再度、S_Aのf0/4に接続します。リンクライトは、直ぐに、オレンジ色から緑色に変わります。

それは、Rapid PVST+の状態遷移で、リスニングとラーニングの状態が省略されるからです。
ブロッキング
↓
リスニング :省略
↓(15秒)
ラーニング :省略
↓(15秒)
フォワーディング
●show spanning-tree の出力
すべてのポートで PortFast と BPDUガードが有効となていないため、下の黄色のマーカーのようにDefaultが「disable」になっています。
S_A#show spanning-tree summary
Switch is in rapid-pvst mode
Root bridge for: default sales marketing
Extended system ID is enabled
Portfast Default is disabled
PortFast BPDU Guard Default is disabled
Portfast BPDU Filter Default is disabled
Loopguard Default is disabled
EtherChannel misconfig guard is disabled
UplinkFast is disabled
BackboneFast is disabled
Configured Pathcost method used is short
Name Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001 2 0 0 3 5
VLAN0010 1 0 0 4 5
VLAN0020 1 0 0 4 5
---------------------- -------- --------- -------- ---------- ----------
3 vlans 4 0 0 11 15
これで、「PortFast と BPDUガード」の検証を終わります。
関連コンテンツ
演習ファイル(完了)のダウンロード
ネットワークの構成を Packet Tracer で一から設定していくのは大変かと思います。「ダウンロード」から演習を完了させたファイルのダウンロードができます。ファイルは、McAfee インターネットセキュリティでウイルスチェックをしておりますが、ダウンロードは自己責任でお願いいたします。