ip routing
Globally initializes the Layer 3 routing engine. While standard Cisco routers have this feature permanently running out of the box, Multilayer Switches operate strictly at Layer 2 until this execution string allocates ASIC processing memory to build and maintain the IPv4 routing table.
Quick Reference
Switch(config)#(e.g., 3560, 3750, 9300)Syntax Breakdown
This command contains no arguments. When you execute it on a multilayer switch, it instructs the internal architectures to change from basic MAC-table lookups to full Layer 3 longest-match prefix lookup algorithms.
Without this command active, a switchport configured with an IP address or an active Switch Virtual Interface (SVI) can only be used for direct local management traffic (like an SSH session pointing directly to the switch). It will completely fail to hop frames across different VLAN boundaries.
CLI Deployment Scenarios
Scenario 1: Turning on Inter-VLAN Routing
You have configured two separate SVIs for VLAN 10 and VLAN 20 on a core multilayer switch, but pings between the networks are dropping. You must unlock global IP processing.
CCNA Exam Gotchas
The Invisible Routing Table Trap
If you are troubleshooting a multilayer switch topology on the exam and execute show ip route, the switch might return an empty output or state that the table does not exist. This is the ultimate giveaway that the designer forgot to run ip routing in global configuration mode.
Impact on Default-Gateways
When a switch is operating strictly as a Layer 2 device, it relies on the ip default-gateway [ip] command to send its management traffic out of the subnet. The moment you execute ip routing, the switch completely ignores the default-gateway setting and requires standard static routes (ip route 0.0.0.0 0.0.0.0 ...) to find outside destinations.