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 | peer-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.
peer-address
Specifies, when configured, that the next hop is set to the neighbor peering address.

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.

When the peer-address keyword is used when defining an inbound route map of a BGP peer, then the next hop of the matching route will be set to the neighbor peer address. Similarly, when the peer-address keyword is used when defining an outbound route map of a BGP peer, then the next hop of the outbound route map will be configured with the peer address of the local router.

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.

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

The following example shows the configuration of the peer-address parameter when defining the next hop.

SLX (config)# route-map test-route permit 99
SLX (config-route-map-test-route/permit/99)# set ip next-hop peer-address