Customer needed to redirect traffic to specific output interface after matching specific rules of TCP/UDP ports and specific source/destination IPs.
He tried to use Policy Based Routing for this, but he could apply the PBR only on P2P Tunnel interface.
Solution
--> Configure ACL that need to match de traffic to be redirected (for example acl 3000)
<Huawei> system-view
[Huawei] acl 3000
[Huawei-acl-adv-3000]rule 5 permit icmp source 192.168.1.1 0 destination 192.168.2.1 0
--> Configure a traffic policy, with the next behavior and classifier:
- classifier:
[Huawei] traffic classifier c1
[Huawei-classifier-c1] if-match acl 3000
- behavior:
[Huawei] traffic behavior b1
[Huawei-behavior-b1] redirect ip-nexthop 1.1.1.1 interface gigabitEthernet 0/6/4
--> Apply the traffic policy on the desired interface in the desired direction
[Huawei] traffic policy p1
[Huawei-trafficpolicy-p1] classifier c1 behavior b1
[Huawei-trafficpolicy-p1] quit
[Huawei] interface interface gigabitEthernet 0/6/4
[Huawei-gigabitEthernet 0/6/4] traffic-policy p1 inbound
Note: traffic policy can be also applied on subinterface/vpn-instance