GPSR Protocol, inet 2.3/ cannot cast GPSR Packet

230 views
Skip to first unread message

Leslye Ibarra

unread,
Sep 25, 2014, 6:41:30 PM9/25/14
to omn...@googlegroups.com
Hi
I'm using omnet 4.3 for a VANET simulation, of routing protocol GPSR, i have my network Highway and my node Ghost, i'm casting dynamic cars and i got this error:

 Error in module (UDP) Highway.ghost[32].udp (id=719) at event #255801, t=13.544791476486: check_and_cast(): cannot cast (GPSRPacket *)Highway.ghost[32].udp.ICMP-error-#1-type11-code0.UDPBasicAppData-1308.UDPBasicAppData-1308 to type 'UDPPacket *'.

somebody can help me with this?

Leslye Ibarra

unread,
Oct 2, 2014, 5:04:40 PM10/2/14
to omn...@googlegroups.com
This is the out of my omnet simulation, the problem seems to be that my ghost[32] get datagram TTL reached zero, i guess there’s no data because it can't find next hop, am i right?

** Event #255794  T=13.544791476486  Highway.ghost[32].wlan[0].radio (Ieee80211Radio, id=733), on selfmsg `endRx' (cMessage, id=244163)
Radio::handleSelfMsg2
frame is completely received now
reception of frame over, preparing to send packet to upper layer
packet (Ieee80211DataFrameWithSNAP)UDPBasicAppData-1308 () snrMin=21380.3
bpsk snr=21380.3 ber=0
64-Qam snr=21380.3 ber=6.07118e-224
berHeader: 1.35412e-316 berMPDU: 1.35412e-316 lengthMPDU: 10849 PER: 0
packet was received correctly, it is now handed to upper layer...
sending up frame UDPBasicAppData-1308
new RadioState is IDLE
** Notification at T=13.544791476486 to Highway.ghost[32].wlan[0].mac: RADIO-STATE IDLE, channel #0, 27Mbps
# state information: mode = DCF, state = DEFER, backoff 0..1 = 1
# backoffPeriod 0..1 = 0.000099
# retryCounter 0..1 = 0, radioState = 0, nav = 0, txop is 0
#queue size 0..1 = 0, medium is free, scheduled AIFS are 0(), scheduled backoff are 0()
# currentAC: 0, oldcurrentAC: 0
# current transmission: none
processing event in state machine Ieee80211Mac State Machine
FSM Ieee80211Mac State Machine: leaving state  DEFER
firing Wait-AIFS transition for Ieee80211Mac State Machine
FSM Ieee80211Mac State Machine: entering state WAITAIFS
scheduling DIFS period
leaving handleWithFSM
    # state information: mode = DCF, state = WAITAIFS, backoff 0..1 = 1
# backoffPeriod 0..1 = 0.000099
# retryCounter 0..1 = 0, radioState = 0, nav = 0, txop is 0
#queue size 0..1 = 0, medium is free, scheduled AIFS are 0(), scheduled backoff are 0()
# currentAC: 0, oldcurrentAC: 0
# current transmission: none
Radio::handleSelfMsg END
** Event #255795  T=13.544791476486  Highway.ghost[32].wlan[0].mac (Ieee80211Mac, id=732), on `UDPBasicAppData-1308' (Ieee80211DataFrameWithSNAP, id=244212)
->Enter handleLowerMsg...
received message from lower layer: (Ieee80211DataFrameWithSNAP)UDPBasicAppData-1308
Self address: 0A-AA-00-00-00-21, receiver address: 0A-AA-00-00-00-21, received frame is for us: 1, received frame was sent by us: 0
# state information: mode = DCF, state = WAITAIFS, backoff 0..1 = 1
# backoffPeriod 0..1 = 0.000099
# retryCounter 0..1 = 0, radioState = 0, nav = 0, txop is 0
#queue size 0..1 = 0, medium is free, scheduled AIFS are 0(), scheduled backoff are 0()
# currentAC: 0, oldcurrentAC: 0
# current transmission: none
processing event in state machine Ieee80211Mac State Machine
FSM Ieee80211Mac State Machine: leaving state  WAITAIFS
firing Receive transition for Ieee80211Mac State Machine
canceling AIFS period
FSM Ieee80211Mac State Machine: entering state RECEIVE
FSM Ieee80211Mac State Machine: leaving state  RECEIVE
firing Immediate-Receive-Data transition for Ieee80211Mac State Machine
sending up (Ieee80211DataFrameWithSNAP)UDPBasicAppData-1308
FSM Ieee80211Mac State Machine: entering state WAITSIFS
scheduling SIFS period
leaving handleWithFSM
    # state information: mode = DCF, state = WAITSIFS, backoff 0..1 = 1
