Date: Wed, 19 Aug 1998 03:16:47 +1200 (NZST) From: Andrew McNaughton <andrew@squiz.co.nz> To: laurens van alphen <lva@dds.nl> Cc: freebsd-isp@FreeBSD.ORG Subject: Re: traffic accounting for interface aliases (how?) Message-ID: <Pine.BSF.3.96.980819023736.8497J-100000@aniwa.sky> In-Reply-To: <001901bdcaee$0b8fe9d0$0a00a8c0@uptight.student.utwente.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Aug 1998, laurens van alphen wrote: > currently we're looking at a ucd-snmpd/mrtg solution but it seems snmp only > provides numbers for the entire interface (ed0 in this case, not every > single ip). > > we use ipfw for firewalling, can i add rules for octet counting? could > someone provide examples? ipfw counts both packets and octets eg: ipfw add 1000 count ip from any to $ip1 ipfw add 1001 count ip from $ip1 to any ipfw add 1010 count ip from any to $ip2 ipfw add 1011 count ip from $ip2 to any ipfw add 1020 count ip from any to $ip3 ipfw add 1021 count ip from $ip3 to any ipfw add 1030 count ip from any to $ip4 ipfw add 1031 count ip from $ip4 to any etc. you then want a root crontab which does something like: ( echo ; date ; ipfw show ) >> traffic.log ; ipfw zero Finally you probably want a simple perl script to process the output and do something suitable with it. Andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980819023736.8497J-100000>