netkey and ip statistics

From: John A. Sullivan III <hidden>
Date: 2012-02-22 05:01:26

Hello, all.  I'm still working on adaptive traffic shaping for
percentile billing and am almost done.  However, I have a question about
byte count statistics when using netkey.

If I understand it correctly, traffic traverses an interface twice when
netkey is used for IPSec, once encrypted and once decrypted.  So let's
say I am using eth1 and transmit 999b decrypted which turns into 1000b
encrypted and I receive 2000b encrypted which turns into 1998b
decrypted.  What will ip -s link ls eth1 show for TX and RX byte counts?

TX 1000b  RX 2000b (what I am hoping for)
or
TX 999b  RX 1998b
or
TX 1999b  RX 3998b

Thanks - John
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help