Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

show services nat source rule

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
show services nat source rule
rule-name
<all>
<interface interface-name>
<service-set service-set>

Description

Display source NAT rule-set information.

Options

rule-name

Display source NAT rule-set information for the specified rule.

all

Display all source NAT rule-set information.

interface interface-name

Display rule-set information about the adaptive services interface.

service-set service-set

Display rule-set information about the service set.

Required Privilege Level

view

Output Fields

Table 1 lists the output fields for the show services nat source rule command. Output fields are described in the approximate order in which they appear.

Table 1: show services nat source rule Output Fields

Field Name

Description

Interface

Interface name.

Service set

Service set name.

Rule Id

Rule identification number.

Rule position

Position of the source NAT rule.

Match-direction

Specifies the direction in which to match traffic that meets the rule conditions.

Match

  • Source address

  • Destination address

  • Application

Match the following:

  • Name of the source address that matches the rule.

  • Name of the destination address that matches the rule.

  • Indicates whether the application option is configured.

Action

  • Persistent NAT type

  • Persistent NAT mapping type

  • Inactivity timeout

  • Max session number

Translation hits

  • Successful sessions

  • Failed sessions

Use this field to check for traffic that matches the rule. Note the successful or failed sessions.

Number of sessions

Number of active sessions.

Sample Output

show services nat source rule

content_copy zoom_out_map
user@host> show services nat source rule all             
ss1_interface_style1 interface vms-0/2/0 all | no-more  
Interface: vms-0/2/0 , Service set: ss1_interface_style1 
source NAT rule: r1                     Rule-set: rs1 
  Rule-Id                    : 1 
  Rule position              : 1 
  Match-direction            : input 
  Match 
    Source addresses         : 0.0.0.0         - 255.255.255.255 
    Destination addresses    : 0.0.0.0         - 255.255.255.255 
    Application              : configured 
  Action                        : src_pool1 
    Persistent NAT type         : N/A               
    Persistent NAT mapping type : address-port-mapping  
    Inactivity timeout          : 0 
    Max session number          : 0 
  Translation hits           : 3 
    Successful sessions      : 3 
    Failed sessions          : 0 
  Number of sessions         : 1 
 

show services nat source rule (Mapping and EIF Configuration)

content_copy zoom_out_map
show services nat source rule all
Total rules: 1
Total referenced IPv4/IPv6 ip-prefixes: 1/0
source NAT rule: r1                     Rule-set: rs1
  Rule-Id                    : 1
  Rule position              : 1
  From zone                  : nh-JNPR-NH-SSET-ZoneIn
  To zone                    : nh-JNPR-NH-SSET-ZoneOut
  Match
    Source addresses         : 30.30.30.0      - 30.30.30.255
  Action                        : p2
  +Mapping-type : endpoint-independent;
  +Mapping-refresh : inbound
  +Filtering-type: endpoint-independent
  +Prefix-list :             
1.2.2.0	--- 2.2.2.3
3.3.3.0   --- 3.3.3.3  except   
Translation hits           : 0
    Successful sessions      : 0
    Failed sessions          : 0
  Number of sessions         : 0

Release Information

Command introduced in Junos OS 19.3R2.

footer-navigation