-   Linux - Software (
-   -   How to patch GPSR routing protocol to ns-2.34 (

nimacasino 05-03-2011 05:44 AM

How to patch GPSR routing protocol to ns-2.34
Hey guys!

I need to patch the GPSR routing protocol to ns-2.34 (ns-allinone-2.34), but i dont know how. could anyone help me, please?

Thank you all in advance for your time

knudfl 05-03-2011 06:19 AM

Welcome to LQ.

I don't know of any "GPSR routing protocol patch" for ns-2.34.
The available patches are for ns-2.29 and ns-2.33

Suggest : Start with ns-allinone-2.33, and when everything works,
you can give ns-2.34 a try. ( It may work ? )

It is no problem having 2 .. 8 different ns-allinone-2.xx installed
at the same time. But do not add any of them to a path :
Is usually not required since ns-2.26.


nimacasino 05-03-2011 08:37 AM

@ knudfl
first of all thank you for your kind

Dear Knudfl, problem solved!
I handled this problem using the guidance of this webpage :
It worked and now i am happy. :)

magnetpest2k5 06-09-2011 12:44 PM

Hi nimacasino,

I also did install gpsr in ns2.34 and the included example works fine. But when I just include gpsr as routing protocol in my own simulation code it give plenty of errors. I guess I have to include many tcl parameters for the gpsr to work. Can you help me out with this?

Thank You

parastoo 06-19-2011 12:33 PM

hi guys
I have the same problem, would u plz give me a direct link to download patch gpsr for ns2.34, i couldnt use the websites above to solving my problem to downloading this patch...
tnx alot

itishi00 12-25-2011 07:12 AM

Want to measure mobility
dear nimacasino,

Can you please tell me the steps for using gpsr in ns2?
I am new to ns2 and want tot simulate mobility.

can you please guide me for that....if possible pls send some notes or code on my id

Thanks in advance

VANET_Prasad 01-05-2012 07:54 PM

GPSR on NS 2.33

I have successfully integrated the Ke Liu's GPSR implementation in to NS-2.33 and the
example which he has given for 100 stationary nodes are working fine and the packet delivery
ration is 100%.

When I tried this code for 50 mobile nodes then it does not work properly. The sources keep dropping packets
and for CBR connections the packet delivery ratio becomes as low as 10% at times.

has anyone tried this before!! Any one knows how to make this properly! I have spent lot of time
on this please help me if you can!


yashu 02-08-2012 09:13 AM

can anybody help me patching gpsr in ns2.34
please help me

knudfl 02-08-2012 09:21 AM

Post #7, @yashu.

You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But do not any of them to a *PATH.

The latest gpsr patches are for ns-2.33 only.


yashu 02-08-2012 09:30 AM

ok , i installed ns2.33, tried to execute , code is not complete, could u help me

knudfl 02-08-2012 10:53 AM

Post #10.

Which Ubuntu version are you using ? ?
And what is it you can't get to work ?
> ns2.33-hls-patch.tar.gz > ns-2.33-hls.patch

1) cd ns-allinone-2.33/2.33/ && patch -p1 < ns-2.33-hls.patch
2) cd ../ && ./install : No errors.
EDIT : Ubuntu : Please see post # 23.

. 03-06-2012 12:54 PM

Dear All,
As I found this is the only thread on the internet discussing the integration of GPSR with ns-2.34, so please let us lock it successfully. I have tried and modified many files of ns2 and Ke Liu`s implementation following the steps as nimacasino mentioned, after recompilation every thing goes well, but when I applied GPSR over the nodes, in nam these nodes do not move, any suggestion to solve this?

mdkhasawneh 03-09-2012 08:48 PM


im new to NS2 and im working on VANET

i need to work on GPSR routing protocol

i found this topic very useful

i need help in getting source code for GPSR and how to patch

if possible anyone to help me in doing that and give me the steps

knudfl 03-11-2012 12:55 PM

Post #13, @mdkhasawneh : Welcome to LQ.

Please read post # 11. And follow the link to the ns-2.33-hls.patch.

mdkhasawneh 03-11-2012 05:50 PM

thanks knudfl

i follow the steps in Post #11

but i get many errors and later this error

make:***[trace/cum-trace.o] error 1
Ns make failed!

can you please help me to solve this error

All times are GMT -5. The time now is 09:53 AM.