Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    bandwidthd and vlans

    Scheduled Pinned Locked Moved Traffic Monitoring
    6 Posts 2 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chrcoluk
      last edited by chrcoluk

      I am switching away from the "total traffic" package after I discovered its feeding me bogus data.

      I also decided I want to tally the usage across devices within my network so monitoring the LAN side.

      The issue is I have 2 VLAN's and I can only choose one of them for bandwidthd.

      The solution seems simple but noone has implemented it, but am I right in thinking I simply need to run multiple instances of bandwidthd, so one for each vlan and problem solved?

      pfSense CE 2.8.0

      1 Reply Last reply Reply Quote 0
      • P
        pwnell
        last edited by

        Pardon the digression but why did you feel the "total traffic" package (vnstat) is feeding you incorrect data? I am curious as I also want an accurate, reliable measure and assumed vnstat is pretty good.

        1 Reply Last reply Reply Quote 0
        • C
          chrcoluk
          last edited by chrcoluk

          There is 2 issues.

          The data for the interfaces is 100% mirror of each other so e.g.

          Wan 50gig inbound
          Lan 50gig inbound
          VPN (sitting idle) 50 gig inbound

          and so on, obviously thats wrong.

          The second issue is the figures are greatly inflated as if some kind of multiplier is been applied to the values.

          Also the figures dont match up from figures displayed by counters from the OS. I compared to counters from PF, and kernel drivers.

          I now also have bandwidthd as a source, and that whilst I dont believe is 100% accurate looks at least close to reality and is nowhere near the figures from vnstat.

          I dont know what vnstat is doing on my pfsense unit but its not working as it should.

          pfSense CE 2.8.0

          1 Reply Last reply Reply Quote 0
          • P
            pwnell
            last edited by

            One thing I noticed is that if vnstat does not have a DB for an interface it will appear to show incorrect statistics. See if each interface has a DB here:

            /var/db/vnstat/
            

            If one is missing create it:

            vnstat --create --iface em1
            

            See if that is the case...

            1 Reply Last reply Reply Quote 1
            • C
              chrcoluk
              last edited by chrcoluk

              Well you might be on to the reason.

              It looks like these databases have not been updated as over time I have made configuration changes to the unit.

              I removed old long disabled interfaces.

              I added new ones.

              I will report back if this fixes the vnstat problem :)

              --edit--

              After a few hours I will say it looks good :)

              All interfaces have their own stats now and they look realistic, thanks for the fix.

              I will see if I can make a script to send to the author of the package to make this pickup interface configuration changes as it looks like it stays in the configuration from when the package gets installed on first run.

              Also works with VLAN's.

              I will keep the bandwidthd configuration in place as I have that LAN side so its providing me stats per LAN side device which is nice. But again I am looking into making a patch for bandwidth so it can have multiple instances which would allow it to support things like VLANs.

              pfSense CE 2.8.0

              1 Reply Last reply Reply Quote 0
              • P
                pwnell
                last edited by

                Good to hear - I found this out also because I fiddled with my interfaces long ago and had the same issues, not a very intuitive fix but at least it works.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.