34-5
Catalyst 2960 and 2960-S Switch Software Configuration Guide
OL-8603-09
Chapter 34 Configuring Static IP Unicast Routing
Configuring Static Unicast Routes
Configuring Static Unicast Routes
Static unicast routes are user-defined routes that cause packets moving between a source and a
destination to take a specified path. Static routes can be important if the router cannot build a route to a
particular destination and are useful for specifying a gateway of last resort to which all unroutable
packets are sent.
Beginning in privileged EXEC mode, follow these steps to configure a static route:
Use the no ip route prefix mask {address | interface} global configuration command to remove a static
route. The switch retains static routes until you remove them.
When an interface goes down, all static routes through that interface are removed from the IP routing
table. When the software can no longer find a valid next hop for the address speci fied as the forwarding
router's address in a static route, the static route is also removed from the IP routing table.
Monitoring and Maintaining the IP Network
You can specific statistics for the routing table or database. Use the privileged EXEC commands in
Table 34-1 to display status:
Command Purpose
Step 1 configure terminal Enter global configuration mode.
Step 2 ip route prefix mask {address | interface} [distance] Establish a static route.
Step 3 end Return to privileged EXEC mode.
Step 4 show ip route Display the current state of the routing table to verify
the configuration.
Step 5 copy running-config startup-config (Optional) Save your entries in the configuration file.
Table 34-1 Commands to Clear IP Routes or Display Route Status
Command Purpose
show ip route [address [mask] [longer-prefixes]] | Display the state of the routing table.
show ip route summary Display the state of the routing table in summary form.
show platform ip unicast Display platform-dependent IP unicast information.