Changes between Version 7 and Version 8 of NewDelayNodeNs
- Timestamp:
- Nov 14, 2011 6:38:36 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewDelayNodeNs
v7 v8 5 5 == make-new-lan == 6 6 The new delay node supports variable delays based on various probability distributions such as: Poisson, Normal and Exponential. Moreover, it 7 enhances some of the functions for a more realistic link emulation. "make- new-lan" command create a LAN that uses this new delay node to control bandwidth, add probabilistic delays and induces sophisticated loss pattern. make-new-lan parameters are the nodelist, bandwidth, delay properties, and loss pattern description. To create a LAN, connecting three nodes, with a static delay of 30ms, 1Gb bandwidth and a static loss of threshold 0.1 and a rate of 1.7 enhances some of the functions for a more realistic link emulation. "make-deter-lan" command create a LAN that uses this new delay node to control bandwidth, add probabilistic delays and induces sophisticated loss pattern. make-deter-lan parameters are the nodelist, bandwidth, delay properties, and loss pattern description. To create a LAN, connecting three nodes, with a static delay of 30ms, 1Gb bandwidth and a static loss of threshold 0.1 and a rate of 1. 8 8 {{{ 9 9 set ns [ new Simulator] … … 14 14 set nodeC [$ns node] 15 15 16 set lan1 [$ns make- new-lan "$nodeA $nodeB $nodeC" bw 1Gb delay static 30ms loss 0.1 static1]16 set lan1 [$ns make-deter-lan "$nodeA $nodeB $nodeC" bw 1Gb delay static mean 30ms loss static threshold 0.1 rate 1] 17 17 $ns rtproto Static 18 18 $ns run 19 19 }}} 20 20 21 make- new-lan receives the arguments in any order e.g you could provide delay parameters before loss one, however, nodelist should be the first. Note that bandwidth parameters have to be preceded by "bw", delay with "delay", and loss with "loss". The user only have to provide the nodelist, others are optional, but once she provide any it has to be provided in the correct format.The command is described by:21 make-deter-lan receives the arguments in any order e.g you could provide delay parameters before loss one, however, nodelist should be the first. Note that bandwidth parameters have to be preceded by "bw", delay with "delay", and loss with "loss". The user only have to provide the nodelist, others are optional, but once she provide any it has to be provided in the correct format.The command is described by: 22 22 {{{ 23 make-new-lan <nodelist> [bw bandwidth ] [delay type mean [standard variation] ] [loss threshold dropmode rate] 23 #make-new-lan <nodelist> [bw bandwidth ] [delay type mean [standard variation] ] [loss threshold dropmode rate] 24 make-deter-lan <nodelist> [bw <bandwidth> ] [delay <type> mean <mean> [std <standard deviation>] ] [loss <dropmode> threshold <threshold> rate <rate>] 25 24 26 }}} 25 27 Examples: 26 28 {{{ 27 29 #Example 1 28 make-new-lan "$nodeA $nodeB " bw 1Gb delay static 100ms loss 0.01 static 1 30 #make-new-lan "$nodeA $nodeB " bw 1Gb delay static 100ms loss 0.01 static 1 31 make-deter-lan "$nodeA $nodeB " bw 1Gb delay static mean 100ms loss static threshold 0.01 rate 1 29 32 #Example 2 30 make-new-lan "$nodeA $nodeB " bw 1Gb delay normal 100ms 5 loss 0.01 poisson 5 33 #make-new-lan "$nodeA $nodeB " bw 1Gb delay normal 100ms 5 loss 0.01 poisson 5 34 make-deter-lan "$nodeA $nodeB " bw 1Gb delay normal mean 100ms std 5 loss poisson threshold 0.01 rate 5 31 35 }}} 32 36 Delay types are : static, normal , poisson and exponential. Note that normal requires standard variation, which is set to zero if not provided.