Bugzilla – Bug 409
Routing messages can exceed MTU, and fragmentation not supported
Last modified: 2011-07-15 18:18:52 EDT
Created attachment 303 [details]
Script where sim fails
I am trying to run the following case:
WIRED CSMA WIRELESS CHANNEL
O O )) (( O )) RANDOMLY PLACED IN 500x500 map
Nk N0 N1 ..... N(k-1)
where nNodes = k-1
The following happens:
./waf --run "scratch/wifi-mesh -nNodes=10" #Works
./waf --run "scratch/wifi-mesh -nNodes=39" #Works
./waf --run "scratch/wifi-mesh -nNodes=40" #Fails
./waf --run "scratch/wifi-mesh -nNodes=41" #Works
./waf --run "scratch/wifi-mesh -nNodes=50" #Fails
./waf --run "scratch/wifi-mesh -nNodes=100" #Fails
when it fails, I get:
assert failed. file=../src/internet-stack/ipv4-l3-protocol.cc, line=671, cond="packetCopy->GetSize () <= outInterface->GetMtu ()"
Command ['/home/cortes/ns3/ns-3-dev/build/debug/scratch/wifi-mesh', '-nNodes=40'] exited with code -11
I was able to verify and debug the cause. The culprit is that OLSR is
occasionally sending packets greater than 1500 bytes. In the specific case for
40 nodes, OLSR tries to send a 1484 byte packet (which becomes 1512 bytes after
UDP and IP headers) on a 1500 byte MTU link.
The fundamental problem is that ns-3 doesn't support IP fragmentation for UDP.
We need to decide when we are going to solve this because it will crop up
For now, the workaround in OLSR to avoid this is to scale back the number of
messages that can be inserted into a single packet, such as:
--- a/src/routing/olsr/olsr-agent-impl.cc Sun Nov 09 12:34:48 2008 +0000
+++ b/src/routing/olsr/olsr-agent-impl.cc Mon Nov 17 15:45:42 2008 -0800
@@ -121,7 +121,7 @@
#define OLSR_PORT_NUMBER 698
/// Maximum number of messages per packet.
-#define OLSR_MAX_MSGS 64
+#define OLSR_MAX_MSGS 24
I moved this to the internet-stack module. I volunteer to add ip fragmentation support once the ipv4 restructuring is done.
changed title to reflect the remaining open issue
bumping priority down-- fragmentation will not be part of ns-3.3 release
Bumping priority since this is a target for 3.4, and assigning to Mathieu who volunteered.
fragmentation not part of ns-3.4
Can we have an updates test case showing the bug?
Ns-3 changed a "little" bit and I can't reproduce this bug anymore.
This bug might now be fixed as IPv4 does have fragmentation and reassembly support.
Shall we close it ?
(In reply to comment #8)
> This bug might now be fixed as IPv4 does have fragmentation and reassembly
> Shall we close it ?
I suggest to close this bug as the just committed patch should fix this.