diff --git a/examples/synthetic-topology.cc b/examples/synthetic-topology.cc
index 0b03c7c..88662df 100644
--- a/examples/synthetic-topology.cc
+++ b/examples/synthetic-topology.cc
@@ -26,6 +26,7 @@
 #include "ns3/point-to-point-grid.h"
 #include "ns3/ipv4-global-routing-helper.h"
 #include "../utils/spring-mobility-helper.h"
+#include "../helper/ccnx-trace-helper.h"
 
 #include <sstream>
 #include "ns3/annotated-topology-reader.h"
@@ -99,11 +100,11 @@
   ApplicationContainer consumers2 = consumerHelper.Install(Names::Find<Node> ("/synthetic", "c2"));
 
   consumerHelper.SetPrefix ("/8");
-  consumerHelper.SetAttribute ("MeanRate", StringValue ("3Mbps"));
+  consumerHelper.SetAttribute ("MeanRate", StringValue ("4Mbps"));
   ApplicationContainer consumers3 = consumerHelper.Install(Names::Find<Node> ("/synthetic", "c3"));
   
   consumerHelper.SetPrefix ("/10");
-  consumerHelper.SetAttribute ("MeanRate", StringValue ("10Mbps"));
+  consumerHelper.SetAttribute ("MeanRate", StringValue ("8Mbps"));
   ApplicationContainer consumers4 = consumerHelper.Install(Names::Find<Node> ("/synthetic", "c4"));
 
   consumers.Start (Seconds (0));
@@ -139,6 +140,14 @@
 
   Simulator::Stop (finishTime);
 
+  CcnxTraceHelper traceHelper;
+  // traceHelper.EnableAggregateAppAll ("ns3::CcnxConsumer");
+  // traceHelper.EnableAggregateAppAll ("ns3::CcnxProducer");
+  // traceHelper.EnableAggregateL3All ();
+  // traceHelper.SetL3TraceFile ("trace-l3.log");
+  // traceHelper.SetAppTraceFile ("trace-app.log");
+  traceHelper.EnableRateL3All ("rate-trace.log");
+
   NS_LOG_INFO ("Run Simulation.");
   Simulator::Run ();
   Simulator::Destroy ();
diff --git a/helper/ccnx-trace-helper.cc b/helper/ccnx-trace-helper.cc
index 3e006e4..1248198 100644
--- a/helper/ccnx-trace-helper.cc
+++ b/helper/ccnx-trace-helper.cc
@@ -28,11 +28,17 @@
 #include "ns3/ccnx-face.h"
 #include "ns3/packet.h"
 #include "ns3/log.h"
+#include "ns3/assert.h"
 #include "ns3/node-list.h"
 #include "ns3/object-vector.h"
+#include "ns3/simulator.h"
+#include "ns3/names.h"
+
+#include <boost/ref.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/foreach.hpp>
 
 #include <fstream>
-#include <boost/lexical_cast.hpp>
 
 using namespace std;
 using namespace boost;
@@ -41,24 +47,46 @@
 
 namespace ns3 {
     
+CcnxAppTracer::CcnxAppTracer (const std::string &app, Ptr<Node> node, const std::string &appId)
+  : m_app (app)
+  , m_appId (appId)
+  , m_nodePtr (node)
+{
+  m_node = boost::lexical_cast<string> (m_nodePtr->GetId ());
+
+  Connect ();
+
+  string name = Names::FindName (node);
+  if (!name.empty ())
+    {
+      m_node = name;
+    }
+}
+
 CcnxAppTracer::CcnxAppTracer (const std::string &app, const std::string &node, const std::string &appId)
   : m_app (app)
   , m_appId (appId)
   , m_node (node)
 {
-  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+appId+"/$"+m_app+"/TransmittedInterests",
+  Connect ();
+}
+
+void
+CcnxAppTracer::Connect ()
+{
+  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+m_appId+"/$"+m_app+"/TransmittedInterests",
                    MakeCallback (&CcnxAppTracer::OutInterests, this));
 
-  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+appId+"/$"+m_app+"/ReceivedNacks",
+  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+m_appId+"/$"+m_app+"/ReceivedNacks",
                    MakeCallback (&CcnxAppTracer::InNacks, this));
 
-  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+appId+"/$"+m_app+"/ReceivedInterests",
+  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+m_appId+"/$"+m_app+"/ReceivedInterests",
                    MakeCallback (&CcnxAppTracer::InInterests, this));
   
-  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+appId+"/$"+m_app+"/TransmittedContentObjects",
+  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+m_appId+"/$"+m_app+"/TransmittedContentObjects",
                    MakeCallback (&CcnxAppTracer::OutData, this));
 
-  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+appId+"/$"+m_app+"/ReceivedContentObjects",
+  Config::Connect ("/NodeList/"+m_node+"/ApplicationList/"+m_appId+"/$"+m_app+"/ReceivedContentObjects",
                    MakeCallback (&CcnxAppTracer::InData, this));
 }
 
