Friday, October 23, 2015

An Introduction to Port Mirroring in Broadcom Switches

Port Mirroring:
                Port mirroring is a way to redirect a copy of packets coming to (ingress) or going out (egress) of a port to another port. It will be helpful to analyze the correctness/content of a packet and it can be used as a best debugging method.

Example:
Consider the below scenario.




        In the above topology, two networks are connected via a router. Now, if we want to capture the traffic that flows between these two networks without disturbing the connections, then port mirroring will be helpful. Here we can mirror the traffic of either Port 1 or Port 3 to Port2. So we can analyze the traffic content without disturbing the topology.

Port Mirroring commands in BCM:

                The below commands are used to enable the port mirroring functionality in Broadcom switches.


S.No Command Purpose
1 mirror mode=l2 port=x This command will do mirroring of all traffic from all ports to port "x". The mode can accept the value of l2 or l3.
2 mirror mode=l2 port=x IngressBitMap=y All the incoming packets to port “y” will be mirrored to port “x”. It is not necessary that both port “x” & “y” to be in the same VLAN.
3 mirror mode=l2 port=x EgressBitMap=y All packets going out of port “y” will be mirrored to port “x”.
4 mir It will display the current port mirror settings.
5 help mirror It will display the help on the port mirroring commands

No comments:

Post a Comment