- A
The port will dynamically learn MAC addresses, allow up to 2 addresses, and if a third MAC is seen, it will drop the traffic but keep the port up.
Correct. 'violation restrict' drops frames from unknown MACs without disabling the port.
- B
The port will learn up to 2 MAC addresses and then shut down if a third is seen.
Why wrong: Incorrect. Shutdown behavior requires 'violation shutdown'.
- C
The port will allow only 2 MAC addresses and will generate a syslog message but continue forwarding traffic from the third MAC.
Why wrong: Incorrect. 'restrict' drops the traffic, it does not forward it.
- D
The port will learn MAC addresses dynamically and convert them to secure MAC addresses, but the maximum is 1 by default.
Why wrong: Incorrect. The maximum is explicitly set to 2.
Quick Answer
The correct answer is that this configuration dynamically learns MAC addresses, allows up to two addresses, and if a third MAC is seen, it drops the traffic but keeps the port up. This is because the `switchport port-security mac-address sticky` command enables sticky learning, which dynamically converts learned MAC addresses into secure sticky entries, while `switchport port-security maximum 2` sets the limit, and `switchport port-security violation restrict` instructs the switch to drop offending frames without error-disabling the interface. On the ENCOR 350-401 exam, this tests your understanding of the three violation modes—protect, restrict, and shutdown—where restrict is the only mode that both drops traffic and generates a syslog message while leaving the port administratively up. A common trap is confusing restrict with shutdown, which would disable the port entirely. Remember the mnemonic: "Restrict reports, Shutdown shuts, Protect is silent."
350-401 Infrastructure Security Practice Question
This 350-401 practice question tests your understanding of infrastructure security. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Examine the following interface configuration on a Cisco IOS-XE switch: ```
interface GigabitEthernet0/1 switchport mode access switchport port-security switchport port-security maximum 2 switchport port-security violation restrict switchport port-security mac-address sticky
``` What is the effect of this configuration?
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
The port will dynamically learn MAC addresses, allow up to 2 addresses, and if a third MAC is seen, it will drop the traffic but keep the port up.
This configuration enables port security with sticky MAC learning, allowing up to 2 MAC addresses, and sets the violation mode to restrict (drops offending traffic but does not shut down the port).
Key principle: A trunk being up does not mean the VLAN is allowed across it. Always verify the allowed VLAN list and whether the VLAN exists on both switches.
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 will dynamically learn MAC addresses, allow up to 2 addresses, and if a third MAC is seen, it will drop the traffic but keep the port up.
Why this is correct
Correct. 'violation restrict' drops frames from unknown MACs without disabling the port.
Related concept
Access ports place end devices into a single VLAN.
- ✗
The port will learn up to 2 MAC addresses and then shut down if a third is seen.
Why it's wrong here
Incorrect. Shutdown behavior requires 'violation shutdown'.
- ✗
The port will allow only 2 MAC addresses and will generate a syslog message but continue forwarding traffic from the third MAC.
Why it's wrong here
Incorrect. 'restrict' drops the traffic, it does not forward it.
- ✗
The port will learn MAC addresses dynamically and convert them to secure MAC addresses, but the maximum is 1 by default.
Why it's wrong here
Incorrect. The maximum is explicitly set to 2.
Common exam traps
Common exam trap: an active trunk can still block the VLAN you need
A trunk being up does not prove every VLAN is crossing it. Check allowed VLAN lists, native VLAN mismatch, VLAN existence and access-port assignment.
Detailed technical explanation
How to think about this question
VLAN questions usually combine access-port and trunking clues. The key is to identify whether the issue is local to one switchport, caused by the trunk, or caused by the VLAN not existing where it needs to exist.
KKey Concepts to Remember
- Access ports place end devices into a single VLAN.
- Trunk ports carry multiple VLANs between switches.
- Allowed VLAN lists decide which VLANs can cross a trunk.
- Native VLAN mismatch can create confusing symptoms.
TExam Day Tips
- Use show vlan brief to verify access VLANs.
- Use show interfaces trunk to verify trunk state and allowed VLANs.
- Do not treat every same-VLAN issue as a routing problem.
Key takeaway
A trunk being up does not mean the VLAN is allowed across it. Always verify the allowed VLAN list and whether the VLAN exists on both switches.
Real-world example
How this comes up in practice
A help-desk technician troubleshoots why a newly connected PC cannot reach shared printers on the same floor. The cable is good, the switch port is active, but the PC is in VLAN 20 and the printers are in VLAN 10. The uplink trunk only allows VLAN 10. A trunk being up does not mean every VLAN crosses it.
What to study next
Got this wrong? Here's your next step.
Review VLAN allowed lists, native VLAN mismatch detection, and how to verify VLAN membership with show vlan brief and show interfaces trunk. Then practise related 350-401 questions on switching, trunking, and access-port configuration.
- →
Infrastructure Security — study guide chapter
Learn the concepts, then practise the questions
- →
Infrastructure Security practice questions
Targeted practice on this topic area only
- →
All 350-401 questions
2,015 questions across all exam domains
- →
ENCOR 350-401 study guide
Full concept coverage aligned to exam objectives
- →
350-401 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related 350-401 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Architecture practice questions
Practise 350-401 questions linked to Architecture.
Enterprise Network Design practice questions
Practise 350-401 questions linked to Enterprise Network Design.
SD-Access Architecture practice questions
Practise 350-401 questions linked to SD-Access Architecture.
SD-WAN Architecture practice questions
Practise 350-401 questions linked to SD-WAN Architecture.
QoS Architecture practice questions
Practise 350-401 questions linked to QoS Architecture.
Virtualization practice questions
Practise 350-401 questions linked to Virtualization.
Network Function Virtualization practice questions
Practise 350-401 questions linked to Network Function Virtualization.
Virtual Machines and Hypervisors practice questions
Practise 350-401 questions linked to Virtual Machines and Hypervisors.
VRF and Path Isolation practice questions
Practise 350-401 questions linked to VRF and Path Isolation.
Infrastructure practice questions
Practise 350-401 questions linked to Infrastructure.
OSPF practice questions
Practise 350-401 questions linked to OSPF.
BGP practice questions
Practise 350-401 questions linked to BGP.
Practice this exam
Start a free 350-401 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this 350-401 question test?
Infrastructure Security — This question tests Infrastructure Security — Access ports place end devices into a single VLAN..
What is the correct answer to this question?
The correct answer is: The port will dynamically learn MAC addresses, allow up to 2 addresses, and if a third MAC is seen, it will drop the traffic but keep the port up. — This configuration enables port security with sticky MAC learning, allowing up to 2 MAC addresses, and sets the violation mode to restrict (drops offending traffic but does not shut down the port).
What should I do if I get this 350-401 question wrong?
Review VLAN allowed lists, native VLAN mismatch detection, and how to verify VLAN membership with show vlan brief and show interfaces trunk. Then practise related 350-401 questions on switching, trunking, and access-port configuration.
What is the key concept behind this question?
Access ports place end devices into a single VLAN.
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 →
Keep practising
More 350-401 practice questions
- Drag and drop the steps to configure an extended access control list (ACL) on a Cisco router in the correct order.
- Drag and drop the steps to configure a site-to-site IPsec VPN on a Cisco router in the correct order.
- Drag and drop the steps to configure VLAN Trunking Protocol (VTP) on a Cisco switch in the correct order.
- Drag and drop the steps to configure a static route on a Cisco IOS router into the correct order.
- Drag and drop the steps to configure port security on a Cisco switch in the correct order.
- Drag and drop the steps for the Spanning Tree Protocol (STP) convergence process in the correct order.
Last reviewed: Jun 18, 2026
This 350-401 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 350-401 exam.
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.
Sign in to join the discussion.