The redirect ip-nexthop command sets the IP address of a next hop to which packets are redirected.
The undo redirect command deletes the IP address of a next hop to which packets are redirected.
By default, no IP address of a next hop to which packets are redirected is set.
This command is supported only on the NetEngine 8000 F1A.
redirect ip-nexthop ip-address { inbound | outbound } redirect-id [ tcp | udp | protocol-id ] [ [ source-ip ip-address { ip-mask | mask-length } [ vpn-instance vpn-name ] ] [ source-port port-number ] | [ destination-ip ip-address { ip-mask | mask-length } [ vpn-instance vpn-name ] ] [ destination-port port-number ] ] *
undo redirect ip-nexthop ip-address { inbound | outbound } redirect-id [ tcp | udp | protocol-id ] [ [ source-ip ip-address { ip-mask | mask-length } [ vpn-instance vpn-name ] ] [ source-port port-number ] | [ destination-ip ip-address { ip-mask | mask-length } [ vpn-instance vpn-name ] ] [ destination-port port-number ] ] *
Parameter | Description | Value |
---|---|---|
inbound |
Indicates redirection to a next hop for public network-to-private network traffic. |
- |
outbound |
Indicates redirection to a next hop for private network-to-public network traffic. |
- |
redirect-id |
Specifies a redirection ID. |
The value is an integer ranging from 1 to 16. A smaller redirect-id value indicates a higher priority. |
tcp |
Indicates the TCP protocol. |
- |
udp |
Indicates the UDP protocol. |
- |
protocol-id |
Specifies a protocol number. |
The value is an integer ranging from 1 to 255. |
source-ip ip-address |
Specifies a source IP address. |
The value is in dotted decimal notation. |
ip-mask |
Specifies the mask of a specified IP address. |
The value is in dotted decimal notation. |
mask-length |
Specifies the mask length of a specified IP address. |
The value is an integer ranging from 1 to 32. |
vpn-instance 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. |
source-port port-number |
Specifies a source port number. |
The value is an integer ranging from 0 to 65535. |
destination-ip ip-address |
Specifies a destination IP address. |
The value is in dotted decimal notation. |
destination-port port-number |
Specifies a destination port number. |
The value is an integer ranging from 0 to 65535. |
ip-nexthop ip-address |
Specifies the IPv4 address of a next hop to which packets are re-directed. |
The value is in dotted decimal notation. |
Usage Scenario
To change the IP address of a next hop to which packets are redirected, run the redirect ip-nexthop command. This command is used when the next-hop IP address NAT traffic is the same as that used in PBR redirection.
Precautions
Perform either of the following operations to configure NAT redirection:
<HUAWEI> system-view [~HUAWEI] nat instance cpe1 id 1 [*HUAWEI-nat-instance-cpe1] redirect ip-nexthop 192.168.1.1 outbound
<HUAWEI> system-view [~HUAWEI] nat instance cpe2 id 2 [*HUAWEI-nat-instance-cpe2] redirect ip-nexthop 192.168.1.1 outbound 1 tcp source-ip 10.1.1.1 24 source-port 1001 destination-ip 2.1.1.1 24 destination-port 1002