RB5009 Mirror Port

Hello MikroTik community,

I’m trying to set up port mirroring on my RB5009 and would like to verify if my current configuration is correct. My goal is to mirror traffic from ether5 to ether6.

Here’s my current configuration:

[/interface ethernet switch port
set 4 mirror-egress=yes mirror-ingress=yes mirror-ingress-target=ether6

/interface ethernet switch
set 0 mirror-egress-target=ether5

Any guidance or corrections would be greatly appreciated.
System Information:

Device: RB5009
RouterOS: 7.16.1

Thank you in advance!

On my RB5009 I se the mirror-egress-target to the port that the mirrored traffic is to be egressed on.
try

/interface ethernet switch
set 0 mirror-egress-target=ether6

Thanks for the suggestion peternz. I’ve tried setting the mirror-egress-target to ether6 as you mentioned, but I’m still not seeing any mirrored traffic when monitoring ether6.

To provide more context, could someone help confirm if I need to:

  1. Configure a mirror source port or source-ports as well?
  2. Enable any additional switch mirror settings?
  3. Verify if the switch chip on RB5009 has any specific requirements for port mirroring?

Here’s my current config:
/interface ethernet switch
set 0 mirror-egress-target=ether6

When I monitor ether6, I see zero packets/bits in both directions:
interface/monitor-traffic ether6
name: ether6
rx-packets-per-second: 0
rx-bits-per-second: 0bps
fp-rx-packets-per-second: 0
fp-rx-bits-per-second: 0bps
tx-packets-per-second: 0
tx-bits-per-second: 0bps
fp-tx-packets-per-second: 0
fp-tx-bits-per-second: 0bps
tx-queue-drops-per-second: 0

Any additional troubleshooting steps would be appreciated.

Don’t you need to set “mirror-source” as well, so it knows which port to mirror to ether6?

I tried it on my RB5009 running v7.15.2 and was mirroring port 2 to port 7. Here is the config which is basically the same as yours:

/interface ethernet switch port
set 1 mirror-egress=yes mirror-ingress=yes mirror-ingress-target=ether7
/interface ethernet switch
set 0 cpu-flow-control=no mirror-egress-target=ether7

When you make ether7 active by plugging it into another device, you will see the TX packet count matching the port being mirrored. It won’t show any statistics if the target port doesn’t have anything plugged into it.

Hope that helps,

i think it works, because TX show traffic but RX no traffic. thanks for helping