Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents

port-mirroring

date_range 20-Jun-24

Syntax: MX Series and PTX Series Routers, M120 and M320

content_copy zoom_out_map
port-mirroring {
    input {
        maximum-packet-length bytes;
        rate number;
        run-length number;
    }
    family (any | ccc | inet | inet6 | vpls) {
        output {
            interface interface-name {
                next-hop address;
            }
            next-hop-group group-name {
                group-type inet6;
                interface interface-name {
                    next-hop ipv6-address;
                }
                next-hop-subgroup group-name {
                    interface interface-name {
                        next-hop ipv6-address;
                    }
                }
            }
            no-filter-check;
        }
    }
    instance {
        instance-name {
            input {
                maximum-packet-length bytes;
                rate number;
                run-length number;
            }
            family (any | ccc | inet | inet6 | vpls) {
                output {
                    interface interface-name {
                        next-hop address;
                    }
                    no-filter-check;
                    server-profile server-profile-name;
                }
            }
        }
    }
    mirror-once;
    packet-timestamp;
    traceoptions {
        file filename  <files number> <size bytes> <world-readable | no-world-readable>;
    }
}

Syntax: QFX Series (but not QFX10000) and EX4600 Switches and NFX Series Devices

content_copy zoom_out_map
port-mirroring {
    family {
        ethernet-switching {
            output {
                interface interface-name;
                no-filter-check;
                vlan vlan-name {
                    no-tag;
                }
            }
        }
        inet {
            output {
                ip-address address;
                routing-instance instance-name {
                    ip-address address;
                }
            }
        }
    }
    instance instance-name {
        family {
            ethernet-switching {
                output {
                    interface interface-name;
                    no-filter-check;
                    vlan vlan-name {
                        no-tag;
                    }
                }
            }
            inet {
                output {
                    ip-address address;
                    routing-instance instance-name {
                        ip-address address;
                    }
                }
            }
        }
    }
}

Syntax: OCX1100

content_copy zoom_out_map
port-mirroring {
    family {
        inet {
            output {
                ip-address address;
                routing-instance instance-name {
                    ip-address address;
                }
            }
        }
    }
    instance instance-name {
        family {
            inet {
                output {
                    ip-address address;
                    routing-instance instance-name {
                        ip-address address;
                    }
                }
            }
        }
    }
}

Syntax: QFX10000 Switches

content_copy zoom_out_map
port-mirroring {
     instance instance-name {
             input {
                 rate number;
                 run-length number;
            }
             output {
                dscp value;
                forwarding-class class-name;
                ip-destination-address address;
                ip-source-address address;
                policer policer-name;
            }
    }
}

Hierarchy Level

content_copy zoom_out_map

Description

Create a port-mirroring configuration. Specify the address family, rate, run length, interface, and next-hop address for sending copies of packets to an analyzer.

The remaining statements are explained separately. See CLI Explorer.

Required Privilege Level

interface—To view this statement in the configuration.

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

routing—To view this statement in the configuration.

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

Release Information

Statement introduced before Junos OS Release 7.4.

family vpls statement introduced in Junos OS Release 9.3.

instance instance-name statement introduced in Junos OS Release 9.3 .

mirror-once statement introduced in Junos OS Release 9.3 .

family ccc statement introduced in Junos OS Release 9.6.

family inet6 and next-hop-group statements introduced in Junos OS Release 14.2 .

footer-navigation