Simulating Mobile IPv6 in OMNeT++

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.

The Problem

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 Simulation

Ping From Correspondent Node (CN) to Mobile Node (MN)

After handover is occurred:

<!> Error in module (xMIPv6) mIPv6Network.MN[0].networkLayer.mipv6support.xMobileIPv6 (id=122) at event #115904, t=88.005745438411: Model error: ASSERT: condition !HoA.isUnspecified() false in function createAndSendBUMessage, networklayer/xmipv6/ line 587.

Ping From MN to CN

When handover is supposed to be occurred:

<!> Error in module (IPv6) mIPv6Network.CN[0].networkLayer.ipv6 (id=136) at event #737718, t=87.391133063979: No output gate defined in protocolMapping for protocol number 58.

TCP Simulation

Sending TCP packets from CN to MN, and vice versa

When the initial configuration is set up.

<!> Error in module (cModule) mIPv6Network.MN[0] (id=7) during network setup: Unable to determine type name for submodule tcpApp, missing entry mIPv6Network.MN[0].tcpApp[0].typename and no default value, at /home/d8/Downloads/omnetpp-4.6/samples/inet/src/nodes/ipv6/StandardHost6.ned:50.

UDP Simulation

<!> Error in module (cModule) mIPv6Network.MN[0] (id=7) during network setup: Unable to determine type name for submodule udpApp, missing entry mIPv6Network.MN[0].udpApp[0].typename and no default value, at /home/d8/Downloads/omnetpp-4.6/samples/inet/src/nodes/ipv6/StandardHost6.ned:58.

The Solution

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.

top: before modification. bottom: after modification
top: before modification. bottom: after modification

Config modification in omnetpp.ini:

*.channelControl.pMax = 1.0mW
**.radio.transmitterPower = 1.0mW

**.MN[0].mobility.constraintAreaMinX = 360m
**.MN[0].mobility.constraintAreaMinY = 140m
**.MN[0].mobility.constraintAreaMaxX = 530m
**.MN[0].mobility.constraintAreaMaxY = 150m

**.CN*.numPingApps = 1
**.CN*.pingApp[0].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[0].tcpApp[*].typename = “TCPSessionApp”
**.MN[0].tcpApp[0].active = true
**.MN[0].tcpApp[0].localPort = -1
**.MN[0].tcpApp[0].connectAddress = “CN[0]”
**.MN[0].tcpApp[0].connectPort = 1000
**.MN[0].tcpApp[0].tOpen = 30s
**.MN[0].tcpApp[0].tSend = 31s
**.MN[0].tcpApp[0].sendBytes = 1000000B
**.MN[0].tcpApp[0].sendScript = “”
**.MN[0].tcpApp[0].tClose = 100s

**.CN[0].numTcpApps = 1
**.CN[0].tcpApp[*].typename = “TCPEchoApp”
**.CN[0].tcpApp[0].localPort = 1000
**.CN[0].tcpApp[0].echoFactor = 2.0
**.CN[0].tcpApp[0].echoDelay = 0

For UDP Simulation

We can adopt UDP simulation example in /inet/examples/inet/udpburst/omnetpp.ini

**.numUdpApps = 1
**.udpApp[*].typename = “UDPBasicBurst”
**.udpApp[0].localPort = 100
**.udpApp[0].destPort = 100
**.udpApp[0].messageLength = 1250B
**.udpApp[0].sendInterval = 0.5s
**.MN[*].udpApp[0].destAddresses = “CN[0]”
**.CN*.udpApp[0].destAddresses = “”
**.CN*.udpApp[0].burstDuration = 10s
**.CN*.udpApp[0].sleepDuration = 2s
**.udpApp[0].chooseDestAddrMode = “perBurst”
**.MN[0].udpApp[0].burstDuration = 10s
**.MN[0].udpApp[0].sleepDuration = 2s
**.udpApp[0].startTime = 30s
**.udpApp[0].stopTime = 1000s
**.udpApp[0].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:


Penulis: fayruzrahma

always trying to be a simple person :)

4 tanggapan untuk “Simulating Mobile IPv6 in OMNeT++”

    1. salam kenal mas Komar,
      iya, OMNeT++ adalah salah satu simulator jaringan. saya belum pernah pakai GNS3, jadi tidak tau perbandingannya seperti apa
      terima kasih telah mampir dan berkomentar 🙂


Ada komentar?

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s