STP PortFast Best Practice
PortFast is a feature used in networking, specifically with the Spanning Tree Protocol (STP), that allows a switch port to bypass the usual STP initialization states (Listening, Learning) and move directly to the Forwarding state. This can significantly reduce the amount of time it takes for a port to become active, which is especially useful for devices that require immediate network connectivity upon connection, such as single-host systems.
The general guideline for enabling PortFast is to use it on switch ports that connect directly to end-user devices like PCs. However, it should never be enabled on ports that connect to other switches, whether trunk or access ports, as it could lead to network topology loops and instability.
For servers, firewalls, routers, and any device with a Layer 3 interface connected to the switch (i.e. whose interface is configured with an IP address), it is preferable to keep PortFast enabled. These devices will probably never be the source of a Layer 2 loop, and secondly, if they are rebooted, or if you disconnect them for maintenance, when they are connected again, you would want them to immediately begin operating.
However, be careful when servers or network devices are connected with two or more NICs. They might be configured for multi-homing or NIC teaming. Also, make sure they don't participate in STP. Some devices might generate BPDUs on their own.
Links
https://networklessons.com/switching/cisco-portfast-configuration/