Procedure
PurposeCommand or Action
Enables privileged EXEC mode. Enter your
password if prompted.
enable
Example:
Device> enable
Step 1
Enters the global configuration mode.configure terminal
Example:
Device# configure terminal
Step 2
Establish a static route.
ip route prefix mask {address | interface}
[distance]
Step 3
Example:
Device(config)# ip route prefix mask
gigabitethernet 1/0/4
Returns to privileged EXEC mode.end
Example:
Device(config)# end
Step 4
Displays the current state of the routing table
to verify the configuration.
show ip route
Example:
Device# show ip route
Step 5
(Optional) Saves your entries in the
configuration file.
copy running-config startup-config
Example:
Device# copy running-config
Step 6
startup-config
What to Do Next
Use the no ip route prefix mask {address| interface} global configuration command to remove a static route.
The device retains static routes until you remove them.
Routing Configuration Guide, Cisco IOS XE Everest 16.6.x (Catalyst 9500 Switches)
185
Configuring IP Unicast Routing
Static Unicast Routes