LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-11-2015, 01:33 PM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599

Re #13.

$ tar xvf ns-allinone-2.35_gcc482.tar.gz
$ cd ns-allinone-2.35/
$ zcat VanetRBC+Security_ns235.patch.gz | patch -p0
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ ./install
$ cd ns-2.35/
$ cp ns ns235-vanetrbc+security
$ sudo cp ns235-vanetrbc+security /usr/local/bin/

Simulations :
$ ns235-vanetrbc+security vntest-2015.tcl : OK.
$ ns235-vanetrbc+security security.tcl : Also OK.


-
 
1 members found this post helpful.
Old 04-11-2015, 01:40 PM   #17
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Re #14.

TraNS : Just run it ...
$ cd TraNSv1.2/bin/
$ java -jar TraNSv1.2.jar
... and the TraNS GUI will open.

-
 
Old 04-11-2015, 02:19 PM   #18
Raaha Priya
LQ Newbie
 
Registered: Dec 2014
Posts: 18

Rep: Reputation: Disabled
Yes it opens but when I try to perform simulation using that got the following error

Execute: /home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35 ./files/simulation.tcl
Processing command: /home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35 ./files/simulation.tcl

java.io.IOException: Cannot run program "/home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35": java.io.IOException: error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:494)
at java.lang.Runtime.exec(Runtime.java:612)
at java.lang.Runtime.exec(Runtime.java:450)
at java.lang.Runtime.exec(Runtime.java:347)
at ch.epfl.trans.util.CommandProcessor.executeCommand(CommandProcessor.java:59)
at ch.epfl.trans.util.CommandProcessor.executeCommand(CommandProcessor.java:44)
at ch.epfl.trans.TraNS.simulate(TraNS.java:532)
at ch.epfl.trans.TraNS.actionPerformed(TraNS.java:454)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2045)
at java.awt.Component.dispatchEventImpl(Component.java:4649)
at java.awt.Container.dispatchEventImpl(Container.java:2103)
at java.awt.Component.dispatchEvent(Component.java:4475)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
at java.awt.Container.dispatchEventImpl(Container.java:2089)
at java.awt.Window.dispatchEventImpl(Window.java:2588)
at java.awt.Component.dispatchEvent(Component.java:4475)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
at java.awt.EventQueue.access$400(EventQueue.java:96)
at java.awt.EventQueue$2.run(EventQueue.java:639)
at java.awt.EventQueue$2.run(EventQueue.java:637)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:119)
at java.awt.EventQueue$3.run(EventQueue.java:653)
at java.awt.EventQueue$3.run(EventQueue.java:651)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:476)
... 44 more
Error executing /home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35 ./files/simulation.tcl
 
Old 04-11-2015, 02:31 PM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Re #18.

? Which java version : $ java -version
 
Old 04-11-2015, 02:34 PM   #20
Raaha Priya
LQ Newbie
 
Registered: Dec 2014
Posts: 18

Rep: Reputation: Disabled
java version "1.6.0_34"
OpenJDK Runtime Environment (IcedTea6 1.13.6) (6b34-1.13.6-1ubuntu0.12.04.1)
OpenJDK Server VM (build 23.25-b01, mixed mode)
 
Old 04-11-2015, 03:47 PM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Re #18
Quote:
Execute: /home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35
Did you enter the above in "NS exe file [ ]" ?

You are supposed to enter like :
/usr/local/bin/ns231 , or another executable 'ns' that TraNS will accept.

-
 
Old 04-13-2015, 04:01 AM   #22
Raaha Priya
LQ Newbie
 
Registered: Dec 2014
Posts: 18

Rep: Reputation: Disabled
Yes I gave the location where the ns executable file is there (i.e) /home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35. This is the location where the ns executable file is there.
 
Old 04-13-2015, 04:08 AM   #23
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Re #22.

If you insist in having no backup = /usr/local/bin/{ ns, ns235 },
you can of course use :
/home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35/ns

I.e. you are asked to enter the ns binary to use.
/home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35/ is not the executable ns !
So you will have to enter exactly <PATH-to>/ns


-
 
Old 04-13-2015, 04:20 AM   #24
Raaha Priya
LQ Newbie
 