@@ -66,34 +94,69 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
+CcnxL3Tracer::CcnxL3Tracer (Ptr<Node> node)
+: m_nodePtr (node)
+{
+  m_node = boost::lexical_cast<string> (m_nodePtr->GetId ());
+
+  Connect ();
+
+  string name = Names::FindName (node);
+  if (!name.empty ())
+    {
+      m_node = name;
+    }
+}
+
 CcnxL3Tracer::CcnxL3Tracer (const std::string &node)
 : m_node (node)
 {
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/ForwardingStrategy/OutInterests",
+  Connect ();
+}
+
+void
+CcnxL3Tracer::Connect ()
+{
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/ForwardingStrategy/OutInterests",
                    MakeCallback (&CcnxL3Tracer::OutInterests, this));
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/InInterests",
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/InInterests",
                    MakeCallback (&CcnxL3Tracer::InInterests, this));
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/DropInterests",
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/DropInterests",
                    MakeCallback (&CcnxL3Tracer::DropInterests, this));
 
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/OutNacks",
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/OutNacks",
                    MakeCallback (&CcnxL3Tracer::OutNacks, this));
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/InNacks",
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/InNacks",
                    MakeCallback (&CcnxL3Tracer::InNacks, this));
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/DropNacks",
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/DropNacks",
                    MakeCallback (&CcnxL3Tracer::DropNacks, this));
 
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/OutData",
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/OutData",
                    MakeCallback (&CcnxL3Tracer::OutData, this));
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/InData",
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/InData",
                    MakeCallback (&CcnxL3Tracer::InData, this));
-  Config::Connect ("/NodeList/"+node+"/$ns3::CcnxL3Protocol/DropData",
+  Config::Connect ("/NodeList/"+m_node+"/$ns3::CcnxL3Protocol/DropData",
                    MakeCallback (&CcnxL3Tracer::DropData, this));
 }
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
+CcnxAggregateAppTracer::CcnxAggregateAppTracer (const std::string &app, Ptr<Node> node, const std::string &appId)
+  : CcnxAppTracer (app, node, appId)
+  , m_inInterests (0)
+  , m_outInterests (0)
+  , m_inNacks (0)
+  , m_inData (0)
+  , m_outData (0)
+
+  , m_inInterestsBytes (0)
+  , m_outInterestsBytes (0)
+  , m_inNacksBytes (0)
+  , m_inDataBytes (0)
+  , m_outDataBytes (0)
+{
+}
 
 CcnxAggregateAppTracer::CcnxAggregateAppTracer (const std::string &app, const std::string &node, const std::string &appId)
   : CcnxAppTracer (app, node, appId)
@@ -102,10 +165,32 @@
   , m_inNacks (0)
   , m_inData (0)
   , m_outData (0)
+
+  , m_inInterestsBytes (0)
+  , m_outInterestsBytes (0)
+  , m_inNacksBytes (0)
+  , m_inDataBytes (0)
+  , m_outDataBytes (0)
 {
 }
 
 void
+CcnxAggregateAppTracer::Reset ()
+{
+  m_inInterests = 0;
+  m_outInterests = 0;
+  m_inNacks = 0;
+  m_inData = 0;
+  m_outData = 0;
+
+  m_inInterestsBytes = 0;
+  m_outInterestsBytes = 0;
+  m_inNacksBytes = 0;
+  m_inDataBytes = 0;
+  m_outDataBytes = 0;
+}
+
+void
 CcnxAggregateAppTracer::PrintHeader (std::ostream &os) const
 {
   os << "NodeId" << "\t"
@@ -117,7 +202,15 @@
      << "InNacks" << "\t"
     
      << "InData" << "\t"
-     << "OutData";
+     << "OutData" << "\t"
+
+     << "InInterestsBytes" << "\t"
+     << "OutInterestsBytes" << "\t"
+    
+     << "InNacksBytes" << "\t"
+    
+     << "InDataBytes" << "\t"
+     << "OutDataBytes";
 }
 
 void
@@ -126,52 +219,66 @@
   os << m_node << "\t"
      << m_app << "\t"
      << m_appId << "\t"
+
      << m_inInterests << "\t"
      << m_outInterests << "\t"
     
      << m_inNacks << "\t"
     
      << m_inData << "\t"
-     << m_outData;
+     << m_outData << "\t"
+
+     << m_inInterestsBytes << "\t"
+     << m_outInterestsBytes << "\t"
+    
+     << m_inNacksBytes << "\t"
+    
+     << m_inDataBytes << "\t"
+     << m_outDataBytes;
 }
 
 void
 CcnxAggregateAppTracer::OutInterests (std::string context,
-                                      Ptr<const CcnxInterestHeader>, Ptr<CcnxApp>, Ptr<CcnxFace>)
+                                      Ptr<const CcnxInterestHeader> header, Ptr<CcnxApp>, Ptr<CcnxFace>)
 {
   m_outInterests++;
+  m_outInterestsBytes += header->GetSerializedSize ();
 }
 
 void
 CcnxAggregateAppTracer::OutData (std::string context,
-                                 Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
+                                 Ptr<const CcnxContentObjectHeader> header, Ptr<const Packet> payload,
                                  Ptr<CcnxApp>, Ptr<CcnxFace>)
 {
   m_outData++;
+  m_outDataBytes += header->GetSerializedSize () + payload->GetSerializedSize ();
 }
 
 void
 CcnxAggregateAppTracer::InInterests (std::string context,
-                                     Ptr<const CcnxInterestHeader>,
+                                     Ptr<const CcnxInterestHeader> header,
                                      Ptr<CcnxApp>, Ptr<CcnxFace>)
 {
   m_inInterests++;
+  m_inInterestsBytes += header->GetSerializedSize ();
 }
 
 void
 CcnxAggregateAppTracer::InNacks (std::string context,
-                                 Ptr<const CcnxInterestHeader>,
+                                 Ptr<const CcnxInterestHeader> header,
                                  Ptr<CcnxApp>, Ptr<CcnxFace>)
 {
   m_inNacks++;
+  m_inNacksBytes += header->GetSerializedSize ();
 }
   
 void
 CcnxAggregateAppTracer::InData (std::string context,
-                                Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
+                                Ptr<const CcnxContentObjectHeader> header, Ptr<const Packet> payload,
                                 Ptr<CcnxApp>, Ptr<CcnxFace>)
 {
   m_inData++;
+  m_inDataBytes += header->GetSerializedSize () + payload->GetSerializedSize ();
 }
 
 
@@ -179,22 +286,42 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
+CcnxAggregateL3Tracer::CcnxAggregateL3Tracer (Ptr<Node> node)
+  : CcnxL3Tracer (node)
+{
+  Reset ();
+}
 
 CcnxAggregateL3Tracer::CcnxAggregateL3Tracer (const std::string &node)
   : CcnxL3Tracer (node)
-  , m_inInterests (0)
-  , m_outInterests (0)
-  , m_dropInterests (0)
-  , m_inNacks (0)
-  , m_outNacks (0)
-  , m_dropNacks (0)
-  , m_inData (0)
-  , m_outData (0)
-  , m_dropData (0)
 {
+  Reset ();
 }
 
 void
+CcnxAggregateL3Tracer::Stats::Reset ()
+{
+  m_inInterests = 0;
+  m_outInterests = 0;
+  m_dropInterests = 0;
+  m_inNacks = 0;
+  m_outNacks = 0;
+  m_dropNacks = 0;
+  m_inData = 0;
+  m_outData = 0;
+  m_dropData = 0;
+}
+
+
+void
+CcnxAggregateL3Tracer::Reset ()
+{
+  m_packets.Reset ();
+  m_bytes.Reset ();
+}
+
+
+void
 CcnxAggregateL3Tracer::PrintHeader (std::ostream &os) const
 {
   os << "Node" << "\t"
@@ -208,87 +335,123 @@
     
      << "InData" << "\t"
      << "OutData" << "\t"
-     << "DropData";
+     << "DropData" << "\t"
+    
+     << "InInterestsBytes" << "\t"
+     << "OutInterestsBytes" << "\t"
+     << "DropInterestsBytes" << "\t"
+    
+     << "InNacksBytes" << "\t"
+     << "OutNacksBytes" << "\t"
+     << "DropNacksBytes" << "\t"
+    
+     << "InDataBytes" << "\t"
+     << "OutDataBytes" << "\t"
+     << "DropDataBytes";
 }
 
 void
 CcnxAggregateL3Tracer::Print (std::ostream &os) const
 {
   os << m_node << "\t"
-     << m_inInterests   << "\t"
-     << m_outInterests  << "\t"
-     << m_dropInterests << "\t"
-  
-     << m_inNacks   << "\t"
-     << m_outNacks  << "\t"
-     << m_dropNacks << "\t"
-  
-     << m_inData   << "\t"
-     << m_outData  << "\t"
-     << m_dropData;
+     << m_packets.m_inInterests   << "\t"
+     << m_packets.m_outInterests  << "\t"
+     << m_packets.m_dropInterests << "\t"
+
+     << m_packets.m_inNacks   << "\t"
+     << m_packets.m_outNacks  << "\t"
+     << m_packets.m_dropNacks << "\t"
+
+     << m_packets.m_inData   << "\t"
+     << m_packets.m_outData  << "\t"
+     << m_packets.m_dropData << "\t"
+
+     << m_bytes.m_inInterests   << "\t"
+     << m_bytes.m_outInterests  << "\t"
+     << m_bytes.m_dropInterests << "\t"
+
+     << m_bytes.m_inNacks   << "\t"
+     << m_bytes.m_outNacks  << "\t"
+     << m_bytes.m_dropNacks << "\t"
+
+     << m_bytes.m_inData   << "\t"
+     << m_bytes.m_outData  << "\t"
+     << m_bytes.m_dropData;
 }
 
 void
 CcnxAggregateL3Tracer::OutInterests  (std::string context,
-                                      Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace>)
+                                      Ptr<const CcnxInterestHeader> header, Ptr<const CcnxFace>)
 {
-  m_outInterests++;
+  m_packets.m_outInterests++;
+  m_bytes.m_outInterests += header->GetSerializedSize ();
 }
 
 void
 CcnxAggregateL3Tracer::InInterests   (std::string context,
-                                      Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace>)
+                                      Ptr<const CcnxInterestHeader> header, Ptr<const CcnxFace>)
 {
-  m_inInterests++;
+  m_packets.m_inInterests++;
+  m_bytes.m_inInterests += header->GetSerializedSize ();
 }
 
 void
 CcnxAggregateL3Tracer::DropInterests (std::string context,
-                                      Ptr<const CcnxInterestHeader>, Ccnx::DropReason, Ptr<const CcnxFace>)
+                                      Ptr<const CcnxInterestHeader> header, Ccnx::DropReason, Ptr<const CcnxFace>)
 {
-  m_dropInterests++;
+  m_packets.m_dropInterests++;
+  m_bytes.m_dropInterests += header->GetSerializedSize ();
 }
 
 void
 CcnxAggregateL3Tracer::OutNacks  (std::string context,
-                                  Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace>)
+                                  Ptr<const CcnxInterestHeader> header, Ptr<const CcnxFace>)
 {
-  m_outNacks++;
+  m_packets.m_outNacks++;
+  m_bytes.m_outNacks += header->GetSerializedSize ();
 }
 
 void
 CcnxAggregateL3Tracer::InNacks   (std::string context,
-                                  Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace>)
+                                  Ptr<const CcnxInterestHeader> header, Ptr<const CcnxFace>)
 {
-  m_inNacks++;
+  m_packets.m_inNacks++;
+  m_bytes.m_inNacks += header->GetSerializedSize ();
 }
 
 void
 CcnxAggregateL3Tracer::DropNacks (std::string context,
-                                  Ptr<const CcnxInterestHeader>, Ccnx::DropReason, Ptr<const CcnxFace>)
+                                  Ptr<const CcnxInterestHeader> header, Ccnx::DropReason, Ptr<const CcnxFace>)
 {
-  m_dropNacks++;
+  m_packets.m_dropNacks++;
+  m_bytes.m_dropNacks += header->GetSerializedSize ();
 }
 
 void
 CcnxAggregateL3Tracer::OutData  (std::string context,
-                                 Ptr<const CcnxContentObjectHeader>, bool fromCache, Ptr<const CcnxFace>)
+                                 Ptr<const CcnxContentObjectHeader> header, Ptr<const Packet> payload,
+                                 bool fromCache, Ptr<const CcnxFace>)
 {
-  m_inData++;
+  m_packets.m_outData++;
+  m_bytes.m_outData += header->GetSerializedSize () + payload->GetSize ();
 }
 
 void
 CcnxAggregateL3Tracer::InData   (std::string context,
-                                 Ptr<const CcnxContentObjectHeader>, Ptr<const CcnxFace>)
+                                 Ptr<const CcnxContentObjectHeader> header, Ptr<const Packet> payload,
+                                 Ptr<const CcnxFace>)
 {
-  m_outData++;
+  m_packets.m_inData++;
+  m_bytes.m_inData += header->GetSerializedSize () + payload->GetSize ();
 }
 
 void
 CcnxAggregateL3Tracer::DropData (std::string context,
-                                 Ptr<const CcnxContentObjectHeader>, Ccnx::DropReason, Ptr<const CcnxFace>)
+                                 Ptr<const CcnxContentObjectHeader> header, Ptr<const Packet> payload,
+                                 Ccnx::DropReason, Ptr<const CcnxFace>)
 {
-  m_dropData++;
+  m_packets.m_dropData++;
+  m_bytes.m_dropData += header->GetSerializedSize () + payload->GetSize ();
 }
 
 
