我是ns模拟器的新手。今天,我继续关注以下网站,以在Ubuntu 16.04 x64中安装ns 2.35 http://telecom-academy.blogspot.com/2018/02/install-network-simulator-2-ns2.35-in-ubuntu-16.04-step-by-step.html。 完全安装后,我尝试使用gt-itm工具生成具有10个节点的随机网络拓扑。所以我执行了这样的命令:
$ itm r10
r10的内容如下所示
geo 3
10 10 3 .2
最终,我得到如下错误:
*** Error in `itm': double free or corruption (top): 0x0000000000bbe250 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f9f067607e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f9f0676937a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f9f0676d53c]
itm[0x406b27]
itm[0x401b0a]
itm[0x401cf5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f9f06709830]
itm[0x400f49]
======= Memory map: ========
00400000-0040b000 r-xp 00000000 08:01 1443751 /usr/local/bin/itm
0060a000-0060b000 r--p 0000a000 08:01 1443751 /usr/local/bin/itm
0060b000-0060c000 rw-p 0000b000 08:01 1443751 /usr/local/bin/itm
0060c000-0060d000 rw-p 00000000 00:00 0
00bbd000-00bde000 rw-p 00000000 00:00 0 [heap]
7f9f00000000-7f9f00021000 rw-p 00000000 00:00 0
7f9f00021000-7f9f04000000 ---p 00000000 00:00 0
7f9f064d3000-7f9f064e9000 r-xp 00000000 08:01 6296370 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f9f064e9000-7f9f066e8000 ---p 00016000 08:01 6296370 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f9f066e8000-7f9f066e9000 rw-p 00015000 08:01 6296370 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f9f066e9000-7f9f068a9000 r-xp 00000000 08:01 6296332 /lib/x86_64-linux-gnu/libc-2.23.so
7f9f068a9000-7f9f06aa9000 ---p 001c0000 08:01 6296332 /lib/x86_64-linux-gnu/libc-2.23.so
7f9f06aa9000-7f9f06aad000 r--p 001c0000 08:01 6296332 /lib/x86_64-linux-gnu/libc-2.23.so
7f9f06aad000-7f9f06aaf000 rw-p 001c4000 08:01 6296332 /lib/x86_64-linux-gnu/libc-2.23.so
7f9f06aaf000-7f9f06ab3000 rw-p 00000000 00:00 0
7f9f06ab3000-7f9f06bbb000 r-xp 00000000 08:01 6296402 /lib/x86_64-linux-gnu/libm-2.23.so
7f9f06bbb000-7f9f06dba000 ---p 00108000 08:01 6296402 /lib/x86_64-linux-gnu/libm-2.23.so
7f9f06dba000-7f9f06dbb000 r--p 00107000 08:01 6296402 /lib/x86_64-linux-gnu/libm-2.23.so
7f9f06dbb000-7f9f06dbc000 rw-p 00108000 08:01 6296402 /lib/x86_64-linux-gnu/libm-2.23.so
7f9f06dbc000-7f9f06de2000 r-xp 00000000 08:01 6296304 /lib/x86_64-linux-gnu/ld-2.23.so
7f9f06fc4000-7f9f06fc8000 rw-p 00000000 00:00 0
7f9f06fe0000-7f9f06fe1000 rw-p 00000000 00:00 0
7f9f06fe1000-7f9f06fe2000 r--p 00025000 08:01 6296304 /lib/x86_64-linux-gnu/ld-2.23.so
7f9f06fe2000-7f9f06fe3000 rw-p 00026000 08:01 6296304 /lib/x86_64-linux-gnu/ld-2.23.so
7f9f06fe3000-7f9f06fe4000 rw-p 00000000 00:00 0
7ffe9d89b000-7ffe9d8bd000 rw-p 00000000 00:00 0 [stack]
7ffe9d953000-7ffe9d956000 r--p 00000000 00:00 0 [vvar]
7ffe9d956000-7ffe9d958000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)
此外,我尝试使用:export MALLOC_CHECK_ = 0用于删除错误日志。相反,我得到了网状网络拓扑。我想要的是随机网络拓扑而不是网格。所以任何人都可以帮助我解决这个问题。预先感谢。
当前输出:
EDGES (from-node to-node length a b):
0 9
0 8
0 7
....
0 3
0 2
0 1
1 9
1 8
1 7
...
1 2
2 9
2 8
2 7
...
8 9
但是我期望的是随机生成,如下所示:
EDGES (from-node to-node length a b):
0 9
0 4
0 2
1 8
2 6
3 9
3 8
3 5
4 7
4 6
5 9
5 7
7 9
8 9
答案 0 :(得分:0)
我的测试:
cd ns-2.35/gt-itm/bin/
./itm r20 // where r20 is a 19B text file with your code
文件{{r20-0.gb 5.4kB, r20-1.gb 5.1kB, r20-2.gb 5.3kB
}已创建。
您的链接https://www.howtoforge.com/tutorial/ns2-network-simulator-on-ubuntu-14.04/ 是旧信息。最新的是:ns-allinone-2.35_gcc5.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing→使用gt-itm
中更新的ns-allinone-2.36.rc1.tar.gz
(2017年更新)。并在ns-2.35/
中进行了g ++-5.4更新(2014年更新)。
注意:请注意,ns-2.35 /必须使用g ++-5.4或更早版本进行编译,例如g ++-4.8。 (ns-allinone-2.35的示例构建命令:export CC=gcc-4.8 CXX=g++-4.8 && ./install
)