In classic CLI, NAT Static Port Forwards (SPFs) can be managed through configuration or with a tools command. In the MD-CLI and NETCONF, a tools command manages SPFs.
If the tools command is configured to manage SPFs and preserve SPFs across reboots, then persistency of the SPF must be enabled with the configure system persistence nat-port-forwarding command for both classic CLI and MD-CLI. With persistency enabled, SPF configuration is stored on the compact flash.
The following are command syntax and sample configuration for Large Scale NAT (LSN):
A:admin@sr-1s# tools perform nat port-forwarding-action lsn ?
lsn add router <string> [b4 <ipv6 address>] [aftr <ipv6 address>] ip <IP address> protocol <keyword> [port <number>] lifetime <string> [outside-ip <ipv4 address>] [outside-port <number>] [nat-policy <string>]
lsn remove router <string> [b4 <ipv6 address>] ip <IP address> protocol <keyword> port <number> [nat-policy <string>]
lsn modify router <string> [b4 <ipv6 address>] ip <IP address> protocol <keyword> port <number> lifetime <string> [nat-policy <string>]
classic CLI
A:cses-V22>config>service>nat>fwd#
lsn router <router-instance> [b4 <ipv6-address>] [aftr <ipv6-address>] ip <ip-address> protocol {tcp|udp} [port <port>] [outside-ip <ipv4-address>] [outside-port <port>] [nat-policy <nat-policy-name>]
*A:Dut-C>config>service>nat>fwd# info detail
----------------------------------------------
lsn router 101 ip 11.11.13.7 protocol udp port 12345 outside-ip 130.0.255.254 outside-port 3171 nat-policy "pol1_for_2001-pool-0"
----------------------------------------------
*A:Dut-C>config>service>nat>fwd#