@@ -296,9 +459,228 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
+CcnxRateL3Tracer::CcnxRateL3Tracer (std::ostream &os, Ptr<Node> node)
+  : CcnxL3Tracer (node)
+  , m_os (os)
+{
+  SetAveragingPeriod (Seconds (1.0));
+}
+
+CcnxRateL3Tracer::CcnxRateL3Tracer (std::ostream &os, const std::string &node)
+  : CcnxL3Tracer (node)
+  , m_os (os)
+{
+  SetAveragingPeriod (Seconds (1.0));
+}
+
+CcnxRateL3Tracer::~CcnxRateL3Tracer ()
+{
+  m_printEvent.Cancel ();
+}
+
+void
+CcnxRateL3Tracer::SetAveragingPeriod (const Time &period)
+{
+  m_period = period;
+  m_printEvent.Cancel ();
+  m_printEvent = Simulator::Schedule (m_period, &CcnxRateL3Tracer::PeriodicPrinter, this);
+}
+
+void
+CcnxRateL3Tracer::PeriodicPrinter ()
+{
+  Print (m_os);
+  Reset ();
+  
+  m_printEvent = Simulator::Schedule (m_period, &CcnxRateL3Tracer::PeriodicPrinter, this);
+}
+
+void
+CcnxRateL3Tracer::PrintHeader (std::ostream &os) const
+{
+  os << "Time" << "\t"
+
+     << "Node" << "\t"
+     << "FaceId" << "\t"
+     << "FaceDescr" << "\t"
+
+     << "Type" << "\t"
+     << "Packets" << "\t"
+     << "Kilobytes";
+}
+
+void
+CcnxRateL3Tracer::Reset ()
+{
+  for (std::map<Ptr<const CcnxFace>, boost::tuple<Stats, Stats, Stats, Stats> >::iterator stats = m_stats.begin ();
+       stats != m_stats.end ();
+       stats++)
+    {
+      stats->second.get<0> ().Reset ();
+      stats->second.get<1> ().Reset ();
+    }
+}
+
+const double alpha = 0.8;
+
+#define STATS(INDEX) stats->second.get<INDEX> ()
+#define RATE(INDEX, fieldName) STATS(INDEX).fieldName / m_period.ToDouble (Time::S)
+
+#define PRINTER(printName, fieldName) \
+STATS(2).fieldName = /*new value*/alpha * RATE(0, fieldName) + /*old value*/(1-alpha) * STATS(2).fieldName; \
+ STATS(3).fieldName = /*new value*/alpha * RATE(1, fieldName) / 1024.0 + /*old value*/(1-alpha) * STATS(3).fieldName; \
+                                                                        \
+os << time.ToDouble (Time::S) << "\t"                                   \
+ << m_node << "\t"                                                      \
+ << stats->first->GetId () << "\t"                                      \
+ << *stats->first << "\t"                                               \
+ << printName << "\t"                                                   \
+ << STATS(2).fieldName  << "\t"                                        \
+ << STATS(3).fieldName << "\n";
+
+void
+CcnxRateL3Tracer::Print (std::ostream &os) const
+{
+  for (std::map<Ptr<const CcnxFace>, boost::tuple<Stats, Stats, Stats, Stats> >::iterator stats = m_stats.begin ();
+       stats != m_stats.end ();
+       stats++)
+    {
+      Time time = Simulator::Now ();
+
+      PRINTER ("InInterests",   m_inInterests);
+      PRINTER ("OutInterests",  m_outInterests);
+      PRINTER ("DropInterests", m_dropInterests);
+      
+      PRINTER ("InNacks",   m_inNacks);
+      PRINTER ("OutNacks",  m_outNacks);
+      PRINTER ("DropNacks", m_dropNacks);
+
+      PRINTER ("InData",   m_inData);
+      PRINTER ("OutData",  m_outData);
+      PRINTER ("DropData", m_dropData);
+
+      // os << Simulator::Now ().ToDouble (Time::S) << "\t"
+
+      //    << m_node << "\t"
+      //    << stats->first->GetId () << "\t"
+      //    << *stats->first << "\t"
+      //    << "InInterests" << "\t" << 
+      //    << stats->second.get<0> ().m_inInterests / m_period.ToDouble (Time::S)  << "\t"
+      //    << stats->second.get<1> ().m_inInterests / m_period.ToDouble (Time::S) / 1024.0;
+
+      //    << stats->second.get<0> ().m_outInterests / m_period.ToDouble (Time::S)  << "\t"
+      //    << stats->second.get<0> ().m_dropInterests / m_period.ToDouble (Time::S) << "\t"
+
+      //    << stats->second.get<0> ().m_inNacks / m_period.ToDouble (Time::S)   << "\t"
+      //    << stats->second.get<0> ().m_outNacks / m_period.ToDouble (Time::S)  << "\t"
+      //    << stats->second.get<0> ().m_dropNacks / m_period.ToDouble (Time::S) << "\t"
+
+      //    << stats->second.get<0> ().m_inData / m_period.ToDouble (Time::S)   << "\t"
+      //    << stats->second.get<0> ().m_outData / m_period.ToDouble (Time::S)  << "\t"
+      //    << stats->second.get<0> ().m_dropData / m_period.ToDouble (Time::S) << "\t"
+
+      //    << stats->second.get<1> ().m_outInterests / m_period.ToDouble (Time::S) / 1024.0  << "\t"
+      //    << stats->second.get<1> ().m_dropInterests / m_period.ToDouble (Time::S) / 1024.0 << "\t"
+
+      //    << stats->second.get<1> ().m_inNacks / m_period.ToDouble (Time::S) / 1024.0   << "\t"
+      //    << stats->second.get<1> ().m_outNacks / m_period.ToDouble (Time::S) / 1024.0  << "\t"
+      //    << stats->second.get<1> ().m_dropNacks / m_period.ToDouble (Time::S) / 1024.0 << "\t"
+
+      //    << stats->second.get<1> ().m_inData / m_period.ToDouble (Time::S) / 1024.0   << "\t"
+      //    << stats->second.get<1> ().m_outData / m_period.ToDouble (Time::S) / 1024.0  << "\t"
+      //    << stats->second.get<1> ().m_dropData / m_period.ToDouble (Time::S) / 1024.0;
+    }
+}
+
+
+void
+CcnxRateL3Tracer::OutInterests  (std::string context,
+                                      Ptr<const CcnxInterestHeader> header, Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_outInterests ++;
+  m_stats[face].get<1> ().m_outInterests += header->GetSerializedSize ();
+}
+
+void
+CcnxRateL3Tracer::InInterests   (std::string context,
+                                 Ptr<const CcnxInterestHeader> header, Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_inInterests ++;
+  m_stats[face].get<1> ().m_inInterests += header->GetSerializedSize ();
+}
+
+void
+CcnxRateL3Tracer::DropInterests (std::string context,
+                                      Ptr<const CcnxInterestHeader> header, Ccnx::DropReason, Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_dropInterests ++;
+  m_stats[face].get<1> ().m_dropInterests += header->GetSerializedSize ();
+}
+
+void
+CcnxRateL3Tracer::OutNacks  (std::string context,
+                                  Ptr<const CcnxInterestHeader> header, Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_outNacks ++;
+  m_stats[face].get<1> ().m_outNacks += header->GetSerializedSize ();
+}
+
+void
+CcnxRateL3Tracer::InNacks   (std::string context,
+                                  Ptr<const CcnxInterestHeader> header, Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_inNacks ++;
+  m_stats[face].get<1> ().m_inNacks += header->GetSerializedSize ();
+}
+
+void
+CcnxRateL3Tracer::DropNacks (std::string context,
+                             Ptr<const CcnxInterestHeader> header, Ccnx::DropReason, Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_dropNacks ++;
+  m_stats[face].get<1> ().m_dropNacks += header->GetSerializedSize ();
+}
+
+void
+CcnxRateL3Tracer::OutData  (std::string context,
+                            Ptr<const CcnxContentObjectHeader> header, Ptr<const Packet> payload,
+                            bool fromCache, Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_inData ++;
+  m_stats[face].get<1> ().m_inData += header->GetSerializedSize () + payload->GetSize ();
+}
+
+void
+CcnxRateL3Tracer::InData   (std::string context,
+                            Ptr<const CcnxContentObjectHeader> header, Ptr<const Packet> payload,
+                            Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_outData ++;
+  m_stats[face].get<1> ().m_outData += header->GetSerializedSize () + payload->GetSize ();
+}
+
+void
+CcnxRateL3Tracer::DropData (std::string context,
+                            Ptr<const CcnxContentObjectHeader> header, Ptr<const Packet> payload,
+                            Ccnx::DropReason, Ptr<const CcnxFace> face)
+{
+  m_stats[face].get<0> ().m_dropData ++;
+  m_stats[face].get<1> ().m_dropData += header->GetSerializedSize () + payload->GetSize ();
+}
+
+////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+
+CcnxTraceHelper::CcnxTraceHelper ()
+  : m_l3RateTrace (0)
+{
+}
+
 CcnxTraceHelper::~CcnxTraceHelper ()
 {
   NS_LOG_FUNCTION (this);
+  if (m_l3RateTrace != 0) delete m_l3RateTrace;
   
   if (m_apps.size () > 0)
     {
@@ -391,7 +773,7 @@
           if ((*app)->GetInstanceTypeId ().GetName () == appName)
             {
               m_apps.push_back (Create<CcnxAggregateAppTracer> (appName,
-                                                                lexical_cast<string> ((*node)->GetId ()),
+                                                                *node,
                                                                 lexical_cast<string> (appId)));
             }
         }
@@ -409,9 +791,33 @@
     {
       NS_LOG_DEBUG ("Node: " << lexical_cast<string> ((*node)->GetId ()));
       
-      m_l3s.push_back (Create<CcnxAggregateL3Tracer> (lexical_cast<string> ((*node)->GetId ())));
+      m_l3s.push_back (Create<CcnxAggregateL3Tracer> (*node));
     }
 }
 
