This section describes how to configure port pre-allocation and incremental allocation.
Port pre-allocation and incremental allocation mainly apply to NAT444 and NAT64 scenarios. Port pre-allocation provides the source tracing based on CPE and reduces the number of service logs as well. Incremental allocation compensates the shortage of pre-allocated ports.
Configuring port pre-allocation and incremental allocation consists of two steps:
Procedure:
nat resource load-balance enable
The nat resource load-balance enable command needs to be run when port pre-allocation and incremental allocation are used in load-balancing hot standby networking.
port-block-size [ extended-times times-num ] [ port-range port1 port2 ]
In interzone multiple-egress scenarios, specify only source IP addresses, but not destination IP addresses in the NAT policy for port pre-allocation and incremental allocation. Otherwise, translation errors may occur.
Traffic that matches the NAT policy for port pre-allocation and incremental allocation will not be matched with other NAT policies.
The log sending interface must be an interface in the root system.
A maximum of 100 address ranges can be excluded from an address pool, and a maximum of 4096 addresses can be excluded from an address range.
After configuring port pre-allocation and incremental allocation, configure the syslog service on theFW to enable the log server to resolve port pre-allocation and incremental allocation logs.
Procedure:
nat port-block { assigning | freeing } syslog enable
nat port-block syslog header default timestamp { utc | local }
nat port-block syslog descriptive format [ cn | unicom ]
The default syslog format is France Telecom.
nat port-block syslog host host-address [ host-port ] source source-name source-address source-port
In the environment of dual-system hot backup, this command is not copied to the slave device. You need to configure this command on the active device and the standby device as well.
The function of sending syslogs needs to be configured only in the root system. After the configuration is complete, virtual systems send syslogs through the root system.
system-view
nat port-block used-up alarm enable
nat port-block used-up alarm threshold
When the ports allocated to users through port pre-allocation or incremental allocation are exhausted, the FW sends alarms and logs in syslog format to the log server.
This function takes effect only when 3-tuple NAT or 3-tuple DS-Lite NAT is configured.
system-view
nat port-block ip-used-up alarm threshold
When the port block usage of an IP address reaches the threshold, the FW sends alarms and logs in syslog format to the log server.
system-view
nat port-block syslog multi-host-mode