Bandwidth meter based on MAC address - is it possible??

5 posts / 0 new
Last post
jj66
jj66's picture
Bandwidth meter based on MAC address - is it possible??

Hello everyone, I'm new to this site and to third party firmware at all. Recently I bought a Netgear WNR3500L v2 router. My question is wether is possible to get information about bandwidth usage of each device connected to the router and what firmware will be the most suitable in order to do it i.e. tomato, DD-WRT or some other. In addition, the information needs to be based on MAC address as every time I connect wireless device the router gives dynamic IP address to it. Can PLEASE any one help me with that and is that acctually possible?

Thank you in advance.

Ole Juul
Ole Juul's picture
That's exactly why using

That's exactly why using dynamic IP addressing is a problem. I never use it because it is just a drag. Not even just wireless, but when I plug in a wired computer that I haven't used for a year and want to ftp into it, I know what the address is. In fact I just use the name that I gave it.

The trick is to put a hosts file on your router. I use a USB flash drive for that. Everything then has a name (or two) and a fixed IP address. The bandwidth usage works perfectly that way. Of course if you have a lot of guests, you will probably have to use dynamic, though in my case I work around that problem by chaining an extra router to use as an access point for dynamically allocated wireless and then everything that happens on that AP can be monitored separately.

I am using Shibby 105-AIO on a WNR3500Lv2.

jj66
jj66's picture
Thank you for the replay, but

Thank you for the replay, but can you please explain in details how do you put the host file into the router. I just started to deal with this things and need more in detail explanation (sorry for that ). Also I didn't get the point with the two routers that you are using (what model is the second one, how do you connect them both etc. )

I'm also using Tomato by Shibby 105-AIO on a WNR3500Lv2
Thank you

Ole Juul
Ole Juul's picture
I assume you know how the

I assume you know how the hosts file works - a line by line list of addresses correlated with the names you wish to give them. And of course you can also direct some names to 127.0.0.1 if you wish to block some - or elsewhere is you want to redirect. The advantage of putting this file on your router (it normally lives in /etc) is that it will then apply to all computers connecting to your lan and you will then also have a local domain name lookup without having to implement a DNS server, which is generally overkill on a small lan.

So, here's a more detailed explanation of how you do that. First, make sure you know how the file works and that it has the parts that must be there. You can look at your computer which will have that in its hosts file already. After making the file look like the way you want, you can use FTP to put it on your router. There is an FTP server in shibby which you can enable. I'll explain the rest with the assumption that you are using shibby, but I suspect that the other firmware versions for this router will have roughly the same capability.

Under advanced -> DHCP/DNS
Check these boxes:
- Use internal DNS
- Prevent DNS rebind attacks
- Intercept DNS port (UDP 53)

Then, under "Dnsmasw Custom configuration" simply provided the path to my new hosts file which you will have put on the USB flash drive already. This is what you put in that box, but make sure that the directory is what you actually have:

local-ttl=1
addn-hosts=/mnt/directory/hosts

Both forward and reverse name lookups will now work.

By the way, I understand that you can also assign host names in Tomato, but I haven't tried doing it this way. Click on "Basic" then on "Static DHCP", and enter your IP addresses and corresponding host names there. I'm not sure if you get both forward and reverse lookups this way. I did it the way I mentioned above because it is the old familiar UNIX way. I like to keep things conservative and simple.

Regarding the two routers:
I find it handy to use numerous routers. Old Linksys WRT54G routers can run Tomato and can be gotten for ten bucks these days, so it is not much expense to add extra access points. Note that it is important to only purchase specific version numbers of those particular routers because of the varying ram put in by the manufacturer. Anyway, you configure the extra router(s) to have a different IP than your gateway router. This extra box can, of course, also give you some extra holes so you may not need to use a switch for all those extra computers or printers etc. which we all seem to accumulate these days. There is really nothing to this setup. I mentioned it only because in your case it will give you a separate IP for a wireless AP which you can then monitor. Perhaps what you need to know is that the easiest way to do this is to not use the extra router to route, and just use the 4 inputs of the switch section. In other words, just don't use the WAN jack.

PS: I'm sorry that I'm not answering your original question about using MAC addresses for monitoring bandwidth. There may well be a simple answer to that, but I don't know what it is. I'm just detailing what I find to be a good setup which also allows me to do traffic monitoring on specific computers and/or parts of the lan.

PPS: Please forgive my lack of proper formatting. :) Although I'm comfortable with HTML code, I'm afraid to play around with this very odd and quirky forum software, lest I get banned like before.

Al Caughey
Al Caughey's picture
Hi - Al here.  I've written a

Hi - Al here.  I've written a script - called YAMon - that generates web-based reports showing usage for every device connected to your network with data tallied by hour, day and month.  You can organize the devices into arbitrary groups (e.g., by family member, roommate or tennant, by device function or location).  YAMon runs on DD-WRT, OpenWRT, AsusWRT, Shibby Tomato, etc.

The v3 release now captures IPv6 traffic and includes a setup script that streamlines the initial configuration steps.  The latest version can be found at http://usage-monitoring.com/download.php.

Al