+void
+CcnxTraceHelper::EnableRateL3All (const std::string &l3RateTrace)
+{
+  NS_LOG_FUNCTION (this);
+  m_l3RateTrace = new ofstream (l3RateTrace.c_str (), ios::trunc);
+
+  for (NodeList::Iterator node = NodeList::Begin ();
+       node != NodeList::End ();
+       node++)
+    {
+      NS_LOG_DEBUG ("Node: " << lexical_cast<string> ((*node)->GetId ()));
+
+      Ptr<CcnxRateL3Tracer> trace = Create<CcnxRateL3Tracer> (boost::ref(*m_l3RateTrace), *node);
+      trace->SetAveragingPeriod (Seconds (0.5));
+      m_l3Rates.push_back (trace);
+    }
+
+  if (m_l3Rates.size () > 0)
+    {
+      // *m_l3RateTrace << "# "; // not necessary for R's read.table
+      m_l3Rates.front ()->PrintHeader (*m_l3RateTrace);
+      *m_l3RateTrace << "\n";
+    }
+}
 
 } // namespace ns3
diff --git a/helper/ccnx-trace-helper.h b/helper/ccnx-trace-helper.h
index 0a0906d..7668b1b 100644
--- a/helper/ccnx-trace-helper.h
+++ b/helper/ccnx-trace-helper.h
@@ -24,6 +24,11 @@
 #include "ns3/ptr.h"
 #include "ns3/simple-ref-count.h"
 #include "ns3/ccnx.h"
+#include "ns3/nstime.h"
+#include "ns3/event-id.h"
+
+#include <boost/tuple/tuple.hpp>
+#include <map>
 
 namespace ns3 {
 
@@ -32,9 +37,13 @@
 class CcnxAppTracer : public SimpleRefCount<CcnxAppTracer>
 {
 public:
-  CcnxAppTracer (const std::string &app, const std::string &node = "*", const std::string &appId = "*");
+  CcnxAppTracer (const std::string &app, Ptr<Node> node, const std::string &appId = "*");
+  CcnxAppTracer (const std::string &app, const std::string &node, const std::string &appId = "*");
   virtual ~CcnxAppTracer ()  { };
 
+  void
+  Connect ();
+
   virtual void
   PrintHeader (std::ostream &os) const = 0;
   
@@ -65,6 +74,7 @@
   std::string m_app;
   std::string m_appId;
   std::string m_node;
+  Ptr<Node> m_nodePtr;
 };
 
 std::ostream&
@@ -80,9 +90,13 @@
 class CcnxL3Tracer : public SimpleRefCount<CcnxL3Tracer>
 {
 public:
-  CcnxL3Tracer (const std::string &node = "*");
+  CcnxL3Tracer (Ptr<Node> node);
+  CcnxL3Tracer (const std::string &node);
   virtual ~CcnxL3Tracer () { };
 
+  void
+  Connect ();
+  
   virtual void
   PrintHeader (std::ostream &os) const = 0;
 
@@ -116,18 +130,34 @@
   
   virtual void
   OutData  (std::string context,
-            Ptr<const CcnxContentObjectHeader>, bool fromCache, Ptr<const CcnxFace>) = 0;
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, bool fromCache, Ptr<const CcnxFace>) = 0;
 
   virtual void
   InData   (std::string context,
-            Ptr<const CcnxContentObjectHeader>, Ptr<const CcnxFace>) = 0;
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ptr<const CcnxFace>) = 0;
 
   virtual void
   DropData (std::string context,
-            Ptr<const CcnxContentObjectHeader>, Ccnx::DropReason, Ptr<const CcnxFace>) = 0;
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ccnx::DropReason, Ptr<const CcnxFace>) = 0;
 
 protected:
   std::string m_node;
+  Ptr<Node> m_nodePtr;
+
+  struct Stats
+  {
+    void Reset ();
+    
+    uint64_t m_inInterests;
+    uint64_t m_outInterests;
+    uint64_t m_dropInterests;
+    uint64_t m_inNacks;
+    uint64_t m_outNacks;
+    uint64_t m_dropNacks;
+    uint64_t m_inData;
+    uint64_t m_outData;
+    uint64_t m_dropData;
+  };
 };
 
 std::ostream&