# backoffPeriod 0..1 = 0.000099
# retryCounter 0..1 = 0, radioState = 0, nav = 0, txop is 0
#queue size 0..1 = 0, medium is free, scheduled AIFS are 0(), scheduled backoff are 0()
# currentAC: 0, oldcurrentAC: 0
# current transmission: none
Leave handleLowerMsg...
** Event #255796  T=13.544791476486  Highway.ghost[32].wlan[0].mgmt (Ieee80211MgmtAdhoc, id=731), on `UDPBasicAppData-1308' (Ieee80211DataFrameWithSNAP, id=244212)
Frame arrived from MAC: (Ieee80211DataFrameWithSNAP)UDPBasicAppData-1308
** Event #255797  T=13.544791476486  Highway.ghost[32].networkLayer.ip (IPv4, id=725), on `UDPBasicAppData-1308' (IPv4Datagram, id=244214)
Received datagram `UDPBasicAppData-1308' with dest=192.168.0.7
GPSR at ghost[32] Finding next hop: source = 192.168.0.33, destination = 192.168.0.7
GPSR at ghost[32] Finding next hop using greedy routing: destination = 192.168.0.7
GPSR at ghost[32] Next hop found: source = 192.168.0.33, destination = 192.168.0.7, nextHop: 192.168.0.37
Routing datagram `UDPBasicAppData-1308' with dest=192.168.0.7: using manually specified output interface wlan0
output interface is wlan0, next-hop address: 192.168.0.37
datagram TTL reached zero, sending ICMP_TIME_EXCEEDED
sending ICMP error ICMP-error-#1-type11-code0
** Event #255798  T=13.544791476486  Highway.ghost[32].networkLayer.ip (IPv4, id=725), on `ICMP-error-#1-type11-code0' (ICMPMessage, id=244216)
Sending datagram `ICMP-error-#1-type11-code0' with dest=192.168.0.33
local delivery
Routing datagram `ICMP-error-#1-type11-code0' with dest=192.168.0.33: using manually specified output interface lo0
output interface is lo0, next-hop address: 192.168.0.33
Sending out packet to interface lo0
** Event #255799  T=13.544791476486  Highway.ghost[32].lo0.lo (Loopback, id=730), on `ICMP-error-#1-type11-code0' (IPv4Datagram, id=244217)
Received (IPv4Datagram)ICMP-error-#1-type11-code0 for transmission
** Event #255800  T=13.544791476486  Highway.ghost[32].networkLayer.ip (IPv4, id=725), on `ICMP-error-#1-type11-code0' (IPv4Datagram, id=244217)
Received datagram `ICMP-error-#1-type11-code0' with dest=192.168.0.33
Local delivery
** Event #255801  T=13.544791476486  Highway.ghost[32].udp (UDP, id=721), on `ICMP-error-#1-type11-code0' (ICMPMessage, id=244216)
<!> Error in module (UDP) Highway.ghost[32].udp (id=721) at event #255801, t=13.544791476486: check_and_cast(): cannot cast (GPSRPacket *)Highway.ghost[32].udp.ICMP-error-#1-type11-code0.UDPBasicAppData-1308.UDPBasicAppData-1308 to type 'UDPPacket *'.

