All of lore.kernel.org
 help / color / mirror / Atom feed
* Accuracy of packet counting?
@ 2002-05-16 22:32 John Holman
  0 siblings, 0 replies; 2+ messages in thread
From: John Holman @ 2002-05-16 22:32 UTC (permalink / raw)
  To: netfilter

I would be grateful for expert opinion on a simple matter:

I am trying to reconcile the traffic charges of my ISP with my own
counts.  
I have a plain 1500/256 bridged ADSL connection (i.e. no connection
software or overhead) to eth0 on a lightly-loaded web/mail server.

My traffic counter is simply this:

#iptables -L -n -v -x
Chain INPUT (policy ACCEPT 21095 packets, 2640498 bytes)
    pkts      bytes target     prot opt in     out    
source               destination         
    9639  1817610 ACCOUNTING  all  --  eth0   *      
0.0.0.0/0            0.0.0.0/0          

Chain FORWARD (policy ACCEPT 629 packets, 262264 bytes)
    pkts      bytes target     prot opt in     out    
source               destination         

Chain OUTPUT (policy ACCEPT 20654 packets, 5383330 bytes)
    pkts      bytes target     prot opt in     out    
source               destination         
    9957  4391462 ACCOUNTING  all  --  *      eth0   
0.0.0.0/0            0.0.0.0/0          

Chain ACCOUNTING (2 references)
    pkts      bytes target     prot opt in     out    
source               destination         
   19596  6209072 RETURN     all  --  *      *      
0.0.0.0/0            0.0.0.0/0

My question:

Is there ANY reason to suppose that the ACCOUNTING total is not an
accurate count of all IP traffic into and out of eth0?

(The machine is a dual-Pentium Pro Linux box, daily traffic 20-30 MB
average, ifconfig never reports any dropped packets).

TIA, 

-- 
Best regards,
John Holman
Eastax WWW
Melbourne, Australia


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Accuracy of packet counting?
       [not found] ` <20020525120020.O30908@sunbeam.de.gnumonks.org>
@ 2002-05-25 22:16   ` John Holman
  0 siblings, 0 replies; 2+ messages in thread
From: John Holman @ 2002-05-25 22:16 UTC (permalink / raw)
  To: Harald Welte; +Cc: John Holman, netfilter



Harald Welte wrote:
> 
> On Fri, May 17, 2002 at 08:39:39AM +1000, John Holman wrote:
> > My question:
> >
> > Is there ANY reason to suppose that the ACCOUNTING total is not an
> > accurate count of all IP traffic into and out of eth0?
> 
> yes, since you only count locally-generated and locally-targeted traffic,
> not the traffic forwarded by your machine.
> 
> use your accounting rules in the mangle table (PREROUTING and POSTROUTING)
> to cover all traffic.
> 


Thank you for that, Harald, it was a RTFM problem :(

[I eventually managed to work out the reason for the discrepancies
byself, by checking against a detailed traffic report supplied by my
ISP.]

-- 
Best regards,
John Holman
Eastax WWW
Melbourne, Australia


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-25 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3CE4352B.36C46B79@john.holman.name>
     [not found] ` <20020525120020.O30908@sunbeam.de.gnumonks.org>
2002-05-25 22:16   ` Accuracy of packet counting? John Holman
2002-05-16 22:32 John Holman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.