Port Mirroring

Hi

10PC’s LANed up (using 2 desktop switches) to an ADSL Modem / Router

Is it possible / advisable to connect these PC’s to ether2 on my RB750GL, mirror that port to ether5, then connect a pc running bandwidthd to ether5 to gather bandwidth usage for all 10 of my pc’s?

If so how can I go about doing this in Winbox?

Step by step instructions not assuming I know what Im doing very much appreciated.

Thanks

opening a terminal and entering

/interface ethernet switch set numbers=0 mirror-source=ether2 mirror-target=ether5

seems to be working

Is it possible to mirror more than one port?

ie to mirror ports 2,3,4 to target port 5?

Hi

Sorry for reposting but have been unable to work out if this is do-able or not on my own.

Is it possible to mirror ports 2,3,4 to target port 5?

If so how?

I’m trying to send all traffic passing through my router to a collector. (pmacct)

Thanks

Hi, I would like an answer on this too. I have the same requirement !!

Though this thread is rather old I stumbled upon it a couple of times. Therefore I’d like to reply anyway. :wink:

Mirroring of multiple ports to a single destination port still (as of ROS 6.3rc1) does not seem to be supported. But take your initial question and situation and you see it would not make sense anyway. You are asking if it is possible to mirror several 1Gbps ports to a single 1Gpbs port. As soon as the accumulated bandwidth of the desired ports exceeds 1Gbps information will get lost.

Also keep in mind that a 1Gbps source port can have up to 2Gbps traffic (bi-directional). But you cannot transmit more than 1Gbps out of your mirror destination port. So there’s also going to be some packet loss happening.

We’re also using pmacct on a server to gather statistics about our customers bandwidth usage. As long as we don’t have a router with 10G ports we’re streaming our traffic through a switch with 10G ports on which our pmacct server listens.

In case we get our core insfrastructure migrated to MT I’ll take a closer look at the RouterOS API. Maybe I’ll find an easier way to get the information we need (traffic stats per port / per vlan), instead of using brute force with pmacct.

It seems like mirroring the master port also mirrors traffic for the slave ports on a switch. So, if you set eth2 master for eth3, eth4 and then configure mirroring of eth2 to eth5 then eth5 will receive packets from 2, 3 and 4