Christoph Sommer

unread,
Oct 5, 2014, 10:46:46 AM10/5/14
to omn...@googlegroups.com
Leslye Ibarra wrote:
> Leslye Ibarra escribió:
>> i'm casting dynamic cars and i got this error:
> datagram TTL reached zero, sending ICMP_TIME_EXCEEDED
>
> i guess there’s no data because it can't find next hop, am i right?

I would guess so, too.

It is odd that your simulation crashes in this case, but I think I
recall reading something about simple UDP applications crashing when
trying to handle ICMP messages.


Best,

Christoph

--
Dr. Christoph Sommer
Distributed Embedded Systems Group
University of Paderborn, Germany
http://www.ccs-labs.org/~sommer/

Leslye Ibarra

unread,
Oct 6, 2014, 7:41:02 PM10/6/14
to omn...@googlegroups.com
i have been modifying parameters of my simulation, and this error always show up when i specific the module of mobility as TracMobility, i'm using VACaMobil to generate my traffic, i'm not sure this is making the conflict.
This is my ini file, for my VANET simulation is necessary this module of mobility to define the number and time of accidents.

[General]
sim-time-limit = 1000s
**.scalar-recording = true
**.vector-recording = true
num-rngs = 5
repeat = 1

**.manager.**.scalar-recording = true
**.manager.**.vector-recording = true
**.movStats.**.scalar-recording = true
**.movStats.**.vector-recording = true
**.vector-recording = false
**.scalar-recording = false

**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 1069900m
**.constraintAreaMaxY = 1713100m
**.constraintAreaMaxZ = 1713100m

**.debug = true
**.coreDebug = false
**.ghost*.**.channelNumber = 0


# channel physical parameters
**.ghost[*].channelControl.carrierFrequency = 2.4GHz

**.ghost[*].channelControl.numChannels = 1
**.ghost[*].channelControl.sat = -110dBm
**.ghost[*].channelControl.alpha = 2

# nic settings
**.wlan.bitrate = 54Mbps
**.wlan.mgmtType = "Ieee80211MgmtAdhoc"
**.wlan.opMode= "a"
**.wlan.mgmt.frameCapacity = 10
**.wlan.mac.address = "auto"
**.wlan.mac.maxQueueSize = 14
**.wlan.mac.rtsThresholdBytes = 2346B
**.wlan.mac.retryLimit = 7
**.wlan.mac.cwMinData = ${7, 15, 31}
**.wlan.mac.cwMaxData = 1023
**.wlan.mac.cwMinBroadcast = 20
**.wlan.mac.slotTime = 13us

**.wlan.radio.transmitterPower = 200mW
**.wlan.radio.thermalNoise = -110dBm
**.wlan.radio.sensitivity = -85dBm
**.wlan.radio.pathLossAlpha = 2
**.wlan.radio.snirThreshold = 4dB

# Capa de aplicación
**.ghost[*].numUdpApps = 1
**.ghost[*].udpApp[*].typename = "UDPBasicBurstNotification"
**.ghost[*].udpApp[*].destAddresses = moduleListByPath("**.ghost[*]")
**.ghost[*].udpApp[*].chooseDestAddrMode = "perSend"
**.ghost[*].udpApp[*].startTime = simTime() + 5s
**.ghost[*].udpApp[*].burstDuration = 0s
**.ghost[*].udpApp[*].sleepDuration = 0s
**.ghost[*].udpApp[*].destPort = 1234
**.ghost[*].udpApp[*].localPort = 1234
**.ghost[*].udpApp[*].messageLength = 1250B
**.ghost[*].udpApp[*].sendInterval = 0.25s + uniform(-0.001s,0.001s,0)
**.ghost[*].udpApp[*].delayLimit =20s
**.ghost[*].udpApp[*].chooseNewIfDeleted = true

