Problem with port mirroring

Hi,

Just i want to copy wan traffic(pppoe-wan) to Physical port 04.
Physical port 04 connected to "security onion" monitoring port(this port haven't an ip adress, promiscuous mode on).
I searched forum and google, just i see ip based traffic mirror.
I created a vlan eth0.3 for physical port 04 and tagged.
OpenWRT port-mirroring package not working.

Device : ZyXEL P-2812HNU-F1 (xRX200 rev 1.1) / OpenWrt 19.07.2 r10947-65030d81f3
I've been researching for 4 days. I couldn't find a solution.

Thanks.

If they belong to the same switch you can configure it in the switch section in Luci or in /etc/config/network
https://openwrt.org/docs/guide-user/base-system/basic-networking?s[]=mirror#switch_configuration

Thanks trendy,
Wan connecting with vdsl(no physical port).
ifconfig like this. How can i select vdsl port?

root@HAL9000:~# ifconfig
br-lan    Link encap:Ethernet  HWaddr AA:AA:AA:AA:68:5E
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34650 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5165613 (4.9 MiB)  TX bytes:41763520 (39.8 MiB)

dsl0      Link encap:Ethernet  HWaddr AA:AA:AA:AA:68:5F
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41787 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30124 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:41310849 (39.3 MiB)  TX bytes:4591274 (4.3 MiB)

dsl0.35   Link encap:Ethernet  HWaddr AA:AA:AA:AA:68:5F
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41787 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30117 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:40558683 (38.6 MiB)  TX bytes:4439038 (4.2 MiB)

eth0      Link encap:Ethernet  HWaddr AA:AA:AA:AA:AA:55
          inet6 addr: fe80::211:22ff:fe33:4455/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34658 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41443 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6067241 (5.7 MiB)  TX bytes:42110998 (40.1 MiB)

eth0.1    Link encap:Ethernet  HWaddr AA:AA:AA:AA:68:5E
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34650 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5165613 (4.9 MiB)  TX bytes:41763520 (39.8 MiB)

eth0.3    Link encap:Ethernet  HWaddr AA:AA:AA:AA:AA:55
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:306 (306.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:654 errors:0 dropped:0 overruns:0 frame:0
          TX packets:654 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:56931 (55.5 KiB)  TX bytes:56931 (55.5 KiB)

pppoe-wan Link encap:Point-to-Point Protocol
          inet addr:88.88.88.89  P-t-P:87.87.87.10  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:40591 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28918 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:40183660 (38.3 MiB)  TX bytes:3766546 (3.5 MiB)
root@HAL9000:~#

root@HAL9000:~# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
Port 0:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:0 link:up speed:100baseT full-duplex auto
Port 1:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:1 link:down
Port 2:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:2 link:up speed:1000baseT full-duplex auto
Port 3:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:3 link:down
Port 4:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:4 link:up speed:1000baseT full-duplex auto
Port 5:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 2
        link: port:5 link:down
Port 6:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:6 link:up speed:1000baseT full-duplex auto
VLAN 1:
        vid: 1
        enable: 1
        ports: 0 1 2 6t
VLAN 2:
        vid: 2
        enable: 1
        ports: 5 6t
VLAN 3:
        vid: 3
        enable: 1
        ports: 4t 6t
root@HAL9000:~#

They don't belong to the same switch. Furthermore your switch is not capable of port mirroring (only vlan is available in global attributes).

1 Like