action (PBR rule view)

Function

The action command configures the action for packets matching the conditions.

The undo action command cancels the preceding configuration.

Format

action { pbr { egress-interface interface-type interface-number &<1-2> [ next-hop ipv4-address &<1-2> ] | next-hop ipv4-address &<1-2> | vpn-instance vpn-instance-name } | no-pbr }

action { pbr { egress-interface interface-type interface-number &<1-2> [ next-hop ipv6-address ] | next-hop ipv6-address | vpn-instance vpn-instance-name } | no-pbr }

undo action pbr { egress-interface interface-type interface-number &<1-2> [ next-hop ipv4-address &<1-2> ] | next-hop ipv4-address &<1-2> | vpn-instance vpn-instance-name }

undo action pbr { egress-interface interface-type interface-number &<1-2> [ next-hop ipv6-address ] | next-hop ipv6-address | vpn-instance vpn-instance-name }

Parameters

Parameter Description Value
pbr

Forwards packets matching the conditions based on a PBR rule.

-

egress-interface interface-type interface-number &<1-2>

Specifies the outgoing interface of packets.

-

next-hop ipv4-address &<1-2>

Specifies the next hop of packets. The next hop is an IPv4 address.

-

next-hop ipv6-address

Specifies the next hop of packets. The next hop is an IPv6 address.

-

vpn-instance vpn-instance-name

Specifies the name of a virtual system.

It must be the name of an existing virtual system.

no-pbr

Forwards packets matching the conditions based on the routing table.

-

Views

PBR rule view

Default Level

2: Configuration level

Usage Guidelines

If the outgoing interface connects to a non-P2P network, the interface may connect to multiple network devices. In this case, the next hop must be specified to ensure route correctness.

If two egress interfaces are configured, traffic matching the PBR rule is forwarded through the two interfaces stream by stream.

For the AntiDDoS8000, when you configure the IPv6 PBR rule, the outgoing interface cannot be set to the VLANIF interface.

Example

# Set the action of a PBR rule to next-hop 10.1.1.1.

<sysname> system-view
[sysname] policy-based-route
[sysname-policy-pbr] rule name abc
[sysname-policy-pbr-rule-abc] action pbr next-hop 10.1.1.1

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.