< Home

static-mapping

Function

The static-mapping command specifies the private address pool, public address pool, public interface address, public port range, and mapped port range for the static mapping.

The undo static-mapping command deletes the static mapping.

Format

static-mapping mapping-id inside-ipv4-pool inside-pool-id global-pool global-pool-id [ port-range start-port end-port ] [ port-block-size port-block-size ] [ in-section | ip-first ]

static-mapping mapping-id inside-ipv4-pool inside-pool-id global interface { interface-name | interface-type interface-number } [ port-range start-port end-port ] [ port-block-size port-block-size ]

undo static-mapping mapping-id

Parameters

Parameter Description Value

mapping-id

Specifies the index of the static mapping.

  • USG6510E/6510E-POE: The value is an integer ranging from 1 to 10.
  • USG6530E: The value is an integer ranging from 1 to 100.
  • USG6515E/6550E/6560E/6580E: The value is an integer ranging from 1 to 200.
  • USG6525E/6555E/6565E/6575E-B/6585E/6605E-B: The value is an integer ranging from 1 to 200.
  • USG6610E/6620E: The value is an integer ranging from 1 to 500.
  • USG6615E/6625E: The value is an integer ranging from 1 to 500.
  • USG6630E/6650E: The value is an integer ranging from 1 to 500.
  • USG6635E/6655E: The value is an integer ranging from 1 to 500.
  • USG6680E: The value is an integer ranging from 1 to 1000.
  • USG6712E/6716E: The value is an integer ranging from 1 to 2000.

inside-pool-id

Specifies the index of the private address pool.

  • USG6510E/6510E-POE: The value is an integer ranging from 1 to 10.
  • USG6530E: The value is an integer ranging from 1 to 100.
  • USG6515E/6550E/6560E/6580E: The value is an integer ranging from 1 to 200.
  • USG6525E/6555E/6565E/6575E-B/6585E/6605E-B: The value is an integer ranging from 1 to 200.
  • USG6610E/6620E: The value is an integer ranging from 1 to 500.
  • USG6615E/6625E: The value is an integer ranging from 1 to 500.
  • USG6630E/6650E: The value is an integer ranging from 1 to 500.
  • USG6635E/6655E: The value is an integer ranging from 1 to 500.
  • USG6680E: The value is an integer ranging from 1 to 1000.
  • USG6712E/6716E: The value is an integer ranging from 1 to 2000.

global-pool-id

Specifies the index of the public address pool.

  • USG6510E/6510E-POE: The value is an integer ranging from 1 to 10.
  • USG6530E: The value is an integer ranging from 1 to 100.
  • USG6515E/6550E/6560E/6580E: The value is an integer ranging from 1 to 200.
  • USG6525E/6555E/6565E/6575E-B/6585E/6605E-B: The value is an integer ranging from 1 to 200.
  • USG6610E/6620E: The value is an integer ranging from 1 to 500.
  • USG6615E/6625E: The value is an integer ranging from 1 to 500.
  • USG6630E/6650E: The value is an integer ranging from 1 to 500.
  • USG6635E/6655E: The value is an integer ranging from 1 to 500.
  • USG6680E: The value is an integer ranging from 1 to 1000.
  • USG6712E/6716E: The value is an integer ranging from 1 to 2000.

interface-type interface-number

Specifies the type and number of an interface on a FW.

-

start-port

Specifies the start port.

The value is an integer ranging from 256 to 65535. The default value is 2048.

end-port

Specifies the end port.

The value is an integer ranging from 256 to 65535. The default value is 65535.

port-block-size

Specifies the size of port range.

The value is an integer ranging from 8 to 4096. The default value is 4096.

in-section

Indicates that the mapping between public and private networks is calculated by section. Ports are preferentially used for private network user translation. After ports are used up, the public network address is changed for a new round of port translation.

-

ip-first

Indicates that the mapping between public and private networks is calculated by address pool. Public IP addresses in the address pool are preferentially used to translate private addresses. After the addresses in the address pool are used up, ports are translated.

-

Views

nat static view

Default Level

2: Configuration level

Usage Guidelines

If in-section and ip-first are not configured, the mapping between public and private networks is calculated by address pool. Ports are preferentially used for private network user translation. After ports are used up, the public network address is changed for a new round of port translation. If ip-first is configured, public IP addresses in the address pool are preferentially used for private network user translation. After the addresses in the address pool are used up, ports are translated. If in-section is not configured, the mapping between public and private networks is calculated by section. Ports are preferentially used for private network user translation. After ports are used up, the public network address is changed for a new round of port translation.

Example

# Configure the static mapping. Set the indexes of the static mapping, public address pool, and private address pool to 1. Set the public port range for the static mapping to 2048-65535. Set the size of the pre-allocated port range to 256.

<sysname> system-view
[sysname] nat static-mapping
[sysname-nat-static] static-mapping 1 inside-ipv4-pool 1 global-pool 1 port-range 2048 65535 port-block-size 256 ip-first
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic