No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S12700 V200R013C00 Command Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
PBR Configuration Commands

PBR Configuration Commands

Command Support

For details about command support, see the description of each command. If no command support information is provided, all switch models support the command by default.

redirect ip-multihop

Function

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

The undo redirect command deletes the redirection configuration.

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

Format

redirect [ vpn-instance vpn-instance-name ] ip-multihop { nexthop ip-address } &<2-4>

redirect [ vpn-instance vpn-instance-name ] ip-multihop acl-ip-pool-name

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.

nexthop ip-address

Specifies the IP address of the next hop.

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

acl-ip-pool-name

Specifies the name of an ACL IP address pool.

The ACL IP address pool name must exist.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If multiple next hop IP addresses are specified, the device redirects packets through equal-cost routes in load balancing mode.

If the outbound interface corresponding to a next hop IP address becomes Down or a route changes, the device switches traffic to the outbound interface corresponding to an available next hop. If the specified next hops are unavailable, the device forwards the packets to the original destination.

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 multiple next hop IP addresses.

Precautions

  • In a traffic behavior, the redirect ip-multihop command cannot be used together with any of the following commands: remark destination-mac, 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 LPU, on an interface, or in a VLAN in the inbound direction.

  • If the device has no ARP entry matching the specified next hop IP address, the redirect ip-multihop command can be used but redirection does not take effect. The device still forwards packets to the original destination until the device has the corresponding ARP entry.

Example

# Configure three next hop IP addresses in the traffic behavior b1: 10.1.42.1, 10.2.12.3, and 10.1.1.2.

<HUAWEI> system-view
[HUAWEI] traffic behavior b1
[HUAWEI-behavior-b1] redirect ip-multihop nexthop 10.1.42.1 nexthop 10.2.12.3 nexthop 10.1.1.2

# In the traffic behavior b2, configure the action of redirecting packets to five next hop IP addresses in the ACL IP address pool abc.

<HUAWEI> system-view
[HUAWEI] acl ip-pool abc
[HUAWEI-acl-ip-pool-abc] ip address 192.168.10.1 32
[HUAWEI-acl-ip-pool-abc] ip address 192.168.20.1 32
[HUAWEI-acl-ip-pool-abc] ip address 192.168.30.1 32
[HUAWEI-acl-ip-pool-abc] ip address 192.168.40.1 32
[HUAWEI-acl-ip-pool-abc] ip address 192.168.50.1 32
[HUAWEI-acl-ip-pool-abc] quit
[HUAWEI] traffic behavior b2
[HUAWEI-behavior-b2] redirect ip-multihop abc
Related Topics

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

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 (?), en dashes (-), 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 (?), en dashes (-), 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 resource mode, ET1D2X48SEC0 cards do not support redirection to low-priority next hops. Run:display resource-assign configuration [ slot slot-id ] The configuration of the resource mode of the extended entry space is displayed. Run:assign resource-mode slot slot-id mode mode The resource mode of the extended entry space of an LPU 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 destination-mac, 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 LPU, 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
Related Topics

redirect ipv6-multihop

Function

The redirect ipv6-multihop command configures an action of redirecting packets to multiple next hop IPv6 addresses in a traffic behavior.

The undo redirect command deletes the redirection configuration.

By default, an action of redirecting packets to multiple next hop IPv6 addresses is not configured in a traffic behavior.

Format

redirect [ vpn-instance vpn-instance-name ] ipv6-multihop { ipv6-address | link-local link-local-address interface interface-type interface-number } & <2-4>

redirect [ vpn-instance vpn-instance-name ] ipv6-multihop acl6-ip-pool-name

undo redirect

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.

ipv6-address

Specifies a next hop IPv6 address.

The address is a 32-digit hexadecimal number, in X:X:X:X:X:X:X:X format.

link-local link-local-address Specifies a link-local address. The prefix of the specified IPv6 address must match FE80::/60. The address is a 32-digit hexadecimal number, in X:X:X:X:X:X:X:X format.
interface interface-type interface-number Specifies the interface corresponding to the link-local address.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.
-
acl6-ip-pool-name

Specifies the name of the ACL IPv6 address pool to be created.

The value is a string of 1 to 32 case-sensitive characters without spaces and starting with a letter.

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If multiple next hop IPv6 addresses are specified, the device redirects packets through equal-cost routes in load balancing mode.

