No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S1720, S2700, S3700, S5700, S6700, S7700, and S9700 Series Switches Common Operation Guide

This document describes the CLI-based configurations of universal protocols and common features for Huawei switches on basic networks.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring Traffic Mirroring

Configuring Traffic Mirroring

Traffic mirroring is a feature that copies a specified type of packets received and sent by devices, ports, or VLANs to observing ports connected to monitoring devices. Monitoring devices monitor only the specified type of packets. Traffic mirroring can be configured based on ACLs and Modular Quality of Service Command-Line Interface (MQC) (complex traffic classification). ACL-based traffic mirroring is easy to configure but supports fewer packets types than MQC-based traffic mirroring and supports only inbound traffic mirroring. MQC-based traffic mirroring is complex to configure but supports more packet types and the inbound, outbound traffic mirroring.

Traffic mirroring is classified into local traffic mirroring and Layer 2 remote traffic mirroring based on observing ports. For details about configuring local observing ports and Layer 2 remote observing ports, see Configuring an Observing Port. The following example configures local traffic mirroring. For details about configuration examples, see "Typical Mirroring Configuration" in the Typical Configuration Examples - Typical Network Management and Monitoring Configuration.

Implementing traffic mirroring using ACLs

  1. Configuring an Observing Port. For example, configure a local observing port GE1/0/1 that is directly connected to a monitoring device.

    <HUAWEI> system-view
    [HUAWEI] observe-port 1 interface gigabitethernet 1/0/1
  2. Create an ACL. For example, create a Layer 2 ACL to match packets with 802.1p priority 6.

    [HUAWEI] acl 4001
    [HUAWEI-acl-L2-4001] rule permit 8021p 6
    [HUAWEI-acl-L2-4001] quit
  3. Configure traffic mirroring. For example:

    • Copy packets with 802.1p priority 6 in the inbound direction of all the ports on the device to observing port GE1/0/1.

      [HUAWEI] traffic-mirror inbound acl 4001 to observe-port 1
    • Copy packets with 802.1p priority 6 in the inbound direction of all the ports in VLAN 10 to observing port GE1/0/1.

      [HUAWEI] traffic-mirror vlan 10 inbound acl 4001 to observe-port 1
    • Copy packets with 802.1p priority 6 in the inbound direction of GE2/0/1 to observing port GE1/0/1.

      [HUAWEI] interface gigabitethernet 2/0/1
      [HUAWEI-GigabitEthernet2/0/1] traffic-mirror inbound acl 4001 to observe-port 1

Implementing Traffic Mirroring Using Complex Traffic Classification

  1. Configuring an Observing Port. For example, configure a local observing port GE1/0/1 that is directly connected to a monitoring device.

    <HUAWEI> system-view
    [HUAWEI] observe-port 1 interface gigabitethernet 1/0/1
  2. Create a traffic classifier. For example, create a traffic classifier c1 to match packets with 802.1p priority 6.

    [HUAWEI] traffic classifier c1
    [HUAWEI-classifier-c1] if-match 8021p 6
    [HUAWEI-classifier-c1] quit
  3. Create a traffic behavior with the mirroring action. For example, create a traffic behavior b1 and set the action to traffic mirroring.

    [HUAWEI] traffic behavior b1
    [HUAWEI-behavior-b1] mirroring to observe-port 1
    [HUAWEI-behavior-b1] quit
  4. Create a traffic policy and bind the traffic classifier and traffic behavior to the traffic policy. For example, create a traffic policy p1 and bind the traffic classifier and traffic behavior to the traffic policy.

    [HUAWEI] traffic policy p1
    [HUAWEI-trafficpolicy-p1] classifier c1 behavior b1
    [HUAWEI-trafficpolicy-p1] quit
  5. Apply the traffic policy. For example:

    • Copy packets with 802.1p priority 6 in the inbound direction of all the ports on the device to observing port GE1/0/1.

      [HUAWEI] traffic-policy p1 global inbound
    • Copy packets with 802.1p priority 6 in the inbound direction of all the ports in VLAN 10 to observing port GE1/0/1.

      [HUAWEI] vlan 10
      [HUAWEI-vlan10] traffic-policy p1 inbound
    • Copy packets with 802.1p priority 6 in the inbound direction of GE2/0/1 to observing port GE1/0/1.

      [HUAWEI] interface gigabitethernet 2/0/1
      [HUAWEI-GigabitEthernet2/0/1] traffic-policy p1 inbound
Translation
Download
Updated: 2018-09-03

Document ID: EDOC1000057410

Views: 84934

Downloads: 12115

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next