Courseiva
Question 1,679 of 1,389
Network Services and SecuritymediumMultiple ChoiceObjective-mapped

CCNA Network Services and Security Practice Question

An engineer applies this command on an access interface connected to a user PC: switchport port-security violation restrict. What happens if a second unauthorized MAC address appears on the port?

⚠ Common exam trap

A frequent exam trap is mistaking the restrict violation mode for shutdown mode. Many candidates incorrectly believe that a violation in restrict mode causes the port to go err-disabled immediately, but this behavior only occurs with the shutdown mode. Another common confusion is between restrict and protect modes; protect silently drops unauthorized frames without incrementing violation counters or generating alerts, whereas restrict does both. Misunderstanding these differences can lead to incorrect answers about port behavior during security violations. Remember, restrict mode blocks unauthorized MAC addresses but keeps the port active and counts violations, which is a key distinction in Cisco port security.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Frames from the unauthorized MAC are dropped and the violation is counted while the port stays up.

With restrict mode, the switch drops frames from the violating MAC, increments the violation counter, and can generate notifications. Unlike shutdown mode, the interface stays up. Unlike protect mode, the switch records the violation.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The port immediately goes err-disabled.

    Why it's wrong here

    Setting the port-security violation mode to shutdown causes the interface to immediately transition to the err-disabled state when any unauthorized frame is received, effectively blocking all traffic on that port. This is a much more drastic action than the restrict mode described in the correct answer, and it typically requires manual re-enabling or an errdisable recovery policy. Because the stem specifies restrict behavior, the port does not go err-disabled.

    When this WOULD be correct

    If the question specified a command that sets the violation mode to 'shutdown' instead of 'restrict', then the correct answer would be that the port goes err-disabled upon detecting a second unauthorized MAC address. This would align with the behavior of the shutdown mode.

  • Frames from the unauthorized MAC are dropped and the violation is counted while the port stays up.

    Why this is correct

    In port-security restrict mode, frames from an unauthorized MAC address are silently discarded at the ingress port, and the port's security violation counter is incremented to record the event. Crucially, the access port remains operationally up and continues to forward traffic from all authorized MACs, so normal connectivity is not interrupted. This behavior distinguishes restrict from shutdown (which err-disables the port) and protect (which drops but does not increment the counter).

  • The switch forwards the traffic but logs a warning.

    Why it's wrong here

    Port-security is designed to enforce a strict MAC allowlist; when an unauthorized MAC attempts to send traffic, the switch does not forward that traffic under any violation mode. In restrict mode the frames are dropped, and although a syslog message may be generated, forwarding the offending traffic would defeat the security purpose. The only actions defined by port-security are restrict (drop and count), protect (drop silently), and shutdown (err-disable), none of which permit forwarding the violating frames.

    When this WOULD be correct

    If the question stated that the command used was 'switchport port-security violation protect', then this option would be correct, as it allows the switch to forward traffic from authorized MAC addresses while dropping frames from unauthorized ones without disabling the port.

  • The port transitions to listening and learning states.

    Why it's wrong here

    The listening and learning states are part of the Spanning Tree Protocol (STP) state machine, used during Layer 2 topology convergence to determine the active loop-free path. Port-security violation handling has no relationship to STP states; it is a separate feature that either drops frames, increments a counter, or shuts down the port. Therefore, a violation never causes the interface to transition into listening or learning states.

    When this WOULD be correct

    In a different scenario where the question asks about a switchport configured with 'switchport port-security violation shutdown', the port would indeed transition to err-disabled, but if it were a question about a port security feature that allows learning of new MACs, this option could be correct.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The 200-301 exam frequently reuses these exact scenarios with slightly different constraints.

Frames from the unauthorized MAC are dropped and the violation is counted while the port stays up.Correct answer

Why this is correct

In port-security restrict mode, frames from an unauthorized MAC address are silently discarded at the ingress port, and the port's security violation counter is incremented to record the event. Crucially, the access port remains operationally up and continues to forward traffic from all authorized MACs, so normal connectivity is not interrupted. This behavior distinguishes restrict from shutdown (which err-disables the port) and protect (which drops but does not increment the counter).

The port immediately goes err-disabled.Wrong answer — click to see why

Why this is wrong here

This option is incorrect because the command 'switchport port-security violation restrict' does not cause the port to go into an err-disabled state; instead, it drops frames from unauthorized MAC addresses while keeping the port operational.

★ When this WOULD be the correct answer

If the question specified a command that sets the violation mode to 'shutdown' instead of 'restrict', then the correct answer would be that the port goes err-disabled upon detecting a second unauthorized MAC address. This would align with the behavior of the shutdown mode.

Why candidates choose this

Candidates may choose this option due to confusion between different port-security violation modes, particularly if they recall that some modes do disable the port, leading to a misinterpretation of the command's effect.

The switch forwards the traffic but logs a warning.Wrong answer — click to see why

Why this is wrong here

This option is incorrect because the command 'switchport port-security violation restrict' does not allow the switch to forward traffic from unauthorized MAC addresses; it drops those frames instead.

★ When this WOULD be the correct answer

If the question stated that the command used was 'switchport port-security violation protect', then this option would be correct, as it allows the switch to forward traffic from authorized MAC addresses while dropping frames from unauthorized ones without disabling the port.

Why candidates choose this

Candidates may choose this option because they might confuse the behavior of port security with logging features, thinking that any unauthorized access would trigger a log warning while still allowing traffic to pass.

The port transitions to listening and learning states.Wrong answer — click to see why

Why this is wrong here

This option is wrong because the command 'switchport port-security violation restrict' does not cause the port to transition to listening and learning states; instead, it drops frames from unauthorized MAC addresses while keeping the port active.

★ When this WOULD be the correct answer

In a different scenario where the question asks about a switchport configured with 'switchport port-security violation shutdown', the port would indeed transition to err-disabled, but if it were a question about a port security feature that allows learning of new MACs, this option could be correct.

Why candidates choose this

Candidates may find this option tempting because they might confuse port security behavior with Spanning Tree Protocol (STP) states, leading them to think that unauthorized MAC addresses would trigger a state change.

Analysis generated from the official 200-301blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Visual reference

Switch VLAN 10 Sales (192.168.10.0/24) PC-A PC-B VLAN 20 HR (192.168.20.0/24) PC-C PC-D Router VLANs isolate traffic — inter-VLAN routing requires a Layer 3 device

Quick reference

Access Control Model Comparison

ModelAcronymWho Controls Access?Best For
Discretionary Access ControlDACResource ownerSmall teams, file shares
Mandatory Access ControlMACSystem / security labelsClassified govt / military
Role-Based Access ControlRBACAdministrator (via roles)Enterprise environments
Attribute-Based Access ControlABACPolicy engine (user + resource attributes)Fine-grained, dynamic policies
Rule-Based Access ControlRuBACSystem rules / ACLsFirewall rules, network ACLs

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: May 17, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This 200-301 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-301 exam.