From owner-freebsd-questions@FreeBSD.ORG Fri Oct 20 18:03:10 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3162916A494 for ; Fri, 20 Oct 2006 18:03:10 +0000 (UTC) (envelope-from kurt.buff@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BFC043D6D for ; Fri, 20 Oct 2006 18:03:09 +0000 (GMT) (envelope-from kurt.buff@gmail.com) Received: by wx-out-0506.google.com with SMTP id t4so1041362wxc for ; Fri, 20 Oct 2006 11:03:08 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=DZOh2I86itiYZ9x2DszRd8cTca4YRlsXSNfAtX9SzfDX/XwVq9F3AadyfUkeQ0Ey+qSjCEbF6Tmjvo3VC+p0k0mckuV9FrVZwAISrZdVNdFCHQSBkJK5Rfh9VkhAYAzKorYIotPftPO3z5KvF2zrbbPYHS5DVBtdzEaTd2fj2HQ= Received: by 10.70.38.12 with SMTP id l12mr1224157wxl; Fri, 20 Oct 2006 11:03:08 -0700 (PDT) Received: by 10.70.130.20 with HTTP; Fri, 20 Oct 2006 11:03:08 -0700 (PDT) Message-ID: Date: Fri, 20 Oct 2006 11:03:08 -0700 From: "Kurt Buff" To: "Zbigniew Szalbot" In-Reply-To: <20061020164010.U62717@192.168.11.51> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061020164010.U62717@192.168.11.51> Cc: freebsd-questions@freebsd.org Subject: Re: monitoring lan->wan X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2006 18:03:10 -0000 On 10/20/06, Zbigniew Szalbot wrote: > Hello, > > Is there anything you would *recommend* re monitoring internet usage (LAN > to WAN), something that is available in ports? This would have to be > something that would allow me to tie it with a router as my FBSD is not a > gateway. This function is handled by our Dlink DFL router. > > Many thanks in advance! > > -- > Zbigniew Szalbot That really depends on the functionality of your router (and I'm not familiar with it, so can't comment on it), the configuration of your internal network and what you mean by 'monitoring internet usage'.. Do you only need to show aggregate traffic flow, to monitor total usage over time? If so, and if the router is SNMP-capable, then cacti (or mrtg, but it's not my preference) or some other some other utility that can get and graph SNMP stats will do what you want. If you wish to characterize the traffic to and from the Internet by protocol and/or user, then you'll have to do something more than simply using SNMP to monitor throughput on the router. In that case, you'll need to have your FreeBSD box actually parse the traffic, or get a netflow from the router (assuming that it can do that.) and ntop is a good start for the software you want, or perhaps etherape. Assuming that netflow isn't available from the router (and I think that's a fairly safe bet) the trick will be making sure that your FreeBSD box will see the traffic, and for that you'll need something like one of the following setups: 1) Put the router and your box on a dumb hub (not a switch) so that all of the traffic going to the router is visible to your box or 2) Have the router (again, assuming it's a multiport router, and capable of this, which is quite doubtful) mirror the traffic to a port to which your box is attached, or 3) Install two NICs in your box and have your router and your box attached to a switch that can mirror all of the traffic to the router - the first NIC will only receive traffic from the switch, the second NIC will have an IP address and be available for monitoring the box, including output from ntop or etherape. or 4) More tricky still, install two NICs in your box and have it act as a transparent bridge between your network and your router. I'm not familiar with this kind of setup, though I like the idea, and will be playing with it in my copious free time. :) or 5) Get a network tap cable, which is essentially a three-headed patch cable that provides receive-only wires for the third head, and that receive-only head is put into a second NIC on your box. Kurt