OpenWrt Forum Archive

Topic: swconfig AR9331 port mirroring support

The content of this topic has been archived on 17 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,
I'd like to configure port mirroring in a small TL-WR740N in which I've installed CHAOS CALMER (15.05, r46767).
It uses an AR9331 and according the datasheet, this part seems to support the mirroring function. But "swconfig" seems not support this port option.
I browsed a bit and I haven't found a solution. I found (https://dev.openwrt.org/ticket/10202) that someone had the same problem -with a rtl8366rb device- and cooked its solution.
It seems it could be easy (?) do the same for the AR9331, but, frankly, it is a bit beyond my coding magic skills.
Well, if someone could tackle this issue it would be great... I think that port mirroring its an always interesting function :-)
Thank you and regards
Josep

(Last edited by jmarro on 5 Jul 2016, 09:40)

I think you can configure this feature by writing related registers directly.  from the datasheet,  address 0x0078 is the mirror port settting. 7:4 --- mirror port num.  set the port you want to mirror. (It only support LAN port's mirror, 0 ~ 3).
Step2: enable ingress/egress on port control register. port 0, 0x0104.

The discussion might have continued from here.