Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Apr 2002 00:25:55 +0200 (CEST)
From:      Walter Hop <walter@binity.com>
To:        Patrick Thomas <root@utility.clubscholarship.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>, <algemeen@filisoft.nl>
Subject:   Re: per IP traffic statistics (totals)
Message-ID:  <20020409002116.X79986-100000@surreal.nl>
In-Reply-To: <20020408151336.F92413-100000@utility.clubscholarship.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[in reply to Patrick Thomas <root@utility.clubscholarship.com>, 08/04/02]

> I have a server with 4 routable IP addresses bound to it.  I would
> like to be able to see how much inbound and outbound traffic (in
> bytes, I guess) each IP is responsible for.

It is a bit of a dirty solution, but I have one separate ipfw rule for
every IP address that my machine uses. The rules just allow traffic so
it doesn't interfere with normal operation, it doesn't seem to add a
significant delay to networking.

  ipfw add 50010 allow ip from any to 10.10.10.1
  ipfw add 50011 allow ip from 10.10.10.1 to any

  ipfw add 50020 allow ip from any to 10.10.10.2
  ipfw add 50021 allow ip from 10.10.10.2 to any

  etcetera...

Running a "ipfw -a list" will print the statistics per IP address.

Ofcourse I'm all up for a better solution, but in case nothing pops
up, you can try this. :)

-- 
 Walter Hop <walter@binity.com> | +31 6 24290808 | PGP keyid 0x84813998






To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020409002116.X79986-100000>