Name
ip route — global
Synopsis
ip routenetwork mask
{next-hop-address|interface}
[distance
] [permanent] [tracknumber
] [tagtag
] no ip routenetwork mask {next-hop-address|interface}
[distance
] [permanent] [tracknumber
] [tagtag
]
Configures
A static route for a network
Default
None
Description
This command defines a static route to the destination network specified by its network
address and mask
. next-hop-address
is the IP address of the router to which traffic for this destination network should be sent. Instead of the next-hop-address
, you can specify the interface
that can be used to reach the network. distance
is an optional administrative distance that allows you change the way the static route behaves. If the distance is high enough, it can be overwritten by dynamic protocols. See Chapter 8 for more information about administrative distances. The permanent
keyword tells the router to keep the route in the route table even if the interface goes down. The router normally removes static routes that are invalid because the interface is down.
The track
keyword is optional. It associates a track object with this route. Valid values for the track number are 1 to 500.
The tag
keyword applies a value that can be used to match the route in route maps, which is useful for controlling redistribution.
Example
The following commands create two static routes. The first route sends traffic for the 192.168.1.0/24 network to 10.1.1.1; the second route sends traffic for the 192.168.2.0/24 network to ...
Get Cisco IOS in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.