Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Example: Configuring Mirroring for Local Monitoring of Employee Resource Use on EX9200 Switches

    EX9200 switches allow you to configure mirroring to send copies of packets to either a local interface for local monitoring or to a VLAN for remote monitoring. You can use mirroring to copy these packets:

    • Packets entering or exiting a port
    • Packets entering or exiting a VLAN

    You can analyze the mirrored traffic using a protocol analyzer application installed on a system connected to the local destination interface (or a running on a remote monitoring station if you are sending mirrored traffic to an analyzer VLAN).

    This topic describes how to configure local mirroring on an EX9200 switch. The examples in this topic describe how to configure an EX9200 switch to mirror traffic entering interfaces connected to employee computers to an analyzer output interface on the same switch.

    Requirements

    The examples use the following hardware and software components:

    • One EX9200 switch
    • Junos OS Release 13.2.0 or later for EX Series switches

    Before you configure mirroring, be sure you have an understanding of mirroring concepts. For information about analyzers, see Understanding Analyzers on EX9200 Switches. For information about port mirroring, see Layer 2 Port Mirroring Overview.

    Overview and Topology

    This topic includes two examples that describe how to mirror traffic entering ports on the switch to a destination interface on the same switch (local mirroring). The first example shows how to mirror all traffic entering the ports connected to employee computers. The second example assumes the same scenario, but includes a filter to mirror only the employee traffic going to the Web.

    The interfaces ge-0/0/0 and ge-0/0/1 serve as connections for employee computers.

    The interface ge-0/0/10 is reserved for analysis of mirrored traffic. Connect a PC running a protocol analyzer application to the analyzer output interface to analyze the mirrored traffic.

    Note: Multiple ports mirrored to one interface can cause buffer overflow and dropped packets.

    Figure 1 shows the network topology for this example.

    Figure 1: Network Topology for Local Mirroring Example

     Network Topology
for Local  Mirroring Example

    Mirroring All Employee Traffic for Local Analysis

    To configure mirroring for all employee traffic for local analysis, perform these tasks:

    CLI Quick Configuration

    To quickly configure local mirroring for ingress traffic to the two ports connected to employee computers, copy the following commands and paste them into the switch terminal window:

    [edit]
    set interfaces ge-0/0/0 unit 0 family ethernet-switching
    set interfaces ge-0/0/10 unit 0 family ethernet-switching
    set forwarding-options analyzer employee-monitor input ingress interface ge-0/0/0.0
    set forwarding-options analyzer employee-monitor output interface ge-0/0/10.0

    Step-by-Step Procedure

    To configure an analyzer called employee-monitor and specify the input (source) interfaces and the analyzer output interface:

    1. Configure each interface connected to employee computers as an input interface for the analyzer employee-monitor:
      [edit forwarding-options]
      user@switch# set analyzer employee-monitor input ingress interface ge–0/0/0.0
    2. Configure the output analyzer interface for the employee-monitor analyzer. This will be the destination interface for the mirrored packets:
      [edit forwarding-options]
      user@switch# set analyzer employee-monitor output interface ge-0/0/10.0

    Results

    Check the results of the configuration:

    [edit] user@switch> show
    forwarding-options {analyzer employee-monitor {input {ingress {interface ge-0/0/0.0;}output {interface {ge-0/0/10.0;}}}}

    Verification

    To confirm that the configuration is correct, perform these tasks:

    Verifying That the Analyzer Has Been Correctly Created

    Purpose

    Verify that the analyzer employee-monitor has been created on the switch with the appropriate input interfaces, and the appropriate output interface.

    Action

    To verify, by using the show forwarding-options analyzer command, whether an analyzer is configured as expected.

    user@switch> show forwarding-options analyzer
      Analyzer name                    	: employee-monitor
      Mirror rate                     	: 1
      Maximum packet length             : 0
      State                           	 : up
      Ingress monitored interfaces     : ge-0/0/0.0
      Output interface                	 : ge-0/0/10.0
    
     

    Meaning

    The output shows that the employee-monitor analyzer has a ratio of 1 (mirroring every packet, the default setting), the maximum size of the original packet mirrored is 0, which indicates that the entire packet is mirrored), the state of the configuration is up, and the analyzer is mirroring the traffic entering the ge-0/0/0 interface, and sending the mirrored traffic to the ge-0/0/10 interface. If the state of the output interface is down or if the output interface is not configured, the value of state will be down and the analyzer will not be programmed for mirroring.

    Published: 2013-08-28