If the outbound interface corresponding to a next hop IPv6 address becomes Down or a route changes, the device switches traffic to the outbound interface corresponding to an available next hop. If the specified next hops are unavailable, the device forwards the packets to the original destination.

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 multihop IPv6 addresses.

Precautions

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

  • When the next hop IPv6 address is a local-link address, you must configure a VLANIF interface. The address is only valid in the VLAN corresponding to the VLANIF interface.

  • The traffic policy that contains the redirection action can only be applied to the system, an LPU, an interface, or a VLAN.

  • When running the redirect ipv6-multithop command to configure multiple next hop IPv6 addresses, you can specify 2 to 4 next hop IPv6 addresses. When configuring multiple next hop IPv6 addresses through an ACL IPv6-POOL, you can specify a maximum of 64 next hop IPv6 addresses. To create and configure an ACL IPv6-POOL, run the acl ipv6 ip-pool and ipv6 address (ACL IPv6-POOL view) commands.

  • If the device does not match the neighbor entry corresponding to the next hop IPv6 address, the device sends NS packets to check whether the neighbor is reachable. If the neighbor is unreachable, packets are forwarded based on the original path and redirection does not take effect.

  • If you run the redirect ipv6-multithop command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure two next hop IPv6 addresses in the traffic behavior b1: FC00:0:0:2000::1 and FC00:0:0:3000::1.

<HUAWEI> system-view
[HUAWEI] traffic behavior b1
[HUAWEI-behavior-b1] redirect ipv6-multihop fc00:0:0:2000::1 fc00:0:0:3000::1

# In the traffic behavior b2, configure an action of redirecting packets to five next hop IPv6 addresses in the ACL IPv6-POOL abc.

<HUAWEI> system-view
[HUAWEI] acl ipv6 ip-pool abc
[HUAWEI-acl6-ip-pool-abc] ipv6 address 2001:db8::1 128
[HUAWEI-acl6-ip-pool-abc] ipv6 address 2001:db8::2 128
[HUAWEI-acl6-ip-pool-abc] ipv6 address 2001:db8::3 128
[HUAWEI-acl6-ip-pool-abc] ipv6 address 2001:db8::4 128
[HUAWEI-acl6-ip-pool-abc] ipv6 address 2001:db8::5 128
[HUAWEI-acl6-ip-pool-abc] quit
[HUAWEI] traffic behavior b2
[HUAWEI-behavior-b2] redirect ipv6-multihop abc
Related Topics

redirect ipv6-nexthop

Function

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

The undo redirect command deletes the redirection configuration.

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

Format

redirect [ vpn-instance vpn-instance-name ] ipv6-nexthop { ipv6-address | link-local link-local-address interface interface-type interface-number } & <1-4> [ forced ]

undo redirect

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.

ipv6-address

Specifies a next hop IPv6 address.

The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X.

link-local link-local-address Specifies a link-local address. The prefix of the specified IPv6 address must match FE80::/60. The address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X.
interface interface-type interface-number Specifies the interface corresponding to the link-local address.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.
-
forced Indicates that packets are discarded if the next hop is unavailable. -

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can configure redirection in a traffic behavior to implement PBR.

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 IPv6 address.

Precautions

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

  • If the device does not match the neighbor entry corresponding to the next hop IPv6 address, the device sends NS packets to check whether the neighbor is reachable. If the neighbor is unreachable, packets are forwarded based on the original path and redirection does not take effect.

  • If multiple next hop IPv6 addresses are configured, the device redirects packets in active/standby mode. A maximum of four next hop IPv6 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 IPv6 addresses were configured. The next hop IPv6 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.

  • When the next hop IPv6 address is a local-link address, you must configure a VLANIF interface. The address is only valid in the VLAN corresponding to the VLANIF interface.

  • If you run the redirect ipv6-nexthop command in the same traffic classifier view multiple times, only the latest configuration takes effect.

Example

# Configure a next hop IPv6 address in the traffic behavior b1: FC00:0:0:2001::1.

<HUAWEI> system-view
[HUAWEI] traffic behavior b1
[HUAWEI-behavior-b1] redirect ipv6-nexthop fc00:0:0:2001::1
Related Topics
Translation
Download
Updated: 2019-04-09

Document ID: EDOC1100065659

Views: 113200

Downloads: 83

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next