Set TTL for RREQ Packet

157 views
Skip to first unread message

Khairul Azmi

unread,
Oct 26, 2009, 5:48:26 PM10/26/09
to omne...@omnetpp.org
Hi,
I'm using INETMANET and want to simulate DSR routing protocol in OMNET. I want to limit the number of hop the RREQ packet should traverse. I look at the parameter of TTL_START in function dsr_rreq_route_discovery at file dsr-rreq.cc and change it from 10 to 1. Unfortunately it is not working. The control packet is still be rebroadcasted by the next node. Is there a way to solve this? Thanks in advance. 

Alfonso Ariza

unread,
Oct 27, 2009, 6:54:58 AM10/27/09
to omn...@googlegroups.com

TTL_START is the initial TTL not the maximum TTL, DSR double the TTL if the node doesn't receive a RREP

 

You should modify the MAXTTL label in the dsr-rreq.cc file


Khairul Azmi

unread,
Oct 27, 2009, 9:43:25 AM10/27/09
to omn...@googlegroups.com
Thanks for the reply,
Correct me if I'm wrong. DSR double the TTL only when there is timeout for the RREQ and if MaxMaintRexmt greater than 1. I want the RREQ control packet be broadcasted up to only one hop. But I could not see any where in the codes the TTL is been monitored and the packet is dropped when TTL is 0. Cheers.

Khairul Azmi

unread,
Oct 27, 2009, 10:14:50 AM10/27/09
to omn...@googlegroups.com
My mistake. The code is in function dsr_ack_req_send in file dsr-ack.cc. I've been looking in file dsr-rreq.cc. Cheers.

Alfonso Ariza

unread,
Oct 27, 2009, 11:49:56 AM10/27/09
to omn...@googlegroups.com
In the method

void

DSRUU::omnet_xmit(struct dsr_pkt *dp)
 

/* If TTL = 0, drop packet */

if (p->getTimeToLive() <= 0) {

DEBUG(

"Dropping packet with TTL = 0.");

drop(p,

ICMP_TIME_EXCEEDED);

dp->

payload = NULL;

dsr_pkt_free(dp);

return;

}

 

Shaikha Al-Khuder

unread,
Feb 8, 2016, 12:09:10 PM2/8/16
to OMNeT++ Users
drop(msg)
Does it drop the message(discards it the same way the function you wrote does)??

Alfonso Ariza Quintana

unread,
Feb 9, 2016, 4:06:10 AM2/9/16
to omn...@googlegroups.com
the method drop deletes the packet


Date: Mon, 8 Feb 2016 09:09:09 -0800
From: cpe....@gmail.com
To: omn...@googlegroups.com
Subject: Re: [Omnetpp-l] Re: Set TTL for RREQ Packet
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Shaikha Al-Khuder

unread,
Feb 9, 2016, 5:03:31 AM2/9/16
to omn...@googlegroups.com
Where does a node decides if this msg is for it or for another node (forwards it to other node)? in which class?
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/MQo6VVO698o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

Alfonso Ariza Quintana

unread,
Feb 9, 2016, 5:07:34 AM2/9/16
to omn...@googlegroups.com

It is DSR, the DSR is special because the packet has a header with all the nodes that the packet must cross
there is a dsr_srt file that contains all the functions used to process this header


Subject: Re: [Omnetpp-l] Re: Set TTL for RREQ Packet
Date: Tue, 9 Feb 2016 13:03:23 +0300
To: omn...@googlegroups.com

Shaikha Al-Khuder

unread,
Feb 9, 2016, 5:16:43 AM2/9/16
to omn...@googlegroups.com
So I cannot do this in AODV ? It is only possible in DSR?

Alfonso Ariza Quintana

unread,
Feb 9, 2016, 5:26:37 AM2/9/16
to omn...@googlegroups.com
you can check also the ttl in aodv. Aodv also uses the ttl field to control the propagation of a packet.


From: cpe....@gmail.com
Subject: Re: [Omnetpp-l] Re: Set TTL for RREQ Packet
Date: Tue, 9 Feb 2016 13:16:35 +0300
To: omn...@googlegroups.com

Shaikha Al-Khuder

unread,
Feb 9, 2016, 7:48:44 AM2/9/16
to omn...@googlegroups.com
I did. It was useful for hopCount, thank you. But, now, I need to know where can I see the function that inspects the forwarded packets, so I can add the extra filtering step (maybe extra tag) to the forwarded message/packet.

I don’t want to use DSR...
Reply all
Reply to author
Forward
0 new messages