CCNP Architecture Practice Question
A network administrator is configuring a new Cisco Catalyst switch and needs to ensure that the management VLAN interface is reachable from a remote subnet. The switch currently has no default gateway configured. Which command should be used to allow the switch to communicate with devices on other subnets?
⚠ Common exam trap
Many candidates confuse the switch's management default gateway command with a router's default route command.
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
✓
ip default-gateway 192.168.1.1
On a Layer 2 switch, the management interface (such as VLAN 1 or a management VLAN SVI) requires a default gateway to communicate with remote subnets. The 'ip default-gateway' command provides this functionality. Unlike a router, a Layer 2 switch does not run a routing protocol or maintain a routing table for management traffic, so a default route is not applicable. The correct command is 'ip default-gateway'.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
ip route 0.0.0.0 0.0.0.0 192.168.1.1
Why it's wrong here
The 'ip route 0.0.0.0 0.0.0.0' command is used on routers or Layer 3 switches to configure a default route. On a pure Layer 2 switch, IP routing is disabled, and this command is not available or has no effect. Since the switch is not routing, it requires the 'ip default-gateway' command instead. Using 'ip route' would be incorrect in this context.
- ✓
ip default-gateway 192.168.1.1
Why this is correct
The 'ip default-gateway' command is used on Layer 2 switches to specify a default gateway for management traffic. When the switch is not performing routing, it needs a default gateway to reach remote subnets. This command sets the gateway of last resort for the management interface. Without it, the switch can only communicate with devices on the same subnet, so this is the correct solution for the scenario.
- ✗
ip gateway 192.168.1.1
Why it's wrong here
There is no Cisco IOS command called 'ip gateway'. The correct command to set a default gateway on a Layer 2 switch is 'ip default-gateway'. This option is a fabricated command and would not be accepted by the CLI. It is a common misconception that such a command exists, but it does not, so it cannot fulfill the requirement.
- ✗
default-router 192.168.1.1
Why it's wrong here
The 'default-router' command is used within a DHCP pool configuration to assign a default gateway to DHCP clients. It does not configure the switch's own default gateway. To set the switch's management default gateway, the correct command is 'ip default-gateway'. Therefore, this command does not solve the problem of the switch needing a gateway for its own management traffic.
Visual reference
Quick reference
Routing Protocol Comparison
| Protocol | Metric | Max Hops | Algorithm | Type |
|---|---|---|---|---|
| RIP v2 | Hop count | 15 | Bellman-Ford | Distance vector |
| OSPF | Cost (bandwidth) | Unlimited | Dijkstra (SPF) | Link state |
| EIGRP | Composite metric | Unlimited | DUAL | Hybrid |
| IS-IS | Cost | Unlimited | Dijkstra | Link state |
| BGP | Policy / attributes | Unlimited | Path vector | Path vector |
RIP's 15-hop limit makes it unsuitable for large networks. OSPF and EIGRP dominate modern enterprise deployments.
About these practice questions
One of 1,923 original 350-401 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
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.