p2pHelper01.SetDeviceAttribute ("DataRate", StringValue ("100kbps"));
The above piece of code sets an helper. When you'll use it, it will install a couple of NetDevices on the nodes you'll pass as arguments.
Since it's a PointToPoint, only 2 devices will be created, each one on a different node.
Both devices will share the same properties, i.e., the ones defined in the helper.
Note that you have 4 PointToPoint NetDevices: one in Node 0, one in Node 2 and TWO in Node 1.
The one in Node 0 (your source node) does have a data rate, but it also have a maximum number of packets.
Summarizing, you have 2 queues between node 0 and node 2, one in node 0 and the other one in node 1 (remember, no queues on reception). Moreover, all the queues are finite, with 10 packets size.
Problem is... you haven't found the thing I was trying to point to. The big mistake in not in the queues (not only there), it's in the following lines:
Time interPacketInterval = Seconds (0.0);
...
UdpClientHelper client (serverAddress, port);
client.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
client.SetAttribute ("Interval", TimeValue (interPacketInterval)); // Default is 1 s
client.SetAttribute ("PacketSize", UintegerValue (MaxPacketSize));
apps = client.Install (nodes01.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (20.0));
Since interPacketInterval is zero, all the packets will be generated at the same time, filling the sender's queue. It's not an unexpected behaviour, and ns2 would have had the very same behaviour, if configured in the same way.
Got it now ?
Your sender node is generating packets with a data rate much greater than the link data rate (infinite to be precise), and you have set a finite queue in the sender node. This will always end up in packet being dropped at the source.
T.