09-Network Management Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C Access Controllers Configuration Guides(E3703P61 R2509P61 R3709P61 R2609P61 R3509P61)-6W10209-Network Management Configuration Guide
07-Mirroring Configuration
Title Size Download
07-Mirroring Configuration 111.06 KB

Configuring port mirroring

Support for this feature depends on the device model. For more information, see About the H3C Access Controllers Configuration Guides.

Overview

Port mirroring copies packets passing through a port to a monitor port that is connected to a monitoring device for packet analysis.

Mirroring source

The mirroring source can be one or more monitored ports. The monitored ports are called source ports. The device where the mirroring sources reside is called a source device.

Packets passing through mirroring sources are copied to a port connecting to a data monitoring device for packet analysis. The copies are called mirrored packets.

Mirroring destination

The mirroring destination is the destination port (also known as the monitor port) of mirrored packets. It connects to the data monitoring device.

The device where the monitor port resides is called the destination device. The monitor port forwards mirrored packets to its connected monitoring device.

A monitor port might receive multiple copies of a packet when it monitors multiple mirroring sources. For example, two copies of a packet are received on Port 1 when the following conditions exist:

·     Port 1 is monitoring bidirectional traffic of Port 2 and Port 3 on the same device.

·     The packet travels from Port 2 to Port 3.

Mirroring direction

The mirroring direction specifies the direction of the traffic that is copied on a mirroring source.

·     Inbound—Copies packets received on a mirroring source.

·     Outbound—Copies packets sent out of a mirroring source.

·     Bidirectional—Copies packets both received on and sent out of a mirroring source.

Mirroring group

Port mirroring is implemented through mirroring groups. For more information about mirroring groups, see "Local port mirroring implementation."

Local port mirroring implementation

In local port mirroring, the following conditions exist:

·     The source device is directly connected to a data monitoring device.

·     The source device acts as the destination device to forward mirrored packets to the data monitoring device.

A local mirroring group is a mirroring group that contains the mirroring sources and the mirroring destination on the same device.

Figure 1 Local port mirroring implementation

 

As shown in Figure 1, configure local port mirroring to copy inbound packets on the source port Ethernet 1/1 to the monitor port Ethernet 1/2. Ethernet 1/2 then forwards the packets to the data monitoring device for analysis.

Configuring local port mirroring

Local port mirroring configuration task list

Local port mirroring takes effect only when the source ports and the monitor port are configured.

Complete these tasks to configure local port mirroring:

 

Task

Remarks

Creating a local mirroring group

Required.

Configuring source ports for the local mirroring group

Required.

Configuring the monitor port for the local mirroring group

Required.

 

Creating a local mirroring group

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Create a local mirroring group.

mirroring-group group-id local

No local mirroring group exists by default.

 

Configuring source ports for the local mirroring group

A mirroring group can contain multiple source ports.

To configure source ports for a local mirroring group, use one of the following methods:

·     Assign a list of source ports to the mirroring group in system view.

·     Assign a port to the mirroring group as a source port in interface view.

To assign multiple ports to the mirroring group as source ports in interface view, repeat the operation.

Configuring source ports for a local mirroring group in system view

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure source ports.

mirroring-group group-id mirroring-port mirroring-port-list { both | inbound | outbound }

By default, no source port is configured for a local mirroring group.

 

Configuring a source port for a local mirroring group in interface view

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure the current port as a source port.

[ mirroring-group group-id ] mirroring-port { both | inbound | outbound }

By default, a port does not serve as a source port for any local mirroring group.

 

Configuring the monitor port for the local mirroring group

To configure the monitor port for a mirroring group, use one of the following methods:

·     Configure the monitor port for the mirroring group in system view.

·     Assign a port to the mirroring group as the monitor port in interface view.

Configuration restrictions and guidelines

When you configure the monitor port for the local mirroring group, follow these restrictions and guidelines:

·     A mirroring group contains only one monitor port.

·     Use a monitor port only for port mirroring, so the data monitoring device receives and analyzes only the mirrored traffic.

Configuring the monitor port of a local mirroring group in system view

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure the monitor port.

mirroring-group group-id monitor-port monitor-port-id

By default, no monitor port is configured for a local mirroring group.

 

Configuring the monitor port of a local mirroring group in interface view

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure the current port as the monitor port.

[ mirroring-group group-id ] monitor-port

By default, a port does not serve as the monitor port for any local mirroring group.

 

Displaying and maintaining port mirroring

Task

Command

Remarks

Display mirroring group information.

display mirroring-group { group-id | all | local } [ | { begin | exclude | include } regular-expression ]

Available in any view.

 

Port mirroring configuration example

Network requirements

As shown in Figure 2, configure local port mirroring on the AC to enable the server to monitor the traffic of the IP network.

Figure 2 Network diagram

 

Configuring the AC

# Create local mirroring group 1.

<Sysname> system-view

[Sysname] mirroring-group 1 local

# Configure GigabitEthernet 1/0/1 as the mirroring port of the local mirroring group.

[Sysname] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both

# Configure GigabitEthernet 1/0/2 as the monitor port of the local mirroring group.

[Sysname] mirroring-group 1 monitor-port gigabitethernet 1/0/2

# Display the configuration of local mirroring group 1.

[Sysname] display mirroring-group 1

mirroring-group 1:

    type: local

    status: active

    mirroring port:

        GigabitEthernet1/0/1  both

    monitor port: GigabitEthernet1/0/2

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网