Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


block-allocation (Source NAT Next Gen Services)



Hierarchy Level

Release Information

Statement introduced in Junos OS Release 19.3R2 on MX Series routers (MX240, MX480 and MX960) running Next Gen Services with the MX-SPC3 services card.


Allocate a block of ports for each subscriber to use for source NAT with port translation, except for deterministic NAT. New requests for NAT ports for the subscriber are served from the active block. With port block allocation, we generate one syslog log per set of ports allocated for a subscriber. This reduces the number of logs, making it easier to track subscribers.


active-block-timeout timeout-intervalThe interval, in seconds, for which the block is active. After the timeout, a new block is allocated, even if ports are available in the active block. If you set the timeout to 0, port blocks are filled completely before a new port block is allocated, and the last port block remains active indefinitely.

Range: 0 through 86,400

Default: 120

block-size block-sizeNumber of ports in a block.

Range: 1 through 64,512

Default: 256

interim-logging-interval timeout-intervalThe interval, in seconds, at which to send interim system logs for active port blocks and for inactive port blocks with live sessions. This increases the reliability of system logs, which are UDP-based and can get lost in the network.

Range: 1800 through 86,400

Default: 0 (interim logs are disabled)

last-block-recycle-timeout timeout-intervalIf you set the active-block-timeout to 0, you can configure the amount of time in seconds before the last active port block is released.

Range: 120 through 864,000

Default: 300

maximum-blocks-per-host maximum-block-numberThe maximum number of blocks that can be allocated to a subscriber address.

Range: 1 through 512

Default: 8

Required Privilege Level

interface—To view this statement in the configuration.

interface-control—To add this statement to the configuration.