< Home

redirect ip-nexthop

Function

The redirect ip-nexthop command configures an action of redirecting packets to a next hop IP address in a traffic behavior.

The undo redirect command deletes the redirection configuration.

By default, an action of redirecting packets to a next hop IP address is not configured in a traffic behavior.

Format

redirect [ vpn-instance vpn-instance-name ] ip-nexthop { ip-address [ track-nqa admin-name test-name ] } &<1-4> [ forced | low-precedence ] *

undo redirect

Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support vpn-instance vpn-instance-name and low-precedence parameter.

Parameters

Parameter

Description

Value

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value must be an existing VPN instance name.

ip-address

Specifies a next hop IP address.

The value is in dotted decimal notation and in X.X.X.X format.

track-nqa

Specifies an NQA test instance.

-

admin-name

Specifies the administrator of an NQA test instance.

The value is a string of 1 to 32 case-sensitive characters, excluding question marks (?), hyphens (-), a single or consecutive quotation marks (").

test-name

Specifies the name of an NQA test instance.

The value is a string of 1 to 32 case-sensitive characters, excluding question marks (?), hyphens (-), a single or consecutive quotation marks (").

forced

Specifies that packets are discarded if the next hop is unavailable.

-

low-precedence

Specifies a low-priority next hop.

NOTE:

If this parameter is specified, redirection-based PBR has a lower priority than routes generated through dynamic routing protocols or statically configured routes. If this parameter is not specified, the former has a higher priority than the latter.

In enhanced-ipv4 or ipv4-ipv6 6:1 resource mode, the S6720-EI does not support redirection to low-priority next hops. Run:display resource-mode configuration The resource allocation mode configuration on the device is displayed. Run:assign resource-mode { enhanced-mac | enhanced-arp | enhanced-ipv4 | ipv4-ipv6 6:1 } [ slot slot-id | all ] The resource allocation mode of the device is configured.

-

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If multiple next hop IP addresses are configured, the device redirects packets in active/standby mode. A maximum of four next hop IP addresses can be configured in a traffic behavior. The device determines the primary path and backup paths according to the sequence in which next hop IP addresses were configured. The next hop IP address that was configured first has the highest priority and this next hop is used as the primary path. Other next hops are used as backup paths. When the primary link becomes Down, a next hop with higher priority is used as the primary link.

Follow-up Procedure

Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing redirection to a next hop IP address.

Precautions

  • In a traffic behavior, the redirect ip-nexthop command cannot be used together with any of the following commands: remark 8021p, add-tag vlan-id, remark cvlan-id and remark vlan-id.

  • A traffic policy containing the redirection action can be only used globally, on an interface, or in a VLAN in the inbound direction.

  • If no ARP entry matches the next hop address on the device, the device triggers ARP learning. If the ARP entry cannot be learned, redirection does not take effect and packets are forwarded along the original forwarding path.

Example

# Redirect packets to next hop 10.0.0.1 in the traffic behavior b1.

<HUAWEI> system-view
[HUAWEI] traffic behavior b1
[HUAWEI-behavior-b1] redirect ip-nexthop 10.0.0.1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >