The apply ip-address next-hop command sets the action for changing the next hop address of BGP routes in a routing policy.
The undo apply ip-address next-hop command restores the default setting.
By default, the action for changing the next hop address of BGP routes is not set in a routing policy.
Product |
Support |
---|---|
S5720-EI, S5720-HI, S5720I-SI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730-HI, S5730S-EI, S5730-SI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S |
Supported. |
S2720-EI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S6720-LI, and S6720S-LI |
Not supported. |
apply ip-address next-hop { ipv4-address | peer-address }
undo apply ip-address next-hop { ipv4-address | peer-address }
Parameter | Description | Value |
---|---|---|
ipv4-address | Specifies the next hop address. | It is in dotted decimal notation. |
peer-address | Sets the next hop address to the local address when the apply clause is used by an export policy. Sets the next hop address to the peer address when the apply clause is used by an import policy. |
- |
Usage Scenario
To change the next hop address of BGP routes for selecting the optimal route, you can apply a routing policy containing the apply ip-address next-hop command.
The next hop address of a BGP route is set using the policy in the following situations:
IBGP: Configure the import or export policy for the IBGP peer. If the next hop address configured in the routing policy is unreachable, the IBGP peer adds the corresponding route to the BGP routing table. However, this route is invalid.
EBGP: Configure the import policy for the EBGP peer. If an export policy is configured, the route destined for the EBGP peer is discarded because the next hop address is unreachable.
Prerequisites
The apply ip-address next-hop command can be used only after the route-policy command is used.
Precautions
When a routing policy takes effect, it affects BGP route selection.
When a routing policy is specified in the import-route and network commands, the apply ip-address next-hop clause in the routing policy 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.