Registered: Dec 2014
Posts: 18

Rep: Reputation: Disabled
Thank you so much.The vanetrbc and security protocol works perfect. thank you so much for that.

I could not understand regarding the backup.

I'll try TraNS with this /home/priya/vanet-sec-ns/ns-allinone-2.35/ns-2.35/ns as the path. Hope that is what u r trying to tell me.
 
Old 04-13-2015, 05:47 AM   #25
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Re #24.

The normal way of handling ns2 is :
$ cd ns-allinone-2.35/ns-2.35/ && sudo make install
( 'make install' will copy the executable 'ns' to /usr/local/bin/
... I.e. a system PATH.)
$ cp ns ns235 ( This is your backup. Any naming can be used.)
$ sudo cp ns235 /usr/local/bin/

Also : No *PATH entries should be done to .bashrc. Not required.

-
 
1 members found this post helpful.
Old 04-14-2015, 10:17 AM   #26
Raaha Priya
LQ Newbie
 
Registered: Dec 2014
Posts: 18

Rep: Reputation: Disabled
Thanks for making me understand regarding the path.

I tried to use the vntest.tcl in TraNS and make an active feedback between sumo and ns2(vntest.tcl)

I got the following error
Process error while executing command:
INITIALIZE THE LIST xListHead
couldn't read file "scenario/urban-n100-t500.tcl": no such file or directory
while executing
"source.orig scenario/urban-n100-t500.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source $opt(sc)

What is this error due to??
Are there any other means for integrating sumo and ns2??
Thanks for taking time and replying me patiently
 
Old 04-14-2015, 11:18 AM   #27
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Re #26.
Quote:
couldn't read file "scenario/urban-n100-t500.tcl"
Wherever you want to run "vntest.tcl" as is,
there must also be a folder scenario/ with `urban-n100-t500.tcl'.
Please read vntest.tcl : There are other options.



Quote:
integrating sumo and ns2 ?
No integration.
Sumo can create files.tcl ? ( I don't remember.) Traffic files ? Scenario files ?
.. And the files can be used for an ns2 simulation.
E.g. edit vntest.tcl from scenario/urban-n100-t500.tcl to <sumo123scen>.


-

Last edited by knudfl; 04-14-2015 at 11:26 AM.
 
Old 04-26-2015, 10:29 AM   #28
Raaha Priya
LQ Newbie
 
Registered: Dec 2014
Posts: 18

Rep: Reputation: Disabled
Can we use two protocols in the same tcl file. I tried to attach two agents Agent/VanetRBC and Agent/Security_Protocol to all the nodes in the tcl file. I am getting error called invalid Agent/Security_Protocol.

When i tried to use the two protocols in different tcl files it just works fine.

Or how am i supposed to encrypt a packet in ns2??
 
Old 04-26-2015, 10:46 AM   #29
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,383

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Re #28.

Security :
There is only only one option to use : Agent/Security_packet

"Agent/Security_Protocol" is not a valid "packet".
The word "Protocol" is never used in simulation code I think.
* Please read 'security.tcl' and 'security_ns235.patch' (VanetRBC+Security_ns235.patch.gz).



Can we use two protocols in the same tcl file ? Don't know.
Please try that out for yourself.


-
 
Old 04-26-2015, 11:14 AM   #30
Raaha Priya
LQ Newbie
 
Registered: Dec 2014
Posts: 18

Rep: Reputation: Disabled
Thanks for your response.
Actually i misspelt it. Its Agent/Security_packet that I used. I got the error as invalid command Agent/Security_packet.

Do you know how to encrypt a packet in ns2??

Thanks in advance
 
  


Reply

Tags
ns2, security-ns2, vanetrbc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with NS2.34 with BGP patch TLa Linux - Networking 49 02-15-2015 02:24 PM
run the perl script in ns2 zana Linux - Software 1 03-14-2013 05:45 AM
[SOLVED] NS2 Nam Issue atb2010 Linux - Newbie 2 03-17-2011 09:52 AM
script tcl NS2 MounaRM Linux - Networking 0 01-10-2011 08:49 AM
NS2 Script wanted. Will pay :D zeeshan12 Linux - Networking 2 06-09-2008 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration