Counting over a bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a router with:

- A WAN interface
- A bridge interface containing
  * The Ethernet switch interface
  * The 2 GHz WLAN interface
  * The 5 GHz WLAN interface

And I would like to count the number of bytes/packets:
- Going out through the WAN interface
  * Which originated from the Ethernet switch
  * Which originated from the 2 GHz WLAN interface
  * Which originated from the 5 GHz WLAN interface
  * Which originated from the device itself

- Arriving through the WAN interface
  * And going out through the Ethernet switch
  * And going out through the 2 GHz WLAN interface
  * And going out through the 5 GHz WLAN interface
  * And going to the device itself

I don't want to count the bytes/packets originating from the device
and going through the bridge, going from one WLAN interface to another
or anything else.

I am finding it problematic since, for example, the inet/forwarding
hook knows that a packet came from the bridge interface (e.g. br-lan)
but it doesn't know if it originated in the Ethernet (e.g. eth0) or
some WLAN interface (e.g. wlan0).

Before investing too much time in whatever solution I come with I
would like to know if there is any specific known "correct" way to
handle this problem.

Thanks!



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux