< Home

Example for Configuring ACL-based Local Flow Mirroring

Networking Requirements

As shown in Figure 1, HostA connects to SwitchA through GigabitEthernet0/0/1. The server directly connects to GigabitEthernet0/0/2 on SwitchA.

The server (monitoring device) is required to monitor packets with the 802.1p priority of 6 sent by HostA.

Figure 1 Networking of local flow mirroring

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure GigabitEthernet0/0/2 as the local observing interface so that the server can receive mirroring packets.
  2. Configure a Layer 2 ACL to match packets with the 802.1p priority of 6.
  3. Configure an ACL-based traffic policy on GigabitEthernet0/0/1 to mirror packets with the 802.1p priority of 6.

Procedure

  1. Configure an observing interface.

    # Configure GigabitEthernet0/0/2 on SwitchA as the observing interface

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] observe-port 1 interface gigabitethernet 0/0/2

  2. Configure a Layer 2 ACL to match packets with the 802.1p priority of 6.

    # Create ACL 4001 (Layer 2 ACL) on SwitchA to match packets with the 802.1p priority of 6.

    [SwitchA] acl 4001
    [SwitchA-acl-L2-4001] rule permit 8021p 6
    [SwitchA-acl-L2-4001] quit

  3. Configure an ACL-based traffic policy.

    # Configure an ACL-based traffic policy on GigabitEthernet0/0/1 to mirror packets with the 802.1p priority of 6.

    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] traffic-mirror inbound acl 4001 to observe-port 1
    [SwitchA-GigabitEthernet0/0/1] quit
    [SwitchA] quit

  4. Verify the configuration.

    # Check the ACL-based traffic policy that has been applied to GigabitEthernet0/0/1 and the traffic behavior.

    <SwitchA> display traffic-applied interface gigabitethernet 0/0/1 inbound
    -----------------------------------------------------------
    ACL applied inbound interface GigabitEthernet0/0/1
    
    ACL 4001
     rule 5 permit 8021p 6
    ACTIONS:
     mirror to observe-port 1
    -----------------------------------------------------------

    The preceding information shows that the traffic behavior in the ACL-based traffic policy defines the action of mirroring packets with the 802.1p priority of 6 on GigabitEthernet0/0/1.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    observe-port 1 interface GigabitEthernet0/0/2
    #
    acl number 4001
     rule 5 permit 8021p 6
    #
    interface GigabitEthernet0/0/1
     traffic-mirror inbound acl 4001 to observe-port 1
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic