0

I have installed the OSPF patch for ns2 and it installs correctly. Now when I try to run the tcl examples of the same patch with command ns ospf0.tcl it gives this error:

(TCL) Creating simulator & trace files...
(TCL) Setting up nodes and links...
(TCL) Configuring traffic objects...
(TCL) Configuring routing protocol...
invalid command name "Agent/rtProto/OSPF"
while executing
"Agent/rtProto/OSPF set helloInterval 1"
(file "ospf0.tcl" line 132)

Here someone says it indicates a failed build. (Or you are using a wrong executable 'ns'.), but the patch installed with no error. I used to run tcl files with ns smoothly without the patch and without OSPF. I have ubuntu 14.04 with ns2 2.35 and have applied 10-ospf4ns2.34 patch. Any ideas whats wrong? Also it would be very helpful if someone just gave me the nam file to simulate or even the trace file.

Community
  • 1
  • 1
Raein Hashemi
  • 3,346
  • 4
  • 22
  • 33

1 Answers1

1

Ns-2.35 : The patch 10-ospf4ns2.34-base.patch will fail with common/packet.h .

Please read post #4 here ... about » ospf_ns235.patch «

Here's what you can do:

Ubuntu 14.04 : $ sudo apt-get remove ns2
$ tar xvf ns-allinone-2.35_gcc482.tar.gz

https://drive.google.com/file/d/0B7S...ew?usp=sharing

$ cd ns-allinone-2.35/
$ patch -p0 < ospf_ns235.patch

https://drive.google.com/file/d/0B7S...ew?usp=sharing

$ ./install
$ cd ns-2.35/
$ sudo make install 
$ cp ns ns-ospf
$ sudo cp ns-ospf /usr/local/bin/
$ cd tcl/ex/ospf/
$ mkdir out_ospf0 out_ospf1 out_ospf2 out_ospf3 out_ospf4 out_ospf5 out_ospf6 out_ospf7 out_ospf8 out_ospf9
$ ns-ospf ospf0.tcl
.
.
$ ns-ospf ospf9.tcl
Knud Larsen
  • 5,753
  • 2
  • 14
  • 19
  • Welcome to `StackOverflow` and thanks again for also answering here. – Raein Hashemi Jan 25 '15 at 11:04
  • Another question man, how are you setting the sentences in the trace file `set sim_annotation {Agente OSPF ...}}` which shows in `nam`? Is there somewhere I can change it, beside changing all the nam file lines? I want them to be english – Raein Hashemi Jan 26 '15 at 07:38