**.networkConfiguratorModule = ""

# Capa de transporte
**.udpType  = "UDP"

**.phyOpMode= "p"
**.wlan*.opMode="p"
**.wlan[*].radio.carrierFrequency = 5.9GHz
**.mac.basicBitrate = 6Mbps

# TraCIScenarioManagerLaunchd
*.manager.updateInterval = 1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.moduleType = "vpro1.Ghost"
*.manager.moduleName = "ghost"
*.manager.moduleDisplayString = ""
*.manager.autoShutdown = true
*.manager.margin = 25

# Mobility
**.ghost[*].mobilityType = "TraCIMobility"
**.ghost[*].mobility.accidentCount =10
**.ghost[*].mobility.accidentStart = 30s
**.ghost[*].mobility.accidentDuration = 40s
**.ghost[*].mobility.accidentInterval = 50s

network = Highway
#**.vehicleRates = "coche=50 0 100"
**.meanNumberOfCars = 50
**.carHysteresisValue = 0
**.warmUpSeconds = 0s
**.autoShutdown = false
**.annotations.draw = true

*.manager.launchConfig = xmldoc("2012LAZARO.launch.xml")

Leslye Ibarra

unread,
Nov 4, 2014, 5:21:57 PM11/4/14
to omn...@googlegroups.com
somebody has the same problem?, i have change the protocol parameters but i couldn't fix the error yet.

<!> Error in module (UDP) Highway.host[36].udp (id=808) at event #61767, t=13.046145484716: check_and_cast(): cannot cast (GPSRPacket *)Highway.host[36].udp.ICMP-error-#2-type11-code0.UDPBasicAppData-158.UDPBasicAppData-158 to type 'UDPPacket *'.


** Event #61763  T=13.046145484716  Highway.host[36].networkLayer.ip (IPv4, id=812), on `UDPBasicAppData-158' (IPv4Datagram, id=119504)
Received datagram `UDPBasicAppData-158' with dest=192.168.0.42
GPSR at host[36] Finding next hop: source = 192.168.0.37, destination = 192.168.0.42
GPSR at host[36] Finding next hop using greedy routing: destination = 192.168.0.42
GPSR at host[36] Next hop found: source = 192.168.0.37, destination = 192.168.0.42, nextHop: 192.168.0.33
Routing datagram `UDPBasicAppData-158' with dest=192.168.0.42: using manually specified output interface wlan0
output interface is wlan0, next-hop address: 192.168.0.33

datagram TTL reached zero, sending ICMP_TIME_EXCEEDED
sending ICMP error ICMP-error-#2-type11-code0
** Event #61764  T=13.046145484716  Highway.host[36].networkLayer.ip (IPv4, id=812), on `ICMP-error-#2-type11-code0' (ICMPMessage, id=119506)
Sending datagram `ICMP-error-#2-type11-code0' with dest=192.168.0.37
local delivery
Routing datagram `ICMP-error-#2-type11-code0' with dest=192.168.0.37: using manually specified output interface lo0
output interface is lo0, next-hop address: 192.168.0.37

Sending out packet to interface lo0
** Event #61765  T=13.046145484716  Highway.host[36].lo0.lo (Loopback, id=817), on `ICMP-error-#2-type11-code0' (IPv4Datagram, id=119507)
Received (IPv4Datagram)ICMP-error-#2-type11-code0 for transmission
** Event #61766  T=13.046145484716  Highway.host[36].networkLayer.ip (IPv4, id=812), on `ICMP-error-#2-type11-code0' (IPv4Datagram, id=119507)
Received datagram `ICMP-error-#2-type11-code0' with dest=192.168.0.37
Local delivery
** Event #61767  T=13.046145484716  Highway.host[36].udp (UDP, id=808), on `ICMP-error-#2-type11-code0' (ICMPMessage, id=119506)
<!> Error in module (UDP) Highway.host[36].udp (id=808) at event #61767, t=13.046145484716: check_and_cast(): cannot cast (GPSRPacket *)Highway.host[36].udp.ICMP-error-#2-type11-code0.UDPBasicAppData-158.UDPBasicAppData-158 to type 'UDPPacket *'.




