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

Typical Configuration Examples

CloudEngine 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

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).
Example for Configuring Local Traffic Mirroring

Example for Configuring Local Traffic Mirroring

Applicable Products and Versions

This example applies to all CE series switches running V100R001C00 or later.

Networking Requirements

In Figure 2-45, the Technical department and Marketing department of a company use 192.168.1.0/24 and 192.168.2.0/24 respectively to communicate with each other through SwitchA. The monitoring device Server is directly connected to SwitchA.

The packets sent from the Technical department to the Marketing department need to be monitored through the Server.

Figure 2-45 Networking diagram of local traffic mirroring

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure 10GE1/0/2 on SwitchA as the local observing port so that Server can receive mirrored packets.
  2. Configure a traffic classifier to match the packets sent from the Technical department to the Marketing department, and configure a traffic behavior to mirror packets to the observing port.
  3. Configure a traffic policy, bind the traffic classifier and traffic behavior to the traffic policy, and apply the traffic policy to the inbound direction of 10GE1/0/1.

Procedure

  1. Configure an observing port.

    # Configure 10GE1/0/2 on SwitchA as the observing port.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] observe-port 1 interface 10ge 1/0/2
    [*SwitchA] commit
    

  2. Configure a traffic classifier.

    # Create a traffic classifier named c1 on SwitchA to match the packets with the source IP address 192.168.1.0 and destination IP address 192.168.2.0/24.

    [~SwitchA] acl number 3000
    [*SwitchA-acl4-advance-3000] rule permit ip source 192.168.1.0 24 destination 192.168.2.0 24
    [*SwitchA-acl4-advance-3000] quit
    
    [*SwitchA] traffic classifier c1
    [*SwitchA-classifier-c1] if-match acl 3000
    [*SwitchA-classifier-c1] commit
    [~SwitchA-classifier-c1] quit
    

  3. Configure a traffic behavior.

    # Create a traffic behavior named b1 on SwitchA and configure it.

    [~SwitchA] traffic behavior b1
    [*SwitchA-behavior-b1] mirroring observe-port 1
    [*SwitchA-behavior-b1] commit
    [~SwitchA-behavior-b1] quit
    

  4. Configure a traffic policy and apply the traffic policy to the interface.

    # Create a traffic policy named p1 on SwitchA, bind the traffic classifier and traffic behavior to the traffic policy, and apply the traffic policy to the inbound direction of 10GE1/0/1 to monitor packets with the 802.1p priority of 6 sent from HostA.

    [~SwitchA] traffic policy p1
    [*SwitchA-trafficpolicy-p1] classifier c1 behavior b1
    [*SwitchA-trafficpolicy-p1] commit
    [~SwitchA-trafficpolicy-p1] quit
    [~SwitchA] interface 10ge 1/0/1
    [~SwitchA-10GE1/0/1] traffic-policy p1 inbound
    [*SwitchA-10GE1/0/1] commit
    [~SwitchA-10GE1/0/1] quit
    [~SwitchA] quit
    

Verifying the Configuration

# View the traffic classifier configuration.

<SwitchA> display traffic classifier c1
  Traffic Classifier Information:
    Classifier: c1
      Type: OR
      Rule(s):
        if-match acl 3000

# View the traffic policy configuration.

<SwitchA> display traffic policy p1
  Traffic Policy Information:
    Policy: p1
      Classifier: c1
        Type: OR
      Behavior: b1
        Mirroring observe-port 1

# Check the mirroring configuration.

<SwitchA> display port-mirroring
  Traffic mirroring:
  -----------------------------------------------------------------------------
  TrafficBehavior                        ObservePort : Interface
  -----------------------------------------------------------------------------
  b1                                               1 : 10GE1/0/2
  -----------------------------------------------------------------------------

Configuration Files

  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    observe-port 1 interface 10GE1/0/2
    #
    acl number 3000
     rule 5 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
    # 
    traffic classifier c1 type or
     if-match acl 3000
    #
    traffic behavior b1
     mirroring observe-port 1
    #
    traffic policy p1
     classifier c1 behavior b1 precedence 5
    #
    interface 10GE1/0/1
     traffic-policy p1 inbound
    #
    return
    
Download
Updated: 2019-04-03

Document ID: EDOC1000039339

Views: 105992

Downloads: 7475

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