O'Reilly logo

Cisco IOS in a Nutshell, 2nd Edition by James Boney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ip route — global

Synopsis

ip route network mask {next-hop-address|interface} [distance] [permanent]
[track number] [tag tag]
no ip route network mask {next-hop-address|interface} [distance] [permanent]
[track number] [tag tag]

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required