From owner-freebsd-isp Tue Aug 18 16:05:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA22830 for freebsd-isp-outgoing; Tue, 18 Aug 1998 16:05:18 -0700 (PDT) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from aniwa.sky (aniwa.actrix.gen.nz [203.96.56.186]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA22803 for ; Tue, 18 Aug 1998 16:05:13 -0700 (PDT) (envelope-from andrew@squiz.co.nz) Received: from localhost (andrew@localhost) by aniwa.sky (8.8.7/8.8.7) with SMTP id DAA19936; Wed, 19 Aug 1998 03:16:47 +1200 (NZST) (envelope-from andrew@squiz.co.nz) Date: Wed, 19 Aug 1998 03:16:47 +1200 (NZST) From: Andrew McNaughton X-Sender: andrew@aniwa.sky Reply-To: andrew@squiz.co.nz To: laurens van alphen cc: freebsd-isp@FreeBSD.ORG Subject: Re: traffic accounting for interface aliases (how?) In-Reply-To: <001901bdcaee$0b8fe9d0$0a00a8c0@uptight.student.utwente.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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