The redirect ipv4-multinhp command configures multiple redirected outbound interfaces and their next hops, a VPN instance, as well as an NQA test instance.
The undo redirect ipv4-multinhp command cancels the configuration.
By default, the multiple redirected outbound interfaces and their next hops, a VPN instance and an NQA test instance are not configured in traffic behavior view.
redirect ipv4-multinhp { nhp ip-address vpn vpn-name nqa nqa-test-administer-name name-of-nqa-test-instance } &<2-42> [ routing-filter { default-routing | blackhole-routing } * ] [ deny ] [ pri-type common ] [ non-revertive ]
redirect ipv4-multinhp { nhp ip-address interface { interface-name | interface-type interface-number } } &<2-42> [ loadbalance [ sip-hash ] [ unequal-cost ] ] [ route-forward ] [ pri-type common ]
redirect ipv4-multinhp { nhp ip-address vpn vpn-name } &<2-42> [ routing-filter { default-routing | blackhole-routing } * ] [ deny ] [ pri-type common ] [ non-revertive ]
redirect ipv4-multinhp { nhp ip-address } &<2-42> [ routing-filter { default-routing | blackhole-routing } * ] [ deny ] [ pri-type common ] [ non-revertive ]
redirect ipv4-multinhp { nhp ip-address nqa nqa-test-administer-name name-of-nqa-test-instance } &<2-42> [ routing-filter { default-routing | blackhole-routing } * ] [ deny ] [ pri-type common ] [ non-revertive ]
undo redirect
undo redirect ipv4-multinhp
Parameter | Description | Value |
---|---|---|
nhp ip-address |
Specifies the IP address of the next hop for redirection. |
The value is an IPv4 address in dotted decimal notation (X.X.X.X), for example, 10.1.1.1. |
vpn vpn-name |
Specifies the name of a VPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
nqa nqa-test-administer-name |
Specifies the name of a manager of an NQA test instance. If multiple NQA instances are configured, the device selects the first routable IP address whose bound NQA instance is up for packet forwarding. |
The name is a string of 1 to 32 case-insensitive characters, spaces not supported. The string can contain spaces if it is enclosed with double quotation marks ("). |
name-of-nqa-test-instance |
Specifies the name of an NQA test instance. |
The name is a string of 1 to 32 case-insensitive characters, spaces not supported. The string can contain spaces if it is enclosed with double quotation marks ("). |
default-routing |
When this parameter is configured, if the IP address of the next hop matches the default route, the packets are forwarded based on their destination IP address. |
- |
blackhole-routing |
When this parameter is configured, if the IP address of the next hop matches a black-hole route, the packets are forwarded based on their destination IP address. |
- |
deny |
If the next hop does not exist, the packet is discarded. |
- |
pri-type |
Defines the route priorities so that the common route, route matching a specified route-policy, and default route take effect in sequence. If both load balance and pri-type common are configured, common routes are preferentially selected. If common routes are reachable, redirection is not performed. If common routes are unreachable, redirection is performed in load balancing mode. |
- |
non-revertive |
When the current next hop of a redirect route exists, the high-priority next hop is not resumed after it is changed from Down to Up. |
- |
interface interface-type interface-number |
Specifies the type and number of an interface. |
- |
loadbalance |
Specifies the load balancing mode of redirected packets. After the loadbalance parameter is specified, load balancing can be implemented among all next hops. By default, load balancing is implemented based on the quintuple. |
- |
sip-hash |
Indicates source IP address-based hash for load balancing. |
- |
unequal-cost |
Specify the load balance unequal cost mode.Traffic is allocated based on the bandwidth ratio of the bound interfaces. |
- |
route-forward |
If a discard PBR policy is enabled in this command and all the specified outbound interfaces were shut down, the parameter route-forward can be configured to return packets to the original forwarding process. |
- |
Usage Scenario
On the live network, if users require some traffic not to be forwarded along the common path but to be forwarded to multiple specific next hops, run this command. The multiple next hops to which traffic is redirected back up each other to enhance traffic forwarding reliability.
In a scenario in which a discard PBR policy is configured to redirect packets to multiple next hops:In a scenario in which a forward PBR policy is configured to redirect packets to multiple next hops:
Precautions
Policy-based routing supports redirection only for incoming traffic. MF classification configured for outgoing traffic does not take effect.
When running this command to configure a discard PBR policy, you must specify both the outbound interface and the next hop. The command does not check whether the configured next hop IP address is mapped to the name of the outbound interface. To switch between the forward and discard PBR policies, delete the original policy and reconfigure the other one. Associating redirection with NQA test ensures that the IP address of the next hop for redirection is reachable. The type of the NQA test instance must be ICMP. To implement real-time check on the reachability of the next hop for redirection, enable the NQA test instance to perform periodical check. NOTE: The IP address of the next hop to which traffic is redirected takes effect only when the NQA test instance is successfully complete. The redirect nexthop address must match the network segment of the outbound interface.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] quit [*HUAWEI] traffic behavior beh1 [*HUAWEI-behavior-beh1] redirect ipv4-multinhp nhp 1.1.1.1 vpn vpna nhp 1.1.1.2 vpn vpna
<HUAWEI> system-view [~HUAWEI] traffic behavior h1 [*HUAWEI-behavior-h1] redirect ipv4-multinhp nhp 1.1.1.1 interface GigabitEthernet0/1/0 nhp 2.2.2.2 interface GigabitEthernet0/1/1 loadbalance sip-hash
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] quit [*HUAWEI] traffic behavior bb1 [*HUAWEI-behavior-bb1] redirect ipv4-multinhp nhp 1.1.1.1 vpn vpna nhp 2.2.2.2 vpn vpna non-revertive
<HUAWEI> system-view [~HUAWEI] nqa test-instance AIS AIS_PM4800 [*HUAWEI-nqa-AIS-AIS_PM4800] quit [*HUAWEI] nqa test-instance AIS AIS_PM4900 [*HUAWEI-nqa-AIS-AIS_PM4900] quit [*HUAWEI] traffic behavior e1 [*HUAWEI-behavior-e1] redirect ipv4-multinhp nhp 1.1.1.1 nqa AIS AIS_PM4800 nhp 1.1.1.2 nqa AIS AIS_PM4900
<HUAWEI> system-view [~HUAWEI] traffic behavior beh1 [*HUAWEI-behavior-beh1] redirect ipv4-multinhp nhp 1.1.1.1 interface GigabitEthernet 0/1/8 nhp 3.3.3.3 interface GigabitEthernet 0/1/9 nhp 2.2.2.2 interface GigabitEthernet 0/1/10