Go Down

Topic: Building an Ethernet bandwidth monitor - Suggestio (Read 3 times) previous topic - next topic

Luca

Hi
I am thinking about building a device that I would connect on the LAN side of my Broadband router (right behind the cable modem) to constantly monitor the bandwidth used and display a graph on a display.

The TouchShield from liquidware looks like a good choice for displaying the graph.
The problem I have is how to perform the acquisition of traffic on the Ethernet connection.
It is important to understand that the device should not need an IP address and should not really communicate with any other device on the network. The Ethernet interface would act more like a probe to read packets going through the cable in a similar way as a you would do in Linux setting the interface in promiscuous mode.

Please also note that I don't want to do real packet sniffing (not enough processing power) but simply do a packet count or even better do a frame count at layer 2.
I think the real issue is to find an Ethernet device that provides traffic information instead of counting packets inside the Arduino.
Another simpler way would be to build a device that queries my router on the network using SNMP and then displays a graph but the negative side of this implementation is that it would be product-specific and I would need a router that supports SNMP.

Any suggestion is really appreciated.

Thanks
 

Mark S

Yes this can be done. I recommend that you use the Arduino Ethernet Sheild (wiznet chip) or the adafruit one with the wiznet chip. Go to the wiznet web site and look at their sample code. They have samples that will let you get to layer 2 and bypass layer 3.  I have a large project that will be doing extensive use of layer 2 (i.e. implementing a protocol that is not TCP or UDP). I have looked at the sample code enough to know that it can be done.  What I am going to build will have what you are looking to do as one of the many options.

Let me know how you make out and we can help each other.

If you cant find the sample code on the wiznet site, let me know and I will go find the link again.

Mark

westfw

You may also be able to monitor packet traffic using analog electronics without any ethernet controller at all.  Each packet is a burst of AC "noise" on some set of signal wires, so the total amount of traffic is (to some approximation) a measure of how much/often noise is happening on those wires...

kg4wsv

Even cheap routers provide a switch, not a hub, so unless you have the ability to force the switch to mirror traffic you will only see packets addressed to your node and broadcasts; you will not see traffic addressed to other nodes.

-j


Tim Stamp

I'd find this a very useful device to connect between my ethernet gateway and the wall outlet - it could easily show (through LED-bargraph or LCD) when the connection is heavily loaded, and perhaps act as a warning device if the activity is suspiciously high for some reason.

Go Up