El jueves, 25 de septiembre de 2014 15:41:30 UTC-7, Leslye Ibarra escribió:

Sergio Martínez Tornell

unread,
Nov 17, 2014, 9:02:15 AM11/17/14
to omn...@googlegroups.com
Hi,

Did you solve your problem? It seems that you a trying to cast a ICMP packet to an UDPPacket. The problem seems to be at the UDP transport layer, did you try to debug your simulation and examinate the stack trace?

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
PhD candidate: Sergio Martínez Tornell
web: http://sertinell.es
Universidad Politécnica de Valencia.
Spain

Leslye Ibarra

unread,
Nov 19, 2014, 7:50:06 PM11/19/14
to omn...@googlegroups.com
Hello

yes, i still have the same problem, i have made changes to my ini file, but the error is still appearing now after 100s of simulation time, i have change just one parameter of the GPSR protocol. The debug shows a problem is about time limit exceeding with TTL because the udp packet didn't reach the destination (datagram TTL reached zero, sending ICMP_TIME_EXCEEDED)
Do you have any idea of this kind of error.? I will post my ini file here.
 
[General]
network = Highway
description = network layer for IPv4 network protocol only (default)
record-eventlog = false
#debug-on-errors = true
sim-time-limit =200s
num-rngs= 50
#num-rngs = 5
repeat= 50

[Config PRUs]

#**.constraintAreaMaxX = 106990m
#**.constraintAreaMaxY = 171310m
#**.constraintAreaMaxZ = 0m

# channel physical parameters
*.channelControl.carrierFrequency = 5.9GHz
#*.channelControl.pMax = 63mW
*.channelControl.sat = -110dBm
*.channelControl.alpha = 2
*.channelControl.numChannels = 1

# nic settings
**.wlan.mgmt.frameCapacity = 10
**.wlan.bitrate = 27Mbps
**.wlan.opMode = "p"
**.propagationModel = "FreeSpaceModel"
**.wlan.radio.carrierFrequency = 5.9GHz
**.mac.basicBitrate = 6Mbps
**.mac.address = "auto"

**.wlan.mgmtType = "Ieee80211MgmtAdhoc"
**.mac.maxQueueSize = 14
**.mac.rtsThresholdBytes = 2346B
**.mac.retryLimit = 7
**.mac.cwMinData = 7
**.mac.cwMinMulticast = 31

**.radio.radioModel= "Ieee80211RadioModel"
**.radio.transmitterPower = 10mW #6.9897000434dBm        #63mW 18dBm
#**.radio.TransmissionAntennaGainIndB = 2dB
#**.radio.ReceiveAntennaGainIndB = 2dB
**.radio.thermalNoise = -110dBm
**.radio.sensitivity = -87dBm                #-82dBm Sensitividad para un data rate de 6Mbps
**.radio.snirThreshold = 4dB
**.radio.pathLossAlpha = 2    # Vehicles-as-obstacles según el estudio de alcance (Con el m en su valor por defecto (1): 2.2 y 2.4)

#**.ipv4.timeToLive = 100
#**.ipv4.multicastTimeToLive = 100

**.host[*].numUdpApps = 1
**.host[*].udpApp[*].typename = "UDPBasicBurstNotification"
**.host[*].udpApp[*].destAddresses = moduleListByPath("**.host[*]")
**.host[*].udpApp[*].chooseDestAddrMode = "perBurst"
**.host[*].udpApp[*].startTime = 0s
**.host[*].udpApp[*].burstDuration = 0s
**.host[*].udpApp[*].sleepDuration = 0s
**.host[*].udpApp[*].destPort = 1234
**.host[*].udpApp[*].localPort = 1234
**.host[*].udpApp[*].messageLength = 512B
**.host[*].udpApp[*].sendInterval = 1s + uniform(-0.0001s,0.0001s)
**.host[*].udpApp[*].delayLimit = 0s

