Bug 409 - Routing messages can exceed MTU, and fragmentation not supported
: Routing messages can exceed MTU, and fragmentation not supported
Status: NEW
: ns-3
internet-stack
: ns-3-dev
: PC Linux
: P2 normal
Assigned To:
:
: bug
:
:
  Show dependency treegraph
 
Reported: 2008-11-14 20:57 EDT by
Modified: 2009-04-03 11:42 EDT (History)


Attachments
Script where sim fails (9.88 KB, text/x-c++src)
2008-11-14 20:57 EDT, Luis
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-11-14 20:57:25 EDT
Created an attachment (id=303) [details]
Script where sim fails

Hi,

I am trying to run the following case:

TOPOLOGY:

     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 

Thanks,
------- Comment #1 From 2008-11-17 18:38:28 EDT -------
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
again.

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
------- Comment #2 From 2008-11-25 09:12:18 EDT -------
I moved this to the internet-stack module. I volunteer to add ip fragmentation
support once the ipv4 restructuring is done.
------- Comment #3 From 2008-11-25 09:56:06 EDT -------
changed title to reflect the remaining open issue
------- Comment #4 From 2008-11-25 09:57:24 EDT -------
bumping priority down-- fragmentation will not be part of ns-3.3 release
------- Comment #5 From 2008-12-19 13:35:19 EDT -------
Bumping priority since this is a target for 3.4, and assigning to Mathieu who
volunteered.
------- Comment #6 From 2009-02-16 01:05:48 EDT -------
fragmentation not part of ns-3.4