正解:A
To prevent loops from occurring accidentally on a switch interface designated for host connectivity, the best practice is to enable Spanning Tree Protocol (STP) protections. Option A, which includes the command spanning-tree guard loop, is the correct configuration to apply. This command enables Loop Guard, a feature that prevents alternate or root ports from becoming designated ports due to a failure that leads to a unidirectional link. If a port stops receiving Bridge Protocol Data Units (BPDUs), Loop Guard puts the port into an STP loop-inconsistent state, effectively preventing potential loops.
References := This information is aligned with the best practices for loop prevention as described in Cisco's Data Center Core Technologies materials. For further details, refer to the study guide or source documents related to STP and its security features within the Cisco Data Center Core Technologies curriculum.