Difficulty: Medium
Correct Answer: Switch(config-if)# switchport port-security maximum 1
Explanation:
Introduction / Context:
Catalyst switches can limit the number of MAC addresses learned per access port to mitigate MAC flooding and unauthorized device attachment. Enforcing “exactly one host” per interface and shutting the port on violations is a classic use of port security.
Given Data / Assumptions:
Concept / Approach:
Port security is configured under the interface with switchport port-security options. Two key knobs are the maximum number of MACs and the violation action. To actually enable port security, you also use switchport port-security (base command). Among the options provided, only the maximum limiter and violation action are relevant interface-level commands.
Step-by-Step Solution:
Verification / Alternative check:
Use show port-security interface to confirm the maximum and violation mode, and test with a second host to see the port error-disable.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting the base switchport port-security command; using sticky without understanding persistence; applying ACLs instead of port security.
Final Answer:
Switch(config-if)# switchport port-security maximum 1 and Switch(config-if)# switchport port-security violation shutdown
Discussion & Comments