redirect public-network

Function

The redirect public-network command redirects IPv4 or IPv6 packets to be forwarded using private network routes to public network routes' outbound interfaces.

The undo redirect public-network command cancels the configuration.

By default, IPv4 or IPv6 packets to be forwarded using private network routes are not redirected to public network routes' outbound interfaces.

Format

redirect { ip | ipv6 } public-network

undo redirect { ip | ipv6 } public-network

Parameters

Parameter Description Value
ip

Specifies IPv4 packets.

-

ipv6

Specifies IPv6 packets.

-

Views

Traffic behavior view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

Usage Scenario

After VPN is configured on a device, VPN services can be forwarded using only private network routes. When public network users require VPN services or VPN services access the public network, to redirect IPv4 or IPv6 packets to be forwarded using private network routes to public network routes' outbound interfaces, run the redirect ip public-network command.

Precautions

This command is effective only in the traffic policy applied to incoming packets.

Example

# Configure traffic behavior named b1 to redirect IPv4 packets to be forwarded using private network routes to public network routes' outbound interfaces.
<HUAWEI> system-view
[~HUAWEI] traffic behavior b1
[*HUAWEI-traffic behavior b1] redirect ip public-network
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >