6-2Displaying and Maintaining Traffic MirroringTo do… Use the command… RemarksDisplay the configuration informationabout the user-defined traffic behaviordisplay traffic behavioruser-defined behavior-nameDisplay the configuration informationabout the user-defined policydisplay qos policy user-definedpolicy-nameAvailable in anyviewTraffic Mirroring Configuration ExampleNetwork RequirementsThe user's network is as described below:z Host A (with the IP address 192.168.0.1) and Host B are connected to GigabitEthernet1/0/1 of theswitch.z The data monitoring device is connected to GigabitEthernet1/0/2 of the switch.It is required to monitor and analyze packets sent by Host A on the data monitoring device.Figure 6-1 Network diagram for configuring traffic mirroring to a portConfiguration ProcedureConfigure Switch:# Enter system view. system-view# Configure basic IPv4 ACL 2000 to match packets with the source IP address 192.168.0.1.[Sysname] acl number 2000[Sysname-acl-basic-2000] rule permit source 192.168.0.1 0[Sysname-acl-basic-2000] quit# Configure a traffic classification rule to use ACL 2000 for traffic classification.[Sysname] traffic classifier 1[Sysname-classifier-1] if-match acl 2000[Sysname-classifier-1] quit# Configure a traffic behavior and define the action of mirroring traffic to GigabitEthernet1/0/2 in thetraffic behavior.[Sysname] traffic behavior 1[Sysname-behavior-1] mirror-to interface GigabitEthernet 1/0/2