set ip next-hop

Configures the next-hop IP address for the traffic that matches a match statement in the route map.
Syntax
set ip next-hop{peer-address|ip-address[vrfvrf-name]}
no set ip next-hop{peer-address|ip-address[vrfvrf-name]}
Command Default

The next-hop IP address is not configured by default.

Parameters
peer-address
Specifies the BGP peer IP address.
ip-address
Specifies the IP address of the next hop.
vrfvrf-name
Specifies the VRF of the interface.
Modes

Route map configuration mode

Usage Guidelines

By default, the TTL value in the packet header is decremented (decreased) for routed traffic and the packet will be discarded when the TTL is exhausted. TTL functions as a hop count limit and every routing hop decrements the TTL value by one. When the TTL value becomes zero, the packet is discarded to prevent routing loops.

Policy-based routing (PBR) does not support the peer-address option while configuring the next-hop IP address using the set ip next-hop command.

For PBR on an interface in a VRF, if the VRF is not specified in the next hop (that is, only the IP address is specified as the next hop), the default VRF of the interface is considered. The next hop in a route map will take effect only if the interface on which the route map is applied and the next hop in the route map are in the same VRF

The no form of the command removes the next-hop IP address configured for the traffic.

Examples

The following example configures a route map with the default VRF of the interface as the next hop.

device# configure terminal
device(config)# route-map test-route permit 99
device(config-routemap test-route)# match ip address 100
device(config-routemap test-route)# set ip next-hop 192.168.3.1
device(config-routemap test-route)# exit

The following example configures a route map which specifies the next hop is a VRF named as vrf_c.

device# configure terminal
device(config)# route-map test-route permit 99
device(config-routemap test-route)# match ip address 100
device(config-routemap test-route)# set ip next-hop 192.168.3.1 vrf vrf_c
device(config-routemap test-route)# exit
History
Release version Command history
08.0.10d The no-ttl-decrement option was introduced.
08.0.30 The support for the no-ttl-decrement option was added in FastIron 08.0.30 and later releases.
08.0.50 The vrf option was introduced.