set ip next-hop

Sets the IPv4 address of the redirect next hop in a route-map instance.

Syntax

set ip next-hop ip-address
set ip [ global | vrf vrf-name ] next-hop ip-address
no set ip next-hop ip-address

Parameters

global
Specifies that the specified next-hop address is to be resolved from the global routing table.
vrf vrf-name
Specifies using a VRF routing table to resolve the specified next-hop address.
ip-address
Specifies, in IPv4 address format, the next hop to which to route the packet. The next hop need not be directly connected or reachable.

Modes

Route-map configuration mode

Usage Guidelines

The global and vrf options are not supported for BGP flowspec route maps.

When a route map applies to BGP flowspec, you can redirect traffic to multiple destinations by configuring multiple set ip next-hop statements in a single route-map instance. However, when the redirect next-hop holder is NLRI, only the first-configured next-hop IP address is advertised.

The no form of this command removes the configuration.

Examples

The following example configures an IPv4 address as the next hop to which traffic that matches a match statement in the route map must be redirected.

device(config)# route-map test-route permit 99
device(config-route-map-test-route/permit/99)# set ip next-hop 192.168.3.1