#**.host[6].numUdpApps = 1
#**.host[6].udpApp[*].typename = "UDPBasicBurstNotification"
#**.host[6].udpApp[*].destAddresses= "host[7](ipv4)"
#**.host[6].udpApp[*].chooseDestAddrMode = "perBurst"
#**.host[6].udpApp[*].startTime = simTime() + 5s
#**.host[6].udpApp[*].burstDuration = 5s
#**.host[6].udpApp[*].sleepDuration = 0s
#**.host[6].udpApp[*].destPort = 1234
#**.host[6].udpApp[*].localPort = 1234
#**.host[6].udpApp[*].messageLength = 512B
#**.host[6].udpApp[*].sendInterval = 0.5s + uniform(-0.001s,0.001s)
#**.host[6].udpApp[*].delayLimit =20s

**.networkConfiguratorModule = ""

**.udpType  = "UDP"

#**.wlan*.opMode="p"
#**.wlan[*].radio.carrierFrequency = 5.9GHz
#**.mac.basicBitrate = 6Mbps


# TraCIScenarioManagerLaunchd
*.manager.updateInterval = 1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.moduleType = "pro3.Ghost"
*.manager.moduleName = "host"

*.manager.moduleDisplayString = ""
*.manager.autoShutdown = true
*.manager.margin = 25
*.manager.launchConfig = xmldoc("2012LAZARO.launch.xml")

*.host[*].mobilityType = "TraCIMobility"
*.host[*].mobility.accidentCount = 1
*.host[*].mobility.accidentStart = 40s
*.host[*].mobility.accidentDuration = 50s
#*.host[*].mobility.accidentInterval = 120s
*.host[*].mobility.speed = truncnormal(20mps, 8mps)


#**.vehicleRates = "coche=50 0 100"
**.meanNumberOfCars = 50
**.carHysteresisValue = 0
**.warmUpSeconds = 0s
#**.doNothing = true

#**.planarizationMode= 1
#**.interfaces = "wlan0"
**.beaconInterval= 5s
#**.maxJitter= .5s
#**.neighborValidityInterval= 40s

Sergio Martínez Tornell

unread,
Nov 20, 2014, 3:28:26 AM11/20/14
to omn...@googlegroups.com
The problem is not yout TTL expired, the problem is you are casting an ICMP packet to GPRSpacket. Debug your simulation using GDB or post your simulation somewhere (github) so we can check it. Are you using inet or inetmanet?

Leslye Ibarra

unread,
Nov 20, 2014, 7:36:23 PM11/20/14
to omn...@googlegroups.com
Hi Sertinell

thanks for the answer, i'm currently using inet, but i did import application modules like: UDPBasicBurstNotification from inetmanet. i wasn't able to find the error in my debug, i upload my project and inet (the one i modified) on google drive, the link is above, if you can help me find the origin of this error i would appreciate any help, thank you in advance.
note: you can maybe have a problem with the traci connection when running the simulation, this can be fixed changing the path of the launch archive : 2012LAZARO.launch.xml.

https://drive.google.com/file/d/0B7QdYW5tPKO2ckdxZjhxNzlrLUk/view?usp=sharing

Shaikha Al-Khuder

unread,
Feb 15, 2016, 4:59:20 AM2/15/16
to OMNeT++ Users
I seem to have the same problem. I just posted a question about it. It does seem to the TTL because in shorter paths from src to dest, I did not face this problem. Is it an exception that should be caught or is there a way to maximize the TTL count?
Reply all
Reply to author
Forward
0 new messages