Port-mirroring on AR750 running gl-ar750-3.010 doesn't work

Hello,
I configured port-mirroring by LuCI to mirror one LAN to eth1 on CPU. However it doesn’t work. No data captured by tcpdump. Is this known issue ?

BTW, I downloaded QCA9531 datasheet, I want to check if port-mirror related registers set to correct value.
As there’s no /dev/mem, busybox devmem doesn’t work. So I wonder is there a tool on your router to check register values from userspace ?
Really appreciate if this can be resolved.

It seems mirror port doesn’t work correctly in Luci. You have to ssh to the router, and set it on command line.

root@GL-AR750:/# swconfig dev switch0 set mirror_monitor_port 2
root@GL-AR750:/# swconfig dev switch0 port 1 set enable_mirror_rx 1
root@GL-AR750:/# swconfig dev switch0 port 1 set enable_mirror_tx 1

swconfig dev switch0 show.

root@GL-AR750:~# swconfig dev switch0 show
Global attributes:
	enable_vlan: 1
	mirror_monitor_port: 2
Port 0:
	enable_mirror_rx: 0
	enable_mirror_tx: 0
	pvid: 1
	link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 
Port 1:
	enable_mirror_rx: 1
	enable_mirror_tx: 1
	pvid: 1
	link: port:1 link:up speed:100baseT full-duplex auto
Port 2:
	enable_mirror_rx: 0
	enable_mirror_tx: 0
	pvid: 1
	link: port:2 link:up speed:100baseT full-duplex auto
Port 3:
	enable_mirror_rx: 0
	enable_mirror_tx: 0
	pvid: 0
	link: port:3 link:down
Port 4:
	enable_mirror_rx: 0
	enable_mirror_tx: 0
	pvid: 0
	link: port:4 link:down
VLAN 0:
	vid: 0
	ports: 3 4 
VLAN 1:
	vid: 1
	ports: 0t 1 2 

The device’s middle port is port 1, another LAN port is port 2.

mirror_monitor_port option is equal with Luci’s mirror_src_port option.

Note that the configuration will lose if network restart.

Thank you very much !
It’s working on my router.

I have AR750S, I got:

root@GL-AR750S:~# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        ar8xxx_mib_poll_interval: 0
        ar8xxx_mib_type: 0
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 2
        mirror_source_port: 0
        arl_age_time: 300
        arl_table: address resolution table
Port 0: MAC 94:83:c4:1d:b1:94
Port 1: MAC 00:07:32:9e:5a:e7
Port 2: MAC 00:26:b9:a5:d3:21
Port 3: MAC 00:1c:c2:52:4d:79

        igmp_snooping: 0
        igmp_v3: 0
Port 0:
        mib: ???
        enable_eee: ???
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 1
        link: port:1 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 2:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 1
        link: port:2 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 3:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 1
        link: port:3 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 4:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:4 link:down
Port 5:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        mib: ???
        enable_eee: ???
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:6 link:up speed:10baseT half-duplex
VLAN 1:
        vid: 1
        ports: 0t 1 2 3
VLAN 2:
        vid: 2
        ports: 0t

The “swconfig dev switch0 set mirror_monitor_port 2” is okay, but I got

root@GL-AR750S:~#  swconfig dev switch0 port 3 set enable_mirror_rx 1
Unknown attribute "enable_mirror_rx"

Is there a way to make port mirroring work on AR750S?

I found the answer by myself, the command sequence is:

root@GL-AR750S:~#  swconfig dev switch0 set mirror_monitor_port 2
root@GL-AR750S:~#  swconfig dev switch0 set mirror_source_port 3
root@GL-AR750S:~#  swconfig dev switch0 set enable_mirror_rx 1
root@GL-AR750S:~#  swconfig dev switch0 set enable_mirror_tx 1

Here is the swconfig show, I set mirror_monitor_port 2 to use port 2 as monitor port and mirror_source_port 3 to set port 3 to be mirrored from.

root@GL-AR750S:~# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        ar8xxx_mib_poll_interval: 0
        ar8xxx_mib_type: 0
        enable_mirror_rx: 1
        enable_mirror_tx: 1
        mirror_monitor_port: 2
        mirror_source_port: 3
        arl_age_time: 300
        arl_table: address resolution table
Port 0: MAC 94:83:c4:1d:b1:94
Port 1: MAC 00:07:32:9e:5a:e7
Port 2: MAC 00:26:b9:a5:d3:21
Port 3: MAC 00:1c:c2:52:4d:79

        igmp_snooping: 0
        igmp_v3: 0
Port 0:
        mib: ???
        enable_eee: ???
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 1
        link: port:1 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 2:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 1
        link: port:2 link:up speed:100baseT full-duplex txflow rxflow auto
Port 3:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 1
        link: port:3 link:up speed:1000baseT full-duplex txflow rxflow auto
Port 4:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:4 link:down
Port 5:
        mib: ???
        enable_eee: 0
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        mib: ???
        enable_eee: ???
        igmp_snooping: 0
        vlan_prio: 0
        pvid: 0
        link: port:6 link:up speed:10baseT half-duplex
VLAN 1:
        vid: 1
        ports: 0t 1 2 3
VLAN 2:
        vid: 2
        ports: 0t