Back to Command Reference
Global ConfigDomain 6.0

ip route

Manually injects a static entry into the router's IPv4 routing table (RIB). This tells the router exactly where to send packets destined for a specific remote network, bypassing the need for dynamic routing protocols like OSPF or EIGRP.

Quick Reference

Execution ModeRouter(config)#
Routing Table CodeS (Static)
Default Admin Distance1
Negation Commandno ip route [dest] [mask] [next-hop]

Syntax & Parameters

ip route [network] [mask] [next-hop / exit-int] [AD]
ParameterDescription
[network]The destination network ID (e.g., 192.168.5.0). You cannot point a route to a host IP unless you are creating a /32 host route.
[mask]The explicit dotted-decimal subnet mask of the destination network (e.g., 255.255.255.0).
[next-hop / exit]How to get there. Can be the Next-Hop IP Address of the neighboring router, or the local Exit Interface (e.g., g0/1) to push the packet out of.
[AD] (Optional)Overrides the default Administrative Distance of 1. Used to create backup "floating" static routes.

CLI Deployment Scenarios

Scenario 1: The Gateway of Last Resort (Default Route)

If a router doesn't know where to send a packet, it drops it. The quad-zero route catches all unknown traffic and blasts it toward your ISP.

Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1
! Any traffic not matching a specific table entry is sent to the ISP router at 203.0.113.1.

Scenario 2: The Floating Static Route

You are running OSPF (Administrative Distance 110) over a fast fiber link. You want to configure a slow cellular backup link that only kicks in if OSPF fails.

Router(config)# ip route 10.50.0.0 255.255.0.0 10.99.1.2 115
! Because 115 is worse than OSPF's 110, this route stays hidden in the background until the primary OSPF route disappears.

CCNA Exam Gotchas

[!]

Recursive Routing Failures

If you configure a static route using a Next-Hop IP Address (e.g., 10.1.1.2), the router must do a second lookup to figure out which physical interface is connected to the 10.1.1.0 network. If the interface pointing to 10.1.1.2 goes down, the static route is immediately removed from the routing table because the next-hop is unreachable.

[!]

Exit Interface vs. Next-Hop

The CCNA will ask which method is better.
Point-to-Point Links (Serial): Use the Exit Interface (e.g., ip route 10.0.0.0 255.0.0.0 s0/0/0). It is faster because it skips the recursive lookup.
Broadcast Links (Ethernet): Use the Next-Hop IP. If you use an Exit Interface on Ethernet, the router will send an ARP request for every single destination IP, completely overwhelming the link and destroying the router's memory.