(Optional) Setting a Next-Hop IP Address to Which a Route Is Redirected

Set the IP address of a next hop to which a route is redirected.

Context

NAT attributes can be configured only after a NAT instance is configured. After user traffic enters a NAT instance, NAT translates information in the user traffic and redirects traffic to a specified next-hop IP address.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run nat instance instance-name id id

    A NAT instance is created, and the NAT instance view is displayed.

  3. Perform either of the following operations to configure NAT redirection:

    • To redirect all user traffic, run the following command to set the next-hop IP address: redirect ip-nexthop ip-address { inbound | outbound }

      A single redirect ip-nexthop command instance can be run for either public network-to-private network (inbound) or private network-to-public network (outbound) packets in each NAT instance.

    • To redirect traffic of a specific user, run the following command to set the rnext-hop IP address: redirect ip-nexthop ip-address { inbound | outbound } redirect-id [ tcp | udp | protocol-id ] [ source-ip ip-address { ip-mask | mask-length } [ source-port port-number ] [ vpn-instance vpn-instance-name ] | destination-ip ip-address { ip-mask | mask-length } [ destination-port port-number ] [ vpn-instance vpn-instance-name ] ] *

      In this situation, a maximum of 16 redirect ip-nexthop command instances can be run for public network-to-private network (inbound) packets, private network-to-public network (outbound) packets, or packets in both directions in each NAT instance. The redirect-id parameter is set to identify each command instance.

  4. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >