Hone

Lessons · Network switches · portfast

Thirty seconds of nothing, on every desk

Spanning tree holds a new port in listening and learning before forwarding; portfast skips that on a port with a single device on it.

Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.

What it is for

Without it a PC that boots faster than the port comes up gets no DHCP address and lands on a link-local one, and the user reports it as the network being broken.

How to think about it

Portfast on access ports with one host, never on a port going to another switch. The warning the switch prints when you type it says exactly that, and it is worth reading every time.

Worked example

enable
The # prompt.
configure terminal
Into configuration mode.
interface gi0/4
A desk port.
switchport mode access
Access mode first, because portfast on a trunk is the mistake the warning is about.
spanning-tree portfast
The switch prints a warning about hubs and switches. It is not an error; it is the condition under which this is safe.
end
Out.
show running-config
The line is under the interface, so it is per port and not a global switch setting.

Your turn

Let this desk port start forwarding immediately.

spanning-tree 

The trap

Turning it on everywhere to fix slow ports. On a port that reaches another switch it removes the delay that stops a loop forming, which trades a thirty second wait for an outage.

Practise portfast on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.