note: I run this on INET2.x. These problems were solved in INET3.x
Click here for draft of INET for Starters / INET for Dummies / INET Tutorial.
When I tried to run mobileipv6 example in INET/OMNeT++ without any modification in omnetpp.ini except the number of Ping/TCP/UDP apps, I encountered some problems…
(note: I run the simulation in Fast/Express mode)
Ping From Correspondent Node (CN) to Mobile Node (MN)
After handover is occurred:
<!> Error in module (xMIPv6) mIPv6Network.MN.networkLayer.mipv6support.xMobileIPv6 (id=122) at event #115904, t=88.005745438411: Model error: ASSERT: condition !HoA.isUnspecified() false in function createAndSendBUMessage, networklayer/xmipv6/xMIPv6.cc line 587.
Ping From MN to CN
When handover is supposed to be occurred:
<!> Error in module (IPv6) mIPv6Network.CN.networkLayer.ipv6 (id=136) at event #737718, t=87.391133063979: No output gate defined in protocolMapping for protocol number 58.
Sending TCP packets from CN to MN, and vice versa
When the initial configuration is set up.
<!> Error in module (cModule) mIPv6Network.MN (id=7) during network setup: Unable to determine type name for submodule tcpApp, missing entry mIPv6Network.MN.tcpApp.typename and no default value, at /home/d8/Downloads/omnetpp-4.6/samples/inet/src/nodes/ipv6/StandardHost6.ned:50.
<!> Error in module (cModule) mIPv6Network.MN (id=7) during network setup: Unable to determine type name for submodule udpApp, missing entry mIPv6Network.MN.udpApp.typename and no default value, at /home/d8/Downloads/omnetpp-4.6/samples/inet/src/nodes/ipv6/StandardHost6.ned:58.
I searched about these problems in OMNeT++ google group and found some solutions.
This is the solution of CN to MN ping problem:
“The problem seems to be due to a bug in route optimization. I have just solved the problem by disconnecting route optimization procedures, making “return” in the beginning of method xMIPv6::triggerRouteOptimization.” -António Grilo
Another researcher even sent me emails to point me the real problem (?) and solution.
“Try to run the simulation in the normal timing not in express mode, I remember I also faced same problem and I could resolve it by running slow simulation, otherwise the delay parameters needs to be changed.” -M. Arif Amin
“please run the simulation in normal mode not in the fast mode, sometime the speed of node is very high in the express mode and the MN cannot perform neighbor discovery and IPv6 configurations and then you will face issues.” -M. Arif Amin
Another problem arose. Because of the wide mobility area and the short interval of beacon message, if the simulation is run in normal mode, it’ll take 3 hours until handover is occurred. 3 hours is quite a long time.
So, to reduce the simulation time needed, I tried to narrow the mobility area and bring the access points closer to each other. The transmitter/receiver power should be reduced too.
Config modification in omnetpp.ini:
*.channelControl.pMax = 1.0mW
**.radio.transmitterPower = 1.0mW
**.MN.mobility.constraintAreaMinX = 360m
**.MN.mobility.constraintAreaMinY = 140m
**.MN.mobility.constraintAreaMaxX = 530m
**.MN.mobility.constraintAreaMaxY = 150m
**.CN*.numPingApps = 1
**.CN*.pingApp.count = -1 # -1 means continuously
For TCP Simulation
For the configuration of TCP simulation, we can adopt TCP simulation example in /inet/examples/inet/tcpclientserver/omnetpp.ini
**.MN[*].numTcpApps = 1
**.MN.tcpApp[*].typename = “TCPSessionApp”
**.MN.tcpApp.active = true
**.MN.tcpApp.localPort = -1
**.MN.tcpApp.connectAddress = “CN”
**.MN.tcpApp.connectPort = 1000
**.MN.tcpApp.tOpen = 30s
**.MN.tcpApp.tSend = 31s
**.MN.tcpApp.sendBytes = 1000000B
**.MN.tcpApp.sendScript = “”
**.MN.tcpApp.tClose = 100s
**.CN.numTcpApps = 1
**.CN.tcpApp[*].typename = “TCPEchoApp”
**.CN.tcpApp.localPort = 1000
**.CN.tcpApp.echoFactor = 2.0
**.CN.tcpApp.echoDelay = 0
For UDP Simulation
We can adopt UDP simulation example in /inet/examples/inet/udpburst/omnetpp.ini
**.numUdpApps = 1
**.udpApp[*].typename = “UDPBasicBurst”
**.udpApp.localPort = 100
**.udpApp.destPort = 100
**.udpApp.messageLength = 1250B
**.udpApp.sendInterval = 0.5s
**.MN[*].udpApp.destAddresses = “CN”
**.CN*.udpApp.destAddresses = “”
**.CN*.udpApp.burstDuration = 10s
**.CN*.udpApp.sleepDuration = 2s
**.udpApp.chooseDestAddrMode = “perBurst”
**.MN.udpApp.burstDuration = 10s
**.MN.udpApp.sleepDuration = 2s
**.udpApp.startTime = 30s
**.udpApp.stopTime = 1000s
**.udpApp.delayLimit = 3s
You can read my code of MIPv6Network.ned and omnetpp.ini here.
Mobile IPv6 Simulation in OMNeT++ can be watched in this video: