Monitoring and Analyzing Switch Operation

Traffic Mirroring

b.Configure a classifier-based mirroring policy to select inbound TCP traffic destined to the server at 10.10.30.153, and apply the policy to a VLAN interface for VLAN 20.

Because the remote session has mirroring sources on different switches, you can use the same session number (1) for both sessions.

The configuration of remote-mirroring session 1 on Switch B is the same as on Switch A (figure B-52), except for the difference in source VLAN and source IP address. Note that on different switches, the UDP port number (9300) can be the

Switch-B(config)# mirror 1 remote ip 10.10.20.145 9300 10.10.30.2 Caution: Please configure destination switch first.

Do you want to continue [y/n]? y Switch-B(config)# class ipv4 tcp7 Switch-B(class-config)# match tcp any 10.10.30.153 Switch-B(class-config)# match tcp any host 10.10.20.153/24 Switch-B(class-config)# match tcp any any eq 80 Switch-B(class-config)# exit

Switch-B(config)# policy mirror mirrorTCP Switch-B(policy-config)# class ipv4 tcp7 mirror 1 Switch-B(policy-config)# exit

Switch-B(config)# vlan 20 service-policy mirrorTCP inFigure B-53. Configuring a Classifier-Based Policy on Source Switch BExample: Remote Mirroring Using Traffic-Direction Criteria

In the network shown in Figure B-54, the administrator connects another traffic analyzer to port B10 (in VLAN 40) on switch C to monitor all traffic entering Switch A on port C12. For this mirroring configuration, the adminis­ trator configures a mirroring destination (with a remote exit port of B10) on switch C, and a remote mirroring session on Switch A.

If the mirroring configuration in the proceeding example is enabled, it is necessary to use a different session number (2) and UDP port number (9400). (The IP address of the remote exit port [10.10.40.7] connected to traffic analyzer 2 [exit port B10] can belong to a different VLAN than the destination IP address of the VLAN used to reach remote switch C [10.20.40.1]).

B-90