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 forwarding-options port-mirroring

date_range 20-Jun-24

Syntax

content_copy zoom_out_map
show forwarding-options port-mirroring
<terse | detail>
<instance-name>
<self-mirror (none | start |statistics |stop)>

Description

Display current state of port-mirroring instances.

Options

terse | detail

(Optional) Display the specified level of output.

instance-name

(Optional) Display a single port-mirroring instance.

Required Privilege Level

view

Output Fields

Table 1 lists the output fields for the show forwarding-options port-mirroring command. Output fields are listed in the approximate order in which they appear.

Table 1: show forwarding-options port-mirroring Output Fields

Field Name

Field Description

Level of Output

Instance Name

Name of port-mirroring instance.

All levels

Instance Id

Instance identification number.

All levels

State

Instance state, either up or down.

All levels

Input parameters

Rate

Rate (ratio of packets sampled).

detail

Run-length

Run length (number of consecutive packets sampled).

detail

Maximum-packet-length

Maximum packet length.

detail

Output parameters

Family

Protocol family.

detail

State

Instance state, either up or down.

detail

Destination

Destination (next-hop group name).

detail

Next-hop

IP address of the next hop to the destination.

detail

Parameters (self-mirror)

Parameters for self-mirror :
  • filename of PCAP file

  • family : family-name

  • size : file-size

  • packet count : number of mirrored packets saved in file

  • total bytes written : count

  • start record time : time

  • stop record time : time

  • duration (seconds) : seconds

  • rate : number

  • run-length : number

  • mode : write mode (circular | linear)

  • self mirror state : recording state (inactive | active | recording)

 

Sample Output

show forwarding-options port-mirroring terse

content_copy zoom_out_map
user@host> show forwarding-options port-mirroring terse
Instance Name			     Instance Id    State
&global_instance		     1		    up
inst1				     2		    up

show forwarding-options port-mirroring detail

content_copy zoom_out_map
user@host> show forwarding-options port-mirroring detail
Instance Name: pm1
  Instance Id: 2
  Input parameters:
    Rate                  : 2
    Run-length            : 0
    Maximum-packet-length : 0
  Output parameters:
    Family              State     Destination          Next-hop
    inet                up        ge-0/0/0.0           10.1.1.2
    inet6               up        ge-0/0/0.0           2001:db8::2
    any                 up        ge-0/0/1.0           NA

show forwarding-options port-mirroring self-mirror

content_copy zoom_out_map
user@host> show forwarding-options port-mirroring self-mirror         
Instance Name: I1                             
 Instance Id: 1             
 Input parameters:
   Rate                   : 1
   Run-length             : 0  
   file name              :/var/tmp/bt_capture_inet_egress  
   family                 :inet  
   size                   :5000000 
   mode                   :circular
   self-mirror state     : inactive <recording state inactive/active/recording>

show forwarding-options port-mirroring self-mirror statistics

content_copy zoom_out_map
user@host> show forwarding-options port-mirroring self-mirror statistics 
Instance Name    :I1                           
  Instance Id    :1                            
Parameters
    file name           :/var/tmp/mirror1.pcap
    family              :inet 
    size                :10485760
    packet count        :3021
    total bytes written :362130

show forwarding-options port-mirroring self-mirror start

content_copy zoom_out_map
user@host> show forwarding-options port-mirroring self-mirror start     
Instance Name    :I1                           
  Instance Id    :1                            
 Parameters
    family                :inet
    start record time     :2024-06-29 22:12:35
    duration(seconds)     :300

show forwarding-options port-mirroring self-mirror stop

content_copy zoom_out_map
user@host> show forwarding-options port-mirroring self-mirror stop     
Instance Name    :I1                           
  Instance Id    :1                            
 Parameters
    family                 :inet
    stop record time       :2024-06-29 22:15:35
    duration(seconds)      :300

Release Information

Command introduced in Junos OS Release 9.6.

footer-navigation