Configuring Port Mirroring

Chips mirror actions:

PRONTO3290 PRONTO3296 PRONTO3295(TR2)(egress mirror=true)
PRONTO3780 PRONTO3920 PRONTO3922 PRONTO3930 PRONTO3960 PRONTO3965 PRONTO3980 PRONTO3920 PRONTO3924(TD)
 
ES4654 AS4610_54P AS4610_54T AS4610_30P AS4610_30T(Helix4)(egress mirror=true)
 PRONTO5101 PRONTO5401 AS6701_32X N2632XL N2948_6XL AS6712_32X AS5712_54X S4048 ARCTICA4806XP(TD2)
 
AS5812_54T AS5812_54X(TD2P)
 DCS7032Q28 AS7712_32X Z9100 (TH)

Note:Egress mirror only works well on the platforms which egress mirror is true(eg:3290(Firebolt3),3296(Triumph2),4610 (helix4)).Otherwise the behaviour of egress mirror is uncertain.

The behaviour of egress mirror port should be the consistent to the output port.eg:port2 is the egress port,and port 3 is the mirror port(mirror the dst traffic of port 2).If the switch support egress mirror(egress mirror is true),then the packets of port 2 are tagged packets,then traffic of port 3 are also tagged packets.

Configuration Examples

The following examples show how to configure the port mirroring feature.

admin@PicOS-OVS$ovs-vsctl -- set bridge br0 mirrors=@m -- --id=@te-1/1/1 get Port te-1/1/1 -- --id=@te-1/1/2 get Port te-1/1/2 -- --id=@te-1/1/3 get Port te-1/1/3 -- --id=@m create Mirror name=mymirror select-dst-port=@te-1/1/1,@te-1/1/2 select-src-port=@te-1/1/1,@te-1/1/2 output-port=@te-1/1/3
admin@PicOS-OVS$


The configuration above includes ports te-1/1/1, te-1/1/2 and te-1/1/3. The source ports are te-1/1/1 and te-1/1/2 (including ingress and egress), and the output port (monitor port) is te-1/1/3.

The "select-dst-port" means some packets (in switch chip) will go-out from the specified port (egress).

The "select-src-port" means some packets will enter the specified port (ingress).

 

PicOS can support multiple mirrors, but some limitations exist. 

1. Only has one output port, at this time the specified port can be configure multiple ways..

2. If configure different output ports, the max monitor port at most is 4.

3, Before PicOS2.10 ovs only support configure physical port as output_port, from PicOS2.10 ovs also support lag interface as output_port.

 

The command set 2 mirrors, m1 and m2:

admin@PicOS-OVS$ovs-vsctl -- set bridge br0 mirrors=@m1,@m2 -- --id=@te-1/1/11 get Port te-1/1/11 -- --id=@te-1/1/13 get Port te-1/1/13 -- --id=@te-1/1/14 get Port te-1/1/14 -- --id=@m1 create Mirror name=mymirror1 select-src-port=@te-1/1/11 output-port=@te-1/1/13 -- --id=@m2 create Mirror name=mymirror2 select-src-port=@te-1/1/11 output-port=@te-1/1/14 

The command add 2 new mirrors, m3 and m4:

admin@PicOS-OVS$ovs-vsctl add bridge br0 mirrors @m3,@m4 -- --id=@te-1/1/11 get Port te-1/1/11 -- --id=@te-1/1/12 get Port te-1/1/12 -- --id=@te-1/1/16 get Port te-1/1/16 -- --id=@m3 create Mirror name=mymirror3 select-dst-port=@te-1/1/11 output-port=@te-1/1/12 -- --id=@m4 create Mirror name=mymirror4 select-dst-port=@te-1/1/11 output-port=@te-1/1/16 

 

Deleting the Mirroring

root@PicOS-OVS# ovs-vsctl clear Bridge br0 mirrors

limitations for tomahawk

For tomahawk chip,do not support mirror ingress dirction and egress direction for the same port.

Copyright © 2024 Pica8 Inc. All Rights Reserved.