Hi again
to have a way to better understand my set up I got my hands on a nice and very cheap USB to ethernet adapter.
Now my PC has got 2 nic cards one is connected to my minirouter 1st rj45 plug and the second to the 2nd
rj45 plug.
I connect my PC to the router using the 1st card (I add the ethernet card MAC address to the Connection
configuration to be sure to use that one)
As per my [Solved] Router-set-up advertising problem (but let's not discuss that here)
I need to ping a random device on the subnet from serial console to have my PC aware of the minirouter
but after that (help please !!??) I am able to ssh to the router and I have access to Luci.
Now using these three lines from console on my 2 physical port router where swconfig shows 5 port entries
swconfig dev eth0 set mirror_monitor_port '5'
swconfig dev eth0 port '1' set enable_mirror_rx '1'
swconfig dev eth0 port '1' set enable_mirror_tx '1'
I get
Global attributes:
enable_vlan: 0
mirror_monitor_port: 5
Port 0:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
enable_mirror_rx: 1
enable_mirror_tx: 1
pvid: 0
link: port:1 link:up speed:100baseT full-duplex auto
Port 2:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:2 link:down
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
Port 5:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:5 link:up speed:100baseT full-duplex auto
VLAN 0:
vid: 0
ports: 0 1 2 3 4 5
Opening up two wireshark instances on my PC
-1st using 1st card connected to router in promiscuous mode port 1
-2nd using 2nd card connected to router in promiscuous mode port 5 (THE MONITOR PORT)
Everything works nicely !!!!
1st Wireshark istance sees traffic from 192.168.1.1 to 192.168.1.2
and from 192.168.1.2 to 192.168.1.1
2nd Wireshark istances THE MONITOR PORT sees traffic from 192.168.1.1 to 192.168.1.2
and from 192.168.1.2 to 192.168.1.1
if I type on router console
swconfig dev eth0 port '1' set enable_mirror_tx '0'
1st Wireshark istance sees traffic from 192.168.1.1 to 192.168.1.2
and from 192.168.1.2 to 192.168.1.1
2nd Wireshark istances THE MONITOR PORT sees traffic from 192.168.1.2 to 192.168.1.1
and if I type
if I type on router console
swconfig dev eth0 port '1' set enable_mirror_tx '1'
swconfig dev eth0 port '1' set enable_mirror_rx '0'
1st Wireshark istance sees traffic from 192.168.1.1 to 192.168.1.2
and from 192.168.1.2 to 192.168.1.1
2nd Wiresharkistances THE MONITOR PORT sees traffic from 192.168.1.1 to 192.168.1.2
so apparently my set up doesnt need Vlan to enable port mirroring.
Problem remains because when I start Luci (I was monitoring packets relating to Luci itself)
I get
and if save and apply Luci switch config page I end up with
config switch 'eth0'
option name 'eth0'
option reset '1'
option enable_mirror_rx '1'
option enable_mirror_tx '1'
option mirror_monitor_port '5'
option mirror_source_port '0'
in my etc/config/network file
once again when I use etc/init.d/network reload
I loose my monitor port and swconfig dev eth0 shows:
Global attributes:
enable_vlan: 1
mirror_monitor_port: 5
Port 0:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:1 link:up speed:100baseT full-duplex auto
Port 2:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:2 link:down
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
Port 5:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:5 link:up speed:100baseT full-duplex auto
VLAN 0:
vid: 0
ports: 0 1 2 3 4 5
Any clue ?