Configuring a static route for use with a route map

You can configure a static route with a tag that can be referenced in a route map.
Perform these steps to configure a static route with a tag that can be referenced in a route map.
  1. Enter global configuration mode.
    device# configure terminal
    
  2. Enter the ip route command followed by the destination network IP address and prefix-length and the next-hop IP address. On the same line, enter the keyword tag followed by a decimal tag number.
    device(config)# ip route 10.0.0.0/24 10.1.1.1 tag 3
    
    Note: An address mask may be used instead of the prefix-length (such as 255.255.255.0 instead of /24).

The following example creates an IP static route to destination IP addresses beginning with 10.0.0.0 through the next-hop address 10.1.1.1. The static route includes the tag "3" for later use in a route map.

device# configure terminal
device(config)# ip route 10.0.0.0/24 10.1.1.1 tag 3