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?
Answer choices
Why each option matters
Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.
Distractor review
The port immediately goes err-disabled.
That behavior matches shutdown mode, not restrict.
Best answer
Frames from the unauthorized MAC are dropped and the violation is counted while the port stays up.
That is the defining behavior of restrict.
Distractor review
The switch forwards the traffic but logs a warning.
Port security does not continue forwarding violating traffic.
Distractor review
The port transitions to listening and learning states.
Those are STP states, not port-security actions.
Common exam trap
Common exam trap: answer the scenario, not the keyword
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.
Technical deep dive
How to think about this question
Port security is a fundamental Cisco feature used to secure switch access ports by limiting the number of MAC addresses that can be learned or statically assigned on a port. This prevents unauthorized devices from connecting to the network through that port. When port security is enabled, the switch monitors incoming frames and compares their source MAC addresses against the allowed list. If a frame arrives from a MAC address that is not permitted, the switch triggers a violation event. The violation mode configured by the command 'switchport port-security violation restrict' determines the switch's response to unauthorized MAC addresses. In restrict mode, the switch drops frames from the violating MAC address, increments the violation counter, and can send notifications such as SNMP traps or syslog messages. Importantly, the port remains operational for authorized devices, ensuring network availability. This contrasts with shutdown mode, where the port is disabled (err-disabled) upon violation, requiring manual intervention to re-enable it. A common exam trap is confusing restrict mode with shutdown mode. While shutdown immediately disables the port on violation, restrict mode only blocks unauthorized traffic but keeps the port up. Another confusion is with protect mode, which drops unauthorized frames silently without counting violations or alerting administrators. Understanding these subtle differences is crucial for configuring port security policies that balance security needs with network uptime. Practically, restrict mode is often preferred in environments where continuous connectivity is critical but unauthorized access must be controlled.
KKey Concepts to Remember
- Port security on Cisco switches controls access by limiting the number of MAC addresses allowed on an access port to prevent unauthorized devices from connecting.
- The 'switchport port-security violation restrict' command configures the port to drop frames from unauthorized MAC addresses while keeping the interface operational and counting violations.
- In restrict mode, the switch increments a violation counter and can generate SNMP traps or syslog messages to alert administrators of security breaches.
- Unlike shutdown mode, restrict mode does not disable the port, allowing legitimate traffic from authorized MAC addresses to continue flowing.
- The protect violation mode silently drops unauthorized frames without incrementing violation counters or generating alerts, differing from restrict mode behavior.
- Port security violations occur when a device with a MAC address not learned or allowed on the port attempts to send traffic.
- Understanding port security violation modes is critical for maintaining network availability while enforcing security policies on access layer switches.
- The restrict mode balances security enforcement and network uptime by blocking unauthorized traffic but avoiding complete port shutdown.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Related practice questions
Related 200-301 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
CCNA subnetting practice questions
Practise IPv4 subnetting, CIDR, masks, host ranges and subnet selection.
CCNA OSPF practice questions
Practise OSPF neighbours, router IDs, metrics, areas and routing-table interpretation.
CCNA VLAN practice questions
Practise VLANs, access ports, trunks, allowed VLANs and switching scenarios.
CCNA STP practice questions
Practise spanning tree, root bridge election, port roles and STP troubleshooting.
CCNA EtherChannel practice questions
Practise LACP, PAgP, port-channel behaviour and bundle requirements.
CCNA ACL practice questions
Practise standard and extended ACLs, permit/deny logic and traffic filtering.
CCNA NAT practice questions
Practise static NAT, dynamic NAT, PAT and inside/outside address translation.
CCNA DHCP practice questions
Practise DHCP scopes, relay, leases and troubleshooting.
CCNA show ip route practice questions
Practise routing-table output, longest-prefix match, AD and route selection.
CCNA show interfaces trunk practice questions
Practise trunk verification and VLAN forwarding across switches.
CCNA wireless security practice questions
Practise WLAN security, authentication and wireless architecture concepts.
CCNA IPv6 practice questions
Practise IPv6 addressing, routes, neighbour discovery and common IPv6 exam traps.
More questions from this exam
Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.
Question 1
A router learns the same prefix from both OSPF and EIGRP. Which route is installed by default?
Question 2
A router shows this output: R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 10.1.1.2 1 FULL/DR 00:00:34 192.168.12.2 GigabitEthernet0/0 10.1.1.3 1 2WAY/DROTHER 00:00:39 192.168.12.3 GigabitEthernet0/0 Which statement is correct?
Question 3
What is the OSPF metric called?
Question 4
A non-root switch has two uplinks toward the root bridge. One path has a lower total STP cost than the other. What role will the lower-cost uplink have?
Question 5
A router interface applies this ACL inbound: 10 deny tcp any any eq 80 20 permit ip any any A user reports that web browsing to a server by IP address fails, but ping works. Which statement best explains the behavior?
Question 6
A router learns route 198.51.100.0/24 from OSPF with AD 110 and also has a static route to the same prefix configured with AD 150. Which route is installed?
FAQ
Questions learners often ask
What does this 200-301 question test?
Port security on Cisco switches controls access by limiting the number of MAC addresses allowed on an access port to prevent unauthorized devices from connecting.
What is the correct answer to this question?
The correct answer is: 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.
What should I do if I get this 200-301 question wrong?
Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.
Discussion
Sign in to join the discussion.