SW3(config)#spanning-tree mode ?
mst - Multiple Spanning Tree mode
pvst - Per-Vlan Spanning Tree mode (classic mode)
rapid-pvst - Rapid Per Vlan Spanning Tree mode (new & improved)
SW3(config)#spanning-tree mode rapid-pvst
^This is the default and we probably won't need to execute this.
SW1(config-if)#spanning-tree portfast
^This command will tell a port it is connected to a PC or end host, not a switch or a hub. Because there is no risk of creating a loop, they can move straight to the forwarding state without the negotiation process. The port is the "edge" of the network, so they are called "edge ports". They function like a classic STP port with PortFast enabled.
SW4(config-if)#spanning-tree link-type point-to-point
^This command tells the port it is connected to a switch
Costs:
Speed - STP Cost - RSTP Cost
10 Mbps - 100 - 2,000,000
100 Mbps - 19 - 200,000
1 Gbps - 4 - 20,000
10 Gbps - 2 - 2,000
100 Gbps - X - 200
1 Tbps - X - 20
[These are my notes from Jeremy's excellent CCNA course which can be viewed here.]