317
Figure 89 Network diagram
Configuration procedure
# Create an IPv4 advanced ACL to match packets that are sourced from 192.168.56.1 0.
<SwitchA> system-view
[SwitchA] acl advanced 3000
[SwitchA-acl-ipv4-adv-3000] rule permit ip source 192.168.56.1 0
[SwitchA-acl-ipv4-adv-3000] quit
# Configure a traffic behavior to mirror traffic to the CPU.
[SwitchA] traffic behavior behavior1
[SwitchA-behavior-behavior1] mirror-to cpu
[SwitchA-behavior-behavior1] quit
# Configure a traffic class to use the ACL to match traffic.
[SwitchA] traffic classifier classifier1
[SwitchA-classifier-classifier1] if-match acl 3000
[SwitchA-classifier-classifier1] quit
# Associate the traffic class with the traffic behavior in a QoS policy.
[SwitchA] qos policy user1
[SwitchA-qospolicy-user1] classifier classifier1 behavior behavior1
[SwitchA-qospolicy-user1] quit
# Apply the QoS policy to the incoming traffic of GigabitEthernet 1/0/1.
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] qos apply policy user1 inbound
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] quit
# Capture incoming traffic on GigabitEthernet 1/0/1.
<SwitchA> packet-capture interface gigabitethernet 1/0/1
Capturing on 'Gigabitethernet1/0/1'
1 0.000000 192.168.56.1 -> 192.168.56.2 TCP 62 6325 > telnet [SYN] Seq=0 Win
=65535 Len=0 MSS=1460 SACK_PERM=1
2 0.000061 192.168.56.1 -> 192.168.56.2 TCP 60 6325 > telnet [ACK] Seq=1 Ack
=1 Win=65535 Len=0
3 0.024370 192.168.56.1 -> 192.168.56.2 TELNET 60 Telnet Data ...
4 0.024449 192.168.56.1 -> 192.168.56.2 TELNET 78 Telnet Data ...
5 0.025766 192.168.56.1 -> 192.168.56.2 TELNET 65 Telnet Data ...
6 0.035096 192.168.56.1 -> 192.168.56.2 TELNET 60 Telnet Data ...
7 0.047317 192.168.56.1 -> 192.168.56.2 TCP 60 6325 > telnet [ACK] Seq=42 Ac
k=434 Win=65102 Len=0
8 0.050994 192.168.56.1 -> 192.168.56.2 TCP 60 6325 > telnet [ACK] Seq=42 Ac
k=436 Win=65100 Len=0
9 0.052401 192.168.56.1 -> 192.168.56.2 TCP 60 6325 > telnet [ACK] Seq=42 Ac
k=438 Win=65098 Len=0
10 0.057736 192.168.56.1 -> 192.168.56.2 TCP 60 6325 > telnet [ACK] Seq=42 Ac
Network
Network
Switch A
GE1/0/1