Back to course

Configuring Basic Static and Default Routes

CCNA: 0 to Hero - Comprehensive Network Engineering Bootcamp

Lesson 35: Configuring Static and Default Routes

Static routes are the simplest form of routing and are essential for connecting to specific networks or defining a default path out of the network.

Static Route Syntax

ios ip route [destination-network] [subnet-mask] [next-hop-ip | exit-interface] [optional AD]

Example 1: Using Next-Hop IP

Router R1 needs to reach the 10.1.1.0/24 network via R2 (IP 192.168.12.2).

ios R1(config)# ip route 10.1.1.0 255.255.255.0 192.168.12.2

Example 2: Using Exit Interface (Point-to-Point)

If the connection is a point-to-point link, you can use the exit interface. This saves the router from needing to perform a recursive lookup.

ios R1(config)# ip route 10.1.1.0 255.255.255.0 Serial 0/0/0

Default Static Route (The Gateway of Last Resort)

Used when the router doesn't have a more specific path. Often routes all unknown traffic out to the ISP.

ios ! 0.0.0.0 0.0.0.0 means 'all networks' R1(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1