@@ -147,7 +177,8 @@
 class CcnxAggregateAppTracer : public CcnxAppTracer
 {
 public:
-  CcnxAggregateAppTracer (const std::string &app, const std::string &node = "*", const std::string &appId = "*");
+  CcnxAggregateAppTracer (const std::string &app, Ptr<Node> node, const std::string &appId = "*");
+  CcnxAggregateAppTracer (const std::string &app, const std::string &node, const std::string &appId = "*");
   virtual ~CcnxAggregateAppTracer () { };
 
   virtual void
@@ -176,18 +207,29 @@
   InData  (std::string context,
            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ptr<CcnxApp>, Ptr<CcnxFace>);
 
-private:
+protected:
+  void
+  Reset ();
+
+protected:
   uint64_t m_inInterests;
   uint64_t m_outInterests;
   uint64_t m_inNacks;
   uint64_t m_inData; 
   uint64_t m_outData;
+
+  uint64_t m_inInterestsBytes;
+  uint64_t m_outInterestsBytes;
+  uint64_t m_inNacksBytes;
+  uint64_t m_inDataBytes;
+  uint64_t m_outDataBytes;
 };
 
 class CcnxAggregateL3Tracer : public CcnxL3Tracer
 {
 public:
-  CcnxAggregateL3Tracer (const std::string &node = "*");
+  CcnxAggregateL3Tracer (Ptr<Node> node);
+  CcnxAggregateL3Tracer (const std::string &node);
   virtual ~CcnxAggregateL3Tracer () { };
   
   virtual void
@@ -222,31 +264,105 @@
   
   virtual void
   OutData  (std::string context,
-            Ptr<const CcnxContentObjectHeader>, bool fromCache, Ptr<const CcnxFace>);
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, bool fromCache, Ptr<const CcnxFace>);
 
   virtual void
   InData   (std::string context,
-            Ptr<const CcnxContentObjectHeader>, Ptr<const CcnxFace>);
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ptr<const CcnxFace>);
 
   virtual void
   DropData (std::string context,
-            Ptr<const CcnxContentObjectHeader>, Ccnx::DropReason, Ptr<const CcnxFace>);
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ccnx::DropReason, Ptr<const CcnxFace>);
+
+protected:
+  void
+  Reset ();
+  
+protected:
+  Stats m_packets;
+  Stats m_bytes;
+};
+
+/**
+ * @ingroup ccnx
+ * @brief CCNx network-layer rate tracer
+ */
+class CcnxRateL3Tracer : public CcnxL3Tracer
+{
+public:
+  /**
+   * @brief Network layer tracer constructor
+   */
+  CcnxRateL3Tracer (std::ostream &os, Ptr<Node> node);
+  CcnxRateL3Tracer (std::ostream &os, const std::string &node);
+  virtual ~CcnxRateL3Tracer ();
+
+  void
+  SetAveragingPeriod (const Time &period);
+  
+  virtual void
+  PrintHeader (std::ostream &os) const;
+
+  virtual void
+  Print (std::ostream &os) const;
+
+  virtual void
+  OutInterests  (std::string context,
+                 Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace>);
+
+  virtual void
+  InInterests   (std::string context,
+                 Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace>);
+
+  virtual void
+  DropInterests (std::string context,
+                 Ptr<const CcnxInterestHeader>, Ccnx::DropReason, Ptr<const CcnxFace>);
+  
+  virtual void
+  OutNacks  (std::string context,
+             Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace>);
+
+  virtual void
+  InNacks   (std::string context,
+             Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace>);
+
+  virtual void
+  DropNacks (std::string context,
+             Ptr<const CcnxInterestHeader>, Ccnx::DropReason, Ptr<const CcnxFace>);
+  
+  virtual void
+  OutData  (std::string context,
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, bool fromCache, Ptr<const CcnxFace>);
+
+  virtual void
+  InData   (std::string context,
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ptr<const CcnxFace>);
+
+  virtual void
+  DropData (std::string context,
+            Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>, Ccnx::DropReason, Ptr<const CcnxFace>);
 
 private:
-  uint64_t m_inInterests;
-  uint64_t m_outInterests;
-  uint64_t m_dropInterests;
-  uint64_t m_inNacks;
-  uint64_t m_outNacks;
-  uint64_t m_dropNacks;
-  uint64_t m_inData;
-  uint64_t m_outData;
-  uint64_t m_dropData;
+  void
+  PeriodicPrinter ();
+  
+  void
+  Reset ();
+
+private:
+  std::ostream& m_os;
+  Time m_period;
+  EventId m_printEvent;
+
+  mutable std::map<Ptr<const CcnxFace>, boost::tuple<Stats, Stats, Stats, Stats> > m_stats;
 };
 
+
 class CcnxTraceHelper
 {
 public:
+  CcnxTraceHelper ();
+  
   /**
    * @brief Destructor that invokes trace output procedures
    */
@@ -271,9 +387,9 @@
    */
   void
   SetL3TraceFile (const std::string &l3Trace = "l3.log");
-  
+
   /**
-   * @brief Enable aggregate app-level CCNx tracing on all CCNx applications (individual file per application)
+   * @brief Enable aggregate app-level CCNx tracing on all CCNx applications
    *
    * @param app  Class name of the application of interest
    */
@@ -281,17 +397,26 @@
   EnableAggregateAppAll (const std::string &app);
 
   /**
-   * @brief Enable aggregate network-level CCNx tracing on all CCNx nodes (individual file per node)
+   * @brief Enable aggregate network-level CCNx tracing on all CCNx node
    */
   void
   EnableAggregateL3All ();
 
+  /**
+   * @brief Enable network-level CCNx rate tracing on all CCNx nodes (individual file per node)
+   */
+  void
+  EnableRateL3All (const std::string &l3RateTrace = "l3-rate.log");
+  
 private:
   std::string m_appTrace;
   std::list<Ptr<CcnxAggregateAppTracer> > m_apps;
 
   std::string m_l3Trace;
   std::list<Ptr<CcnxAggregateL3Tracer> > m_l3s;
+
+  std::list<Ptr<CcnxRateL3Tracer> > m_l3Rates;
+  std::ostream *m_l3RateTrace;
 };
 
 
diff --git a/model/ccnx-content-store.cc b/model/ccnx-content-store.cc
index 4875386..b0c4858 100644
--- a/model/ccnx-content-store.cc
+++ b/model/ccnx-content-store.cc
@@ -150,7 +150,7 @@
 }
 
 
