Saturday, June 6, 2015

Huawei - Switch: Local Port Mirroring (aka SPAN)

How to Configure Local Port Mirroring?

As shown in Figure 1, HostA is connected to GigabitEthernet0/0/1 on SwitchA, and Server is directly connected to GigabitEthernet0/0/2 on SwitchA.

Users want to use the monitoring device (Server) to monitor packets sent from HostA.

networking-diagram-of-local-port-mirroring

Figure 1 Networking diagram of local port mirroring

Note: e example can be applied to Huawei Switches (like Huawei S2700, Huawei S3700 switches and Quidway S5700, etc )

 

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure GigabitEthernet0/0/2 on SwitchA as the local observing port so that Server can receive mirrored packets.
  2. Configure GigabitEthernet0/0/1 on SwitchA as the mirrored port to monitor packets passing through the mirrored port.

Procedure

  1. Configure an observing port.

# Configure GigabitEthernet0/0/2 on SwitchA as the local observing port.

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

  1. Configure a mirrored port.

# Configure GigabitEthernet0/0/1 on SwitchA as the mirrored port to monitor packets sent from HostA.

[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port-mirroring to observe-port 1 inbound
[SwitchA-GigabitEthernet0/0/1] return

  1. Verify the configurations.

# Check the observing port configuration.

<SwitchA> display observe-port

———————————————————————-
Index         : 1
Untag-packet   : No
Interface     : GigabitEthernet0/0/2
———————————————————————-


# Check the mirrored port configuration.

<SwitchA> display port-mirroring
———————————————————————-
Observe-port 1 : GigabitEthernet0/0/2
———————————————————————-
Port-mirror:
———————————————————————-
Mirror-port               Direction Observe-port
———————————————————————-
1   GigabitEthernet0/0/1     Inbound   Observe-port 1
———————————————————————-

 

Configuration File

# Configuration file of SwitchA

sysname SwitchA
#
observe-port 1 interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/1
port-mirroring to observe-port 1 inbound
#
return

The more information about technical support you can consult with our engineer the e-mail address is as below:

support@huanetwork.com

Taken From: http://www.huanetwork.com/blog/how-to-configure-local-port-mirroring/

No comments: