How to get traffic graph to show all subnets, not just the directly attached
-
My network is about ~250 workstations, voip phones, and BYODs. This is divided into several subnets and each are on their own router. Pfsense is on listening 192.168.127.254/24 and the routers are 192.168.126.254/24 through 192.168.119.254/24
I found this old post with the same problem: http://forum.pfsense.org/index.php/topic,23411.0.html
I really need to have some insight on my network who is eating bandwidth in realtime. Short of putting everything on the same subnet, which would be a disaster, how can I do this? the traffic graph would work perfectly, is there some code I can modify to show hosts on all subnets?
-
Ok, I figured this out. This is definitely a hack so don't do this.
Edit the following: sudo vi /usr/local/www/bandwidth_by_ip.php
About line ~30, there is this line:
$intsubnet = gen_subnet($intip, $netmask) . "/$netmask"; change to:
Take that line out and substitute this:
if ($real_interface == "em0")
{$intsubnet = "192.168.0.0/16";}
else
{$intsubnet = gen_subnet($intip, $netmask) . "/$netmask";}em0, 192.168.0.0/16 will need to be changed for your network
-
Ok man i make this now its only show subnet 192.168.2.0/24
My pricipal lan not show.
What to show all ips on intrface 192.168.3.0/24 and 192.168.2.0/24 ???My code:
//$intsubnet = gen_subnet($intip, $netmask) . "/$netmask";
if ($real_interface == "em0")
{$intsubnet = "192.168.2.0/24";}
else
{$intsubnet = gen_subnet($intip, $netmask) . "/$netmask";} -
You need a wider mask to encompass 192.168.2-3.
192.168.2.0/23 should do it.Is your LAN interface em0 though?
This is a horrible hack as the OP said. ::)
Steve
-
Its work like a charm
if ($real_interface == "em0")
{$intsubnet = "192.168.2.0/23";}
else
{$intsubnet = gen_subnet($intip, $netmask) . "/$netmask";If i need to add subnet 192.168.4.xx 192.168.6.xx 192.168.9.xx ithe rules is same?
-
SOLVED - Man this script list all subnets thanks
if ($real_interface == "em0")
{$intsubnet = "192.168.0.0/16";}
else
{$intsubnet = gen_subnet($intip, $netmask) . "/$netmask";} -
During 2.1 development, there was a time when the "rate" utility returned stats for all IP addresses and I added the "Filter" option to the Traffic Graph GUI - Filter "All", "Local" or "Remote". Some time later, the "rate" utility was put back to just displaying what it was asked to (a subnet specified with the "-c" parameter to "rate").
Reading this got me thinking that actually the Filter option can be fixed up using the current "rate" binary but driving it creatively from bandwidth_by_ip.php
This pull request fixes up the Filter option so it works as intended: https://github.com/pfsense/pfsense/pull/906
Hopefully this will be fixed in 2.1.1. From there, it should be relatively easy to add more filter options to display wider sets of IP addresses - people could suggest what groupings of subnets would be useful.