-boost::tuple<Ptr<Packet>, Ptr<const CcnxContentObjectHeader> >
+boost::tuple<Ptr<Packet>, Ptr<const CcnxContentObjectHeader>, Ptr<const Packet> >
 CcnxContentStore::Lookup (Ptr<const CcnxInterestHeader> interest)
 {
   NS_LOG_FUNCTION_NOARGS ();
@@ -162,9 +162,9 @@
                                            m_contentStore.project<i_mru> (it));
 
       // return fully formed CCNx packet
-      return boost::make_tuple (it->GetFullyFormedCcnxPacket (), it->GetHeader ());
+      return boost::make_tuple (it->GetFullyFormedCcnxPacket (), it->GetHeader (), it->GetPacket ());
     }
-  return boost::tuple<Ptr<Packet>, Ptr<CcnxContentObjectHeader> > (0, 0);
+  return boost::tuple<Ptr<Packet>, Ptr<CcnxContentObjectHeader>, Ptr<Packet> > (0, 0, 0);
 }   
     
 void 
diff --git a/model/ccnx-content-store.h b/model/ccnx-content-store.h
index dd0f884..9f07a47 100644
--- a/model/ccnx-content-store.h
+++ b/model/ccnx-content-store.h
@@ -174,7 +174,7 @@
    * If an entry is found, it is promoted to the top of most recent
    * used entries index, \see m_contentStore
    */
-  boost::tuple<Ptr<Packet>, Ptr<const CcnxContentObjectHeader> >
+  boost::tuple<Ptr<Packet>, Ptr<const CcnxContentObjectHeader>, Ptr<const Packet> >
   Lookup (Ptr<const CcnxInterestHeader> interest);
             
   /**
@@ -215,22 +215,6 @@
    * Release build dumps everything in MRU order
    */
   void Print () const;
-            
-protected:
-  // /**
-  //  * \brief Move the given CS entry to the head of the list
-  //  *
-  //  * \param entry Content Store entry
-  //  */
-  // void Promote( CsEntry &entry );
-
-  /**
-   * \todo Alex: DoDispose and NotifyNewAggregate are seem to be very
-   * important, but I'm not yet sure what exactly they are supposed to
-   * do
-   */
-  // virtual void DoDispose ();
-  // virtual void NotifyNewAggregate ();
 
 private:
   CcnxContentStore (const CcnxContentStore &o); ///< Disabled copy constructor
@@ -244,7 +228,7 @@
    * \brief Content store implemented as a Boost.MultiIndex container
    * \internal
    */
-    CcnxContentStoreContainer::type m_contentStore;
+  CcnxContentStoreContainer::type m_contentStore;
 };
 
 inline std::ostream&
diff --git a/model/ccnx-l3-protocol.cc b/model/ccnx-l3-protocol.cc
index 7f5f195..2e55164 100644
--- a/model/ccnx-l3-protocol.cc
+++ b/model/ccnx-l3-protocol.cc
@@ -423,8 +423,9 @@
     }
 
   Ptr<Packet> contentObject;
-  Ptr<const CcnxContentObjectHeader> contentObjectHeader; // unused for now
-  tie (contentObject, contentObjectHeader) = m_contentStore->Lookup (header);
+  Ptr<const CcnxContentObjectHeader> contentObjectHeader; // used for tracing
+  Ptr<const Packet> payload; // used for tracing
+  tie (contentObject, contentObjectHeader, payload) = m_contentStore->Lookup (header);
   if (contentObject != 0)
     {
       NS_ASSERT (contentObjectHeader != 0);
@@ -432,7 +433,7 @@
       NS_LOG_LOGIC("Found in cache");
         
       incomingFace->Send (contentObject);
-      m_outData (contentObjectHeader, true, incomingFace);
+      m_outData (contentObjectHeader, payload, true, incomingFace);
 
       // Set pruning timout on PIT entry (instead of deleting the record)
       m_pit->modify (m_pit->iterator_to (pitEntry),
@@ -533,7 +534,7 @@
 {
     
   NS_LOG_FUNCTION (incomingFace << header << payload << packet);
-  m_inData (header, incomingFace);
+  m_inData (header, payload, incomingFace);
 
   // 1. Lookup PIT entry
   try
@@ -580,7 +581,7 @@
           if (incoming.m_face != incomingFace)
             {
               incoming.m_face->Send (packet->Copy ());
-              m_outData (header, false, incoming.m_face);
+              m_outData (header, payload, false, incoming.m_face);
             }
 
           // successfull forwarded data trace
@@ -600,7 +601,7 @@
       //    (unsolicited data packets should not "poison" content store)
       
       //drop dulicated or not requested data packet
-      m_dropData (header, UNSOLICITED, incomingFace);
+      m_dropData (header, payload, UNSOLICITED, incomingFace);
       return; // do not process unsoliced data packets
     }
 }
diff --git a/model/ccnx.h b/model/ccnx.h
index f87da94..8d565c1 100644
--- a/model/ccnx.h
+++ b/model/ccnx.h
@@ -197,14 +197,14 @@
   ////////////////////////////////////////////////////////////////////
   ////////////////////////////////////////////////////////////////////
 
-  TracedCallback<Ptr<const CcnxContentObjectHeader>,
+  TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
                  bool /*from cache*/,
                  Ptr<const CcnxFace> > m_outData;
 
-  TracedCallback<Ptr<const CcnxContentObjectHeader>,
+  TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
                  Ptr<const CcnxFace> > m_inData;
 
-  TracedCallback<Ptr<const CcnxContentObjectHeader>,
+  TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
                   DropReason,
                   Ptr<const CcnxFace> > m_dropData;  
 };
