Traffic usage by MAC address

Discussion in 'Sveasoft Firmware' started by Chazza, Dec 15, 2004.

  1. Chazza

    Chazza Network Guru Member


    Is it possible to see how much each computer (tracked by its unique MAC address) has downloaded/uploaded from the WAN since the router has been restarted?

    If this is not possible with the default Sveasoft firmware, is there any additional modules I can load in at startup which might assist in this?

    Ultimately I would like to have a cronjob run every hour or so which poststhe traffic usage to a PHP script on another web server which stores them permanently.
  2. macsat

    macsat Network Guru Member

    iptraf would do it in linux...


    iptraf can provide just that in linux - but I dont know if there is a iptraf for the WRT linux version - or if there is even enough space in the RAM for that app...

    Anyone ?
  3. Chazza

    Chazza Network Guru Member

    Re: iptraf would do it in linux...

    I was able to find iptraf for WRT54G on another site. I loaded it onto the router and when attempting to run it I get:

    (none):[~]# ./iptraf -g
    Error opening terminal: xterm.

    The help seems to work though which shows its compiled correctly for the WRT54G CPU:

    (none):[~]# ./iptraf -h
        iptraf [ -f ] [ { -i iface | -g | -d iface | -s iface | -z iface |
               -l iface } [ -t timeout ] [ -B [ -L logfile ] ] ]
    Issue the iptraf command with no parameters for menu-driven operation.
    These options can also be supplied to the command:
    -i iface    - start the IP traffic monitor (use "-i all" for all interfaces)
    -g          - start the general interface statistics
    -d iface    - start the detailed statistics facility on an interface
    -s iface    - start the TCP and UDP monitor on an interface
    -z iface    - shows the packet size counts on an interface
    -l iface    - start the LAN station monitor ("-l all" for all LAN interfaces)
    -B          - run in background (use only with one of the above parameters)
    -t timeout  - when used with one of the above parameters, tells
                  the facility to run only for the specified number of
                  minutes (timeout)
    -L logfile  - when used with -B, allows you to specify an alternate
                  log file.  The log is placed in /tmp/var/log/iptraf if a path is not
    -f          - Clear all locks and counters.  Use with great caution.
                  Normally used to recover from an abnormal termination.
  4. Chazza

    Chazza Network Guru Member

    OK. I got iptraf running by copying the xterm-color file and adding the folllowing:

    export TERM='xterm-color'
    export TERMINFO='/tmp/iptraf/etc/terminfo'

    However, I can't see how to get iptraf to give me a breakdown of Internet usage by MAC address. For the record only the eth0 (LAN) and loopback interfaces can be monitored by iptraf.
  5. macsat

    macsat Network Guru Member

    LAN Station Monitor

    If you go to "LAN Station monitor" and choose the LAN Interface, it should show you the LAN MAC's generating the traffic...
  6. Chazza

    Chazza Network Guru Member

    Looks like iptraf is a dead-end:

    a) All packets that are being captured have IP checksum errors. Looks like it's not reading the packets correctly.

    b) The LAN Station Monitor is not able to use filters (says so in the docu). Any internal LAN transfers will show up as traffic, which is not what I want.
  7. macsat

    macsat Network Guru Member


    That is a real shame :)

    Seemed to work for me a few years back, when I had a linuxbox as a router :)

    There must be alternatives though - anyone ?
  8. sergkkkk

    sergkkkk Network Guru Member

    Re: LAN Station Monitor

    Hi. I have WRT54G firmware Alchemy-6.0-RC1.w42 V2.04.4.8sv.
    How I can get LAN MAC's generating the traffic (octets/packets up/down) via SNMP?
    There must be another firmware?
    what is the OIDs?
    Where I can find SNMP Enterprise docs?

    It is very important for me. Thx.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice