cbr-50-20-4-512
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:9k
源码类别:

通讯编程

开发平台:

Visual C++

  1. #
  2. # nodes: 50, max conn: 20, send rate: 4.0, seed: 95813843.243
  3. #
  4. #
  5. # 1 connecting to 2 at time 176.70898653413587
  6. #
  7. set udp_(0) [new Agent/UDP]
  8. $ns_ attach-agent $node_(1) $udp_(0)
  9. set null_(0) [new Agent/Null]
  10. $ns_ attach-agent $node_(2) $null_(0)
  11. set cbr_(0) [new Application/Traffic/CBR]
  12. $cbr_(0) set packetSize_ 512
  13. $cbr_(0) set interval_ 4.0
  14. $cbr_(0) set random_ 1
  15. $cbr_(0) set maxpkts_ 10000
  16. $cbr_(0) attach-agent $udp_(0)
  17. $ns_ connect $udp_(0) $null_(0)
  18. $ns_ at 176.70898653413587 "$cbr_(0) start"
  19. #
  20. # 1 connecting to 3 at time 127.93667922166023
  21. #
  22. set udp_(1) [new Agent/UDP]
  23. $ns_ attach-agent $node_(1) $udp_(1)
  24. set null_(1) [new Agent/Null]
  25. $ns_ attach-agent $node_(3) $null_(1)
  26. set cbr_(1) [new Application/Traffic/CBR]
  27. $cbr_(1) set packetSize_ 512
  28. $cbr_(1) set interval_ 4.0
  29. $cbr_(1) set random_ 1
  30. $cbr_(1) set maxpkts_ 10000
  31. $cbr_(1) attach-agent $udp_(1)
  32. $ns_ connect $udp_(1) $null_(1)
  33. $ns_ at 127.93667922166023 "$cbr_(1) start"
  34. #
  35. # 2 connecting to 3 at time 79.371595438277154
  36. #
  37. set udp_(2) [new Agent/UDP]
  38. $ns_ attach-agent $node_(2) $udp_(2)
  39. set null_(2) [new Agent/Null]
  40. $ns_ attach-agent $node_(3) $null_(2)
  41. set cbr_(2) [new Application/Traffic/CBR]
  42. $cbr_(2) set packetSize_ 512
  43. $cbr_(2) set interval_ 4.0
  44. $cbr_(2) set random_ 1
  45. $cbr_(2) set maxpkts_ 10000
  46. $cbr_(2) attach-agent $udp_(2)
  47. $ns_ connect $udp_(2) $null_(2)
  48. $ns_ at 79.371595438277154 "$cbr_(2) start"
  49. #
  50. # 8 connecting to 9 at time 130.49074511532243
  51. #
  52. set udp_(3) [new Agent/UDP]
  53. $ns_ attach-agent $node_(8) $udp_(3)
  54. set null_(3) [new Agent/Null]
  55. $ns_ attach-agent $node_(9) $null_(3)
  56. set cbr_(3) [new Application/Traffic/CBR]
  57. $cbr_(3) set packetSize_ 512
  58. $cbr_(3) set interval_ 4.0
  59. $cbr_(3) set random_ 1
  60. $cbr_(3) set maxpkts_ 10000
  61. $cbr_(3) attach-agent $udp_(3)
  62. $ns_ connect $udp_(3) $null_(3)
  63. $ns_ at 130.49074511532243 "$cbr_(3) start"
  64. #
  65. # 8 connecting to 10 at time 37.95315322370881
  66. #
  67. set udp_(4) [new Agent/UDP]
  68. $ns_ attach-agent $node_(8) $udp_(4)
  69. set null_(4) [new Agent/Null]
  70. $ns_ attach-agent $node_(10) $null_(4)
  71. set cbr_(4) [new Application/Traffic/CBR]
  72. $cbr_(4) set packetSize_ 512
  73. $cbr_(4) set interval_ 4.0
  74. $cbr_(4) set random_ 1
  75. $cbr_(4) set maxpkts_ 10000
  76. $cbr_(4) attach-agent $udp_(4)
  77. $ns_ connect $udp_(4) $null_(4)
  78. $ns_ at 37.95315322370881 "$cbr_(4) start"
  79. #
  80. # 9 connecting to 10 at time 127.20229852348672
  81. #
  82. set udp_(5) [new Agent/UDP]
  83. $ns_ attach-agent $node_(9) $udp_(5)
  84. set null_(5) [new Agent/Null]
  85. $ns_ attach-agent $node_(10) $null_(5)
  86. set cbr_(5) [new Application/Traffic/CBR]
  87. $cbr_(5) set packetSize_ 512
  88. $cbr_(5) set interval_ 4.0
  89. $cbr_(5) set random_ 1
  90. $cbr_(5) set maxpkts_ 10000
  91. $cbr_(5) attach-agent $udp_(5)
  92. $ns_ connect $udp_(5) $null_(5)
  93. $ns_ at 127.20229852348672 "$cbr_(5) start"
  94. #
  95. # 9 connecting to 11 at time 29.031284241486009
  96. #
  97. set udp_(6) [new Agent/UDP]
  98. $ns_ attach-agent $node_(9) $udp_(6)
  99. set null_(6) [new Agent/Null]
  100. $ns_ attach-agent $node_(11) $null_(6)
  101. set cbr_(6) [new Application/Traffic/CBR]
  102. $cbr_(6) set packetSize_ 512
  103. $cbr_(6) set interval_ 4.0
  104. $cbr_(6) set random_ 1
  105. $cbr_(6) set maxpkts_ 10000
  106. $cbr_(6) attach-agent $udp_(6)
  107. $ns_ connect $udp_(6) $null_(6)
  108. $ns_ at 29.031284241486009 "$cbr_(6) start"
  109. #
  110. # 10 connecting to 11 at time 144.90353608732275
  111. #
  112. set udp_(7) [new Agent/UDP]
  113. $ns_ attach-agent $node_(10) $udp_(7)
  114. set null_(7) [new Agent/Null]
  115. $ns_ attach-agent $node_(11) $null_(7)
  116. set cbr_(7) [new Application/Traffic/CBR]
  117. $cbr_(7) set packetSize_ 512
  118. $cbr_(7) set interval_ 4.0
  119. $cbr_(7) set random_ 1
  120. $cbr_(7) set maxpkts_ 10000
  121. $cbr_(7) attach-agent $udp_(7)
  122. $ns_ connect $udp_(7) $null_(7)
  123. $ns_ at 144.90353608732275 "$cbr_(7) start"
  124. #
  125. # 11 connecting to 12 at time 117.24698354361905
  126. #
  127. set udp_(8) [new Agent/UDP]
  128. $ns_ attach-agent $node_(11) $udp_(8)
  129. set null_(8) [new Agent/Null]
  130. $ns_ attach-agent $node_(12) $null_(8)
  131. set cbr_(8) [new Application/Traffic/CBR]
  132. $cbr_(8) set packetSize_ 512
  133. $cbr_(8) set interval_ 4.0
  134. $cbr_(8) set random_ 1
  135. $cbr_(8) set maxpkts_ 10000
  136. $cbr_(8) attach-agent $udp_(8)
  137. $ns_ connect $udp_(8) $null_(8)
  138. $ns_ at 117.24698354361905 "$cbr_(8) start"
  139. #
  140. # 11 connecting to 13 at time 110.05241760520842
  141. #
  142. set udp_(9) [new Agent/UDP]
  143. $ns_ attach-agent $node_(11) $udp_(9)
  144. set null_(9) [new Agent/Null]
  145. $ns_ attach-agent $node_(13) $null_(9)
  146. set cbr_(9) [new Application/Traffic/CBR]
  147. $cbr_(9) set packetSize_ 512
  148. $cbr_(9) set interval_ 4.0
  149. $cbr_(9) set random_ 1
  150. $cbr_(9) set maxpkts_ 10000
  151. $cbr_(9) attach-agent $udp_(9)
  152. $ns_ connect $udp_(9) $null_(9)
  153. $ns_ at 110.05241760520842 "$cbr_(9) start"
  154. #
  155. # 12 connecting to 13 at time 106.08323424406501
  156. #
  157. set udp_(10) [new Agent/UDP]
  158. $ns_ attach-agent $node_(12) $udp_(10)
  159. set null_(10) [new Agent/Null]
  160. $ns_ attach-agent $node_(13) $null_(10)
  161. set cbr_(10) [new Application/Traffic/CBR]
  162. $cbr_(10) set packetSize_ 512
  163. $cbr_(10) set interval_ 4.0
  164. $cbr_(10) set random_ 1
  165. $cbr_(10) set maxpkts_ 10000
  166. $cbr_(10) attach-agent $udp_(10)
  167. $ns_ connect $udp_(10) $null_(10)
  168. $ns_ at 106.08323424406501 "$cbr_(10) start"
  169. #
  170. # 12 connecting to 14 at time 40.91794000049957
  171. #
  172. set udp_(11) [new Agent/UDP]
  173. $ns_ attach-agent $node_(12) $udp_(11)
  174. set null_(11) [new Agent/Null]
  175. $ns_ attach-agent $node_(14) $null_(11)
  176. set cbr_(11) [new Application/Traffic/CBR]
  177. $cbr_(11) set packetSize_ 512
  178. $cbr_(11) set interval_ 4.0
  179. $cbr_(11) set random_ 1
  180. $cbr_(11) set maxpkts_ 10000
  181. $cbr_(11) attach-agent $udp_(11)
  182. $ns_ connect $udp_(11) $null_(11)
  183. $ns_ at 40.91794000049957 "$cbr_(11) start"
  184. #
  185. # 13 connecting to 14 at time 30.208176369875751
  186. #
  187. set udp_(12) [new Agent/UDP]
  188. $ns_ attach-agent $node_(13) $udp_(12)
  189. set null_(12) [new Agent/Null]
  190. $ns_ attach-agent $node_(14) $null_(12)
  191. set cbr_(12) [new Application/Traffic/CBR]
  192. $cbr_(12) set packetSize_ 512
  193. $cbr_(12) set interval_ 4.0
  194. $cbr_(12) set random_ 1
  195. $cbr_(12) set maxpkts_ 10000
  196. $cbr_(12) attach-agent $udp_(12)
  197. $ns_ connect $udp_(12) $null_(12)
  198. $ns_ at 30.208176369875751 "$cbr_(12) start"
  199. #
  200. # 14 connecting to 15 at time 141.91656903453011
  201. #
  202. set udp_(13) [new Agent/UDP]
  203. $ns_ attach-agent $node_(14) $udp_(13)
  204. set null_(13) [new Agent/Null]
  205. $ns_ attach-agent $node_(15) $null_(13)
  206. set cbr_(13) [new Application/Traffic/CBR]
  207. $cbr_(13) set packetSize_ 512
  208. $cbr_(13) set interval_ 4.0
  209. $cbr_(13) set random_ 1
  210. $cbr_(13) set maxpkts_ 10000
  211. $cbr_(13) attach-agent $udp_(13)
  212. $ns_ connect $udp_(13) $null_(13)
  213. $ns_ at 141.91656903453011 "$cbr_(13) start"
  214. #
  215. # 16 connecting to 17 at time 23.789830405167226
  216. #
  217. set udp_(14) [new Agent/UDP]
  218. $ns_ attach-agent $node_(16) $udp_(14)
  219. set null_(14) [new Agent/Null]
  220. $ns_ attach-agent $node_(17) $null_(14)
  221. set cbr_(14) [new Application/Traffic/CBR]
  222. $cbr_(14) set packetSize_ 512
  223. $cbr_(14) set interval_ 4.0
  224. $cbr_(14) set random_ 1
  225. $cbr_(14) set maxpkts_ 10000
  226. $cbr_(14) attach-agent $udp_(14)
  227. $ns_ connect $udp_(14) $null_(14)
  228. $ns_ at 23.789830405167226 "$cbr_(14) start"
  229. #
  230. # 18 connecting to 19 at time 83.602217232623246
  231. #
  232. set udp_(15) [new Agent/UDP]
  233. $ns_ attach-agent $node_(18) $udp_(15)
  234. set null_(15) [new Agent/Null]
  235. $ns_ attach-agent $node_(19) $null_(15)
  236. set cbr_(15) [new Application/Traffic/CBR]
  237. $cbr_(15) set packetSize_ 512
  238. $cbr_(15) set interval_ 4.0
  239. $cbr_(15) set random_ 1
  240. $cbr_(15) set maxpkts_ 10000
  241. $cbr_(15) attach-agent $udp_(15)
  242. $ns_ connect $udp_(15) $null_(15)
  243. $ns_ at 83.602217232623246 "$cbr_(15) start"
  244. #
  245. # 18 connecting to 20 at time 22.46502869877267
  246. #
  247. set udp_(16) [new Agent/UDP]
  248. $ns_ attach-agent $node_(18) $udp_(16)
  249. set null_(16) [new Agent/Null]
  250. $ns_ attach-agent $node_(20) $null_(16)
  251. set cbr_(16) [new Application/Traffic/CBR]
  252. $cbr_(16) set packetSize_ 512
  253. $cbr_(16) set interval_ 4.0
  254. $cbr_(16) set random_ 1
  255. $cbr_(16) set maxpkts_ 10000
  256. $cbr_(16) attach-agent $udp_(16)
  257. $ns_ connect $udp_(16) $null_(16)
  258. $ns_ at 22.46502869877267 "$cbr_(16) start"
  259. #
  260. # 19 connecting to 20 at time 75.477956242616273
  261. #
  262. set udp_(17) [new Agent/UDP]
  263. $ns_ attach-agent $node_(19) $udp_(17)
  264. set null_(17) [new Agent/Null]
  265. $ns_ attach-agent $node_(20) $null_(17)
  266. set cbr_(17) [new Application/Traffic/CBR]
  267. $cbr_(17) set packetSize_ 512
  268. $cbr_(17) set interval_ 4.0
  269. $cbr_(17) set random_ 1
  270. $cbr_(17) set maxpkts_ 10000
  271. $cbr_(17) attach-agent $udp_(17)
  272. $ns_ connect $udp_(17) $null_(17)
  273. $ns_ at 75.477956242616273 "$cbr_(17) start"
  274. #
  275. # 20 connecting to 21 at time 83.644134711308467
  276. #
  277. set udp_(18) [new Agent/UDP]
  278. $ns_ attach-agent $node_(20) $udp_(18)
  279. set null_(18) [new Agent/Null]
  280. $ns_ attach-agent $node_(21) $null_(18)
  281. set cbr_(18) [new Application/Traffic/CBR]
  282. $cbr_(18) set packetSize_ 512
  283. $cbr_(18) set interval_ 4.0
  284. $cbr_(18) set random_ 1
  285. $cbr_(18) set maxpkts_ 10000
  286. $cbr_(18) attach-agent $udp_(18)
  287. $ns_ connect $udp_(18) $null_(18)
  288. $ns_ at 83.644134711308467 "$cbr_(18) start"
  289. #
  290. # 22 connecting to 23 at time 155.32651876813105
  291. #
  292. set udp_(19) [new Agent/UDP]
  293. $ns_ attach-agent $node_(22) $udp_(19)
  294. set null_(19) [new Agent/Null]
  295. $ns_ attach-agent $node_(23) $null_(19)
  296. set cbr_(19) [new Application/Traffic/CBR]
  297. $cbr_(19) set packetSize_ 512
  298. $cbr_(19) set interval_ 4.0
  299. $cbr_(19) set random_ 1
  300. $cbr_(19) set maxpkts_ 10000
  301. $cbr_(19) attach-agent $udp_(19)
  302. $ns_ connect $udp_(19) $null_(19)
  303. $ns_ at 155.32651876813105 "$cbr_(19) start"
  304. #
  305. #Total sources/connections: 14/20
  306. #