The apply ip-address next-hop command sets the next hop address for a route.
The undo apply ip-address next-hop command cancels the configuration.
By default, no next hop address is set.
Parameter | Description | Value |
---|---|---|
address |
Specifies the next hop address. |
The value is an IPv4 address, in dotted decimal notation. |
peer-address |
If the apply ip-address next-hop peer-address command is run in a route-policy that is used as an export route-policy on a device, the device sets the next hop address of a route to be advertised to a peer to its own IP address. If the command is run in a route-policy that is used as an import route-policy, the device sets the next hop address of a filtered route that has been received from the peer to the peer's IP address. |
- |
blackhole |
Adds a black-hole flag to a route. |
- |
Usage Scenario
To set a next hop address of a route, run the apply ip-address next-hop command.
Prerequisites
A route-policy has been configured using the route-policy command.
Configuration Impact
If a BGP route matches a route-policy, the next hop address of the BGP route is changed.
Precautions
When a route-policy has been specified in the import-route or network command, the apply clause configured for the route-policy using the apply ip-address next-hop command does not take effect.
The command sets a next hop IP address for the routes that match the relevant route-policy, which may change the service forwarding path. Therefore, exercise caution when running this command. If an import route-policy is used to change the next hops of the matched routes received from a direct EBGP peer to indirectly connected interface addresses, the peer ebgp-max-hop command must be run to ensure that the routes can recurse to reachable next hops. This is because direct EBGP routes do not recurse by default. If the next hop of a direct EBGP route encounters the preceding change, the new next hop of the route is unreachable, adversely affecting services. If the apply ip-address next-hop command is run more than once, the last configuration overrides the previous one.